Add README
This commit is contained in:
@@ -1,3 +1,48 @@
|
|||||||
# task-6a219d6afd30e81cf3146d6b
|
# FAQ Bot with ChromaDB and MCP-style Tool
|
||||||
|
|
||||||
Solution for FAQ bot with ChromaDB and MCP 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.
|
||||||
|
|||||||
Reference in New Issue
Block a user