-
Notifications
You must be signed in to change notification settings - Fork 4.7k
validating an agents output
An agent reading pages is a stochastic instrument pointed at a deterministic job. It is very good and it is not exact, so the output needs a check, and the check needs to be cheap enough that you actually run it.
Five, in order of cost. The first three are seconds.
Most listings state their own size: "1,240 results", "page 3 of 17", "showing 20 of 400". Compare your row count against it.
A short count is truncation or an early stop, and it is the single most common failure of a collection run. A read that came back clipped is one cause, and it announces itself when it happens: measured on a long page, the default text read returned 6,000 of 35,490 characters and said so in its own last line, per text, HTML, snapshot or screenshot. A silent short count usually means the walk stopped early instead.
Spot-checking the middle is the natural instinct and the wrong one. Truncation, timeouts and early stops all eat the tail, so the last row is where the damage is, and the first rows are always fine.
Open the last row's URL and compare. Thirty seconds, and it catches the class of failure that a sample of five in the middle never will.
Every line has the same number of fields; every number parses as a number; every date falls in a plausible range; no cell contains a whole sentence where a value belongs.
Column drift is the failure this catches: page one produces two columns, page four contains a comma inside a title and produces three, and every subsequent row is shifted. Any spreadsheet import that flags ragged rows does this for free.
How many rows have a raw value and no normalised one, and how many have an outcome that is not "done".
This is the number that tells you whether the dataset answers the question. Two awkward rows out of forty is a caveat; fifteen means the thing you are comparing is not comparable, which is a finding rather than a defect, and it is only visible if the agent was allowed to leave cells empty. Normalising values across sites is where that instruction belongs.
Take five rows and run them again. Disagreement between the two runs proves one of them is wrong, which is worth knowing.
Agreement proves less than it looks. Two runs of the same model on the same page share the same blind spots: if it misreads a label the first time, it will usually misread it the same way the second. Two agreeing runs rule out flakiness and say nothing about a systematic misreading.
For that, the only check is a human comparing a row against the page, which is check 2 done deliberately rather than as a spot check.
A correct extraction of the wrong thing. The agent read the price accurately, from the subscription option rather than the one-time one, on all forty sites. Every check above passes: the count is right, the shape is right, the values parse, the reruns agree.
Only a person looking at one page and one row together finds this, and it is worth doing once at the start rather than at the end. Run the first row alone and compare it against the page before releasing the list, which is the same discipline as one form submission per spreadsheet row.
Two of the five can be the agent's own job, and they are the two it is reliable at because they are arithmetic rather than judgement:
After finishing, state how many rows you wrote, what number the page said the total was, and how many rows you left empty and why. If those two numbers disagree, say so first.
That costs one sentence and it turns "here is your file" into a file with a declared coverage. The remaining three stay with you, because they require comparing against something the agent cannot see.
How do I check an AI agent's extraction? Count against the total the page stated, open the last row, check the shape mechanically, count the empties, and re-run a slice.
Why the last row rather than a random one? Because truncation and early stops eat the tail. The first rows are always right.
Do two agreeing runs prove it is correct? No. They rule out flakiness. A systematic misreading repeats identically, so agreement is not evidence against it.
What do the checks miss? A correct reading of the wrong element, on every row. Only comparing one row against the page by hand finds that.
Can the agent check its own work? The arithmetic parts, yes: row count against the stated total, and a count of what it left empty. Ask for both in the task.
See also: what an agent run should log, which is what these checks read, and deduplicating what an AI agent collects, because a row count is only meaningful once duplicates are resolved.
- The truncation behaviour used in check 1, a default text read returning 6,000 of 35,490 characters with a line saying so, is measured and sourced on text, HTML, snapshot or screenshot.
- The five checks are practice rather than a study, and the page presents them as such.
Checks one to three take a minute between them. Check five is the one people reach for first and the one that proves the least.
- OpenAI Operator alternatives
- Open-source Operator-style agents
- Is OpenAI Operator still available?
- OpenAI Operator vs Claude computer use
- browser-use alternatives
- Choosing an AI browser agent
- Open-source AI browser agents
- Open-source computer-use agents
- What is an AI web agent?
- AI browser agents vs traditional scraping
- Cloud browser infrastructure for AI agents, explained
- Browserbase alternatives
- Firecrawl vs an AI browser agent
- Skyvern alternatives
- Stagehand vs browser-use
- Project Mariner is gone: what replaced it
- Manus alternatives
- Gemini computer use vs Claude computer use
- invisible_playwright_mcp, reviewed honestly by its own wiki
- AI browser vs AI browser agent: which one do you want?
- AI browser agent vs RPA: which one fits the job
- AI browser agent vs n8n, Zapier and Make
- Vercel agent-browser alternatives, compared honestly
- What is an agentic browser? Definition and the two kinds
- Open-source agentic browsers: the three layers, compared
- Choosing an MCP server for browser automation: four axes
- Stealth MCP servers compared: Camoufox, nodriver, Patchright
- Playwright MCP alternatives, and the three you don't need
- Autonomous browser agents: the four rungs of autonomy
- What is actually free in the AI browser agent stack
- browser-use on GitHub: what the repo actually gives you
- Playwright MCP vs Chrome DevTools MCP: different jobs
- How to choose among MCP servers: a map by category
- Which MCP servers are worth adding to Claude Code
- MCP on GitHub: finding servers and judging them fast
- MCP vs an API: the decision, and what the wrapper costs
- MCP alternatives: when the protocol is the wrong shape
- Why does my AI agent get blocked?
- The timing signal AI agents give off
- Agent retry loops trip rate limits, not fingerprints
- Claude computer use detected as a bot
- browser-use getting blocked: what you can and cannot change
- Playwright MCP session blocked: four causes, four fixes
- Playwright MCP and captchas: what actually gets you past
- Cloudflare and a browser MCP server: what is being read
- Can an AI agent solve a captcha? The honest answer
- Getting an AI agent to fill out forms
- Which model to use with invisible_playwright_mcp
- Browser problem or model problem?
- Running invisible_playwright_mcp's browser from Claude Code
- Extracting data to a CSV with an AI agent
- Monitoring a page for changes with an AI agent
- Running invisible_playwright_mcp's browser from Claude Desktop
- Running invisible_playwright_mcp's browser from Cursor
- Using an AI agent to hunt for apartments
- Getting website data into Google Sheets with an AI agent
- Using an AI agent to download invoices from portals
- AI agents for web research
- Using an AI agent to test your own website
- Running invisible_playwright_mcp's browser from Cline
- Posting to social media with an AI agent
- Posting to Facebook with an AI agent
- Posting to Instagram with an AI agent
- Posting to X with an AI agent
- Automating LinkedIn posts: read this first
- Appointment bots: what they are and what an agent can legitimately do
- Track prices across sites with an AI agent
- Build a lead list with an AI browser agent
- Run an AI browser agent on a schedule
- AI browser agent with a local LLM: what changes
- Should you log your AI agent into your accounts?
- How to write a task an AI browser agent can follow
- Move data between two web apps with an AI agent
- The MCP server
- How the tools are shaped, and why
- Playwright MCP vs the Playwright CLI: which fits when
- Playwright MCP: browser is already in use, and the fix
- Playwright MCP best practices: four decisions that matter
- Playwright MCP with a proxy, and the three leaks it leaves
- A browser MCP server in GitHub Copilot: setup and limits
- Using a browser MCP server for web scraping: the pattern
- Which LLM for browser automation: the four properties
- How to build a browser agent, and what to take instead
- Getting an AI agent to log into a website: three routes
- MCP tools, resources and prompts: who controls each
- How many MCP tools is too many? The context arithmetic
- How to build an MCP server: the decisions, not the scaffold
- Local or remote MCP server: what changes, and what does not
- Writing an MCP client in Python: the thirty-line version
- Self-hosted AI agent: what one actually costs to run
- How long an AI browser agent takes per step, measured
- Text, HTML, snapshot or screenshot: what the agent should read
- Giving an AI browser agent a stopping condition
- Keeping an AI browser agent out of destructive actions
- Why did the AI agent click the wrong thing
- When the page changes under the AI agent
- Running one AI agent task across a list of sites
- Seeing a page as it appears in another country
- Getting data out of a dashboard with no export button
- Two browsers in one session: main and support
- Finding the dead links on a site with an AI agent
- Filling a CRM record from a company's website
- One form submission per spreadsheet row, with an AI agent
- Dated screenshots of a page as evidence
- Checking order and delivery status with an AI agent
- Reading a PDF that opens inside the browser
- Summarising a long page or thread with an AI agent
- Collecting every image on a page with its caption
- Collecting event and course listings with an AI agent
- Cancelling a subscription with an AI agent
- What an AI agent can and cannot do inside an iframe
- Shadow DOM and an AI agent: you can click it, you cannot read it
- Running invisible_playwright_mcp's browser from Codex
- What a page snapshot costs, per control
- Native selects and the ones that only look like selects
- Running invisible_playwright_mcp's browser from Gemini CLI
- Clicking by selector or by coordinates
- How long the agent waits before it gives up
- What a second browser costs
- Uploading a file with an AI agent, and why this one cannot
- Watching the agent work, and when it is worth it
- When not to use an AI browser agent
- Agent or script: deciding once instead of every time
- Using the keyboard instead of the mouse
- Secrets in an agent task: where they end up
- What an agent run should log
- Deduplicating what an AI agent collects
- Normalising values across sites
- Validating an AI agent's output
- Reading a table with an AI agent
- Driving a site's own search and filters
- The task works headed and fails headless