<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Ali Zahid Raja</title>
    <description>The latest articles on DEV Community by Ali Zahid Raja (@alizahidraja).</description>
    <link>https://dev.to/alizahidraja</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4081349%2Fd6727152-090f-4d9e-a5ea-a15b450c4bb5.jpg</url>
      <title>DEV Community: Ali Zahid Raja</title>
      <link>https://dev.to/alizahidraja</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/alizahidraja"/>
    <language>en</language>
    <item>
      <title>I built a system to catch unreliable AI agents. In my own evaluation, it missed the worst one.</title>
      <dc:creator>Ali Zahid Raja</dc:creator>
      <pubDate>Mon, 17 Aug 2026 10:04:10 +0000</pubDate>
      <link>https://dev.to/alizahidraja/i-built-a-system-to-catch-unreliable-ai-agents-in-my-own-evaluation-it-missed-the-worst-one-k48</link>
      <guid>https://dev.to/alizahidraja/i-built-a-system-to-catch-unreliable-ai-agents-in-my-own-evaluation-it-missed-the-worst-one-k48</guid>
      <description>&lt;p&gt;My framework exists to identify unreliable transmitters in a multi-agent pipeline. In my own evaluation, the grade-recovery loop missed the highest-fault narrator in the set.&lt;/p&gt;

&lt;p&gt;The single worst actor. The exact thing the system is for.&lt;/p&gt;

&lt;p&gt;I put that in the abstract of the paper rather than in an appendix, and this post is about why — plus the two other results I had to label &lt;em&gt;inconclusive&lt;/em&gt;, and what I think all of it says about how we evaluate systems like this.&lt;/p&gt;

&lt;h2&gt;
  
  
  The problem
&lt;/h2&gt;

&lt;p&gt;Modern multi-agent knowledge systems don't retrieve knowledge so much as accumulate it. A claim passes through chains of autonomous transformations: one agent retrieves, another summarizes, a third synthesizes, a fourth writes the answer. By the time it reaches a user, that claim has been through four hands and the chain is gone.&lt;/p&gt;

&lt;p&gt;We have decent tooling for recording &lt;em&gt;what happened&lt;/em&gt; — execution traces, tool calls, evidence links. And source-reliability estimation is a mature field on its own; truth discovery and reputation systems have been around for years.&lt;/p&gt;

&lt;p&gt;What's missing is the thing that joins them: &lt;strong&gt;graded, per-domain reliability for each transmitter, attached to a specific claim's transmission chain&lt;/strong&gt;, with rules for what to do when the chain is incomplete, how to aggregate across different &lt;em&gt;kinds&lt;/em&gt; of transformation, and where the resulting claim should be routed.&lt;/p&gt;

&lt;p&gt;"This claim came from somewhere" isn't provenance. "This claim came through these four transmitters, this one has a poor record on this specific domain, the chain is missing a step, therefore quarantine" is provenance.&lt;/p&gt;

&lt;h2&gt;
  
  
  Where the method comes from
&lt;/h2&gt;

&lt;p&gt;Classical Islamic hadith science faced a structurally identical problem and worked on it for centuries: how do you decide whether knowledge transmitted through a chain of human narrators should be accepted?&lt;/p&gt;

&lt;p&gt;What they built is, in engineering terms, remarkably close to what we need:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Isnad&lt;/strong&gt; — a complete transmission chain attached to every single claim. Not optional metadata. A claim without a chain is a different class of object.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Rijal&lt;/strong&gt; — systematic, documented grading of each narrator's integrity and precision. Not reputation-by-vibes. Criteria, applied consistently, recorded, contestable.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Weakest-link evaluation&lt;/strong&gt; — a chain is graded by its worst member, not its average. Averaging hides the bad node, which is precisely the node you care about.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Corroboration through independent chains&lt;/strong&gt; — multiple separate routes to the same claim strengthen it.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Matn criticism&lt;/strong&gt; — the content is evaluated &lt;em&gt;independently&lt;/em&gt; of the chain's quality. A perfect chain carrying an absurd claim is still an absurd claim.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;That last one is the piece most modern provenance work collapses. Chain quality and content quality are different axes, and if you fuse them into one score you lose the ability to distinguish "trustworthy source, wrong claim" from "sketchy source, correct claim." Those need different handling.&lt;/p&gt;

&lt;p&gt;So the paper transfers that methodology: a formal mapping from hadith-science concepts to multi-agent pipelines, a relational schema for claim chains and a graded narrator registry, a decision matrix combining chain grade with content criticism, and serve/review/quarantine routing on the output.&lt;/p&gt;

&lt;h2&gt;
  
  
  The evaluation
&lt;/h2&gt;

&lt;p&gt;20,000 claims extracted from real physics textbooks. Not synthetic data, not a toy set.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Two things held up.&lt;/strong&gt; Weakest-link quarantine worked — grading a chain by its worst transmitter correctly caught claims that averaging would have waved through. And independent-chain corroboration worked — claims reached by genuinely separate routes were more reliable, as the theory predicts.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;One thing partially failed&lt;/strong&gt;, and it's the interesting one.&lt;/p&gt;

&lt;p&gt;The grade-recovery loop is supposed to recover each transmitter's reliability grade from observed behaviour — you watch what an agent does over time and back out how much it should be trusted. In the evaluation, it &lt;strong&gt;missed the highest-fault narrator.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Think about what kind of failure that is. It isn't uniform degradation, where the system is a bit noisy everywhere and you discount accordingly. It's a system that behaves plausibly across the distribution and then fails on the extreme case &lt;em&gt;that it exists to catch&lt;/em&gt;. That's worse than a system that fails visibly, because you'd trust it. You'd look at the grades, see nothing alarming, and ship.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Two analyses came back inconclusive.&lt;/strong&gt; The one worth naming is a matched-coverage comparison against a reference content critic — the framework couldn't reach comparable coverage, so the comparison couldn't be made fairly. Not a positive result, not a negative one. Genuinely undetermined.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why report any of this
&lt;/h2&gt;

&lt;p&gt;Because the alternative is that somebody else finds it.&lt;/p&gt;

&lt;p&gt;There's a version of research writing where limitations are damage to be minimized — reported at the smallest defensible volume, in the last section, in the passive voice. I understand the incentive. I also think it's a bad trade, for a reason that's purely practical rather than moral:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The failure modes are the most useful part of the paper for anyone deciding whether to build on it.&lt;/strong&gt; A method that works on a defined slice is genuinely valuable if you know where the edges are. The same method with the edges hidden is a trap, and it becomes the next person's expensive discovery.&lt;/p&gt;

&lt;p&gt;There's also a specific thing I'd argue for: &lt;strong&gt;"inconclusive" should be a normal category.&lt;/strong&gt; Right now most work has two buckets — it worked, or it isn't mentioned. That's a lie by omission at the field level, and it means every honest negative result gets quietly reclassified as a positive one somewhere between the experiments and the abstract. Two of my analyses didn't resolve. Saying so cost me nothing except the stronger version of a claim I hadn't earned.&lt;/p&gt;

&lt;h2&gt;
  
  
  What generalizes to anyone building evaluation
&lt;/h2&gt;

&lt;p&gt;Three things I'd take away even if you never touch provenance:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Average-case metrics hide tail failures, and tail failures are usually the point.&lt;/strong&gt; My system is &lt;em&gt;for&lt;/em&gt; catching the worst actor. Any metric averaged across all transmitters would have looked fine while missing exactly the case that matters. Ask what your metric does at the extreme, not at the mean.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;If your ground truth and your system share a component, you're partly measuring agreement with itself.&lt;/strong&gt; Same model on both sides, same heuristic, same person's judgement at both ends — the number that comes back measures consistency, and consistency is much easier to achieve than correctness. The diagnostic question: &lt;em&gt;if my system were systematically wrong in one specific way, would this evaluation catch it?&lt;/em&gt; If you can't name the failure mode and point at the part of the eval that flags it, there's circularity in there somewhere.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Separate the axes you're tempted to fuse.&lt;/strong&gt; Chain quality and content quality are different questions. One score is easier to report and strictly less useful.&lt;/p&gt;

&lt;h2&gt;
  
  
  The open problem
&lt;/h2&gt;

&lt;p&gt;The critique I've heard most, and the one I'd most like help with, is &lt;strong&gt;chain independence&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Corroboration assumes that two independent chains supporting the same claim is stronger evidence than one. Reasonable — until you ask what "independent" means when every agent calls the same base model, retrieves from an overlapping corpus, and inherits the same biases from pretraining.&lt;/p&gt;

&lt;p&gt;Two chains that look structurally separate can share a hidden root. When they do, their agreement isn't corroboration. It's correlated failure wearing corroboration's clothes — and it presents as &lt;em&gt;more&lt;/em&gt; convincing than a single chain, not less. That's the dangerous shape.&lt;/p&gt;

&lt;p&gt;I don't have a clean answer, and I don't think the multi-agent literature has one either. If you've worked on correlated failure in ensembles or retrieval, I'd genuinely like to talk.&lt;/p&gt;

&lt;h2&gt;
  
  
  Try it
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;pip &lt;span class="nb"&gt;install &lt;/span&gt;isnad
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;MIT licensed. It's a research prototype backed by a published evaluation — usable, actively developed, and honest about where it stops working.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Paper:&lt;/strong&gt; &lt;a href="https://arxiv.org/abs/2607.24117" rel="noopener noreferrer"&gt;arxiv.org/abs/2607.24117&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Code:&lt;/strong&gt; &lt;a href="https://github.com/alizahidraja/isnad" rel="noopener noreferrer"&gt;github.com/alizahidraja/isnad&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Issues and disagreement welcome. Several of the open issues in that repo came from people who turned up to argue, and the project is better for all of them.&lt;/p&gt;

</description>
      <category>ai</category>
      <category>machinelearning</category>
      <category>opensource</category>
      <category>python</category>
    </item>
  </channel>
</rss>
