DEV Community

Mike
Mike

Posted on

I came across the piece that so many AI builders are missing

I came across something I have been looking for, and if you are building anything with AI, I think it is worth a few minutes of your time.
I build AI agents for home service businesses. Plumbers, HVAC, cleaning companies, that kind of work. The agent talks to a customer, understands what they need, and pulls together all the details. Name, address, the actual problem, the time they want, notes about access, all of it.
Then the agent hands that off to the software the business already runs on. Scheduling, the CRM, and dispatch. And this is where it kept going wrong for me.

The agent captures ten useful things. The system on the other end keeps four. The other six just disappear. No error. No warning. The booking still goes through, so nobody notices until a tech shows up not knowing the gate code, or the dog, or the second issue the customer clearly mentioned.

I knew I was losing information in that handoff. What I could not do was measure it. I had no number. So I could not tell which agents were leaking, or how badly, or whether a change I made helped or hurt.
I went searching for how to measure data loss in an AI system. That is how I found Jamil Ashkar and a protocol he built called CORD.
This is genuinely one of the pieces so many of us are missing, and he has solved it.

What it is, in plain terms

CORD stands for Canonical Object for Relational Data. It is an open standard for wrapping your data in an envelope before it moves between systems. The envelope carries the full version of what your AI produced, and it carries what the other system actually kept. Then it gives you a score for how much of the meaning survived the trip.

That score is the part I had been missing. It is called EFS, the Envelope Fidelity Score, a number from 0 to 1. One means nothing was lost. Lower means the receiving system dropped or flattened something.
It does not replace my agents. It does not change my AI. It sits in the middle of the handoff and tells the truth about what makes it across.

What it looks like in my actual work

Let me make it concrete, because that is what finally sold me.
Here is roughly what one of my job handoffs looks like once it is wrapped in a CORD envelope. I have simplified it, but the shape is real.

json

{
  "cord_version": "1.0",
  "envelope_type": "snapshot",
  "fields": {
    "customer": "Dana Ruiz",
    "job": "water heater leaking, no hot water since morning",
    "access_notes": "side gate locked, code 4417, dog in the yard",
    "window": "not home until 4pm",
    "second_issue": "kitchen faucet is also dripping"
  },
  "legacy_output": {
    "customer": "Dana Ruiz",
    "job": "water heater"
  },
  "loss_report": {
    "efs": 0.5
  }
}
Enter fullscreen mode Exit fullscreen mode

Look at the two blocks. Fields are everything my agent captured. legacy_output is what the scheduling system actually kept after it did its translation. The access code, the dog, the time window, the second job. All gone. The booking still succeeded, which is exactly why I never caught it before.

The loss_report is the new part. That EFS value is the score. In this example, half the meaning did not survive. In my own data.
The protocol also adds a small digest, a hash of the envelope, so you can tell if it got corrupted or tampered with in transit. I did not have to build any of that myself.

Setting it up was not the hard part

I expected this to be a project. It was not.

I started by copying one of the example envelopes from the spec and shaping it to my own data. Then I wrapped my agent's output on the way out, and recorded what the scheduling system returned on the way in. That was the whole loop. Output in, legacy result in, score out.

The part that mattered was what I did next. I have tested on multiple outputs on my agents connecting to other systems, and I got different EFS numbers. When I did an audit on the data, moving it all made sense.

For the first time, I was not guessing. I could point at one integration and say this one loses half of what my agent produces, and here is the exact field responsible. Then I could fix it and watch the number move.

Why this matters beyond my corner

Everyone is racing to put AI into real businesses right now, and almost nobody is measuring what breaks when the AI talks to the systems that were already there. We test the model. We test the prompt. We just trust the handoff. CORD turns that trust into a measurement.

And it is open. Open spec, free to use, no vendor owns the format your data travels in. For something that sits in the middle of every handoff, that matters. You do not want to be locked into the one piece connecting everything else together.

If you build AI into real systems, go look

If you are putting AI output into anything with real software behind it, and you have never actually measured what your pipeline loses on the way, this is worth an afternoon. The spec, the tools, and the example envelopes are at cordspec.org. Copy one, point it at your own data, and read the score.

I am not going to tell you it fixes your pipeline. It does not. What it does is show you, for the first time, exactly how much your pipeline is losing. For me, that was the harder half of the problem, and I had been stuck on it for months.

Top comments (0)