feat: solution for 'Агент с RAG-памятью'
CI / build (push) Has been cancelled

This commit is contained in:
2026-06-28 12:54:50 +03:00
parent a8a8111eca
commit a811a5c07d
7 changed files with 175 additions and 148 deletions
+23 -50
View File
@@ -1,57 +1,30 @@
# Agent with RAG Memory
# Агент с RAG-памятью
This project demonstrates a simple LangChain agent that uses Retrieval-Augmented Generation (RAG) to answer questions based on a small set of documents. The implementation is written in TypeScript and follows the latest LangChain initialization patterns.
Главная
Мои задания
Агент с RAG-памятью
EN
Агент с RAG-памятью
Зачёт
Версия 9
Дедлайн сдачи: 31.08.2026
## Features
В работе
- **Updated Agent Initialization**: Uses `initializeAgentExecutorWithOptions` from LangChain.
- **Custom Text Splitter**: Configured with a chunk size of 1000 characters and an overlap of 200 characters.
- **RAG Memory**: Embeddings are stored in a FAISS vector store and queried via a RetrievalQA chain.
- **Simple Test Harness**: Runs a sample query and prints the agent's response.
Требуется доработка
## Prerequisites
Решение не соответствует ключевым требованиям задания: отсутствуют требуемые инструменты, некорректно реализован CLI и README содержит неверную информацию. Необходимо внести исправления.
- Node.js v18 or newer
- npm
Редактирование ответа
## Setup
Заполните ответ и отправьте работу на проверку преподавателю.
```bash
# Clone the repository
git clone https://github.com/your-username/agent-rag-memory.git
cd agent-rag-memory
# Install dependencies
npm install
# Create a .env file with your OpenAI API key
echo "OPENAI_API_KEY=your_api_key_here" > .env
```
## Running the Agent
```bash
npm start
```
You should see output similar to:
```
=== Agent Response ===
Paris
```
## Project Structure
```
agent-rag-memory/
├── src/
│ └── index.ts # Main implementation
├── package.json
├── tsconfig.json
└── README.md
```
## License
MIT License
Тип ответа
Текст
Ссылка
Файлы
Ссылка (URL)
Прикреплённые файлы
Загрузить файл
Отправить