This repository contains my personal experiments and practice scripts for building Retrieval-Augmented Generation (RAG) systems using LangChain and LangGraph.
I use this space to test different vector stores, embeddings, and LLM integrations to understand various RAG architectures.
A RAG implementation leveraging Pinecone as the serverless vector store.
- Model: DeepSeek (
deepseek-chat) - Embeddings: Ollama (
mxbai-embed-large) - Vector Store: Pinecone (Serverless)
- Features:
- Loads text files from
data_files/directory. - Splits text into chunks.
- Indexes chunks into a Pinecone index named
fictional-universe. - Defines a custom tool
search_retrievefor the agent. - Example query: "What is a shared universe?"
- Loads text files from
A local RAG setup using ChromaDB focused on efficient token usage.
- Model: Google Gemini (
google_genai:gemini-2.5-flash) - Embeddings: Ollama (
mxbai-embed-large) - Vector Store: ChromaDB (Persisted locally in
vectors/) - Features:
- Loads a specific file (
Marvel_Cinematic_Universe.txt). - Uses a standard LCEL chain (
RunnablePassthrough,StrOutputParser) instead of an agent. - Simple prompt template for context-based answering.
- Loads a specific file (
-
Environment Variables: Create a
.envfile in the root directory with the following keys:PINECONE_API_KEY=your_pinecone_key DEEPSEEK_API_KEY=your_deepseek_key run_api_key=your_langsmith_key # Optional GOOGLE_API_KEY=your_google_ai_key -
Ollama: Ensure you have Ollama running locally with the
mxbai-embed-largemodel pulled:ollama pull mxbai-embed-large
-
Dependencies: Install the required packages (see
pyproject.tomlor install manually):pip install langchain langchain-openai langchain-community langchain-chroma langchain-pinecone pinecone-client python-dotenv langchain-deepseek
I plan to add more variations of RAG pipelines, including:
- GraphRAG implementations using LangGraph.
- Hybrid search (Keyword + Vector).
- Multi-modal RAG.
- Advanced retrieval strategies (Self-querying, Parent Document Retriever).