Files
task-6a1d75c5fd30e81cf3126ae7/README.md
T
2026-06-04 23:22:58 +00:00

52 lines
1.8 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.
# FAQBot 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