2026-06-04 23:23:44 +00:00
2026-06-04 23:23:21 +00:00
2026-06-04 23:23:27 +00:00
2026-06-04 23:23:44 +00:00
2026-06-04 23:22:58 +00:00
2026-06-04 23:23:04 +00:00

FAQ‑Bot – ChromaDB + MCP Tool

Overview

This project implements an FAQ‑bot that answers questions about local course notes stored in Markdown files using ChromaDB for retrieval and a single MCP‑style tool for metadata queries.

  • Local knowledge – 2–3 .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

# 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

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

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