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 MCPtool to process queries.

Features

  • Persistent vector store (ChromaDB) data is saved to disk and reused across runs.
  • Retrievalbased QA using LangChains RetrievalQA chain.
  • Simple commandline interface.
  • Unit tests covering vector store creation, bot answering, and unknownquestion 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

S
Description
BroJS: Повторный экзамен: FAQ-бот — ChromaDB + один MCP-tool
Readme 142 KiB
Languages
Python 100%