TO2D

Architecture Lab

Language Models / Environment Discovery

Error Signals and Environment Discovery

In many systems, failures do more than indicate that something went wrong. They also reveal information about the structure of the environment.

When a language model interacts with a real system, the full environment is often not known in advance. The system may only have partial information about the data, interface, or constraints it must operate within.

Error signals help uncover that missing information.

The Basic Pattern

Consider a simple interaction loop.

input → model → output → verification → error

Each step produces additional information about the environment. The process can be represented as:

x → M(x) → y → E(y)

where:
  x    system input
  M    model operator
  y    candidate representation
  E    environment feedback (error signal)

The error signal becomes a source of information.

Extracting Environment Information

When the model output fails, the error often reveals something about the system.

missing JSON field
invalid schema
element not found
timeout
incorrect calculation

Each of these signals reveals a constraint that the system must satisfy.

Error Signal

missing field "confidence"

Discovered Constraint

representation must include
confidence

The error signal exposes a rule of the system.

Example: Browser Automation

Browser automation environments are especially rich in error signals.

click failed: element not found

This reveals something about the environment: the element selector was incorrect, the element may not exist, or the page structure differs from what was expected.

Over time the system can infer structure about the environment.

pagemapping → automation specerror signalenvironment insightbuilds betterrepresentation

Environment Discovery Loop

The interaction becomes a discovery loop. Instead of simply retrying, the system learns something about the environment.

environmentmodel proposalsystem verificationerror signalenvironment insightimproved mappingproposeverifysignaldiscoverimprovediscoveryloop

Why This Matters

Many real-world systems contain structure that is difficult to specify in advance: websites, documents, APIs, user-generated data, operational systems.

In these environments, it may be impossible to fully define the correct representation beforehand. Error signals allow the system to gradually discover those constraints.

Relationship to Representation Mapping

Representation mapping converts information between domains. Error signals reveal when the mapping fails. Those signals then guide improvements to the mapping.

environment → model → representation    (mapping)
representation → verification → error   (signal)
error → insight → improved mapping       (discovery)

Relationship to Deterministic Boundaries

Deterministic boundaries enforce system guarantees. When a boundary detects a violation, it produces an error signal. These signals provide structured feedback about what the system requires.

candidate representation
        │
deterministic boundary
        │
error signal → environment constraint

Error Signals as Control Feedback

Error signals behave like a control feedback signal. In control systems, the difference between the desired output and the actual output drives the next correction.

e(t) = desired(t) - actual(t)

In a language model system, the error signal plays an analogous role. The deterministic boundary defines what the system expects. The model output is what was produced. The difference between them is the error signal.

e = boundary(expected) - model(actual)

This signal drives the next iteration, just as in a closed-loop control system. The environment discovery loop is structurally equivalent to a feedback control loop operating on representations rather than physical quantities.

inputoutpute = expected - actualerror signal (feedback)

From Failure to Information

In traditional software systems, errors are often treated as terminal events. In probabilistic systems, failures can become a source of information.

attempt → failure → signal → improved attempt

This turns errors into a mechanism for discovering how the system behaves.

Summary

Error signals indicate when model outputs fail to satisfy system constraints. However, they also reveal information about the environment and the requirements of the system.

When systems treat errors as signals rather than simple failures, they can use those signals to improve representation mapping and gradually discover the structure of the environment.

input → model → representation → error signal → environment insight

Failures become a source of knowledge.