perf_correct
Corrects LLM-generated output by detecting and fixing hallucinations, schema violations, semantic inconsistencies, and instruction drift. Returns corrected content with confidence scores or rejects unfixable errors.
Instructions
General-purpose LLM output correction. Classifies error type (hallucination, schema violation, semantic inconsistency, instruction drift) and applies specialized correction. Use when unsure which specific tool to apply or when output has multiple error types. Returns corrected output with confidence scores, or rejects if unfixable.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| content | Yes | The LLM-generated output to correct. | |
| original_prompt | No | The prompt that generated this output. Helps detect instruction drift. | |
| target_schema | No | If output should conform to a schema, provide for combined correction. | |
| correction_budget | No | 'fast': single-pass ~50ms. 'thorough': multi-pass with adversarial verification ~500ms. Default: 'fast'. |