classify_mismatch (agent/hypothesis.rs)

vtcode · crates/codegen/vtcode-core/src/core/agent/hypothesis.rs · rust · Apache-2.0
ai, tag:embed-classified

Classifies mismatches between an agent's hypothesis and observations to provide structured feedback for autonomous error correction.

// Source: https://github.com/vinhnx/vtcode | License: Apache-2.0 | Copyright 2025 Vinh Nguyen
// Provided via justclaw.it.com; keep this notice with the code.
//! Hypothesis-loop mismatch classification for the agent runloop.
//!
//! desirable loop: hypothesis → observation → mismatch → inspect evidence →
//! revise hypothesis. This module is the pure, testable core of that loop:
//! it names the mismatch, but never blocks, retries, or performs I/O. The
//! binary's failure diagnosis and loop notices call into it to frame
//! model-facing feedback; the evaluator provides a count-based heuristic.
//!
//! Dimension key for [`MismatchEvidence`] (index → field → meaning):
//!
//! | field                 | meaning when set                                          |
//! | --------------------- 

... (truncated -- full source via MCP)

See the full source, get the GitHub permalink, and search for more like it.

Get a free API key