easy-local-rag  by AllAboutAI-YT

Local RAG implementation using Ollama

created 1 year ago
1,122 stars

Top 34.8% on sourcepulse

GitHubView on GitHub
Project Summary

This project provides a simplified, local implementation of Retrieval-Augmented Generation (RAG) using Ollama for LLM inference and local data sources. It targets users who want to build AI applications with private data without relying on cloud services, offering a straightforward setup for querying documents and emails.

How It Works

The system leverages Ollama to run LLMs and embedding models locally. It supports RAG on uploaded documents (PDF, TXT, JSON) via upload.py and email data via collect_emails.py. The core retrieval logic is handled by localrag.py and emailrag2.py, which can optionally rewrite user queries for improved retrieval accuracy.

Quick Start & Requirements

  • Install dependencies: pip install -r requirements.txt
  • Install Ollama: https://ollama.com/download
  • Pull models: ollama pull llama3 (or other models), ollama pull mxbai-embed-large
  • Run: python upload.py, python localrag.py, python collect_emails.py, python emailrag2.py
  • Email RAG requires email credentials configured in a .env file.

Highlighted Details

  • Supports local LLM inference via Ollama.
  • Enables RAG on local documents and personal emails.
  • Includes a query rewriting feature for enhanced retrieval.
  • Allows model selection via CLI argument (e.g., python localrag.py --model mistral).

Maintenance & Community

The project is associated with the AllAboutAI YouTube channel. Links to tutorials are provided.

Licensing & Compatibility

The repository does not explicitly state a license. Compatibility for commercial or closed-source use is not specified.

Limitations & Caveats

The project is presented as "SuperEasy" and "100% Local," but the lack of explicit licensing and detailed compatibility information may pose adoption challenges for commercial or closed-source applications. The email RAG feature requires specific setup for Gmail app passwords.

Health Check
Last commit

1 year ago

Responsiveness

1 day

Pull Requests (30d)
0
Issues (30d)
0
Star History
89 stars in the last 90 days

Explore Similar Projects

Starred by Chip Huyen Chip Huyen(Author of AI Engineering, Designing Machine Learning Systems), Simon Willison Simon Willison(Author of Django), and
1 more.

Lumos by andrewnguonly

0.1%
2k
Chrome extension for local LLM web RAG co-piloting
created 1 year ago
updated 6 months ago
Feedback? Help us improve.