Prompt & Context Engineering·Question 34 of 68Intermediate

The model does not know what day it is. How do you handle dates, recency and the knowledge cutoff in your prompts?

Type it the way you would explain it to an interviewer. A few sentences is enough; you can't break anything.

Model answer: the part to lead with

Give the model the current date explicitly, tell it that its own knowledge stops at a cutoff, and do anything date-critical in code rather than in the model.

Full worked answer with diagram

Give the model the current date explicitly, tell it that its own knowledge stops at a cutoff, and do anything date-critical in code rather than in the model.

The failure modes are concrete. Without a date, the model behaves as if it is living at its training cutoff: it computes ages and deadlines wrongly, calls an old library version "the latest", and sometimes argues with users about events it has never seen, insisting a real launch is hypothetical. With a date but no cutoff statement, it confidently answers questions about last month from stale memory.

What goes in the prompt:

  • Today's date and timezone, at day granularity. Granularity matters for caching: a per-request timestamp near the top of the prompt invalidates the cached prefix on every call, while a date that changes once a day costs one cache rebuild per day. Put it at the end of the static block or in the first user turn.
  • A recency rule: "Your training data has a cutoff. For anything that may have changed since, such as prices, versions, or who holds a role, use the search tool, and prefer tool results over memory when they disagree."
  • A date on every retrieved document, so staleness is visible and a rule like "prefer the most recent source" is enforceable.

What stays out of the model: date arithmetic. "Next Friday", "30 days after signup" and timezone conversion should be resolved by a tool or a pre-processing step and passed in as absolute ISO dates. Models are unreliable at calendar arithmetic, and the errors look plausible.

Test it with time-travel evals: freeze the injected date at different values, including month and year boundaries, and check that relative-date answers move correctly. Add questions about events after the cutoff to confirm the model searches rather than guesses.

Worth sketching. It shows which date work stays with the model and which moves into code.

flowchart TD
    A["User question"] --> B{"Depends on today<br/>or on recent facts?"}
    B -->|"no"| C["Answer from<br/>prompt and memory"]
    B -->|"relative date"| D["Resolve in code<br/>to an ISO date"]
    B -->|"recent facts"| E["Search tool,<br/>results carry dates"]
    D --> F["Prompt: date and timezone,<br/>end of the static block"]
    E --> F
    F --> G["Model answers,<br/>tool results beat memory"]

What a good answer covers

  • Give the model the current date explicitly, tell it that its own knowledge stops at a cutoff, and do…
  • Without a date, the model behaves as if it is living at its training cutoff
  • With a date but no cutoff statement, it confidently answers questions about last month from stale memory
  • Today's date and timezone, at day granularity
  • A recency rule: "Your training data has a cutoff

Key terms: Today's date and timezone · A recency rule

Interviewer follow-ups to expect

  1. Where exactly would you put the date so it does not hurt your cache hit rate?

  2. How would you build an eval that catches a model confidently answering about events after its cutoff?

  3. A user insists on a fact the model believes is false and newer than its training data. What should happen?

Worked answer from AI-Engineer-Interview-Questions by Om (MIT), reformatted for LLM Prep · answer text last updated 6 November 2026 · scoring and review schedule by LLM Prep