Files
task-6a1864f78a94f887e50d46da/README.md
T
2026-05-28 16:59:38 +00:00

904 B
Raw Blame History

RAGAgent with ChromaDB and Tavily

What is it?

A small demo of a LangChain agent that can answer questions using either a local knowledge base stored in ChromaDB or live web search via Tavily. The agent automatically chooses the source based on the query and returns the answer together with a source label.

Prerequisites

  • Python3.10+
  • Ollama (downloaded models below)
ollama pull llama3
ollama pull nomic-embed-text

Installation

pip install -r requirements.txt

Create a .env file in the project root with your Tavily API key:

TAVILY_API_KEY=your_key_here

Data

Place any .txt or .md files you want to index into the documents/ folder.

Usage

python main.py

You will see a prompt. Type your question and press Enter. Type exit to quit.

The output shows the answer and the source (chromadb or tavily).