A legal RAG setup for New Zealand tenancy Q&A

Astraea.cpp and Astraea for Python are being built as a tenant-facing question-and-answer tool for New Zealand tenancy law. The system uses a legislation-first RAG design. It indexes the Residential Tenancies Act, Healthy Homes Standards, Tenancy Tribunal decisions, and official Tenancy Services guidance.

It retrieves legislation, official guidance, and cases as separate source types instead of mixing them all together. Important law sections are routed by fixed rules, and is used as a backup signal when no rule matches but legislation retrieval looks confident. A writes answers with citations.

The system also shows the context and debug output so the builder can see what the model actually used. There is also a dataset of 300 verified real-world tenancy question-and-answer pairs, but those answers are being treated as a practical advice floor rather than the final legal gold standard because they do not always include law sections or Tribunal citations.

Key points

  • The tool answers New Zealand tenancy law questions for tenants.
  • It indexes laws, housing standards, Tribunal decisions, and official guidance.
  • It retrieves different source types separately instead of blending them together.
  • Important law sections are found through fixed .
  • A 300-pair verified Q&A dataset is used as a practical baseline, not as the final legal answer key.
Read original