Skip to main content

Module normalization

Module normalization 

Source
Expand description

§Normalization

Detects malformed tool protocol and narrated next steps in ReAct loop output, and builds retry prompts to guide the model back to correct behavior.

Enums§

NormalizationPattern
Describes the kind of protocol failure detected in model output.

Constants§

MAX_NORMALIZATION_RETRIES
Maximum number of normalization retries before giving up.

Functions§

build_normalization_retry_prompt
Build a system-level retry instruction for the given pattern.
detect_normalization_failure
Inspect content and return the first NormalizationPattern detected, or None if the content looks well-formed.