Recipes / Ground a model answer in current reporting without wasting the context window

Ground a model answer in current reporting without wasting the context window

/stories in hybrid mode. The parameters matter less than the reasoning behind them, so that is most of what is below.

The request

GET /stories
  ?q=<the user's question, unmodified>
  &mode=hybrid
  &from=<now - 7d>
  &limit=8

Why these parameters

The common mistake here is reaching for article search. On a busy day that returns twenty rows describing one event, and the model then spends most of its context learning one fact. Worse, repetition reads as significance — a model shown the same claim twenty times weights it as well-corroborated when it has seen one wire report twenty times. Hybrid mode because the query was written by a person or paraphrased by a model, and neither matches newsroom phrasing reliably.

What comes back

Eight distinct events, each with its outlet list. That fits comfortably in a context window and gives the model genuine variety to reason over, plus a defensible corroboration signal in the outlet count rather than in raw repetition.

How this goes wrong

Using /search with a high limit and letting the model deduplicate. It cannot, reliably, and you have paid for every duplicate token to find that out. If you change one thing about a news-to-LLM pipeline, change this.

Adapting it

For a research agent rather than a single answer, let the model call find_related on its best result instead of issuing another search. Models reformulate badly under uncertainty and each reformulation costs a request, so a similarity lookup from a result it already trusts is both cheaper and usually better. If answers must cite sources, return the outlet list with each story and instruct the model to cite the outlet rather than the story identifier, which means nothing to a reader.

Running it for real

Set a per-run request budget. Framework agents commonly issue three to five requests per user question because they retry when a first result looks unsatisfying, and that multiplier is invisible in testing where you watch one query at a time. Put the story-grouping tool first in the tool list and describe it as the default; given two similar tools an agent takes the first plausible one, and if that is article search it will fill its own context with duplicates and then reason over them.

When this is the wrong tool

Do not use this when the question is not actually about current events. Models reach for a news tool whenever one is available, and grounding a question about a stable fact in recent coverage makes the answer worse rather than better — it anchors a general question to whatever happened to be published this week. Describe the tool as being for current events specifically, and expect to reinforce that in the system prompt. This recipe also cannot supply article bodies, so if your use case requires the model to read full text rather than reason over headlines and snippets, this is the wrong foundation and licensing text directly from publishers is the honest path. Finally, a seven-day window is a default rather than a rule; for fast-moving stories it is far too wide.

Related recipes