About LeCaBase
What is LeCaBase?
LeCaBase is a mini legal casebase search engine prototype, inspired by AustLII and Jade.io. It demonstrates the core features of a legal casebase — a system fundamentally different from a legal chatbot.
A legal casebase is a retrieval-first system. Its primary output is real legal documents with verifiable citations. AI enhances search and discovery, but the foundation is always an authoritative corpus where every document is real and citable.
Technical Architecture
FrontendNext.js 15, React 19, Tailwind CSS, TypeScript
BackendFastAPI, Python 3.10+, Pydantic, SQLAlchemy (async)
DatabasePostgreSQL 16 with pgvector extension for hybrid search
SearchHybrid: PostgreSQL full-text search (tsvector/BM25-like) + semantic vector search (sentence-transformers + pgvector cosine similarity)
Embeddingsall-MiniLM-L6-v2 (384 dimensions) via sentence-transformers
Data27 landmark Australian cases with real metadata, catchwords, headnotes, and full text excerpts, plus 19 citation relationships with treatment signals
Key Features
- ●Hybrid Search — Combines full-text BM25 search with semantic vector search for comprehensive results
- ●Citation Network — Cases linked to each other with treatment signals (followed, distinguished, overruled, cited, applied)
- ●Faceted Filtering — Filter by court, jurisdiction, date range, and sort by relevance, date, or citation count
- ●Case Detail View — Full metadata display with catchwords, headnotes, judges, legislation cited, and full text
- ●Semantically Similar Cases — Vector similarity to discover related cases even without explicit citation links
- ●Browse by Court — Browse the entire casebase by court hierarchy
Casebase vs Chatbot
This prototype deliberately demonstrates a casebase, not a chatbot. The distinction is critical:
Legal Casebase
- Retrieval-first
- Real documents with real citations
- Near-zero hallucination risk
- Every result is a primary source
Legal Chatbot
- Generation-first
- Synthesized natural language
- 17-82% hallucination rate
- Claims must be verified