Can an AI agent repair its own tool instructions?
A starting point for research into improving an answer in stages and using specialized model parts.
An agent needs to produce actions in a form its tools can understand. If an action is malformed, even a useful intention may never be executed. We began exploring whether a repair step could fix a small part of that problem.
Two ideas for generating an answer
A diffusion model starts with an incomplete or corrupted representation and improves it through a series of steps. In language-related work, one possible use is to refine a block of text or an action instead of generating every part in a single pass.
A mixture of experts is a model design that selects from specialised components for different inputs. The broader research direction asks whether iterative refinement and specialised computation could work together. That combined architecture remains an open idea; it was not the system tested in the repair experiment.
Start with a smaller repair problem
The local block-repair work focused on action and verification blocks: structured pieces of output an agent might use to call a tool or check a result. It prepared examples with introduced errors, interfaces for a refiner, a training entry point and an evaluation process.
This narrow task makes the question easier to examine. A repaired block must have a valid structure, but it must also preserve the action that was intended. Those are different measures of success.
For illustration, a repair might add a missing bracket to a tool call and make it readable by the tool. If it also changes the file name or leaves out an important argument, the call may still do the wrong thing. A useful evaluation must look beyond whether the format is accepted.
Valid structure is not the same as recovered meaning
A rule-based repair baseline produced valid output for 67 of 100 corrupted development examples. It exactly reconstructed none of them. A parser accepting a repaired block therefore did not show that the original action had been recovered.
This distinction matters when an agent uses tools. A repaired instruction may be readable while still naming the wrong file or leaving out a step. The repair has to preserve what the agent meant to do, as well as the format the tool expects.
What would show progress
A next experiment could compare the rule-based baseline, a trained refiner and a direct generator on the same set of corrupted blocks. It should measure valid structure, exact recovery, the behaviour produced when the action is executed, and total time separately.
A combined diffusion and mixture-of-experts approach would need its own implementation and comparison. The repair baseline is a starting point for the question, rather than a result for that combined design.