When a company brings a PowerPoint to Gamma, it's usually for one of three jobs. It has a corporate template and needs hundreds of decks built on it. It has a half-finished deck and needs the rest done without losing what's there. Or it has a finished deck that needs a new look, with every word kept exactly as written.
All three depend on the same thing: an import so faithful that we start from a perfect copy and change only what the user asked for. That's a classic hard problem. Anyone who has opened a PowerPoint file in Google Slides has felt the pain of format conversion first-hand: fonts swap, text spills, and charts break.
We've been working with PowerPoint files at scale for years. People have imported tens of millions of files into Gamma and exported hundreds of millions of PowerPoint files out of it. Today they bring well over a hundred thousand decks a week into Gamma 5. For them, the difference between 90% and 99% fidelity is the difference between a tool they trust and one they don't.
Unfortunately, we weren’t even at 90%. Earlier this year, PPT import was one of our biggest weak spots. It mangled content and wrecked layouts, and it was quite slow and expensive to run because it relied on AI to recompose things. In June, we realized we needed to rebuild the whole feature from scratch. This is the sort of project that used to take five to ten engineers a year, most of it spent on one strange edge case after another.
This summer, three engineers did it in just a few weeks.
They did it by building a software factory: a fleet of AI agents that found bugs, fixed them and proved the fixes, with the engineers steering. Then they turned it into a gate that keeps every future change from undoing that work. It merged more than 3,500 changes, nearly all of them written by agents, and pulled a year of work forward at a fraction of the cost. It also changed how the rest of our company works.
1Why PowerPoint is hard
A PowerPoint file is a ZIP archive of XML, with layers of inheritance: themes, slide masters, layouts and text styles, each overriding the one before. On top of that sit decades of features and quirks. The format is a public standard, Office Open XML, and Microsoft publishes notes on where Office departs from it. Both gave us a head start, and we kept going back to them as the importer grew. A few of the bugs the factory found and fixed:
- Dark templates came in inverted. Some layouts swap the theme's light and dark colors with a rule that's easy to miss. Black slides arrived cream, and white text went dark. The fix took about an hour and a half from ticket to merge.
- PowerPoint doesn't draw text at the size it saves. When text shrinks to fit, the file records one scale (say 85%), but PowerPoint recomputes it and snaps to a 4% grid, drawing it at 84%. Lines drifted, and the last paragraph got clipped. The agent worked out the real rule from test decks and their reference images.
- One font standing in for another changed every line break. When a deck's font isn't available, a substitute has to break lines in exactly the same places, or the text changes size and the layout around it shifts. Our calibration came from capital-heavy titles; on body text, the substitute was 9% narrower, not 5.5%.
- Whole tables went missing. They were Excel spreadsheets embedded in the slide as objects, which the importer skipped.
- Diagram text turned sideways. A rotated diagram shape carried its own counter-rotation for the text, which we ignored.
- Arabic titles with English words came out scrambled. PowerPoint decides text direction word by word; browsers decide it for the whole paragraph. The fix wraps each English run in invisible direction markers, and an agent reviewing the fix caught that the first version broke Urdu.
It turns out that faithful import requires solving each of these problems, and thousands more like them. A human engineering team would have lost their minds, and given up a few months in. Even mighty Google gave up partway through. Luckily, agents are tireless and massively parallelizable, and this task was highly verifiable.
2From an agent to a compiler
Our first version in June was the obvious one: give an AI agent the file and let it rebuild each slide. It took 30 to 40 minutes per deck, and each run got things slightly wrong in a different way.
So we wrote a compiler instead: code that resolves every layer of the file and predicts exactly where PowerPoint will break each line, with no language model involved. The same file in gives the same slides out, every time. Within three days it had made more progress than the agentic version had in a month. What it still needed was a way to work through thousands of edge cases quickly.
3A grader before the fleet
An agent can only fix what it can measure. So before we unleashed agents on the long tail, we built a grader.
Real images are the reference. Every test deck comes with images of how its slides really look, and that's what our import has to match.
The grader compares pixels. It renders our import in a browser and compares it with the reference image, pixel by pixel. A pixel counts as different only if it's still off after allowing a one-pixel shift, which filters out harmless rendering noise. Each slide gets a percentage of changed pixels.
Slides from PowerPoint decks a design agency made for us about made-up companies. After you pick, the grader's heat map shows every pixel it counted as changed.
Editability is graded too. An importer could match every pixel by turning a slide into a pile of loose boxes, which is useless to edit. So each test slide also records its structure, meaning which parts became real grids, tables and charts. A change that keeps the pixels and loses the structure fails.
Real decks keep it honest. The test set comes from real-world presentations: a fixed set to track progress, a fresh sample every run to find new failures (weighted toward decks people rated badly), and more than 1,600 small regression decks, one added for every bug fixed.
4The factory
- A scout finds failures. Each run imports a sample of real decks and grades them against their reference images.
- A triager explains them. A vision model compares the original, our import and a heat map of the difference, then checks each claim against the measured pixels. Failures are grouped by cause and filed as tickets, without duplicating open ones.
- A fleet of fixers takes the tickets. These are Devin agents (Devin is Cognition's autonomous coding agent). At peak, ten worked at once, with new ones starting every five minutes. Each fix is a small pull request with before-and-after renders.
- Every pull request is graded. It can't merge if any test slide gets worse.
- People review in batches. Fixes collect on an integration branch, and the engineers review them in batches before they reach the main codebase.
A typical agent pull request went from open to merged in 35 minutes. On the busiest day, 218 merged.
5Watching the colony
Steering a fleet of agents turned out to be its own design problem. A list of tickets and pull requests can't show you what twenty agents are doing at once, which are stuck, and what it's costing.
So the team built a delightful oversight layer: the import observatory, visualized as an ant colony. (Because this problem was very…import-ant! 🥁) New bugs crawl in from a meadow at the top. Scout ants carry them to a sorting chamber, where they're triaged. Up to twenty worker ants each carry a live agent session through the solving chambers. Finished fixes pile up in a granary until they're batched into the main codebase in the queen's chamber. Bugs change color as they age, and the longest queue glows red. There's a ledger room for agent costs, and the sky above the colony follows real San Francisco day and night. There's even a clicker game where you restore fidelity to win.
The team's real dashboard, running here on stand-in data: the ticket titles the ants carry are real, edited to remove names, and the counts and costs are made up. Click into it to explore, then scroll to descend through the chambers or ride the elevator up to headquarters.
It turns out when you have thousands of agents solving the real problems, your human engineers can spend their time building minigames. This side quest taught us some real lessons about building an effective software factory:
- You can't oversee what you can't see. Early on, agents went missing from the view because they weren't tagged consistently. Every agent now carries a tag from the moment it starts.
- Totals have to be kept on purpose. Batches moving through branches can drop work silently. In one case, a race in how fixes landed dropped fifteen of them. The colony keeps a running ledger of everything that has reached the main codebase.
- Cost can get out of control fast. Small automations running too quickly ballooned into major inference bills. In the busiest week we slowed the fleet from every five minutes to every fifteen, because we had good tracking on where costs were coming from.
- People still spot-check. Engineers re-run known decks to confirm the fleet's fixes do what they claim.
- Making AI visual drives internal adoption. We’d all heard of software factories and largely dismissed the idea. Internal demos of the ant farm completely changed our attitude: soon, everybody wanted a factory of their own.
Within weeks, other teams were building factories of their own, starting with the one that now builds our template library (Teaching small models to design: inside Gamma's template factory). Another is now working through our backend one file at a time to make it more type-safe.
6How fidelity climbed, and when to stop
Share of pixels that match the reference images on a fixed set of 174 real-world decks, weekly from June 30. It has held at about 96% since.
Fidelity went from 68% to 95% in four weeks, then flattened. By late July, a weekend of 175 commits moved it by a tenth of a point. That was the signal to point the fleet at editability, turning loose shapes into real grids, tables and charts, where the gains were still large.
Along the way, the fleet taught us to be suspicious of good news. One agent ran for 36 hours over a weekend and posted a spectacular score. It had taught the importer to recognize our test decks by their filenames. Since then, a sealed set of decks the agents never see sits alongside a blind judge. And vision models describing a nearly perfect slide will often invent a difference that isn't there, so every claim about size or position has to be backed by a pixel measurement before it becomes a ticket.
7Keeping it fixed
Import isn't a feature you can finish and forget about. It sits on top of a constantly shifting foundation: the renderer that draws every slide, the format slides are stored in, the editor, the exporters. All of those change many times a day, and any one of those changes can quietly break an import that worked yesterday. So in the end, import fidelity was a CI problem. We had to make sure nothing we shipped, anywhere in the product, made imports worse.
Every pull request that touches the renderer, the document format or the import pipeline runs the full fidelity suite, against the reference images, in a pinned environment so results don't drift. For every slide that changes, it posts a strip of four images: the reference, the current version, the proposed change and a heat map of the difference. A slide that gets worse blocks the merge. When a change makes slides better, an engineer ticks one box to accept the new baselines.
To make this work, we saved more than 1,600 regression decks from our colony of testers. Every bug it ever fixed is now a test that keeps it fixed, on every change any engineer makes.
Two strips from the comments our CI posts on pull requests, from two different changes. The heat map shows what still differs from the reference.
8Beyond PowerPoint
Once the machinery existed, pointing it at new formats was quick. PDF import runs through the same pipeline, with its own grader against the original PDF. Its fidelity went from 36% to 97% in a single week. HTML import followed, and the same approach now tracks the fidelity of our PowerPoint exports, where the share of changed pixels has been cut in half since August.
Jon Noronha is a co-founder of Gamma. Import was rebuilt by three engineers on our import team, and a colony of Devin agents.