DriveLegal: Toward legally compliant driving via trustworthy hybrid retrieval-augmented LLMs
• Modular legal-interpretation layer with hybrid vector–graph RAG for AV guidance. • Two datasets: SFT and RAG for multilingual, cross-jurisdiction evaluation. • Hybrid retrieval improves faithfulness and reduces hallucination vs single modes. • Trust module scores context, groundedness, and answer relevance online. • Validated in smart-cabin, V2X intersection monitoring, and offline auditing. Autonomous vehicles (AVs) face persistent challenges in complying with complex and evolving traffic laws. Existing approaches, including rule-based, learning-based, and large language model (LLM) methods, each face limits in adaptability, generalizability, or trustworthiness. We present DriveLegal , a modular legal-interpretation framework for downstream autonomous driving applications. DriveLegal pairs fine-tuned multilingual large language models (LLMs) with an intelligent hybrid retrieval module that routes between vector search and knowledge graph, then returns concise, cited answers. A trust layer scores context relevance, groundedness, and answer relevance and supports continuous improvement through periodic automatic signals and targeted human review. We introduce the DriveLegal datasets for supervised fine-tuning and for retrieval and graph reasoning. Across benchmarks and case studies in smart cabin and vehicle-to-everything (V2X) settings, the hybrid retrieval strategy improves contextual accuracy and reduces hallucination while producing jurisdiction-aware outputs suitable for compliance checks, incident analysis, and reporting.
Authors
- Shucheng Huang (ORCID: https://orcid.org/0000-0001-9737-8779)
- Amir Khajepour (ORCID: https://orcid.org/0000-0002-1998-6100)
- Minghao Ning (ORCID: https://orcid.org/0000-0003-4333-5524)
- Keqi Shu
- Chen Sun (ORCID: https://orcid.org/0009-0006-9354-9888)
- Jiaming Zhong (ORCID: https://orcid.org/0009-0002-3717-0727)
- Yufeng Yang
- Changye Ma
- Freda Shi
Institutions
- University of Waterloo (CA)
- Vector Institute (CA)
- University of Hong Kong (HK)
Publication Details
- Journal
- Expert Systems with Applications
- Published
- 2026-02-14
- DOI
- https://doi.org/10.1016/j.eswa.2026.131593
- Citations
- 1
- Primary Topic
- Topic Modeling
- Type
- article
- Field-Weighted Citation Impact
- 52.10