This commit is contained in:
@@ -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-памятью
|
||||
5Д
|
||||
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)
|
||||
Прикреплённые файлы
|
||||
Загрузить файл
|
||||
Отправить
|
||||
Reference in New Issue
Block a user