rag-asic answers questions over ASIC's regulatory guides and Chapter 7 of the Corporations Act by retrieving the actual text first, then asking a language model to write an answer grounded in — and citing — only what it was shown. Nothing here is trained into a model; every citation traces back to an extract you can inspect. Two things happen: documents get ingested into a retrievable index, and each question runs through retrieval to assemble the extracts the answer is built from.
The Corporations Act arrives as a DOCX compilation with real Word heading styles; regulatory guides and other ASIC PDFs don't, so their parsers key off the margin paragraph labels (e.g. "RG 175.30") and font-size-detected headings instead. All three converge on the same chunk record, which gets a breadcrumb — its full structural path — prepended before embedding. That's the single highest-leverage step in the pipeline: it disambiguates terse statutory text and gives the generator citation context for free. Each register then gets its own index table with its own keyword-search statistics — Act, RG, and misc chunks are never scored against each other.
Turns each chunk of text into a list of numbers — a fingerprint of its meaning. Chunks about the same idea end up with similar fingerprints even when they share no words in common. That's how a question like "what if my company can't pay its debts" can still find the section on insolvency.
A classic keyword scorer: it counts how often your exact words show up, weighting rare, specific terms (like "s912A" or "AFSL") far more than common ones. It won't find a match unless the wording lines up — but that literalism is exactly what makes it reliable for citations and defined terms.
A question is encoded once, then searched independently in each register — dense vector similarity and BM25 keyword search, fused by reciprocal rank fusion, within that register's own pool only. The Act pool's top candidates then go through a listwise LLM rerank — the single change that closed retrieval recall@8 from 0.93 to a perfect 1.00 on the eval set. Results are merged by a doc-aware seat budget, and a deterministic pass scans the seated guidance text for its own statute citations, pulling in the most-cited Act section that budget allocation missed — no extra model call. Only then does generation see any text.
Reads the top candidates side by side and re-orders them by which one actually answers the question — not just which is on-topic. Adjacent statute sections can be nearly identical to both keyword matching and semantic similarity; only reading them jointly, in context of the question, tells "about this topic" apart from "answers this."
Merges each register's ranked list by fixed quotas rather than one shared score, since scores from different registers aren't comparable. Within a register it also hedges: instead of betting the whole allocation on the top-ranked document's guess, it spreads seats across other documents that are genuinely still in contention.
Guidance documents cite the statute sections they interpret. If the guidance that got seated repeatedly cites an Act section that didn't otherwise make the cut, that section is pulled in for free — no extra model call, just reading the citations already sitting in the text.
Retrieval recall@8 climbed from 0.50 to a perfect 1.00 across seven versions — but the number alone hides what actually happened. Step through them: some jumps are new pipeline stages, one is a straight bug fix, and one is mostly the measuring stick getting harder, not the architecture getting better.
Experimental RAG demo over public regulatory material. Output is machine-generated general information, not legal or financial advice, and may be wrong or out of date. Source material © Commonwealth of Australia / ASIC.