A conversational AI system built with LangGraph that enables natural language question answering over custom documents using retrieval-augmented generation.
The system is structured as a stateful LangGraph graph with discrete, single-responsibility nodes:
| File | Responsibility |
|---|---|
ingest.py |
Loads documents, generates embeddings, indexes into Chroma |
state.py |
Defines shared graph state passed between nodes |
nodes.py |
Retrieval node (semantic search) and generation node (LLM response) |
graph.py |
Assembles the LangGraph graph with node connections and routing |
main.py |
Entry point, runs the conversational loop |
- LangGraph over a simple chain — enables stateful conversation memory and conditional routing between retrieval and direct generation
- Chroma as local vector store — fast embedding-based retrieval with no external dependencies
- Single-responsibility nodes — each node can be tested and replaced independently without touching the rest of the graph
pip install -r requirements.txtCopy .env.example to .env and add your GROQ API key.
Place your documents in the docs/ folder, then:
python ingest.py # index documents into Chroma
python main.py # start the chatingest.pyloads documents fromdocs/, splits them into chunks, generates embeddings, and stores them in a local Chroma vector database- At query time, the retrieval node performs semantic search over the vector store to find relevant chunks
- Retrieved chunks are injected as context into the LLM prompt
- The generation node produces a grounded response using the retrieved context
- Conversation history is maintained in the graph state across turns
- Python 3.10+
- GROQ API key