Files
task-6a219d6afd30e81cf3146d6b/README.md
T
2026-06-05 14:22:10 +00:00

49 lines
1.4 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 with ChromaDB and MCP-style Tool
## Overview
This repository implements a FAQ bot that answers questions about course materials using a local **ChromaDB** vector store and, when needed, a single **MCP-style tool** that fetches course metadata.
## Features
* **ChromaDB** for semantic search over lecture markdown files.
* **MCP-style tool** (`fetch_course_meta`) that simulates an external MCP service.
* **LangGraph**based agent that routes queries to the appropriate tool and prefixes the answer with the source.
* CLI with preset questions and an interactive mode.
## Setup
```bash
# Pull embeddings model
ollama pull nomic-embed-text
# Install dependencies
pip install -r requirements.txt
# Run a simple HTTP server to serve meta.json (for the MCP tool)
# In a separate terminal:
# python -m http.server 8000
```
## Running the Bot
```bash
python main.py
```
The script will load the FAQ data, build the ChromaDB index, and then run the demo questions followed by an interactive prompt.
## Project Structure
```
├── data/ # Markdown files with lecture notes
├── main.py # Entry point
├── requirements.txt
└── README.md
```
## Notes
* The MCP tool currently points to `http://localhost:8000/meta.json`. Replace with your actual endpoint if needed.
* The agent uses `ChatOpenAI` via OpenRouter; set `OPENAI_API_KEY` in your environment.