Skip to main content

library_name: lexrag pipeline_tag: text-generation tags:

  • legal-rag
  • legal-ai
  • legal-research
  • retrieval-augmented-generation
  • uae-law
  • indian-law
  • gst
  • vat
  • corporate-tax
  • hybrid-search
  • fastembed
  • qdrant
  • legal-tech
  • compliance
  • tax-research
  • case-law
  • evolucentai
  • eulogik license: agpl-3.0 language:
  • en datasets:
  • Indian Kanoon
  • UAE Legislation Portal metrics:
  • retrieval-recall
  • grounding-accuracy widget:
  • text: "What is the GST rate on online gaming contest prizes in India?"
  • text: "UAE VAT on financial services"
  • text: "TDS under Section 194B on winnings"
  • text: "UAE Corporate Tax free zone treatment" co2_eq_emissions: 0


⚖️ LexRAG — The Legal Intelligence Terminal

Enterprise-Grade Hybrid RAG for UAE & Indian Law, Taxation & Compliance

Stars License PyPI HuggingFace



What is LexRAG?

LexRAG is a professional-grade, high-performance Retrieval-Augmented Generation (RAG) platform purpose-built for UAE and Indian laws, taxation, accounting standards, and corporate compliance. It combines hybrid dense-sparse retrieval, neural reranking, auto-jurisdiction detection, and multi-provider LLM streaming into a zero-latency terminal interface.

⚡ Built by Evolucent AI — Premium Legal Technology Solutions
🛠️ Engineered by Eulogik — Enterprise AI & Systems Integration


Key Capabilities

Capability Technology
Dense Retrieval BAAI/bge-small-en-v1.5 via fastembed
Sparse Retrieval prithivida/Splade_PP_en_v1 via fastembed
Hybrid Fusion Reciprocal Rank Fusion (RRF)
Neural Reranker BAAI/bge-reranker-base (CrossEncoder)
Vector Database Qdrant (on-disk, no Docker required)
LLM Providers Groq, OpenRouter, Ollama (dynamic model catalog)
Jurisdiction Auto-detect India/UAE/Both with manual override
Confidence Tiers GROUNDED / PARTIAL / SYNTHESIZED
Streaming SSE with heartbeat keep-alive
Persistence SQLite chat history with session management

Quick Start

# Install from PyPI
pip install lexrag

# Or clone from source
git clone https://github.com/eulogik/LexRAG.git
cd LexRAG
pip install -r requirements.txt

# Configure
cp .env.example .env
# Edit .env with your API keys

# Run
python -m uvicorn api.main:app --host 0.0.0.0 --port 8000
# Open http://localhost:8000

Architecture

flowchart TD
    UI[HTML/CSS/JS SPA] <-->|SSE / API| FastAPI[FastAPI Server]
    FastAPI <-->|History| SQL[(SQLite)]
    Query --> Detect[Auto-Jurisdiction]
    Detect --> Search{Hybrid Search}
    Search -->|Dense| Dense[BGE-small-en-v1.5]
    Search -->|Sparse| Sparse[Splade_PP_en_v1]
    Dense & Sparse -->|RRF| Qdrant[(Qdrant)]
    Qdrant -->|Candidates| Rerank[BGE-Reranker-Base]
    Rerank -->|Top Docs| Context[Build Prompt]
    Context --> LLM{LLM Router}
    LLM -->|Cloud| Groq[Groq]
    LLM -->|Cloud| OpenRouter[OpenRouter]
    LLM -->|Local| Ollama[Ollama]

Ecosystem

Platform Link Description
GitHub eulogik/LexRAG Source code & issues
PyPI lexrag Python package
HuggingFace evolucentai/lexrag Model card
Eulogik eulogik.com Engineering partner
Evolucent AI evolucentai.com Product & commercial

License

AGPL v3 — Free for open-source and internal use.
Commercial licenses available from Evolucent AI for proprietary deployments.


Built by Evolucent AI — Engineered by Eulogik

Metadata

Release files for lexrag 3.3.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for lexrag 3.3.0
File Size Uploaded
lexrag-3.3.0.tar.gz 25.4 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for lexrag 3.3.0
File Interpreter ABI Platform
lexrag-3.3.0-py3-none-any.whl Python 3 none any Details

Total release size: 49.5 kB

Release files / lexrag-3.3.0.tar.gz

Download URL lexrag-3.3.0.tar.gz
Size 25.4 kB
Tags Source
SHA-256 checksum
How to use checksums
4da22808c00264f895e0cb8be6d70923924e329819ff330ffda6ddb21b83b84f
BLAKE2b-256 checksum
How to use checksums
6d7c0c88298d18f34859da0278ac590e2e268c3b43a213df648ce91235e1974d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.11.15

Release files / lexrag-3.3.0-py3-none-any.whl

Download URL lexrag-3.3.0-py3-none-any.whl
Size 24.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
bcfc6993c7df0f718b06905b078373855d77696b93c26baf80e1cde1df2cae68
BLAKE2b-256 checksum
How to use checksums
168a53c85f15dbc036a38849700aea45be56b25a2a43664fcf73eb90d0c33735
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.11.15

Release history Release notifications | RSS feed

This release

3.3.0 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page