What it is for
The honest objection to a context-selection service is: how do I know it would not have thrown away something my model needed? Shadow mode answers it on your own traffic instead of on ours. Needlepath runs the full computation and reports what it would have selected and what that would have saved, while you keep sending your full context to your model, unchanged. Nothing about your output moves. Nothing is at risk. You run it for a week, look at the engage rate and the savings on your real workload, and then decide.How to run it
Shadow mode is a calling pattern, not a wire field. Call/v1/context/select
as normal, record the answer, and ignore it:
1
Never let it affect the real call
Wrap it so that any failure is swallowed. A shadow measurement that can break
production is worse than no measurement.
2
Ignore the rendered block
You are not going to use
rendered_context. render: false is the field for
saying so and it is
currently ignored,
so the block is built and returned regardless; discard it client-side. Send
the field anyway; it starts working without a change on your side.3
Run it out of band if latency matters
If your critical path cannot absorb the extra round trip, fire the shadow call
asynchronously, or sample it: pick a fixed fraction by a stable hash of
request_id, sized so the sample still covers every workload you care about.What to record
The last one matters more than it looks. An aggregate savings number does not
tell you whether a specific answer would have degraded: the dropped-record list
does. Spot-check the turns where something you expected to survive did not.
Costs
A shadow call is a normal request: it counts against your rate limit and your daily quota, and it is priced exactly like the same request made live. What shadowing removes is the risk of changing your output, not the cost of finding out. Two consequences:- You are roughly doubling your request rate if you shadow every call. Check your limits before you start, and consider sampling.
- The per-request ceiling applies as normal, so a payload that would
413live also413s in shadow. That is useful information: it tells you the workload needs splitting before it can be selected at all.