A Retrieval-Augmented Generation project built with LangChain, LangGraph, and FAISS. The goal is to load documents from a local folder, embed them into a vector store, and answer questions about them by retrieving relevant chunks and passing them to an LLM.
This is a work-in-progress — most of the experimentation lives in the notebook/ folder, and the src/ modules wire those experiments into a reusable pipeline.
- Loads PDF and text documents from a
data/directory - Chunks and embeds them using HuggingFace sentence-transformer models
- Stores the embeddings in a FAISS index (Chroma is also available as an option)
- Runs similarity search against a user query and feeds the top results to an LLM (Groq or OpenAI) to produce a grounded answer
- Uses LangGraph for the agent flow
Agentic-RAG/
├── data/ # source documents (PDFs, etc.)
├── notebook/ # exploratory Jupyter notebooks
├── src/ # core modules
│ ├── data_loader.py # loads documents from data/
│ ├── vectorstore.py # FAISS store: build, save, load, query
│ └── search.py # RAGSearch: retrieve + summarize
├── app.py # entry point that wires the pieces together
├── main.py # placeholder script
├── pyproject.toml # dependencies (managed with uv)
└── requirment.txt # pip-style requirements
- Python 3.13
- LangChain (
langchain,langchain-core,langchain-community,langchain-text-splitters) - LangGraph for agent orchestration
- FAISS (
faiss-cpu) for the vector store, with ChromaDB as an alternative - HuggingFace sentence-transformers via
langchain-huggingfacefor embeddings - LLM providers:
langchain-groqandlangchain-openai - PDF parsing:
pymupdfandpypdf - uv for dependency management
git clone https://github.com/BharathiDonku7/Agentic-RAG.git
cd Agentic-RAGIf you have uv installed:
uv syncOr with pip:
pip install -r requirment.txtCreate a .env file in the project root with your API keys:
OPENAI_API_KEY=your_key_here
GROQ_API_KEY=your_key_here
Drop PDFs or text files into the data/ folder.
python app.pyRight now app.py just loads and prints the documents. The vector store and RAG search lines are commented out — uncomment them once you've added documents and set your keys.
from src.data_loader import load_all_documents
from src.vectorstore import FaissVectorStore
from src.search import RAGSearch
# Load and index documents
docs = load_all_documents("data")
store = FaissVectorStore("faiss_store")
store.build_from_documents(docs)
# Query
rag_search = RAGSearch()
summary = rag_search.search_and_summarize("What is attention mechanism?", top_k=3)
print(summary)- The
notebook/folder has the original exploration work and is useful for understanding how each piece was put together. - The FAISS index is saved to disk after the first build, so subsequent runs can just
load()it instead of rebuilding.
- Add a CLI or simple web interface
- Plug in a LangGraph agent that decides when to retrieve vs. answer directly
- Add evaluation on a small QA set
- Document chunking strategy comparison (recursive vs. semantic)
Built by Bharathi Donku.