43 lines
1.1 KiB
Markdown
43 lines
1.1 KiB
Markdown
# RAG Agent with Qdrant and Ollama
|
||
|
||
This repository contains a simple RAG (Retrieval‑Augmented Generation) agent built with **LangChain**, **Qdrant** as the vector store, and **Ollama** for embeddings and LLMs.
|
||
|
||
## Features
|
||
|
||
* Semantic search in a local vector database.
|
||
* Add new documents to the knowledge base.
|
||
* Recursive text splitting for chunking.
|
||
* Interactive CLI to query the agent.
|
||
|
||
## Setup
|
||
|
||
```bash
|
||
# Pull required models
|
||
ollama pull llama3
|
||
ollama pull nomic-embed-text
|
||
|
||
# Install Python dependencies
|
||
pip install -r requirements.txt
|
||
```
|
||
|
||
## Usage
|
||
|
||
```bash
|
||
# Load documents from the knowledge folder (default: ./knowledge)
|
||
python agent.py
|
||
```
|
||
|
||
You can type any question. The agent will automatically search the knowledge base and answer.
|
||
|
||
## Adding Documents
|
||
|
||
Place any `.txt` files in the `knowledge` directory before running the agent, or use the `add_to_knowledge_base` tool via the agent.
|
||
|
||
## Project Structure
|
||
|
||
- `agent.py` – Main entry point.
|
||
- `qdrant_store.py` – Wrapper around Qdrant for adding/searching.
|
||
- `rag_tools.py` – LangChain tools for the agent.
|
||
- `requirements.txt` – Python dependencies.
|
||
- `README.md` – Documentation.
|