LLM & Retrieval · 2025
LawBot
Document-grounded legal research with hybrid retrieval
A document-grounded legal assistant for Indonesian TNI law revisions, combining fine-tuned language models with hybrid retrieval and reranking.
- PyTorch
- Transformers
- QLoRA
- LangChain
- ChromaDB
- Streamlit
Problem worth solving
Make Indonesian TNI law revision material easier to query while keeping generated answers grounded in the underlying legal documents.
Engineering decisions
- Built a document pipeline for cleaning, chunking, tokenization, embeddings, and ChromaDB vector storage.
- Combined BM25, semantic search, cosine similarity, and cross-encoder reranking for hybrid retrieval.
- Fine-tuned several pretrained language models with QLoRA.
- Evaluated ROUGE-1, Semantic F1, factual accuracy, answer completeness, and hallucination rate.
What changed
- Delivered a Streamlit prototype that returns document-grounded answers with supporting knowledge-base references.
- Established a comparative evaluation workflow for both retrieval relevance and answer quality without claiming an unreported aggregate score.