[LEX-01]
Lexora
RAG-based legal research assistant for Indian law.
- FastAPI
- BGE embeddings
- cross-encoder rerank
- RAGAS
- Next.js / Vercel AI SDK
- Docker
- Langfuse
- GCP Cloud Run
Problem
Legal research is slow, and answers are only useful if they're traceable to sources. A lawyer can't act on a confident paragraph with no citation behind it.
Architecture
A FastAPI backend embeds documents with BGE into a vector store, then reranks retrieved chunks with a cross-encoder before they reach the model. Reranking is where retrieval quality is won or lost. RAGAS runs continuous evaluation so regressions surface as numbers, not vibes. The frontend is a streaming Next.js chat. Observability runs through Langfuse, CI/CD through GitHub Actions, deployed on Cloud Run.
- 01Queryuser question
- 02BGE embedvector store
- 03Cross-encoder reranktop-k chunks
- 04Grounded answerstreamed + cited
Evidence
The improvement over the baseline is itself the signal. Every number below comes from RAGAS in CI.
Reranking did most of the work: a cross-encoder scoring each chunk against the query directly, not just by vector proximity, is what moved context precision from 0.75 to 0.87.
V1 live