Files
task-6a1864f78a94f887e50d46da/README.md
T
2026-06-04 09:12:27 +00:00

29 lines
1006 B
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.
# RAG Agent with ChromaDB and Tavily
This repository contains a simple RAG agent that uses **ChromaDB** as a local vector store and **Tavily** for web search. The agent automatically selects the appropriate source (local knowledge base or the web) based on the query.
## Structure
- `vectorstore.py` utilities for creating and loading the vector store.
- `tools.py` LangChain tools for local and web search.
- `agent.py` agent definition with routing logic.
- `main.py` interactive CLI.
- `init_db.py` helper script to load documents from `documents/` into the vector store.
- `requirements.txt` dependencies.
- `documents/` folder with sample `.txt`/`.md` files.
## Usage
```bash
# Install dependencies
pip install -r requirements.txt
# Load documents into the vector store
python init_db.py
# Run the chat interface
python main.py
```
## Environment
- `TAVILY_API_KEY` required for web search.
- `OLLAMA_BASE_URL` optional, defaults to `http://localhost:11434`.