Retrieval and RAGRanking, evidence and groundingStaff
How should an assistant join time-dependent facts before making an eligibility claim?
By Amit Kumar4 min readWorked answer includedReviewed 27 Sept 2026
The question
Interview question
A passenger asks whether a booking was refundable at flight time. Search finds a true rule that Flex fares are refundable and a true current booking record showing Flex. The rule became effective the following day, and the booking changed to Flex after departure. Design the evidence join, explain what can be concluded, and handle missing history or an exception without combining incompatible facts.
Draft your approach first
Take a few minutes before you read the answer. Name the constraint that matters most, the failure you are designing for and how you would know it worked.
Reveal the worked answerWorked answer
The missing operation is a join with conditions. The facts need to refer to the same booking, the same decision time, and versions that were effective then. “Flex is refundable” is a rule with an effective interval and exclusions. “The booking is Flex” is a state with its own history. A current snapshot of each does not establish the intersection on the flight date. A relevant citation to each page only proves that the text exists.
For a hypothetical flight at 10:00 on 10 May, require the booking-state interval and the policy’s effective interval both to contain that instant. A booking changed at 12:00 and a policy effective 11 May fail those conditions. They do not establish eligibility at departure. They also do not, by themselves, establish ineligibility: an older fare or earlier rule might supply a different entitlement. Retrieve the applicable historical evidence before making either categorical claim.
I would make the question planner extract the claim it needs to establish: booking identity, fare class at flight time, governing policy at that time, geography and exception conditions. Retrieval brings candidates, but evidence assembly checks these typed fields and their provenance before generation. A booking change event after the flight cannot satisfy the historical fare-class predicate. A policy effective tomorrow cannot govern yesterday, even if it ranks highest today. If timestamps are ambiguous or one source has only a publication date rather than an effective date, the assistant needs to say what is missing or ask for the right record.
This does not require inventing a universal knowledge graph. For high-stakes claims, a small claim-specific join can combine an authoritative booking history with versioned policy text. Search may locate a policy clause, then a structured lookup resolves its release and effective interval. Store citations to exact spans and source revisions. The model can explain the result after the deterministic conditions are checked. HotpotQA illustrates why multiple supporting facts and explainable reasoning matter, but a production eligibility decision also needs the business timestamps and authority that a benchmark may not represent.
There is a tempting shortcut: put both passages into a long prompt and tell the model to consider dates. That may help on easy cases, but it does not give us a reliable invariant if a source uses “updated on” where another uses “effective from.” The ingestion schema must preserve those meanings. Test the swapped-date counterexample, a booking modification just before cutoff, a policy exception, and two customers with the same fare class. Evaluate the joined claim, not recall of each fact separately.
The pushback is when both sources have incomplete history. Maybe the airline only stores the current booking state. Then we cannot infer past eligibility from today's Flex field. Find a change log, ticket receipt or transaction record, or give a bounded answer saying the required historical state is unavailable. How do you retrieve a contract clause and the exception that changes it? asks for a clause and its exception in one legal context. This question is about the compatibility of otherwise correct facts across time and entity state.
The join result should preserve which fields were verified and which remain unknown. A missing booking history is different from a verified non-Flex booking. Model context can carry an explicit unavailable-state marker so the generator does not fill it from the current snapshot. If the business decision is consequential, the trusted eligibility service can return a bounded decision plus the exact policy and booking revisions used, while the assistant explains it.
A useful counterfactual fixture changes one condition at a time. Make the fare Flex before departure while keeping the policy effective afterward, then reverse those dates, then make both valid and add an exclusion. The answer should change only when all required predicates support it. This tests relational evidence, rather than rewarding a system merely for retrieving two individually accurate passages.
Related questions
Keep practising retrieval and rag
Follow another question in this area, or search the complete library.
Get my essays on AI engineering and distributed systems by email. Subscribe to ArchCrux