All articles

The making of AIME, the engine that learned to know its limits

Suman Akkisetty
Builder of KaryoSpace
24 November 2026
15 min read

PrologueThe day AIME quoted its own doubt

Getting an AI to answer is the easy part. The hard part is making it honest about what it knows, and keeping it honest as it learns, because it will find ways to fool you that you'd never think to test for.

I learned that the hard way. I was reading replies by hand, a hundred and twenty of them from one of our tests, because the scores looked good and I've learned not to trust scores I haven't read. Most were fine. Then one stopped me.

Someone had asked about an incident called INC-2000, which doesn't exist. AIME didn't make anything up, which was exactly what I wanted. But it answered that "the knowledge base states there is no information on INC-2000", and there's no such page in our knowledge base. Here's what had happened. A few days earlier a similar question had come in, and AIME had honestly said "I don't know". A background process that turns good answers into reusable facts had saved that "I don't know" as if it were knowledge. So the next time, AIME cited its own uncertainty as a source.

Nobody was harmed and I fixed it the same day. An "I don't know" can no longer become a fact, and facts learned from one person's questions stay out of everyone's answers until they've passed their own test. That one reply was the whole lesson of this project in miniature. This is the story of that work.

Chapter oneFour pipelines and nobody in charge

KaryoSpace could answer questions long before AIME had a name. You could ask about an email thread or a ticket and get something back. The trouble only showed when I sat down on 6 August and audited what we'd actually built, line by line, instead of what I remembered building.

There were three separate search pipelines, one for email, one for the knowledge base and one for connected tools like Jira and Confluence, each written at a different time and each cutting text into pieces of a different size (256 words, 500 words, 512 words). There was a fourth system distilling knowledge on the side. The observability layer, AIO, wrote down a detailed record of every answer and never read a single one back. There was exactly one AI model, and if it was busy or down, the answer simply failed. Nobody had designed this. It had grown, one sensible decision at a time, into something no one owned.

So I asked myself the question I'd been avoiding. If we built the AI in KaryoSpace from scratch today, knowing everything we know about the product, what would it look like? I'll admit my first instinct was the fashionable one, a crowd of agents talking to each other. It didn't survive contact with the actual work. Finding the right emails, checking who may see them and writing an answer is a sequence with a known order, and a pipeline with a known order gives agents nothing to negotiate about. They would have added cost and unpredictability and nothing else.

What survived was simpler and, I think, better. One engine that manages all of the AI work, with the scattered pieces brought under a single roof. We called it AIME, the Artificial Intelligence Managed Engine, and the word that mattered most was the one in the middle. On 10 August the three pipelines became one index and one retrieval layer, and every search branch got its own deadline, because until then a single hung search could hold an entire answer hostage.

Why the name stuck

KaryoSpace takes its name from Sanskrit kārya, purposeful work, and Greek karyon, the nucleus that directs a cell. If KaryoSpace is the nucleus of your work, AIME was always meant to be the engine at its centre. Not a chat window bolted on top, but the thing underneath everything that reads, links and answers.

Chapter twoThe test that couldn't fail

The first real improvement I built was a better way of merging two kinds of search, the old keyword search and a newer search by meaning. There's a well-known method for it called Reciprocal Rank Fusion, and I expected it to win comfortably. The first measurement said it made things worse.

That's where I learned the most important lesson of the whole project, and it had nothing to do with search. When I dug into the numbers, 66 of the questions in my test set pointed at two mailboxes that the test user wasn't even allowed to see. On the questions that were actually valid, the old system already failed 0% of the time, so my pass mark (cut failures by three points) could never be met by anything. I had built a test that was structurally incapable of saying yes. Once I fixed the test, a sweep of the fusion setting showed the textbook value of 60 was wrong for our data, and 5 worked better. It's still 5 today.

Two more ideas from that first phase, context written in front of every chunk and an AI reranker, I built anyway because I believed in them. Neither cleared its bar, and the result was the same on a small 8-billion-parameter model and on a 70-billion one. Of everything in phase one, only the plumbing shipped, the deadlines on every branch.

I also wanted to build a knowledge graph next, and the plan said to learn from real usage first. So I counted the real usage. There were 42 traces in the whole observability store, and every one of them had been created by my own test scripts. There were no real users yet to learn from. I parked the graph and wrote that down too, because pretending otherwise would have meant building on air.

The rule that came out of it

From then on every change was an experiment with its pass mark written down and committed before the test ran. If I had to change the plan midway, the change went into the record with the reason, before I looked at any result that could tempt me. If a change missed its mark, it didn't ship, however much I liked it.

Chapter threeWho may see what

Somewhere in September the way I thought about AIME changed. An assistant that can read every email, every chat and every ticket in a company is, if you're careless, the most dangerous employee you'll ever hire. It never forgets, and left to itself it will happily tell anyone anything. Accuracy matters, but a single leak of someone's private mail would end the conversation with any customer before accuracy came up.

So AIME got guards. Every email, message, ticket and document now carries a sensitivity label, from company-wide through internal and project-only up to finance, HR and restricted, and every person has a clearance. Finance and HR sit at the same level but can't read each other, because seniority isn't the same thing as need. A manager can see the threads their direct reports are on. The asker's clearance is turned into a filter inside every database query, so forbidden content isn't fetched in the first place, and then every result is checked a second time before the model sees a word. Anything without a label, or with a label the check doesn't recognise, is refused rather than shared. We even made it impossible to deactivate someone who's leaving until a successor is named, so their mail and documents pass to a person instead of quietly disappearing.

Then I tried to break it. I took 32 test people across every clearance level, asked each of them a dozen questions, and checked every single result against the rules with a separate checker that doesn't share any code with the guards. Nothing leaked. The part I trust more than the zero is the control run, where I switched the guards off and the same test leaked thousands of items. A checker that can't fail proves nothing, and I'd already been burned by one of those.

The testing paid for itself on 8 October. It found a real hole. Our Gmail and Outlook connectors store both the company and the owner on each private mailbox chunk, and the company-wide search only looked at the company, so one person's synced mail could surface in someone else's answer. Production held exactly two such chunks, both demo data, but the hole was real. Now anything with an owner stays with its owner. I checked it on the live data afterwards. Both owners could find their own chunk, and in 64 attempts nobody else could.

Chapter fourEighty-three percent

On 1 October I was running what I thought was a modest experiment, whether searching by meaning alone could rescue questions that keyword search missed. The results didn't make sense. Questions about some mailboxes worked beautifully and questions about others never found anything at all, as if those mailboxes didn't exist.

For AIME, they didn't. Each email stores the id of the conversation it belongs to, and in our demo data that id had been saved as plain text, while the search code expected a different type. Every time it met one, the decode failed, the loop skipped the message without complaint, and the email simply vanished from search. Eighty-three percent of the email corpus was invisible, and nothing anywhere had raised an alarm.

Fixing that one quiet line moved the share of questions whose source email was found from about 27% to 70%, and letting AIME search all of time rather than only the last 90 days took it to 80%. The experiment itself, the meaning-only rescue, barely helped and was rejected by its own rule. I still find that funny. The experiment failed and the product got roughly three times better.

Around the same time a routine update to the local software that turns text into vectors silently changed the numbers it produced for the same text. Nothing errored, the answers just drifted. We pinned the version, and I added another line to my growing list of things that fail without making a sound.

Chapter fiveWhen better search made it worse

This is the chapter I think about most. Google released a new embedding model, EmbeddingGemma 2, and on our data it really was better at finding things. The right email came back 93% of the time instead of 80%. By every retrieval measure I had, it should have shipped.

Then I read the answers. Asked which department the rollout of a project was starting with, it said "IT and Engineering" with complete confidence. The project had never been mentioned with either. What the better search had found were 27 templated emails about other rollouts, close enough to be convincing, and the model took that pile of near-misses as proof. Better search had fed it more persuasive wrong evidence.

I tried to rescue it with a grounding guard that rejects weak evidence. It cut those fabrications from four to one, which felt like a win until I saw that correct answers on ordinary questions fell from 32 to 26 out of 60. My own rule said that's a fail. Six experiments after it arrived, the newer model was rejected for good, and the older, slightly less clever one stayed. I'd rather have an engine that finds a little less and invents nothing than one that finds more and occasionally makes things up beautifully.

Two quieter wins came out of that period. Giving email a larger share of the prompt, because that's where answers usually live, got more questions right with no new mistakes. And while testing it I caught the answer cache serving an answer about one incident to a question about a different one, because the two questions read almost identically. A cached answer now has to name the same tickets and the same people before it's reused, and it's only ever matched against the asker's own earlier questions.

Chapter sixTeaching it to connect the dots

By November AIME was safe and honest, but it was still a good librarian rather than a colleague. Ask it something that needed two facts from two places, like which apps were hit when a particular server went down and who was affected, and it struggled, because the facts lived in different tickets and documents that never mentioned each other.

The idea that changed this started with a question I kept coming back to. If an incident takes a server down, and that server hosts five apps that fifty people use, shouldn't the engine be able to follow that chain the way a person would? People don't remember whole documents, they remember small facts and the threads between them, so AIME learned to do the same. In the background a small model running on our own server now reads tickets and documents and writes one-line facts we call ATOMS, each naming the ticket or document it came from and keeping that source's access rules. Atoms that mention the same specific server, system or person are linked.

It didn't work the first time. The first version of linked atoms produced a measured gain of exactly zero. The second, where atoms replaced the records they summarised, made prompts bigger instead of smaller. The fix was almost philosophical. Some words connect everything, like "the team" or a department name that appears in half the company's tickets, and a link through a word that connects everything means nothing. Once AIME ignored those hub words and only followed specific links, and the prompt was held at a fixed size, the questions that needed two or three linked facts went from 10 right out of 40 to 36 out of 40, with nothing invented. The leak checker learned about atoms too, and across 61,209 results it still found none.

1

When new data comes in

Mail, chat and documents are cut into overlapping passages, turned into vectors on our own server, stored with their access labels, distilled into atoms and linked through specific people, systems and projects.

2

When someone asks

The question is screened, every source is searched at once by keywords and by meaning, every result is checked against the asker's access, the best evidence is packed into a fixed brief, and the answer names where it came from.

Two more things happened that month that never make it into product demos. I noticed the same question could gather slightly different evidence on different runs, because results with equal scores came back in whatever order the database felt like. Every ranking now breaks ties the same way, so the same question always sees the same evidence. And when our free cloud quota ran dry mid-test, AIME simply stopped answering, so it got a backup model that takes over after twelve seconds, with failing models sitting out a cool-down. In a lab where I shut down a database node in the middle of a test, not one request failed.

Chapter seven"I don't know", and then a better question

For months I was proud that AIME said "I don't know" instead of making things up. Then I looked at it from the other side, as the person asking. A vague question, the kind that doesn't say which build or which project, got a flat "I don't have that information", and that was the end of the conversation. It was honest, and it made the whole system feel dumb.

So the last experiment was about what an honest assistant should say when it can't find something, without guessing and without leaving you at a dead end. If several things could match, it should name them and ask which one you mean. If nothing matches, it should say exactly what it couldn't find and ask for the detail that would help.

"What did the Orion team deliver last sprint?"
AIME today I don't have any information on what the Orion team delivered in the last sprint. If you can specify the project name, ticket number, or a date range for that sprint, I can look for the relevant details.

On twenty vague questions, the bare "I don't know" replies fell from 11 to 4, and helpful replies rose from 6 to 14. On twenty trick questions about things that don't exist, it still invented nothing. I read all of them by hand, and that's how, on the night this story started, I found the reply that quoted its own doubt.

EpilogueWhere it stands

Twenty experiments, and thirteen of them failed. I've kept every one of them on the record, and I've stopped seeing that as an embarrassment. Each failure is a decision I didn't make on a hunch, and the seven that passed are in the product because they earned it.

I'll be as plain about the limits as I've tried to be about everything else. When a question uses different words from its source, AIME gets about half to six in ten right today, and it says so on the rest rather than guessing. Every number here comes from a realistic but synthetic company, because there's no real customer yet. It runs on one server and free AI tiers, so its speed (a median of 1.4 seconds across all sources on our live site) comes from the design rather than from expensive hardware, and a large company would need more of both. Those are the next things I'm working on, in roughly that order.

When we wrote the line for the AIME page, it came out as "it knows your work, and its limits". Knowing the work was hard enough. Knowing its limits took most of the four months, and I suspect it's the half that matters. If you'd like to see exactly how it works, every step and every number is on the AIME page, and the rest of the engineering lives on the architecture page.


Contact Us
We read every submission

Message Sent!

Thanks for reaching out. We'll get back to you shortly.

Send Feedback
We read every submission
Build Stats
Loading stats…