Create traceable records and prevent stale versions and audience mismatches.
Understand the method
Inspect documents.json. id supports citations; version identifies revisions; status controls current candidates; audience describes applicability; title aids retrieval; text preserves the rule. A travel heading alone does not establish intern eligibility.
P1 covers staff lodging; P2 covers intern travel approval. Preserve the cap together with audience, nightly unit and invoice condition. Extracting only the number can produce a false conclusion even with a valid citation ID. Meaning comes before brevity.
P1-old intentionally carries the archived cap. Keep it to test version filtering. Real corpora contain history: retrieve current records while retaining archives for audit. Updating a title without rebuilding the index leaves stale evidence in circulation.
For PDFs, pages and tables, inspect extraction: repeated headers, detached table labels, image-only scans and broken conditions. Compare a small sample with the original. Fix extraction failures before indexing instead of blaming the model for missing text.
The CLI audience parameter demonstrates applicability only. Production authorization must use trusted identity and enforce access at retrieval; a user-provided staff value is not access control. The lab corpus is public teaching data.
Record each source change, version, effective date and reviewer. Track corpus and code versions separately: answers may change when only the data changes. Reproducibility requires both.
- 1Inspect
- 2Conditions
- 3Version
- 4Filter
Included material
Fields: id=P1, version=v1, status=current, audience=staff. The supplied Chinese text keeps audience, nightly cap and invoice condition in one record.
Work through the steps
- Check all seven records and identify the archive.
- Identify audience, amount, unit and condition in P1.
- Create an incomplete copy lacking audience and document why ingestion should reject it.
Worked example
Source checklist: P1 staff, CNY400/night, invoice, current v1; P2 interns, cap unspecified, prior approval, current v1; P1-old archived v0. Do not merge these into a cap for everyone.
Your exercise
Tabulate P5 and write one question it cannot answer. Explain why the archive stays in the file but is excluded from current answers.
Check before delivery
- Preserve audience, units and conditions.
- Distinguish applicability filtering from authorization.
Finish the exercise, then view the reference
P5 supports a seven-day booking window and releasing cancelled slots, not a fine. Filter archives out of current retrieval while retaining them for version review.
An original course with teaching exercises. Reading records, practice outcomes and independent certification are distinct.