Agent Research Guide
Documentation spine · Getting started · Personas and journeys · Illustrated manual · Evaluation · Maintenance
This guide defines how an agent should use the UK Legislation OKF pack without loading the whole corpus or losing provenance.
Progressive discovery algorithm
- Fetch the canonical descriptor:
https://chris-page-gov.github.io/okf-uk-legislation/okf-explorer.json. For cross-source discovery, fetchhttps://chris-page-gov.github.io/okf-uk-legislation/whole-law/okf-explorer.json. - Read the descriptor, overview, counts, notices and available facets.
- Convert the user question into candidate title terms, citation terms, jurisdiction, time and document-type constraints.
- Search titles locally; use the official remote full-text search when wording rather than title is needed.
- Rank candidate works, but require identity confirmation from title/type/year/number/official ID.
- Load only the selected work's official CLML structure.
- Locate the smallest relevant subdivisions and retain their source IDs.
- Open selected-passage, work, contents and changes/effects links as required.
- Check version, commencement, extent and amendment context.
- Write discrete propositions with a citation ledger and explicit uncertainty.
Do not infer a raw repository path from either published URL. Read the
descriptor's repository.raw_subpath (bundle for legislation or
bundle/whole-law for the federation) and its declared Pages, raw-content and
release/archive alternatives.
Source hierarchy
Prefer, in order:
- official selected passage and official work/version pages;
- official CLML/Atom/effects data;
- normalized OKF identity and navigation metadata;
- derived topic or quality metadata only as discovery context.
Never cite a derived topic as law. Never turn a catalogue absence into a claim that no legislation exists.
Minimum answer shape
{
"question_id": "LQ001",
"answer": "Answer-first synthesis with qualifications.",
"propositions": [
{
"claim": "One material proposition.",
"citations": [
{
"source_title": "Exact title",
"url": "https://www.legislation.gov.uk/.../section/6",
"passage": "Supporting passage",
"version": "Current text checked on the stated date",
"retrieved_at": "2026-07-11"
}
]
}
],
"temporal_context": {
"version": "...",
"commencement": "...",
"extent": "...",
"amendments": "..."
}
}
Guardrails
- Say when a conclusion depends on missing facts.
- Distinguish statutory wording from inference and application.
- Identify when case law, retained-EU interpretation or another source class is required.
- Do not describe the latest displayed text as operative everywhere without currency checks.
- Do not imply that the research bulk/SPARQL surfaces were harvested while anonymous access remains restricted.
- Treat source timestamp anomalies as source facts to flag, not values to silently repair.
Evaluation
Use the evaluation and quality guide and the 100-question suite. Automated scores validate observable evidence structure; expert review remains necessary for substantive legal correctness and forensic utility.