Back to portfolioia. Systems, explained.

Architecture lab / 05

Legal Contract AnalyzerUnder the hood.

Clause-aware ingestion and hybrid retrieval feed bounded analysis and verification passes, preserving references through to the output.

View source
100%
Hybrid retrieval & verificationSelect a component to inspect

Service

Hybrid retrieval

BGE embeddings · BM25 · RRF

Combines dense and sparse retrieval before cross-encoder reranking.

Receives
Uploaded clauses or routed user questions.
Produces
Ranked reference context.
Design boundary

Category-routed chat falls back to broader search when filtered results are insufficient.

Connections

Contract ingestion Hybrid retrievalclauses

Reference knowledge Hybrid retrievalreferences

Hybrid retrieval Clause analysisranked context

AI Services & code Data & output Controls- - Verification path

The core decision

Preserve the clause. Preserve the citation.

Scope & limits

A legal-analysis prototype: LLM judging is a faithfulness heuristic, not proof of legal correctness. Historical precision/recall measure clause-type sets on synthetic contracts.

LegalRAG architecture & limitations