Files
task_6a1d75c5fd30e81cf3126a…/README.md
T
2026-06-04 16:29:59 +00:00

52 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 Chroma and MCP Tool
## Overview
This project implements a FAQ bot that can answer questions from a local set of FAQ markdown files and from an external course metadata service via an MCPstyle HTTP tool.
- **Local data** loaded from `data/` and persisted in a Chroma vector store.
- **MCP tool** HTTP GET request to `https://api.example.com/course_meta`.
- **LLM** Ollamas `llama3` model with `nomic-embed-text` embeddings.
- **CLI** preset questions and interactive mode.
## Setup
### 1. Clone the repo
```bash
git clone <repo-url>
cd <repo-dir>
```
### 2. Create a virtual environment
```bash
python -m venv .venv
source .venv/bin/activate # On Windows: .venv\Scripts\activate
```
### 3. Install dependencies
```bash
pip install -r requirements.txt
```
### 4. Download the Ollama model
```bash
ollama pull nomic-embed-text
```
### 5. Set environment variables
Create a `.env` file in the project root:
```
OLLAMA_BASE_URL=http://localhost:11434/v1
```
(If you run Ollama on a different host/port, adjust accordingly.)
## Running the Bot
```bash
python agent.py
```
You will see preset questions. Select a number or type a custom question.
## Data Folder
Place your FAQ markdown files in the `data/` directory. The bot will automatically load them on first run and persist the vector store in `chromadb/`.
## Dependencies
See `requirements.txt` for exact versions.