1.1 KiB
1.1 KiB
FAQ Bot – ChromaDB + LangChain
This project implements a simple FAQ bot that answers user questions based on a predefined FAQ dataset.
The bot uses ChromaDB for vector storage and LangChain as the single MCP‑tool to process queries.
Features
- Persistent vector store (ChromaDB) – data is saved to disk and reused across runs.
- Retrieval‑based QA using LangChain’s
RetrievalQAchain. - Simple command‑line interface.
- Unit tests covering vector store creation, bot answering, and unknown‑question handling.
Setup
# Create a virtual environment (optional but recommended)
python -m venv .venv
source .venv/bin/activate # On Windows use `.venv\Scripts\activate`
# Install dependencies
pip install -r requirements.txt
Usage
python src/main.py
You will be prompted to type a question. The bot will reply with the best answer from the FAQ dataset.
Running Tests
pytest
All tests should pass.
FAQ Dataset
The dataset is embedded in the code (3 entries). Feel free to extend it in src/vector_store.py.
License
MIT License