Update README.md

This commit is contained in:
2026-06-04 23:22:58 +00:00
parent 4601bddd06
commit 6686337305
+51 -2
View File
@@ -1,3 +1,52 @@
# task-6a1d75c5fd30e81cf3126ae7 # FAQBot ChromaDB + MCP Tool
Повторный экзамен: FAQ-бот — ChromaDB + один MCP-tool ## Overview
This project implements an FAQbot that answers questions about local course notes stored in Markdown files using **ChromaDB** for retrieval and a single **MCPstyle tool** for metadata queries.
- **Local knowledge** 23 `.md` files in `data/`.
- **Vector store** ChromaDB with Ollama embeddings.
- **Tool** `fetch_course_meta` that performs a GET request to a local JSON file (mock MCP server).
- **Agent** LangGraph agent that routes the query to the appropriate source and labels the answer with `source: chroma | mcp_meta`.
- **CLI** 3 example questions (2 for Chroma, 1 for meta) and an interactive mode.
## Setup
```bash
# Pull Ollama model
ollama pull nomic-embed-text
# Install dependencies
pip install -r requirements.txt
# Start local mock MCP server (JSON file)
python -m http.server 8000 --directory mock
```
## Running the Bot
```bash
python main.py --question "What is the course schedule?"
```
## Example Questions
1. **Chroma** *"What topics are covered in week 3?"*
2. **Chroma** *"How many hours per week are required?"*
3. **Meta** *"What is the course schedule?"*
## Project Structure
```
├── data/ # Markdown FAQ files
├── mock/ # JSON mock MCP server
├── src/
│ ├── agent.py # LangGraph agent definition
│ ├── chunker.py # Chroma loader
│ ├── cli.py # CLI interface
│ ├── config.py # Config & constants
│ ├── init_loader.py # Bulk loader
│ ├── qdrant_store.py # Vector store helper
│ ├── rag_tools.py # Search & meta tools
│ ├── tools.py # MCP wrapper
│ └── vector_store.py # Chroma store
└── requirements.txt
```
## License
MIT