Maintaining factual accuracy is a core challenge in developing reliable AI agents. Over time, an agent's knowledge base can accumulate errors, whether from initial misconfigurations, outdated information, or even self-generated inaccuracies. To address this systematically, we're introducing correction-pipeline, an AI agent skill designed to trace a factual error to its source and fix it methodically, rather than merely acknowledging the mistake. This tool helps ensure the integrity of your AI agent's responses by going beyond surface-level corrections to resolve issues at their root.
This skill is built for developers and operators who need a robust mechanism for maintaining the veracity of their agent's outputs, ensuring that factual discrepancies are not just identified, but truly resolved within the system's foundational knowledge.
How correction-pipeline Works
The correction-pipeline operates through a detailed, eight-step process to ensure thorough error resolution. When an inaccuracy is detected, the skill first searches the brain for the specific wrong claim. Following this, it checks memory files for any contamination, looking for instances where the error might have originated or spread. Next, it reviews identity files, specifically SOUL.md and USER.md, for any misleading passages that might be contributing to the incorrect information.
The fourth step involves querying the facts table for incorrect entries, a critical step for data-driven inaccuracies. After gathering this information, the skill classifies the error type into one of three categories: brain error, hallucination, or stale data. This classification guides the subsequent fix. The sixth step is to fix the source appropriately, which could involve editing pages, updating facts within the facts table, or re-rendering identity files to remove the misleading passages. Once the source is corrected, the tool checks for propagation across other pages within the brain repository, ensuring the fix is comprehensive. Finally, it reports all findings to the user, providing transparency on the error and its resolution.
For example, if a user queries the agent about a specific financial regulation, and the agent provides an outdated effective date, correction-pipeline would be triggered. It would search the brain for that date, query the facts table for the regulation's entries, classify the error as 'stale data,' update the effective date in the facts table, and then verify no other pages still reference the old date, before reporting the successful correction.
Triggering the Correction Process
Unlike general maintenance routines, correction-pipeline is activated by specific user cues. The system listens for direct user feedback indicating a factual error. The primary triggers that initiate the correction sequence are the phrases 'that's wrong,' 'I never said that,' and 'correct that fact.' These explicit statements signal to the AI agent that a factual discrepancy has occurred and prompt the skill to begin its diagnostic and repair protocol. This design ensures that the tool focuses its resources on addressing confirmed user-identified inaccuracies, providing a targeted approach to maintaining data integrity.
Scope and Limitations
It is important to understand the specific scope of this skill. Correction-pipeline is designed for tracing and fixing factual errors at their source. It is not intended for general brain maintenance; such tasks are handled by other dedicated skills like 'maintain.' Furthermore, it does not address issues related to citation-format compliance. Its purpose is also not proactive conflict detection between pages; rather, it reacts to identified factual inaccuracies. This clear definition of scope ensures the skill is used for its intended purpose: precise, systematic factual error resolution.
Underlying Tools
The systematic operation of correction-pipeline relies on a set of robust underlying tools that interact with the agent's knowledge base. These tools provide the necessary capabilities for diagnosing and rectifying errors. The skill uses search to locate specific claims within the brain, query to interact with and verify entries in the facts table, and recall/forget/remember functionalities to manage specific pieces of information stored in the agent's memory. Additionally, grep against the brain repository is employed to check for the propagation of errors or to ensure corrections have taken effect across various related documents and pages. This toolkit enables the comprehensive and deep-seated correction process required to maintain accuracy.
Frequently Asked Questions
Q: What types of errors does correction-pipeline address? A: It classifies errors as brain error, hallucination, or stale data and fixes the source appropriately.
Q: How does it know when to start? A: Specific user triggers activate it: 'that's wrong', 'I never said that', 'correct that fact'.
Q: Is this for general knowledge base cleanup? A: No, it focuses on factual error correction. General maintenance is handled by 'maintain'.
Implementing correction-pipeline helps ensure the factual integrity of your AI agent's responses. This skill provides a systematic method for addressing and resolving inaccuracies at their root.





