The Comparator Trap: Why High-Stakes AI Fails

原文首发:The Comparator Trap: Why High-Stakes AI Fails(知乎专栏:陈杰的金融笔记)

Chapter 1: Harness Engineering as Closed-Loop Control

The Paradigm Shift: From Open-Loop to Closed-Loop

In the current generative AI landscape, most development teams are inadvertently stuck in an open-loop mindset. Prompt engineering and context engineering, regardless of how meticulously detailed they are, function as open-loop systems. They operate exactly like a traditional toaster: you turn a dial to three minutes, and the heating coils activate blindly. The toaster possesses no internal feedback mechanism to know if your bread is perfectly golden or actively catching fire; it simply executes its pre-set instructions without checking the actual state of the environment.

Harness Engineering represents a fundamental shift to a closed-loop control system, mirroring the mechanics of a modern thermostat. When you input a target temperature, a thermostat does not blast air blindly. It continuously samples the room’s actual temperature, calculates the error variance (the delta between reality and the target setpoint), and automatically adjusts the HVAC output until equilibrium is met.

The Core Thesis

The essence of Harness Engineering is using deterministic software tools to boundary, constrain, and validate the behavior of probabilistic LLMs.

Large Language Models are, by definition, probabilistic generators subject to prompt injection, confirmation bias, and behavioral drift. By wrapping these probabilistic engines within a rigid, deterministic harness layer, we transform raw generative text into a predictable, engineering-grade system component capable of autonomous execution.

The Detailed Technical Implementation

For detailed research on agent harnesses, refer to the following studies:

📂 Attachment: 2026-6-28-Jack-The Agent Harness Framework.pptx (0.18MB)


Chapter 2: The Luxury of Perfect Observability: Why Coding Agents Excel

To diagnose why AI fails in high-stakes business lines, we must first deconstruct the unique environment that allowed coding agents to disrupt the market first.

It is important to state an engineering reality: coding agents cannot solve every problem perfectly. Compiling cleanly does not mean the code is free of hidden architectural flaws, race conditions, or subtle business logic bugs. However, despite not being a 100% complete silver bullet, coding agents have prospered wildly and triggered wave after wave of technical layoffs.

They achieved this massive commercial disruption because the software development environment provides an inherent, low-cost, and absolute semi-deterministic binary feedback loop to the system’s sensors.

When a coding agent mutates an environment, the feedback is immediate and high-signal:

  1. The Binary “Yes”: The code compiles cleanly, or the test suite returns a success code. The harness senses this state, updates the operational timeline, and safely moves forward.
  2. The High-Signal “No”: The environment rejects the change. Crucially, the system does not just say “failed.” It hands the harness a rich, deterministic, structured payload—such as standard compiler errors, raw stack traces, or explicit unit-test tracebacks (e.g., via pytest).

This is the holy grail of control theory. The harness sensor captures a precise, quantifiable error variance. It does not have to guess why or how the model drifted; the environment itself isolates the exact coordinates of the failure. Because failure is perfectly observable, the harness can effortlessly feed a highly localized correction constraint back into the model’s active context window.


Chapter 3: The Comparator Trap in High-Stakes Domains

When this exact same agent architecture is ported into high-stakes enterprise domains like Finance, Law, and Medicine, it immediately collapses. To fix this, we must diagnose the exact nature of the trap.

These industries do not actually lack state observability—we have real-time market tickers, comprehensive patient charts, and exhaustive legal databases. Instead, they fall into The Comparator Trap: they completely lack an objective, automated Comparator (the mechanism that calculates the error delta between an action and the target setpoint).

DomainWhat is Missing? (The Absent Comparator)
FinanceThere is no native “finance-compile” to instantly evaluate whether an unstructured, cross-border asset-allocation strategy contains a hidden structural compliance breach.
LawThere is no automated “pytest” to flag that an open-ended phrasing change on page 90 of an acquisition contract has silently nullified an indemnity clause on page 12.
MedicineThere is no low-cost, zero-risk sandbox to run a clinical triage recommendation where a minor miscalculation wouldn’t result in catastrophic real-world liability.

The Empirical Proof: Why Enterprise AI is Stuck in the “Read-Only” Shallows

If you look at where generative AI is actually deployed in production across major enterprises today, the pattern provides undeniable proof of this trap. The industry is overwhelmingly bottlenecked at non-critical, low-liability peripheral use cases:

  • RAG Chatbots: Internal Q&A tools pulling HR policies or synthesizing dense internal PDFs.
  • OCR & Document Parsing: Extracting structured fields from standardized invoices or forms.
  • Tier-1 Customer Support: Handling front-line chat inquiries with highly restrictive, text-matching guardrails.

Why haven’t these multi-billion-dollar industries deployed sovereign, autonomous agents to actively rebalance investment portfolios, execute binding corporate mergers, or write patient prescriptions?

It is not a limitation of model intelligence; it is a direct consequence of the Observability Trap. RAG, OCR, and customer service bots are popular because they are inherently “read-only” or low-stakes applications where a human supervisor is forced to act as the missing closed-loop sensor.

The moment we attempt to cut the human out and move to autonomous “write” operations—where the agent takes irreversible actions based on its own output—the system collapses because the harness layer is blind. We are stuck in the shallows because we haven’t built the infrastructure to see in the deep.

The Core Failure Modes: Feedback Delay & Self-Evaluation

Two major engineering bottlenecks occur when trying to close the loop in these semantic fields:

  1. Catastrophic Feedback Delay: In the real world, the true “feedback” of an enterprise action has massive latency. An investment strategy takes months to prove its returns; a legal contract clause might take years to be tested in a lawsuit. In control theory, high latency in the feedback loop inevitably introduces system oscillation and instability.
  2. The Self-Evaluating Death Spiral: Faced with a lack of a native, real-time compiler, developers commit the ultimate architectural sin: they ask the LLM to evaluate its own output. This transforms the agent into a completely blind, open-loop system that is highly susceptible to:
    • Severe Confirmation Bias: The model looks at its own faulty generation and confidently judges it to be correct.
    • Token Cognitive Drift: Over multi-turn semantic interactions without an external anchor, the model subtly loses track of the original target setpoint. The agent stalls, the tokens rot, and the system fails silently.

Chapter 4: Conclusion: Harness as the Risk-Breaker, Not the Absolute Judge

Shifting the Focus: Proxy Simulators & Safe Boundaries

The enterprise AI bottleneck is no longer a cognitive ceiling issue. Upgrading to a more expensive, “smarter” foundational LLM or writing more elaborate prompts will not rescue a system trapped in an evaluation vacuum.

To deploy sovereign agents safely in high-liability environments, software architects must pivot 100% of their focus toward engineering synthetic comparators and proxy simulators. Because real-world feedback is severely delayed, the harness must construct high-frequency, local simulation sandboxes—such as automated historical backtesting engines or graph-based contract dependency linters—to shorten the feedback loop latency.

The True Role of the Harness

Furthermore, we must reframe our expectations of determinism in a semantic world. The goal of Harness Engineering in high-stakes industries is not to magically prove that an LLM’s decision is the “absolute optimal strategy.” The true role of the harness is to serve as a deterministic risk breaker and safety guardrail.

We do not expect the harness to know if a legal brief is beautifully written or if a clinical diagnosis shows medical brilliance. Instead, the harness uses hardcoded invariant constraints, strict schema firewalls (like Pydantic objects), and local database lookups to 100% rule out catastrophic failure modes.

The harness doesn’t need to know how to cure the patient; it just needs a deterministic code lookup to instantly intercept and mutate a tool call if the model attempts to prescribe a fatal drug-to-drug contraindication.

The next frontier of enterprise AI is not about making models think better; it is about building the deterministic harness that establishes exactly where they are allowed to act, and giving the system the exact visibility required to stop them when they fail.


Reference

  1. 李宏毅:AI Agent的成败在 Harness
  2. 90% 的代码交给 AI 之后,字节发现了一个反常识的真相