Skip to content

Instantly share code, notes, and snippets.

View vivek12345's full-sized avatar

Vivek Nayyar vivek12345

View GitHub Profile
// Get the pdf loader from langchain
import { PDFLoader } from "langchain/document_loaders/fs/pdf";
// import the RecursiveCharacterTextSplitter from langchain
import { RecursiveCharacterTextSplitter } from "langchain/text_splitter";
// We will use open ai embeddings from langchain and import it
import { OpenAIEmbeddings } from "langchain/embeddings/openai";
// Use HNSWLib as our vector db
import { HNSWLib } from "langchain/vectorstores/hnswlib";
// import the chain for connecting llm with vectore store
import { RetrievalQAChain } from "langchain/chains";
@vivek12345
vivek12345 / q&a.ts
Last active October 18, 2023 16:42
// import the chain for connecting llm with vectore store
import { RetrievalQAChain } from "langchain/chains";
// import the open ai function to load our LLM model
import { OpenAI } from "langchain/llms/openai";
// Create vector store retriever
const vectorStoreRetriever = vectorStore.asRetriever();
// init the LLM model
// We will use open ai embeddings from langchain and import it
import { OpenAIEmbeddings } from "langchain/embeddings/openai";
// Use HNSWLib as our vector db
import { HNSWLib } from "langchain/vectorstores/hnswlib";
// Init open ai embeddings
const embeddings = new OpenAIEmbeddings();
// Finally store our splitted chunks with open ai embeddings
// import the RecursiveCharacterTextSplitter from langchain
import { RecursiveCharacterTextSplitter } from "langchain/text_splitter";
// Initialize it with chunksize and chunkOverlap
const splitter = new RecursiveCharacterTextSplitter({
chunkSize: 1000,
chunkOverlap: 20,
});
// created chunks from pdf
// Get the pdf loader from langchain
import { PDFLoader } from "langchain/document_loaders/fs/pdf";
// Initialize it with the path to the pdf file
const loader = new PDFLoader("src/documents/budget_speech.pdf");
// Load into docs variable
const docs = await loader.load();
Objective Weightage
Project Delivery 60%
Engineering Process 20%
System Stability 10%
Sharing and Collaboration 10%
Bucket Outcome Steps
Learning/Performance Single ownership of a project - Be a PIC for a large project
- Setup alerts and monitors on datadog
- Setup zenduty for oncall and support team on oncall
Initiative Goals Knowledge Sharing and Visibility - Share a project or work in tech sharing session
- Write a blog for our engineering blog
Personal Goals Know team members from different teams - Have a coffee with one member of non tech team
Bucket Outcome Steps
Learning/Performance Having better understand of codebase - Complete at least one medium-sized task.
- Be comfortable navigating all parts of the codebase
- Be release manager for one sprint
Initiative Goals Improve code quality and process - Build a useful utility for the team
- Improve test coverage
- Ask questions in product and tech grooming
Personal Goals Know cross team members - Have a coffee with one member of another tech team
Bucket Outcome Steps
Learning/Performance Understand how the team works and responsibilities of different stakeholders. - Understand the team’s processes (meetings, git workflow, code review, testing, deployment, etc.)
- Understand who to talk to for different question domains (tech, process, HR, culture, etc.)
- Understand the organization hierarchy and all departments in the company
- Setup dev environment locally
- Understand your manager’s/lead’s expectations of you in this role.
- Buy one policy on Qoala App to understand the end to end flow
- Pick up one small task every week starting week 2.
Initiative Goals Being involved in discussions - Make a documentation contribution.
- Ask atleast one question in team meetings
Personal Goals Knowing your team better - Come to office every day for the initial week to know the team. - Have a coffee with one team member - Schedule 1:1 with yo
on("before:browser:launch", (browser = {}, launchOptions) => {
const downloadDirectory = path.join(__dirname, "..", "excelDownloads");
if (browser.family === "chromium") {
launchOptions.preferences.default["download"] = {
default_directory: downloadDirectory
};
}
return launchOptions;
});