A Retrieval-Augmented Generation (RAG) system that allows querying documents intelligently using LangChain, Google Gemini API, and Pinecone Vector Database.
-
Backend: Node.js
-
AI Model: Google Gemini (
@google/generative-ai) -
Vector Database: Pinecone
-
Framework: LangChain.js
-
File Parsing:
pdf-parse -
Embedding Store: LangChainβs
PineconeStore
Create .env:
GEMINI_API_KEY=your_gemini_api_key
PINECONE_API_KEY=your_pinecone_api_key
PINECONE_INDEX_NAME=your_index_name
PINECONE_ENVIRONMENT=your_pinecone_environment
RAG/
βββ Prepare.js # Creates embeddings from documents & stores them in Pinecone
βββ chat.js # Handles user queries using Gemini + vector retrieval
βββ node_modules/ # Node.js dependencies
βββ package.json # Project metadata & dependencies
βββ .env # API keys & environment variables
βββ README.md # Project documentation