Skip to content

Commit c4e211a

Browse files
committed
initial
0 parents  commit c4e211a

File tree

7 files changed

+8162
-0
lines changed

7 files changed

+8162
-0
lines changed

README.md

+74
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
<div align="center">
2+
<img src="img/logo.png" alt="Micro RAG Logo" width="150"/>
3+
</div>
4+
5+
# Micro RAG
6+
7+
A minimalist command-line tool for Retrieval-Augmented Generation (RAG) chat with your documents using local LLMs via Ollama.
8+
9+
## Features
10+
11+
- Chat with your documents using RAG technology
12+
- Uses local LLMs via Ollama
13+
- Simple and intuitive command-line interface
14+
- Supports various document formats
15+
- Streaming responses with source citations
16+
17+
## Installation
18+
19+
```bash
20+
# Clone this repository
21+
git clone https://github.com/yourusername/minimal-rag.git
22+
cd minimal-rag
23+
24+
# Install dependencies
25+
pip install -r requirements.txt
26+
27+
# Make the script executable
28+
chmod +x minimal-rag.py
29+
```
30+
31+
## Usage
32+
33+
Basic usage:
34+
35+
```bash
36+
python minimal-rag.py /path/to/documents
37+
```
38+
39+
With custom models:
40+
41+
```bash
42+
python minimal-rag.py /path/to/documents --chat-model "llama3:latest" --embed-model "nomic-embed-text"
43+
```
44+
45+
Full options:
46+
47+
```bash
48+
python minimal-rag.py --help
49+
```
50+
51+
### Command-line Arguments
52+
53+
- `documents_dir`: Directory containing the documents to chat with (required)
54+
- `--chat-model`: Ollama chat model to use (default: "orca-mini:13b")
55+
- `--embed-model`: Ollama embedding model to use (default: "nomic-embed-text")
56+
- `--ollama-host`: Ollama host URL (default: http://localhost:11434 or OLLAMA_HOST env variable)
57+
- `--chunk-size`: Size of document chunks (default: 512)
58+
- `--chunk-overlap`: Overlap between document chunks (default: 50)
59+
60+
## Requirements
61+
62+
- Python 3.8+
63+
- Ollama running locally or remotely
64+
- Available models in Ollama for chat and embeddings
65+
66+
## Notes
67+
68+
- The first run will download the models if they aren't already available in Ollama
69+
- Type 'exit' or 'quit' to end the chat session
70+
- Press Ctrl+C to interrupt the chat
71+
72+
## License
73+
74+
MIT

data/wikipedia-ai/wikipedia-ai.md

+3,464
Large diffs are not rendered by default.

data/wikipedia-ai/wikipedia-deeplearning.md

+2,279
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)