docs(groq): flatMap citations across all search executions (#69)#75
Merged
Merged
Conversation
…ions (#69) Live verification of the downstream consumer call (groq/compound + web_search) showed the model running multiple search executions in a single call — so `builtInToolResults` is an array of executions, and the previously documented `?.[0]?.results` pattern silently drops every execution after the first. That read compiles clean and returns a partial citation set with no error, so it would land truncated data in a consumer's store unnoticed. - README built-in-tools snippet now flatMaps results across all executions. - Citations note clarifies: iterate all executions (not just [0]); `score` is the provider's retrieval-relevance score, not an authority ranking; and response `content` (model's synthesized/curated answer) and `builtInToolResults` (raw retrieved hits) are different sets. Docs-only; no API change. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Follow-up to the #69 sprint, from a live verification of the downstream consumer call.
Why
Running stackbilt-web's exact planned call (
groq/compound+builtInTools: [{type:'web_search'}]+response_format: json_object) through the shipped code against live Groq, the model ran 2 search executions on the first real query. Multi-execution is the common case for research workloads — sometadata.builtInToolResultsis an array of executions, and the citation-read documented in S5 (and the issue body):…compiles clean and returns a partial citation set with no error. That's the one runtime-silent footgun in the otherwise-green feature; left uncorrected it would land truncated citations in a consumer's evidence store unnoticed. The
[0]pattern would be copied verbatim from the README into the downstream Librarian stage.Change (docs-only)
[0]);scoreis the provider's retrieval-relevance score (not an authority/quality ranking); and responsecontent(the model's synthesized/curated answer) vsbuiltInToolResults(raw retrieved hits) are different sets.No API change. The rest of the verification was green — see the review notes on the parent work.
🤖 Generated with Claude Code