法務RAG制御アーキテクチャの実装実証-Edge-based Legal Initial Support AI with Internal Legal Database, Query Separation, and Auditable RAG
Description
Implementation Demonstration of a Legal RAG Control Architecture
Technical Note / Implementation Architecture for Controlled Legal RAG Systems
Subtitle
Edge-based Legal Initial Support AI with Internal Legal Database, Query Separation, and Auditable RAG
Overview
This document presents an implementation demonstration of a RAG control architecture for legal initial support AI.
In recent years, RAG (Retrieval-Augmented Generation) in the legal domain has gained attention as a technology that retrieves laws, case law, and contracts, and connects LLM responses to supporting materials. However, in practical legal operations, simply retrieving relevant documents is insufficient. It is necessary to distinguish whether the input concerns "legal risk assessment," "inquiries about systems or procedures," or "statutory confirmation," and to control at what depth RAG should be executed and at which stage the process should return to human judgment.
In this implementation, an edge-based legal initial support AI was constructed by integrating an internal legal database, structured preprocessing, query phase separation, target statute anchoring, multi-lane retrieval, case law search support, and audit logging. The system does not automatically determine legal conclusions; instead, it assumes final human judgment and provides relevant laws and statutes, procedural overviews, process flows, missing facts, and points requiring confirmation.
The distinguishing feature of this research lies not in the construction of a legal RAG database itself, but in the control structure that determines under what conditions, at what depth, based on which evidence, and to what extent AI should process legal RAG, and from which point it should return to human decision-making. This enables separation and verification of search results, inference results, and raw JSON logs, thereby improving the ability to distinguish errors in retrieval and reasoning, as well as enhancing auditability.
This implementation is positioned as an applied example of semantic structure control, based on the foundational philosophy of the Thought Chemistry System, including previously published materials. Note that the current integrated version contains subsequent refinements and is not identical to previously published materials; therefore, prior publications are treated not as direct specification references but as prior disclosures of the underlying conceptual framework.
This publication is intended for research demonstration purposes. Use for research purposes is permitted; however, operational use in practice is not guaranteed. Commercial use and derivative commercial products require a separate licensing agreement.
Therefore, this architecture should be understood not merely as an enhancement of legal RAG, but as an implementation example of judgment control structures in legal AI systems.
Keywords
Legal AI, RAG, Legal Database, Auditable AI, Edge AI, Legal Support, Generative AI, Human-in-the-loop, Legal Technology, Retrieval-Augmented Generation
Files
Legal_AI_RAG_Control_Architecture_EN.pdf
Additional details
Related works
- References
- Publication: 10.5281/zenodo.17463598 (DOI)
- Publication: 10.5281/zenodo.17505811 (DOI)
- Publication: 10.5281/zenodo.17439333 (DOI)
Dates
- Copyrighted
-
2026-04-28This document is intended for research demonstration purposes and does not constitute legal advice or legal conclusions. All final decisions are the sole responsibility of the user. Use for research, evaluation, validation, and academic purposes is permitted. However, any commercial use (including but not limited to commercial products, services, enterprise use, or contracted development) and any commercial derivatives based on this material require a separate licensing agreement. This material is provided "as is" without any warranties, including accuracy, completeness, or fitness for a particular purpose. To the extent permitted by law, no liability shall be assumed for any damages arising from its use. Generative AI was used for structuring and implementation support; however, all decision-making authority and ethical responsibility reside with humans. For further details, refer to LICENSE_POLICY.md, AI_COAUTHORSHIP_PRINCIPLES.md, and ETHICAL_OPERATION_PRINCIPLES.md.
- Copyrighted
-
2026-04-28本資料は研究実証を目的としたものであり、法的助言または法的結論の提示を目的とするものではない。最終的な判断は利用者の責任において行われる。 研究、評価、検証、学術的検討の範囲における利用は許可する。一方、本資料または同梱内容に基づく商用利用(商用製品、サービス、企業利用、受託開発等を含む)および商用派生物の利用については、別途ライセンス契約を必要とする。 本資料は現状有姿で提供され、正確性、完全性、有用性についていかなる保証も行わない。法令上許容される範囲で、利用により生じたいかなる損害についても責任を負わない。 生成AIは整理および実装支援に用いられているが、意思決定および倫理的責任は人間に帰属する。 詳細は LICENSE_POLICY.md、AI_COAUTHORSHIP_PRINCIPLES.md、ETHICAL_OPERATION_PRINCIPLES.md を参照のこと。