At Black Box Crypto I can look at a market feed, an exchange document, a model output, and a log entry that all appear to talk about the same instrument. They still answer different questions. One tells me when something happened, another tells me what the exchange says ought to happen, and another records what our software observed. The work is getting those distinctions into the system before I ask AI to make sense of any of it.
Decide what the model needs to see
A prompt might tell the model to explain why yesterday’s results changed. Context is everything the system makes available for that answer. It includes the treatment of time zones, the current and prior report, the relevant events, and which data the person asking is allowed to see. Context engineering is designing the way that evidence reaches the model. The design deserves tests and version history like any other dependency.
Retrieval-augmented generation, often shortened to RAG, gives a generator passages from a searchable collection at answer time. Lewis and colleagues showed how retrieval could support knowledge-intensive language tasks. Deep down, it is an idea most engineers already use. When I answer a question about a system, I open the right file. A model can do a version of that, given a sensible search and a way to cite what it found.
I start a retrieval design with a few questions that somebody actually needs answered. For each question, I write down the source I would check and how I would recognize the right version. That gives me a testable example before I choose any embedding or vector database. For a build result, an exact revision lookup is a good first operation. For a vague recollection of an architectural decision, semantic search might do better.
Put time back into the data
Time-series work forces these questions early. A market event occurs at one time and arrives at your service at another. A correction may appear later still. If I am scoring a forecast from our multi-layer temporal fusion transformer, MLTFT, the relevant question is what information had arrived when that forecast was issued. A dataset created today can contain historical values an older model never had access to.
I think about three clocks when I model this. The first is when the event happened. The second is when the system could observe it. The third is when we made a decision with it. A sound replay respects all three. It is surprisingly easy for a single timestamp called “date” to collapse these distinctions and make a feature appear usable earlier than it really was.
The same problem shows up in text lookup. A policy can have a publication date and a different effective date. A supervisor might ask what procedure was in effect on a specific day. For those questions I want retrieval to use dates as filters where it can. I still want the answer to show the source date, because that is how the person decides whether the evidence matches the question.
- 10:00:00 · EventThe source records a market observation.
- 10:00:02 · ArrivalThe observation becomes available to our software.
- 10:00:05 · DecisionA forecast or review can include the observation.
Keep enough information to go back
My MIT capstone proposed an AI-enabled operating layer to bring engineering and business evidence together. The proposed inputs included product telemetry, test results, bug reports, and vendor updates. I put metadata into the design early, including source, timestamp, environment, version, and owner. Those are the fields I reach for the minute two apparently reasonable reports disagree.
For a source document I want a stable identifier, an authoritative location, a revision, and the rules for who can read it. For a computed number I want the definition and inputs as well. If somebody changes how an incident is counted, a graph going up might mean the underlying system changed or simply that the definition changed. The answer should be able to distinguish those cases.
Permissions have to shape retrieval, too. An assistant can produce a plausible-looking customer summary from two sensible records that should never have been returned together. I want the caller’s access enforced at the data boundary, then carried into any cached or derived result. A reference link in the final answer is a way for a person to verify evidence they are entitled to see.
The tool I built to organize my MIT coursework gave me a smaller-scale example. Course material, my notes, and my drafts have different jobs. I need to find the original assignment wording when I review a draft, and I want to be able to see which decisions I had already made. Keeping those inputs distinct makes the tool useful even when I am the only person coming back to the work.
- IdentityAuthoritative source, record identifier, and revision.
- TimeEvent, availability, and relevant effective dates.
- ScopeEnvironment, units, entities, and interpretation rules.
- AuthorityOwner and who may retrieve or act on the information.
Separate what you found from what you inferred
I like keeping search results and answer quality separate in the evaluation. Did the retriever surface the right document? Did it return the right passage and version? Did the answer attribute the claim correctly? If the search misses the source, a well-written prompt can still produce a polished guess. Those checks tell me which part of the system is worth improving.
Liu and colleagues found that where relevant information appears in a long context can affect how well some models use it. I take that as a good reason to test the assembled input instead of assuming a large context window solves our retrieval problem. For a specific question I would send a small set of relevant, well-labeled evidence, then challenge the system with older documents that are easy to confuse with the new ones.
Every so often the correct response will be that the evidence is unavailable or conflicting. I include examples of both. I also look at what a person has to do next. If the answer can point straight to the missing report or the two conflicting versions, it still saved somebody work. Making up a single clean answer at that point creates a second investigation.
A first version I would actually ship
I would start with one recurrent decision and two or three trustworthy sources. For an engineering team, that might be figuring out whether a change is ready for release. Use the candidate revision, its test evidence, and the current release policy. Collect the examples a reviewer already understands. Include the cases where the revision changed after testing or where a build result was still pending.
Once I can explain how the software selected the evidence and a teammate can reproduce the answer, I have something to build on. Adding another source then becomes a concrete decision about what new question it answers and how we will know if it helps. I would much rather spend a morning on that than spend the same time tuning a prompt around evidence nobody can trace.