DEV Community

Cover image for Proofreader vs. Rewriter vs. Prompt API: Test the Task, Not the Demo

Proofreader vs. Rewriter vs. Prompt API: Test the Task, Not the Demo

Raju Dandigam on November 23, 2026

“Make this message better” is not one task. It can mean correcting a spelling mistake, changing the tone, shortening a paragraph, or clarifying an ...
Collapse
 
paullovelace profile image
Paul Lovelace •

'Make this message better' is not one task — that line alone is worth the post, because every writing-API demo I've seen feeds all three APIs the same sentence and calls the difference a result. The Room 204 fixture is the part I'd steal: a condition that can silently disappear is exactly the failure that matters, and a literal-check catching the $250 but missing the weakened commitment is such a clean illustration of why mechanical checks aren't enough. One question: you keep the length setting stable for the tone comparison — do you think the Rewriter's length drift is a real-world problem, or mostly an artifact of the demo setup?

Collapse
 
raju_dandigam profile image
Raju Dandigam Google Developer Experts •

@paullovelace Keeping length as-is mainly controls this comparison: otherwise tone and compression change together. Length drift can matter in a real editor when a message must fit a field or notification, but I would evaluate shortening as its own task with its own preservation rubric before drawing that conclusion from this fixture.

Collapse
 
johnclentoira profile image
john Clent Oira •

Really interesting comparison, especially the point about testing preservation separately from fluency. I've seen similar challenges with LLM-based editing pipelines, where the output looks better but quietly changes the original intent. I'm curious, have you experimented with combining deterministic validation and LLM-as-a-judge to catch semantic drift? I'd love to discuss how this approach could scale in production, particularly for high-volume document processing.

Collapse
 
raju_dandigam profile image
Raju Dandigam Google Developer Experts •

@johnclentoira I have not run an LLM judge in this companion. A judge could help triage high-volume outputs after literal and structural checks, but I would calibrate it on held-out, human-scored examples of changed commitments and review disagreements. Otherwise the judge can reward fluent drift just as the editor does.

Collapse
 
johnclentoira profile image
john Clent Oira •

I agree that an LLM judge should be validated against human-reviewed examples first. What acceptance criteria would you use before trusting it to triage production rewrites, particularly for subtle changes to approval conditions or commitments?

Collapse
 
bhaveshvaghela profile image
Bhavesh Vaghela •

The Room 204 example shows the limit of literal checks well: a sentence confirming the booking keeps 204, $250 and Friday and still passes. I see the same thing with auto-captions in video, where every word is there but a "not" gets dropped and the meaning flips. Would a small check on negation and condition words (not, unless, until) fit in the mechanical layer, or does that always end up in the human rubric?

Collapse
 
raju_dandigam profile image
Raju Dandigam Google Developer Experts •

@bhaveshvaghela A mechanical check for missing not, unless, or until is useful as an early warning, especially for captions. It still cannot tell whether the negation has the same scope or whether a rephrased condition is equivalent. I would keep that check as a cheap flag and score the actual commitment with the human rubric.

Collapse
 
promptauditsaas profile image
 PromptAudit •

Testing the actual task rather than the demo is spot on — especially in the browser where the input context is often messy.

One challenge we see frequently with browser-side prompt APIs is that users inadvertently pass structured secrets or personal data into the prompt context before it reaches the model. How do you handle client-side input sanitation or masking before invoking the Prompt API?

Collapse
 
raju_dandigam profile image
Raju Dandigam Google Developer Experts •

@promptauditsaas This lab sends the brief to Chrome’s on-device API, not a cloud endpoint, but local processing still needs data minimization. I would keep the input limited to the selected text, show it before invocation, and make masking an explicit, reviewed step: silently replacing a name or amount could change the preservation task we are trying to test.

Collapse
 
hammiwor profile image
hammi •

solid writeup. the part about proofreader vs. rewriter vs. prompt api stuck with me.

Collapse
 
raju_dandigam profile image
Raju Dandigam Google Developer Experts •

@hammiwor Thanks. Writing the allowed change first makes the API choice testable: a grammar pass should preserve the commitment, while a formal rewrite may change wording but still must keep the room, budget, deadline, and approval condition.

Collapse
 
robertpaschal profile image
Odinaka Robert Nnamani •

the Room 204 check proving $250 survived while missing that the message now confirms instead of holding conditionally is the whole case for testing the task, not the demo.

Collapse
 
raju_dandigam profile image
Raju Dandigam Google Developer Experts •

@robertpaschal Exactly. That confirming sentence is a constructed negative fixture, not an observed API failure. It makes the limit of the literal check visible, so the review rubric has to ask whether the approval condition and provisional hold survived.

Collapse
 
the_daily_flare profile image
The daily flare •

I think testing the task itself is the part I would trust most here.

Collapse
 
raju_dandigam profile image
Raju Dandigam Google Developer Experts •

@the_daily_flare Agreed. The key is to define the task before comparing outputs. A fluent rewrite that changes “hold until Friday” into a confirmed booking has failed even if it keeps every number and proper name.