How would you set the freshness targets an assistant commits to for an HR handbook, an incident queue and a code repository, and what does each target cost?
answer
- when do people ask after a change
- harm of a stale answer
- split each target into stage budgets
- deletes tighter than edits
- stages you do not control
basics
~20 sSet each target from how soon people ask after a change and how harmful a stale answer is, then price it: detection, reserved embedding and churn spend. Give deletes and revocations tighter targets and split each target into per-stage budgets.
solid answer
~50 sA target is a per-source, per-change-kind percentile with a consequence when missed. Base it on need: incident tickets are asked about while the incident runs, so in this scenario minutes; the handbook changes weekly, so hours are fine for edits; code is asked about soon after merges, so half an hour, scoped to the main branch to cap embedding spend. Then price it: a tight target needs faster detection that spends source quota, a reserved live lane, and embedding money on every change. Give deletes and revocations a target at or below the edit target, because lateness there is exposure, even when that forces a lighter, more frequent delete and permission check. Split each target into stage budgets, never promise below the stages you do not control, agree the targets with each source's owners, and revisit them when use changes.
code
yaml · 18 lines# illustrative per-source freshness targets; keys are invented
sources:
incident-queue:
edit_p95: 5m
delete_and_revocation_p95: 2m
stage_budget: {detect: 30s, parse: 30s, embed: 3m, write: 1m}
show_behind_notice_after: 20m
hr-handbook:
edit_p95: 6h
delete_and_revocation_p95: 1h
stage_budget: {detect: 5h42m, parse: 6m, embed: 6m, write: 6m}
show_behind_notice_after: 6h15m
code-repository:
scope: main-branch-only
edit_p95: 30m
delete_and_revocation_p95: 30m
stage_budget: {detect: 1m, parse: 5m, embed: 20m, write: 4m}
show_behind_notice_after: 45mgo deeper
Know that different sources need different freshness, and that deletes and access changes matter more than ordinary edits.
Explain what a target is made of: a percentile, a window, a kind of change, and a visible consequence when it is missed.
Split a target into stage budgets, show where a source cannot meet it with its current detection, and name the stages outside your control.
Decide which promise each source gets from how soon users ask and how much staleness harms them, price each one, agree it with source owners and revisit it as use changes.
## What a freshness target is A **freshness target** is a commitment about how far behind its source a retrieval index may fall, for example "95% of incident-queue edits are retrievable within five minutes of being made". It is stated per source and per kind of change, as a percentile over a window, and it has a consequence when missed: at the least, a visible notice to users that the source is behind. A single target for the whole assistant is almost always wrong. Sources change at different rates, people ask about them on different clocks, and the cost of meeting a tight target differs widely from one source to the next. ## The inputs that decide it 1. **How soon after a change people ask about it.** Incident tickets are asked about while the incident runs; handbook policies are asked about days or weeks after they change; code is asked about soon after a merge. 2. **The harm of a stale answer.** A stale incident status sends responders the wrong way; a stale handbook paragraph is often caught by a human before it matters; a stale code answer misleads but gets checked against the code. 3. **What the target costs to meet.** More frequent polling spends the source's request quota; webhooks need a receiving service and a backstop; tight embedding targets need reserved throughput that sits idle part of the time; high-churn sources spend embedding money on every change. 4. **The stages you do not control.** A source whose change notifications themselves lag, or a vector store that applies writes asynchronously, sets a floor that no pipeline work can beat. A target below that floor is a promise nobody can keep. ## A worked set of targets The figures are this scenario's: | Source | Changes | Stale-answer harm | Edit target (p95) | Delete and revocation target (p95) | Main cost | |---|---|---|---|---|---| | Incident queue | every few minutes | high | 5 min | 2 min | reserved live-lane embedding | | HR handbook | weekly | medium | 6 h | 1 h | a light, frequent check for deletes and access changes | | Code repository | many merges a day | medium | 30 min, main branch only | 30 min | embedding spend on merge churn | Each edit target is then **split into a stage budget** so each part of the pipeline knows its share: - incident queue: detection 30 s, parse 30 s, embedding 3 min, write 1 min, five minutes in all; - HR handbook: with a uniform wait across a six-hour poll, the p95 detection wait is about 5 h 42 min, which leaves about 18 minutes for everything after detection; - code repository: detection 1 min, parse 5 min, embedding 20 min, write 4 min, thirty minutes in all. Scoping the code target to the main branch is itself a decision: indexing every branch multiplies the embedding bill for content few people ask about. ## Deletes and revocations get a tighter target For every source, deletes and permission revocations should have a target at or below the edit target, because a late one is an exposure window rather than staleness. That target can **force the detection design**. A handbook polled every six hours cannot meet a one-hour revocation target, so it needs a cheaper, more frequent check on the delete and permission path; listing document IDs and access lists usually costs far less than re-fetching content. How that check works is the connector's design. The target is what requires it. ## Committing and revisiting - **Write the targets down per source**, with the stage budget and the user-facing consequence, such as showing a behind notice once a source is fifteen minutes past target. - **Agree them with the people who own and use each source:** the incident team, the HR owners, the engineering leads. - **Price each one.** A target that needs a webhook service, a reserved lane and a frequent check costs engineering time and running money; say what it costs before committing to it. - **Revisit when use changes.** A handbook that starts being asked about on the day a policy changes needs a tighter target, or a manual sync when a planned change is published. Alerting when a target is at risk, with burn rates and error budgets for an index-lag objective, is covered with search-index builds. The lead's decision here is which promise each source gets, what it costs, and which stage carries it.
- Why is one freshness target for the whole assistant usually a mistake?Either it is tight enough for the incident queue, and you pay for frequent detection and reserved embedding on sources nobody needs that fresh, or it is loose enough for the handbook, and incident answers arrive dangerously late. Per-source targets put the cost where the need is.
- A team asks for a fifteen-minute edit target on an HR handbook that is polled every six hours. How do you respond?Price it first: meeting it means a change notification or a frequent check, which costs source quota and a receiving service. Then ask what drives the need. If it is planned policy changes on known dates, a manual sync when a change is published, or a tighter target only for deletes and access changes, may meet it far more cheaply.
- Every source should get the tightest target the pipeline can manage.
- Freshness targets only need to cover edits, not deletes or revocations.
- A target can be promised without knowing the store's apply delay.
- Available embedding capacity should decide each source's target.
- Once agreed, freshness targets never need revisiting.