v148 · Summarizer API · benchmark

Quality vs Speed Benchmark

Run the same text through all three performancePreference modes simultaneously. Compare output quality, word count, estimated inference time, and a key-facts faithfulness score side by side.

Origin Trial Summarizer API requires Chrome 130+ with the SummarizationAPI_v3 origin trial token, or chrome://flags/#summarization-api-for-google-ai enabled. If unavailable, this demo falls back to a local text-truncation simulator.

input text

Streaming output (shows token-by-token for each mode)

results

Speed fast
Words
Time (ms)
Run benchmark to see output…
Key-facts retained
Balanced balanced
Words
Time (ms)
Run benchmark to see output…
Key-facts retained
Quality quality
Words
Time (ms)
Run benchmark to see output…
Key-facts retained

how it works

  1. Feature-detects window.Summarizer. Falls back gracefully if unavailable.
  2. Creates three Summarizer instances via Summarizer.create({performancePreference: 'speed' | 'balanced' | 'quality'}).
  3. Fires all three summarization calls simultaneously via Promise.allSettled().
  4. When streaming mode is on, summarizer.summarizeStreaming(text) streams tokens into each card's output.
  5. Faithfulness score is simulated: counts how many of the input's noun phrases (words >5 chars, capitalised or content words) appear in the output.

The faithfulness score is a heuristic for demo purposes — not a ground-truth metric.

implementation reference

Need the exact API surface, compatibility boundaries, errors, lifecycle, and source links? Read the matching gendn reference ↗