Skip to main content

validate_instruction

Function validate_instruction 

Source
pub fn validate_instruction(rendered: &str, summary: &str) -> String
Expand description

Build the validator’s one user message.

The validator sees the same flattened rendering the summariser saw — that is the ground truth the summary can be held to. It is asked only about omission, because that is how summaries actually fail: measured here, the summariser preserved a stated fact 3/3 while losing the traversal position 4/5, and measured elsewhere ~90% of compaction failures are omissions. Asking a checker to critique style invites rewrites; asking what is missing invites a list, which is what the retry needs.