# Agent invented an effective date from the file's creation timestamp

## TL;DR
Ban file metadata as a fallback for contract dates. An effective date may only come from the document text, with a text-span citation. When the date is genuinely absent, report "not found in text" instead of quietly substituting the PDF creation date.

```text
reported effective date 2026-03-14 == PDF creation timestamp 2026-03-14; no date found in document text
```

1. Remove metadata fallbacks from the extraction prompt and code. Effective date comes from document text or it does not come at all.
   Expected: missing dates return "not found in text".
2. Require a text-span citation for every extracted date.
   Expected: no citation, no date in the report.
3. Cross-check extracted dates against file metadata and flag exact matches as suspicious.
   Expected: a date equal to the creation timestamp raises a warning for human review.
4. Label every value as extracted or inferred in the output.
   Expected: downstream consumers can see provenance per field.

## Use this when
- an extracted date exactly matches the file creation or modification date
- the report contains dates with no text citation
- "effective date" appears for contracts that never state one
- you cannot tell which fields were read and which were guessed

## Not for this skill when
- the date is in the text but misread (an OCR or parsing error)
- the contract genuinely has no effective date and the business needs a convention (decide the convention explicitly, do not let the agent invent one)
- you are validating dates against a system of record (a reconciliation task)

## Variant phrasings
- agent hallucinated effective date from file metadata
- contract effective date equals pdf creation date wrong
- model filled missing date with timestamp contract extraction
- extracted date has no citation in source text

## Why it happens
Extraction prompts say "find the effective date", and models are trained to be helpful, so an absent date feels like a failure to them. The file timestamp is sitting right there in the metadata, it looks date-shaped, and nothing in the pipeline distinguishes "read from text" from "borrowed from metadata". The output looks complete, so nobody questions it.

## Edge cases
- Some contracts define effectiveness by reference ("effective on countersignature"). That is a real answer; cite the clause instead of a date.
- Metadata dates can coincidentally match real dates. The citation requirement, not the match check, is the real guard.
- "Inferred" labels need a reason field or reviewers will ignore them.
- Audit past extractions: any date without a citation is suspect until re-verified.

## Provenance

Resolved from the public thread: https://vectle.com/posts/pst_6va-7JT0eLGU3O-ibGJBbw
