45 lines
1.4 KiB
Markdown
45 lines
1.4 KiB
Markdown
# FAQ Bot with ChromaDB
|
||
|
||
This project implements a simple FAQ bot that uses **ChromaDB** as the vector store and **MCP-tool** for generating embeddings. The bot indexes a set of FAQ entries and can answer user questions by retrieving the most relevant entries from the vector store.
|
||
|
||
## Architecture
|
||
|
||
- **ChromaDB** – the sole vector storage stack used for persisting embeddings and performing similarity queries.
|
||
- **MCP-tool** – the only MCP-tool used for generating embeddings from text. No other vector store libraries or MCP-tools are included.
|
||
|
||
## Setup
|
||
|
||
```bash
|
||
# Install dependencies
|
||
npm install
|
||
|
||
# Run the bot
|
||
npm start
|
||
```
|
||
|
||
## How It Works
|
||
|
||
1. **VectorStore**
|
||
- Connects to a local ChromaDB instance.
|
||
- Adds documents with embeddings generated by MCP-tool.
|
||
- Queries the collection for the top‑k most similar documents.
|
||
|
||
2. **Bot**
|
||
- Initializes the vector store.
|
||
- Indexes a predefined list of FAQs.
|
||
- Answers user questions by querying the vector store and returning the top results.
|
||
|
||
## Example
|
||
|
||
Running the bot will output:
|
||
|
||
```
|
||
Answer:
|
||
What is ChromaDB?
|
||
ChromaDB is a vector database designed for storing and querying embeddings efficiently.
|
||
---
|
||
How do I use MCP-tool?
|
||
MCP-tool is a utility that generates embeddings from text using a chosen model.
|
||
```
|
||
|
||
Feel free to extend the FAQ list or integrate the bot into a larger application. |