REQUEST · GATE · INSPECT

Search-tool integration: prefer current evidence over a stale top hit

Inspect ranking, freshness, citation, and the chosen document.

Eight bounded stages · sixty-second inspection0 / 60 seconds
  1. WaitingWaiting for inspection
  2. WaitingWaiting for inspection
  3. WaitingWaiting for inspection
  4. WaitingWaiting for inspection
  5. WaitingWaiting for inspection
  6. WaitingWaiting for inspection
  7. WaitingWaiting for inspection
  8. WaitingWaiting for inspection

Inspect an integration boundary, not a live search engine

This offline lab computes lexical retrieval over three visible, fictional source records and validates an exact citation span before returning an excerpt. It sends no Google Search or Gemini request and executes no ADK Java code. The documents describe an invented service; their retry delays and quota are teaching values, not engineering recommendations. A current marker is supplied by the fixture, not inferred from the web. A correctly attributed excerpt may still be wrong, incomplete or unsuitable for a real question. This lesson separates source selection and provenance validation from answer quality.

Change the query and follow computed scores

Query chooses retry timeout, quota, or encryption rotation. The tokenizer lowercases words, removes punctuation and counts each distinct query term once. A document score is matched distinct query terms divided by all distinct query terms. For retry timeout, F1 matches two of two terms and F2 matches one of two; F3 matches none. Quota selects F3. Encryption rotation matches no document and must abstain. The pipeline discards zero-score documents, then ranks eligible documents by descending score and document ID as a deterministic tie-break. This simple word overlap is not semantic retrieval, Google ranking, a probability, or evidence that a document actually answers the question.

Compare source freshness with lexical preference

Evidence policy either requires a source marked current or ranks solely by lexical overlap. Search result set can mark every source current, mark F1 superseded, or mark all three superseded. Choose retry timeout with F1 superseded. Current-only selection excludes F1 and returns the F2 excerpt about four seconds; lexical selection still returns F1 about two seconds and explicitly warns that the selected source is superseded. With all sources superseded, the current-only policy abstains. The lexical policy can still return an attributed excerpt, so a valid citation must not be mistaken for compliance with a freshness requirement. Query quota isolates F3 and demonstrates that changing F1 alone should not affect that result.

Break the citation before publishing the excerpt

Citation fixture chooses an exact source span, no citation, or an end offset seven characters beyond the source. The validator checks matching document identity, integer offsets, nonempty bounds within the selected text, and exact equality between the quoted text and that source slice. Both missing and out-of-range citations block the answer, even when selection found a matching source. A successful answer is copied from the selected source rather than generated. The output records every candidate, its matched terms and score, eligibility, selected ID, freshness, citation and answer. These local character offsets use JavaScript string indices over an ASCII corpus; they do not implement every provider offset convention or prove semantic entailment.

Inspect every stage and save comparisons

Play tool flow reveals eight completed stages over sixty seconds; one stage completes every seven and a half seconds. At twenty-one seconds only Query and Corpus have completed. Pause tool flow freezes time, Resume tool flow continues, and Replay tool flow restarts after completion. Restart retains settings and speed but clears time. Timeline seeks and pauses. Speed offers half, normal and double pace and settles elapsed time at the old rate before a change. A hidden tab pauses. Changing any of the four scenario choices resets time and hides the final output. Capture baseline, Replace baseline and Clear baseline manage a comparison of visible output and inputs. Notes persist locally and Export notes downloads them. Expand experiment and Exit full screen change the view.

Read real grounding documentation separately

The related articles discuss actual tool integration and retrieval. Real search grounding may return source metadata and mappings between claims and supporting sources, with API-specific structures and display obligations. This fixture has no live results, network failures, credentials, billing, Search Suggestions, access-control checks, injection defenses or model-generated claims. It validates a local excerpt and its exact source span only. Do not copy its three-document score or current flags into a production relevance or trust assessment. Consult the provider documentation for the API being integrated and test the complete response, source mappings and required user interface independently.

Views are my own and do not represent any employer, past or present.

Search