This application was created during my recent hiring experience. I have a separate repository where I use LangChain to load my resume and a question bank of interview questions which then get fed to a vector database (PineCone). For each request, we do a "similarity" search on the DB, then feed that as context to ChatGPT and answers the question.
This should be pretty close to what I would answer if I had a good vector database inside my head.
First, run the development server:
npm run dev
# or
yarn dev
# or
pnpm dev
Open http://localhost:3000 with your browser to see the result.
You can start editing the page by modifying app/page.tsx
. The page auto-updates as you edit the file.
This project uses next/font
to automatically optimize and load Inter, a custom Google Font.
There is 2 parts to this project
- The loader
- Chat API
The loader (configured in a separate repo) works the following way
sequenceDiagram
Script->>LangChain: Load all documents
LangChain->>LangChain: Read, Split, transform to embeddings
LangChain->>PineCone: Insert new embededdings into DB
PineCone->>Script: Return files in Index
Chat API
sequenceDiagram
API->>PineCone: Find the closest documents related to this question
PineCone->>API: returns K similar documents
API->>ChatGPT: With added context, answer the question
ChatGPT->>API: Return streaming response to client