-
-
Notifications
You must be signed in to change notification settings - Fork 0
Home
Fan Luo edited this page Dec 14, 2025
·
1 revision
This wiki documents the design, architecture, and evolution of Legal-RAG.
It complements the source code by providing:
- architectural explanations and design rationale
- implementation notes and engineering trade-offs
- project roadmap and current status
- usage notes that are intentionally kept out of the README
Legal-RAG is an open-source engineering reference implementation for law-grounded, traceable Retrieval-Augmented Generation (RAG) systems, with a focus on Chinese Contract Law (《民法典·合同编》).
⚠️ Legal-RAG is not a legal advisory service.
It provides legal information assistance for research, education, and engineering purposes only.
This wiki will grow gradually and may include:
- End-to-end RAG pipeline overview
- Hybrid retrieval (FAISS + BM25)
- Routing logic and
law_graphusage - Offline vs. online data flow
- Rationale behind architectural choices
- Why certain defaults are used
- Prompt constraints and safety considerations
- Trade-offs between simplicity, correctness, and extensibility
- Implemented features
- Planned extensions
- Explicit non-goals (what the project intentionally does not do)
- Indexing strategies and metadata design
- PDF ingestion and incremental indexing
- Conversation-aware retrieval (when applicable)
- New readers: start with the architecture overview.
- Code readers: refer to design notes to understand why the code is structured this way.
- Questions or ideas: please use GitHub Discussions.
- Bugs or actionable tasks: please use GitHub Issues.