verify_and_repair
Verify LLM-generated code, detect hallucinated identifiers, and suggest actual repo APIs and symbols to use instead.
Instructions
Verify LLM-generated code and suggest repairs for hallucinations.
Combines BIPT verification with rejection analysis to identify hallucinated identifiers and suggest which real APIs/symbols from the context should be used instead.
This is a single-shot verification + feedback tool — it does NOT call an LLM. For the full repair loop (FORGE), use the Python SDK: from entroly.verifiers import forge_loop
Args: prompt: The original user request that generated the code code: The LLM-generated code to verify context: The repository context provided to the LLM
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"prompt": "<prompt>",
"code": "<code>"
},
"name": "verify_and_repair"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| code | Yes | ||
| prompt | Yes | ||
| context | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |