Weakness Mining Engine
For our capstone project with CCC Intelligent Solutions, my team and I are building and researching self-improving agent harnesses.
In a nutshell, an agent harness is the environment and software which allows an LLM to use tools and pursue goals. Thus, the performance of an agent is dependent not only on the LLM, but also on the tooling and environment that it lives in. This increases the surface area for mistakes in the output of an agent; a faulty output can come from any tool or environment which the agent uses. Additionally, since the tools are independently developed from the agent, an update to a tool can change how an agent functions drastically.
Our goal is to help agents become more reliable by identifying where they struggle across many runs, what we call “weakness mining”.
How the process works
Our approach has two connected loops. The first looks for recurring weaknesses in execution traces: records of what an agent did during a run. The second takes a prioritized weakness, investigates its cause, and tests a small change to the harness.
Loop 1 · Scheduled or on demand
Find recurring weaknesses
- Select traces Pick eligible records from previous agent runs.
- Extract possible causes An LLM records structured clues and failure hypotheses.
- Group similar failures Separate by error type, then cluster summaries by meaning.
- Build a weakness catalog Name groups, save representative runs, and define how to find matching traces.
Wait for the next mining run
Loop 2 · Independent triage
Test a targeted fix
- Prioritize and diagnose Choose a cataloged weakness; inspect traces and source code.
- Propose a small fix Make a minimal change to the agent harness.
- Benchmark and test Check for improvement without unacceptable regressions.
- Review and approve Passing patches need human review and PR approval before a new harness version.
Failed tests: revise or reject the patch
The aim is to move from individual failures to patterns we can investigate, then use benchmarks and regression tests to decide whether a proposed fix is worth keeping. A mined weakness is a starting point for diagnosis, not a confirmed root cause.