verify_response
Verify LLM-generated code against an ontological software contract to catch hallucinated or unauthorized method/function calls, returning validation status and violations.
Instructions
Verifies LLM-generated code against an ontological software contract to detect hallucinated or unauthorized method/function calls.
Args: response_code: The Python code snippet or markdown text produced by the model. contract_or_file: Either the rendered contract string OR the path to the original Python file. target_symbol: If contract_or_file is a file path, specify the target symbol to extract its contract.
Returns: Dictionary with validation status, count of violations, and list of invalid calls.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| response_code | Yes | ||
| target_symbol | No | ||
| contract_or_file | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||