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.
|
||||
* Add new documents to the knowledge base.
|
||||
* Recursive text splitting for chunking.
|
||||
* Interactive CLI to query the agent.
|
||||
1. Добавлять документы в векторную базу.
|
||||
2. Выполнять семантический поиск по базе.
|
||||
3. Собирать ответы из найденных документов.
|
||||
|
||||
## Setup
|
||||
## Стек
|
||||
|
||||
* Python 3.10+
|
||||
* Qdrant – векторная база данных
|
||||
* Ollama – локальные LLM и эмбеддинги (`llama3`, `nomic-embed-text`)
|
||||
* LangChain 1.x – фреймворк для агентов и RAG
|
||||
|
||||
## Установка
|
||||
|
||||
```bash
|
||||
# Pull required models
|
||||
# Ollama
|
||||
ollama pull llama3
|
||||
ollama pull nomic-embed-text
|
||||
|
||||
# Install Python dependencies
|
||||
# Python пакеты
|
||||
pip install -r requirements.txt
|
||||
```
|
||||
|
||||
## Usage
|
||||
## Запуск
|
||||
|
||||
```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
|
||||
|
||||
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.
|
||||
```
|
||||
├── agent.py # основной скрипт агента
|
||||
├── qdrant_store.py # обёртка над QdrantVectorStore
|
||||
├── chunker.py # разбиение документов на чанки
|
||||
├── tools.py # инструменты для агента
|
||||
├── requirements.txt
|
||||
└── README.md
|
||||
```
|
||||
|
||||
Reference in New Issue
Block a user