The invention provides an agent illusion
correction method and device. The method comprises the following steps: firstly, analyzing and globally planning a problem input by a user, generating an
execution plan comprising at least one subtask, performing reasoning circulation and retrieval enhancement based on the
execution plan, generating an enhanced context evidence set, then performing screening and context optimization
processing on the enhanced context evidence set, generating an optimized context, and finally, performing context optimization
processing on the optimized context. And then, generating an initial answer based on the optimized context and the question, carrying out factuality and logic consistency closed-loop
verification on the initial answer to detect whether illusion exists or not, if the illusion is detected, correcting the initial answer, generating a corrected answer, and recording the illusion event and the correction process to the reflection
knowledge base. According to the method, self-correction and
continuous optimization are realized through a closed-loop mechanism of problem
decomposition,
global planning, reasoning circulation, retrieval enhancement and optimization and correction reflection, so that the reliability and
interpretability of agent answering are improved.