The invention discloses a Chinese error
correction method and
system based on multi-agent
collaboration and retrieval enhancement, and belongs to the technical field of network space security. The method comprises the following steps: step 1, constructing a plurality of Chinese error correction expert agents and one Chinese error correction judgment agent based on a large
language model and an agent prompt project; step 2, establishing an error
correction text knowledge base, converting corpora in the
knowledge base into a vector
database, and accessing a Chinese error correction expert agent and a judgment agent for
information retrieval of the Chinese error correction expert agent and the judgment agent, enhancing context understanding ability and realizing a retrieval enhancement generation function; and step 3, designing a detection prompt, a discrimination prompt and a feedback prompt, constructing a multi-agent closed-loop feedback module, realizing information
collaboration, step-by-step reasoning, result
verification and iterative optimization of each agent, and completing a Chinese error correction task. According to the method,
generalization error correction can be realized under the condition of limited training data, and the adaptability of the model to unknown errors is improved.