← Latest papers
🤖 machine learning

Train, Retrieve, or Both? A Four-Arm Head-to-Head for Correct Statutory Citation on the Ontario Residential Tenancies Act

This paper presents a four-arm evaluation demonstrating that a fine-tuned Qwen2.5-7B model combined with retrieval (SFT+RAG) achieves the highest accuracy in citing the Ontario Residential Tenancies Act while eliminating hallucinations, outperforming both standalone fine-tuning and retrieval-only approaches without requiring specialized retrieval models or larger datasets.

Original authors: Ali Asaria, Tony Salomone, Deep Gandhi

Published 2026-06-19
📖 5 min read🧠 Deep dive

Original authors: Ali Asaria, Tony Salomone, Deep Gandhi

Original paper licensed under CC BY 4.0 (http://creativecommons.org/licenses/by/4.0/). This is an AI-generated explanation of the paper below. It is not written or endorsed by the authors. For technical accuracy, refer to the original paper. Read full disclaimer

Imagine you are trying to find the exact rule in a massive, 300-page rulebook (the Ontario Residential Tenancies Act) that answers a specific question, like "How much notice does a landlord need to give before entering my apartment?"

The goal isn't to write a beautiful essay; it's to point a finger at the exact page and paragraph number (the citation) so a regular person can look it up themselves.

This paper is a "taste test" to figure out the best way to teach a computer to do this. The researchers set up a race between four different strategies using a smart AI model (a digital brain) to see which one finds the right rule without making things up.

Here is how the four runners in the race performed:

The Four Runners

  1. The "Raw Brain" (Base Model):

    • The Analogy: This is like asking a very smart student who has read the rulebook once but hasn't memorized it. They try to guess the page number from memory.
    • The Result: They failed completely. They couldn't find the right page, and 81% of the time, they made up a fake page number that didn't exist. They are too unreliable for this job.
  2. The "Memorizer" (Fine-Tuning Only):

    • The Analogy: This is the same student, but they spent weeks drilling flashcards of "Question → Page Number." They know the format and try to memorize the answers.
    • The Result: They stopped making up fake pages, but they still got the specific numbers wrong. They remembered the idea of the rule but mixed up the exact section numbers. It's like knowing the rule is about "noise" but guessing it's on page 50 instead of page 52.
  3. The "Librarian" (Retrieval Only):

    • The Analogy: This student doesn't try to memorize anything. Instead, they have a super-fast librarian who searches the book for them. The student is only allowed to answer using the pages the librarian hands them.
    • The Result: This was a huge improvement. Because the student is forced to look at the real text, they never make up fake page numbers (0% hallucinations). However, sometimes the librarian hands them a stack of 10 pages, and the student gets confused about which one is the exact right one.
  4. The "Super Team" (Hybrid: Memorizer + Librarian):

    • The Analogy: This is the student who did the flashcard drills AND has the librarian. The drills taught them how to be a better judge when the librarian hands them a messy stack of pages.
    • The Result: This team won the race. They found the exact page number more often than anyone else. The "drills" helped them pick the right page from the librarian's stack, even when the stack was large.

The Big Surprises

  • Bigger isn't always better: The researchers tried using a "super-librarian" (a more complex, expensive search tool) to help the students. It didn't help. The simple, cheap librarian worked just as well. This is great news because it means you don't need expensive, heavy machinery to solve this problem.
  • More studying didn't help: They tried giving the "Memorizer" more flashcards to study. It didn't make them any better. The bottleneck wasn't how much they studied; it was that they needed the librarian to find the text in the first place.
  • The "Zero Hallucination" Trick: The reason the "Librarian" and "Super Team" never made up fake rules is by design. The system has a safety gate: if the page number isn't in the book the librarian is holding, the system refuses to say it. It's a hard rule, not a learned skill.

The Final Scorecard

The "Super Team" (Hybrid) got the best score, but they didn't win the gold medal yet.

  • The Goal: The researchers wanted to get a score of 0.70 (getting the right answer 70% of the time).
  • The Reality: They got 0.48 (getting it right about half the time).

Why didn't they get 100%?

  1. The Librarian missed the book: Sometimes the librarian couldn't find the right page at all (about 11% of the time). If the right page isn't in the stack, the student can't pick it.
  2. The "Fine Print" problem: The student often found the right Section (Chapter) but missed the specific Subsection (paragraph). It's like finding the right chapter but the wrong paragraph. This counts as a "half-right" answer.
  3. Tiny Test Group: The final test only had 27 questions. It's like judging a whole season of a sports team based on one game. The results are promising, but the sample size is too small to be 100% sure.

The Bottom Line

If you want a computer to point people to the right law:

  • Don't just ask it to memorize the law (it will guess wrong).
  • Don't just ask it to read the law (it will get confused by too much text).
  • Do combine a model that has been trained to understand the format with a tool that searches the law for you.

This approach is the most accurate, it never lies about where a rule is, and it works well without needing expensive, heavy technology. However, it still needs work to get from "good" (48% accuracy) to "great" (70% accuracy).

Drowning in papers in your field?

Get daily digests of the most novel papers matching your research keywords — with technical summaries, in your language.

Try Digest →