# LexRAGLab

- **Event:** [Meta Global AI Developer Hackathon](https://cerebralvalley.ai/e/meta-ai-developer-hackathon)
- **When:** Oct 26, 12:00 PM – Nov 4, 9:00 PM (EST)
- **Where:** Online
- **Team:** [Ziffany Firdinal](https://cerebralvalley.ai/u/Ziffan)
- **GitHub:** https://github.com/ziffan/LexRAGLab-Meta2026Hackathon
- **Demo video:** https://youtu.be/BMXQfIeGhqw
- **Gallery:** https://cerebralvalley.ai/e/meta-ai-developer-hackathon/hackathon/gallery
- **Page:** https://cerebralvalley.ai/e/meta-ai-developer-hackathon/hackathon/gallery/220

LexRAGLab is an evaluation lab, not a chatbot or a RAG app. For one family of Indonesian legal documents, it finds the chunking and retrieval setting that gives a language model the right clauses within a fixed token budget, and exports it as a versioned setting profile for any RAG pipeline.

Problem (known firsthand, theme "Build for Your World", legal domain): agentic legal work (legal opinions, due diligence, contract drafting) has to consult a body of regulation that does not fit one context window, and legal RAG teams pick chunk sizes by guess. In Indonesian regulation a guess can cut an "ayat" in half, and the model cites half a rule. There is no public benchmark for Indonesian legal RAG.

What it does: Muse Spark reads a new document family and proposes its structure schema, context headers, and evaluation items (including must-refuse items); the operator reviews every item before it counts. LexRAGLab then scores a grid of settings (chunker, size, overlap, dense/BM25/hybrid, header on/off) on gold character spans at equal token budgets, shows the recall-vs-tokens Pareto frontier, picks a setting on a tune split and reports it on held-out items, and checks Spark's answers with a deterministic citation verifier. It ships with two families: Indonesian Company Law (UU PT) and synthetic notarial deeds as a transfer test.

Results: On 8 held-out Company Law items with a gold span, the selected setting (structure-schema chunker, dense retrieval, 2,000-token budget) fully covers 6, mean span recall 0.75 (raw counts, no significance claim). On five synthetic notarial deeds (69 gold items, same budget, nothing selected on them), the deed structure schema fully covers 69 of 69, fixed-size 512/64 chunks 64 of 69, and one chunk per deed 0 of 69.

Before kickoff only the planning specs and the Company Law text existed; all code, prompts, evaluation items, synthetic deeds, stored runs, and profiles were built during the hackathon (Oct 26 – Nov 4). No pre-event code is included.

Live replay (static, no backend or API key; stored runs only): https://ziffan.github.io/LexRAGLab-Meta2026Hackathon/

## More from Meta Global AI Developer Hackathon

- [DreamNet](https://cerebralvalley.ai/e/meta-ai-developer-hackathon/hackathon/gallery/217)
- [School Learning Simplified](https://cerebralvalley.ai/e/meta-ai-developer-hackathon/hackathon/gallery/218)
- [Kept](https://cerebralvalley.ai/e/meta-ai-developer-hackathon/hackathon/gallery/219)
- [NacermeIV](https://cerebralvalley.ai/e/meta-ai-developer-hackathon/hackathon/gallery/221)
- [Edited!](https://cerebralvalley.ai/e/meta-ai-developer-hackathon/hackathon/gallery/222)
- [Cozy Bear Cottage](https://cerebralvalley.ai/e/meta-ai-developer-hackathon/hackathon/gallery/223)

---

Markdown version of https://cerebralvalley.ai/e/meta-ai-developer-hackathon/hackathon/gallery/220. Site index for agents: https://cerebralvalley.ai/llms.txt · full text: https://cerebralvalley.ai/llms-full.txt
