A lightweight RAG exploration tool.
Project description
LightRAG Exploration
LightRAG Exploration is a Python FastAPI application for exploring Retrieval-Augmented Generation (RAG) workflows. It provides a modern web interface for chat, graph visualization, and RAG experimentation using local LLMs via Ollama. The app is designed for easy local use and sharing as a pipx CLI tool.
Features
- RAG Chat: Interact with a RAG pipeline using your own documents and local LLMs.
- Classic Chat: Simple chat interface with model selection and context summarization.
- Graph Viewer: Visualize the entity/relation graph extracted from your research data.
- Modern Web UI: Clean, responsive interface built with Tailwind CSS.
- Easy Setup: Installable as a pipx CLI for global use.
- Ollama Integration: Uses Ollama for local LLM inference and embeddings.
- Configurable: Uses
.envfor research output directory and Ollama host.
Prerequisites
- Python 3.9+
- pipx
- Ollama installed and running with required models (e.g.
gemma3:1b,nomic-embed-text:latest)
Install system dependencies (macOS example)
brew install pipx
pipx ensurepath
source ~/.zshrc # or restart your terminal
Install with pipx
pipx install lightrag-exploration
Usage
- The API will run on http://localhost:8080 by default.
- Open your browser and navigate to:
/frontend— Home page/frontend/chat— Classic chat interface/frontend/rag-chat— RAG chat interface/frontend/graph-viewer— Graph visualization/docs— FastAPI API docs
How It Works
- RAG Pipeline: Uses LightRAG and Ollama for retrieval, embedding, and LLM completion.
- Templates: Web UI is served from the
templates/directory. - Config: Set
research_output_dirandollama_hostin.envor.env.example.
Development
- All source code is in the root and
routers/directory. - The entrypoint is
main.py, which runs the FastAPI app. - You can run locally with:
python main.py - Or install and run globally with pipx as above.
Packaging & Distribution
To build and publish to PyPI:
- Upgrade build and twine:
python -m pip install --upgrade build twine
- Build your package:
python -m build
- (Optional) Check your package:
python -m twine check dist/*
- Upload to PyPI:
python -m twine upload dist/*
Troubleshooting
- If you see errors about missing templates, ensure you installed with pipx after running
pipx ensurepathand that your terminal session is up to date. - Make sure Ollama is running and the required models are pulled.
- If you see errors about missing research output, check your
.envand that the directory exists.
License
MIT
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file lightrag_exploration-0.1.0.tar.gz.
File metadata
- Download URL: lightrag_exploration-0.1.0.tar.gz
- Upload date:
- Size: 11.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e578320047d1f46dc8ac8a0a3800ec089051b8b469f07fe49e7f336887ce68fd
|
|
| MD5 |
efff4c8c3457073a97920fcf10e4d5a2
|
|
| BLAKE2b-256 |
d105ca89a1bf0ce35d86cb7d0bcc0ceaab518a508f1b10fb1b6f2c09747519b9
|
File details
Details for the file lightrag_exploration-0.1.0-py3-none-any.whl.
File metadata
- Download URL: lightrag_exploration-0.1.0-py3-none-any.whl
- Upload date:
- Size: 16.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b55babe87796a55b4bb8be759ce971fe47742a5125736ac8ea0786aafa9507d9
|
|
| MD5 |
475562582d48ed5e258e84ae5bd4e497
|
|
| BLAKE2b-256 |
4276f8be3f2e9705c405293f4927570846011d3129d4fe6b7b02f834a5caefe7
|