pk_verify_citations
Verifies Pakistani legal citations in text against a corpus, flagging non-existent sections and mismatched descriptions for review.
Instructions
Verify Pakistani legal citations found in a text against the corpus.
Extracts statute sections ("section 302 of the Pakistan Penal Code", "section 10A of the Pakistan Study Centres Act, 1976"), act coordinates ("Act No. XLV of 1860"), Constitution articles ("Article 184(3) of the Constitution") and Supreme Court registry citations ("Crl.A. 93/2013"), then checks each against the local corpus. A parenthetical description right after a citation is content-checked with a trigram match (mismatch = review signal). Non-existent sections come back with a range hint of what DOES exist.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| text | Yes | the text to verify (an LLM answer, a memo, a pleading). | |
| max_citations | No | cap on citations to verify (1..30, default 15). |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| gaps | No | ||
| total | Yes | ||
| status | Yes | ||
| summary | Yes | ||
| citations | No | ||
| dataset_note | No | Verification runs against the local corpus snapshots (statutes 2025-01-30, judgments 2024-07-26). Statute section detection reads the 'N. Heading' markers that survived OCR, so [MISSING] describes the machine-detectable text of the snapshot - treat it as a strong signal and confirm at source_url before accusing anyone. The judgment corpus is a 1,414-judgment SUBSET, so a case citation that is not found is reported as a gap, never as a hallucination. Everything the tool could not check lands in `gaps`, not in silence. | |
| failed_count | Yes | ||
| warning_count | Yes | ||
| verified_count | Yes |