Skip to main content

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 .env for 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_dir and ollama_host in .env or .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:

  1. Upgrade build and twine:
    python -m pip install --upgrade build twine
    
  2. Build your package:
    python -m build
    
  3. (Optional) Check your package:
    python -m twine check dist/*
    
  4. Upload to PyPI:
    python -m twine upload dist/*
    

Troubleshooting

  • If you see errors about missing templates, ensure you installed with pipx after running pipx ensurepath and 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 .env and that the directory exists.

License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

lightrag_exploration-0.1.0.tar.gz (11.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

lightrag_exploration-0.1.0-py3-none-any.whl (16.1 kB view details)

Uploaded Python 3

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

Hashes for lightrag_exploration-0.1.0.tar.gz
Algorithm Hash digest
SHA256 e578320047d1f46dc8ac8a0a3800ec089051b8b469f07fe49e7f336887ce68fd
MD5 efff4c8c3457073a97920fcf10e4d5a2
BLAKE2b-256 d105ca89a1bf0ce35d86cb7d0bcc0ceaab518a508f1b10fb1b6f2c09747519b9

See more details on using hashes here.

File details

Details for the file lightrag_exploration-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for lightrag_exploration-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 b55babe87796a55b4bb8be759ce971fe47742a5125736ac8ea0786aafa9507d9
MD5 475562582d48ed5e258e84ae5bd4e497
BLAKE2b-256 4276f8be3f2e9705c405293f4927570846011d3129d4fe6b7b02f834a5caefe7

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page