From 0231c1f318a72802d6b019c29bb1caf7244fdf50 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=AD=D0=BC=D0=B8=D0=BB=D1=8C=20=D0=90=D0=BC=D0=B8=D1=80?= =?UTF-8?q?=D0=BE=D0=B2?= Date: Fri, 5 Jun 2026 11:24:08 +0000 Subject: [PATCH] add README.md --- README.md | 38 +++++++++++++++++++------------------- 1 file changed, 19 insertions(+), 19 deletions(-) diff --git a/README.md b/README.md index e18df7f..3a732bb 100644 --- a/README.md +++ b/README.md @@ -1,15 +1,16 @@ -# FAQ Bot – ChromaDB + MCP Tool +# FAQ Bot – ChromaDB + MCP‑tool -## Overview +## What it does -This repository contains a simple FAQ bot that answers questions about course materials using a local Chroma vector store and, when needed, calls a mock MCP‑style tool that returns course metadata. - -The bot is built with **LangGraph** and **LangChain** and uses **Ollama** embeddings (`nomic-embed-text`). +* Loads a small set of markdown FAQ files into a local Chroma vector store. +* Provides a single MCP‑style tool `fetch_course_meta` that returns course metadata from a static JSON file. +* Uses a LangGraph React agent that routes a user question either to the vector store (Chroma) or to the MCP tool based on simple keyword detection. +* Interactive CLI with three example questions and a free‑form mode. ## Prerequisites -* Python 3.10+ -* Ollama server running locally with the `nomic-embed-text` model: +* Python 3.10+ +* Ollama running locally with the `nomic-embed-text` model: ```bash ollama pull nomic-embed-text ``` @@ -20,22 +21,21 @@ The bot is built with **LangGraph** and **LangChain** and uses **Ollama** embedd pip install -r requirements.txt ``` -## Running the Bot +## Running the bot ```bash python main.py ``` -You will be prompted to enter a question. The bot will decide whether to answer from the FAQ documents (Chroma) or to call the mock MCP tool. +The script will: +1. Load `data/*.md` into Chroma. +2. Build the agent. +3. Run three sample questions. +4. Enter an interactive prompt. -## FAQ Files +## Files -The `data/` directory contains three example Markdown files that are loaded into the vector store. - -## MCP‑style Tool - -The tool `fetch_course_meta` simulates an external MCP call by reading a local `course_meta.json` file. In a real deployment this would be an HTTP request to an MCP server. - -## License - -MIT +* `main.py` – entry point. +* `data/*.md` – FAQ documents. +* `mock_meta.json` – static metadata used by the MCP tool. +* `requirements.txt` – dependencies.