https://github.com/rasmussvala/local-rag-agent
A local Retrieval-Augmented Generation (RAG) agent using the QWEN2-1.5B-Instruct model.
https://github.com/rasmussvala/local-rag-agent
llm python qwen2 retrieval-augmented-generation
Last synced: about 2 months ago
JSON representation
A local Retrieval-Augmented Generation (RAG) agent using the QWEN2-1.5B-Instruct model.
- Host: GitHub
- URL: https://github.com/rasmussvala/local-rag-agent
- Owner: rasmussvala
- Created: 2024-08-23T20:02:33.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2024-10-07T18:00:07.000Z (12 months ago)
- Last Synced: 2025-03-28T19:39:53.160Z (6 months ago)
- Topics: llm, python, qwen2, retrieval-augmented-generation
- Language: Python
- Homepage:
- Size: 24.4 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Local RAG Agent
A local RAG agent you can add documents to and ask questions about. Still a work in progress.
## Installation
1. Clone repo with LLM: `git clone --recurse-submodules https://github.com/rasmussvala/Local-RAG-Agent.git`
2. Create virtual environment: `py -m venv .venv`
3. Activate virtual environment (Windows): `.\.venv\Scripts\activate`
4. Install requirements:
- Without CUDA: `pip install -r .\requirements.txt`
- With CUDA: `pip install -r .\requirements_cuda.txt`## Usage
### Adding documents
To add documents to the chatbot you need to do the following:
1. Replace example documents in the **documents** folder (right now .txt is only supported).
2. Run the **proccess documents** script to embed documents so chatbot can find them.```
py .\proccess_documents.py
```### Chatting
To chat with the chatbot you run the script
```
py .\main.py
```The chatbot as of now only finds relevant documents in the first query. If you want the chatbot to find new documents you new to start a new session.
## Future improvements
- Create a command "restart" to restart chat
- GUI