How damieee/lightrag_experimental works
Project type and purpose
• This is a hybrid RAG (Retrieval-Augmented Generation) API service with a minimal Streamlit front-end for demo purposes.
• FastAPI provides REST endpoints for chat and document management; a local Pydantic-backed document store holds the chunks; external LLM calls (OpenAI-compatible) power the generation.
File structure
• Top-level:
• api/ – FastAPI app, schemas, business services
• main_app.py / streamlit_app.py – entry points for CLI/demo and Streamlit UI
• helper scripts: insert_pydantic_docs.py, super-basic-lightrag.py
• Within api/:
• app.py defines routers (/chat, /chat/stream, /docs/*)
• schemas/ holds Pydantic models for payload validation
• services/ contains the core RAG logic and external-call adapters
• Config & deployment: requirements.txt, api/requirements.txt, pyproject.toml, .env.example, uvicorn lock file
README for additional insights
• The system combines naive RAG with graph-based relationship mapping – so there is a “hybrid” retrieval module.
• Endpoints do error handling via structured JSON.
• CORS is enabled (ready for a separate JS front‐end if desired).
• Streaming support for real-time chunked responses.