Urgent.News

What's breaking now, across thousands of outlets.

Tech

Run it in the shadows first: how to earn an agent's permission with diffs, not demos

"It worked when I tried it" is the weakest sentence in software. It is especially weak for an agent, because the demo is a single sample drawn by the person who wants it to pass. The demo proves that a path exists. Production is the distribution of every other path. So the question I kept running into while operating an assistant was not can it do the task but how do I earn the right to stop…

Demonstrating an agent's capabilities through demos is insufficient for gaining an agent's permission, especially in software development. Shadow mode offers a more reliable approach, allowing the agent to practice before being granted permission to proceed independently. Shadow mode involves running the agent in a controlled environment where its actions are recorded, but not executed. The recorded actions are then compared to the human's actual actions through a process called diffing.

Diffing is a technique used to identify the differences between two sets of data. In the context of shadow mode, it involves comparing the agent's proposed actions to the human's actual actions. This comparison is done at a field-level, meaning that each individual data point is examined, rather than comparing entire text blocks. This approach yields four possible outcomes: identical, cosmetic, substantive, and unsafe differences.

Identical differences indicate that the agent's proposed actions match the human's actions exactly, and no further review is required. Cosmetic differences involve minor variations in formatting or wording, which do not affect the outcome and can usually be ignored. Substantive differences, on the other hand, represent meaningful variations in the agent's proposed actions compared to the human's actions.

These differences require human review to determine if they are valid or if there is a problem with the agent's definition of the task.

Unsafe differences are the most critical, as they indicate that the agent's proposed actions could lead to incorrect or harmful outcomes. These differences should always block the promotion of the agent to full autonomy. To ensure that the agent is operating effectively and safely, it is essential to establish a clear baseline for human performance through baseline agreement. This involves having multiple humans independently perform the same tasks and comparing their results through diffing.

Once a baseline has been established, the focus should shift to measuring the agent's performance relative to this baseline. Key metrics to monitor include the count of unsafe diffs, the substantive-diff rate, cosmetic-diff rate, coverage of proposals, and shadow mode precision. By closely monitoring these metrics, developers can ensure that the agent is functioning as intended and make necessary adjustments to improve its performance.

Written by urgent.news from Dev.to's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.

Read the original at dev.to →

More in Tech

I got a RAG app running on a 512 MB free server. The trick was not running the embedding model at all.

Most "build a RAG app" tutorials work fine in a notebook. Then you try to put one online on a free host, and it falls over.

  • Use cloud inference service Qdrant Cloud to embed text instead of running an embedding model locally
  • Create custom LangChain retriever to pass raw text to Qdrant's querypoints method
  • Mitigate Groq LLM API token limit by using higher maxtokens (1024) and low reasoningeffort

More from Saturday 14 November →