Update README.md
This commit is contained in:
@@ -1,42 +1,44 @@
|
|||||||
# RAG Agent with Qdrant and Ollama
|
# Агент с RAG‑памятью
|
||||||
|
|
||||||
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
|
Простой пример AI‑агента, использующего локальный RAG‑хранилище на базе **Qdrant** и **Ollama**. Агент умеет:
|
||||||
|
|
||||||
* Semantic search in a local vector database.
|
1. Добавлять документы в векторную базу.
|
||||||
* Add new documents to the knowledge base.
|
2. Выполнять семантический поиск по базе.
|
||||||
* Recursive text splitting for chunking.
|
3. Собирать ответы из найденных документов.
|
||||||
* Interactive CLI to query the agent.
|
|
||||||
|
|
||||||
## Setup
|
## Стек
|
||||||
|
|
||||||
|
* Python 3.10+
|
||||||
|
* Qdrant – векторная база данных
|
||||||
|
* Ollama – локальные LLM и эмбеддинги (`llama3`, `nomic-embed-text`)
|
||||||
|
* LangChain 1.x – фреймворк для агентов и RAG
|
||||||
|
|
||||||
|
## Установка
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
# Pull required models
|
# Ollama
|
||||||
ollama pull llama3
|
ollama pull llama3
|
||||||
ollama pull nomic-embed-text
|
ollama pull nomic-embed-text
|
||||||
|
|
||||||
# Install Python dependencies
|
# Python пакеты
|
||||||
pip install -r requirements.txt
|
pip install -r requirements.txt
|
||||||
```
|
```
|
||||||
|
|
||||||
## Usage
|
## Запуск
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
# Load documents from the knowledge folder (default: ./knowledge)
|
python agent.py "Какой последний прогресс в области ИИ?"
|
||||||
python agent.py
|
|
||||||
```
|
```
|
||||||
|
|
||||||
You can type any question. The agent will automatically search the knowledge base and answer.
|
## Структура проекта
|
||||||
|
|
||||||
## Adding Documents
|
```
|
||||||
|
├── agent.py # основной скрипт агента
|
||||||
Place any `.txt` files in the `knowledge` directory before running the agent, or use the `add_to_knowledge_base` tool via the agent.
|
├── qdrant_store.py # обёртка над QdrantVectorStore
|
||||||
|
├── chunker.py # разбиение документов на чанки
|
||||||
## Project Structure
|
├── tools.py # инструменты для агента
|
||||||
|
├── requirements.txt
|
||||||
- `agent.py` – Main entry point.
|
└── README.md
|
||||||
- `qdrant_store.py` – Wrapper around Qdrant for adding/searching.
|
```
|
||||||
- `rag_tools.py` – LangChain tools for the agent.
|
|
||||||
- `requirements.txt` – Python dependencies.
|
|
||||||
- `README.md` – Documentation.
|
|
||||||
|
|||||||
Reference in New Issue
Block a user