Files
povtornyy-ekzamen-faq-bot-c…/README.md
T

46 lines
1.1 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# 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
```bash
# 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
```bash
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
```bash
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