Logo Lanfrica
  • Accueil
  • Atlas
  • Analyses
  • Documentation
  • Sign in

© 2026 Lanfrica. Tous droits réservés. Tous les droits d'auteur des ressources affichées sur le site Web Lanfrica appartiennent aux détenteurs de droits d'auteur d'origine, sauf indication contraire explicite.

akhiyusuf/legal-ai-nigeria

Domaine:

digital infrastructure

Type de record:

software
Créateur:
akh
Hôte:
# Legal QA System: Advanced RAG for {{COUNTRY}} A production-ready Legal Question Answering system utilizing Advanced Retrieval-Augmented Generation (RAG). ## Features - **Structure-Aware Chunking**: Preserves titles, chapters, and sections. - **Knowledge Graph**: Entity extraction (spaCy) and NetworkX graph for multi-hop reasoning. - **Hybrid Retrieval**: Combines Vector Search (Chroma) and Graph Traversal. - **Reranking**: Uses Cross-Encoders for precision. - **Source Proof**: Screenshot generation for PDF sources using `pdf2image`. - **Auto-Discovery**: Automatic discovery of official legal portals for {{COUNTRY}}. ## Prerequisites - Python 3.10+ - Poppler (system dependency for `pdf2image`) - Linux: `sudo apt-get install poppler-utils` - Mac: `brew install poppler` ## Installation 1. Clone the repository and navigate to the directory. 2. Install dependencies: ```bash pip install -r requirements.txt python -m spacy download en_core_web_sm ``` 3. Configure your environment in `.env`: ```env GROQ_API_KEY=your_key COUNTRY={{COUNTRY}} VECTOR_DB={{VECTOR_DB}} ``` ## Getting Started 1. **Initial Ingestion**: Run the ingestion script to discover and index laws for {{COUNTRY}}. ```bash # Trigger via API curl -X POST localhost ``` 2. **Run the Application**: ```bash python -m backend.main ``` Open `localhost` in your browser. ## Architecture 1. **Discovery**: `SourceDiscovery` identifies official .gov domains. 2. **Indexing**: Chunks are stored in ChromaDB; Entities are stored in a NetworkX graph. 3. **Retrieval**: - Semantic search finds similar text. - Graph traversal finds related provisions (multi-hop). - Results are fused and reranked by a MiniLM Cross-Encoder. 4. **Generation**: Groq (Mixtral) generates answers grounded in the retrieved context with citations. ## Disclaimer This tool is for informational purposes only. It is NOT a substitute for professional legal advice.

Visit

github.com

Tasks

question answering

Similaires

AI Legal ChatbotKellyKiprop/Legal-AI-assistantBmiami988/Uganda-legal-AIfredhmacau/legal-ai-assistantAirlectric/Legal-Tech-AIeslamelhosuniy/Sanad-Legal-AI

AI Legal Chatbot

Title: Dataset for "Design and Implementation of an AI Legal Chatbot to Support Legal Aware

KellyKiprop/Legal-AI-assistant

A production-ready Retrieval-Augmented Generation (RAG) system that explains the Constitution of Ken

Bmiami988/Uganda-legal-AI

A production-grade RAG 3.0 legal awareness chatbot built on Ugandan legislation. Combines FAISS vect

fredhmacau/legal-ai-assistant

O Legal AI (Kamba da Lei) é um agente inteligente conversacional construído com arquitetura Agentic

Airlectric/Legal-Tech-AI

LegalTech, a project designed to empower access to justice in Ghana by leveraging AI technology. Thi

eslamelhosuniy/Sanad-Legal-AI

Sanad is an innovative technology solution designed to address the critical gaps in Egypt's legal s