KatInterview

Teaching an LLM to Flag Questions Past Its Knowledge Horizon

Machine LearningModel answer
MediumModel answerMachine Learningllmcalibrationabstention

Last updated

Design a way for a language model to spot questions that need information newer than its training data and to tell the user clearly where its knowledge stops.

You are building a conversational language model. Users sometimes ask about events, releases or facts that appeared after the data the model was trained on. Instead of inventing an answer, the assistant should recognize the situation and say something like: "My training data ends around a certain date, so I may not know about this."

Describe how you would build this behavior end to end.

Assumptions

  • You own the whole pipeline: the pretraining corpus (most documents carry a timestamp), the later fine-tuning stages, and the serving stack.
  • The model is retrained on a regular schedule, so the knowledge horizon moves with every release.

Points to clarify before designing

  • Should the model decline completely, or give what it knew as of its horizon along with a caveat?
  • Can the product call retrieval or web search, which might make declining unnecessary?
  • Is the current date passed to the model at inference time?
  • Which error hurts more here: refusing something it could have answered, or confidently giving stale information?

What to cover

  1. How the model knows its own horizon, how it knows today's date, and how it decides a question is time-sensitive.
  2. How you would build training and evaluation data, including cases where the model should simply answer.
  3. Where the logic should live (system prompt, fine-tuning, a separate classifier, retrieval) and the trade-offs.
  4. How you would measure both failure directions.
  5. How the behavior stays correct after the next retraining.

Hints

Hint 1

Split the problem in three: what the model knows about its own horizon, what it knows about the current date, and whether the question depends on facts that could have changed since then.

Hint 2

Most questions are not time-sensitive. Your training mix needs many normal-answer examples, otherwise the model will over-refuse. Think about how document timestamps help you build positive and negative examples.

Hint 3

Evaluate both directions separately (stale or hallucinated answers versus unnecessary refusals), and make the horizon a parameter you can change rather than something baked into the weights.