Skip to content
Resources > Technical Articles

How We Built a Slide Agent for Decision-Grade Decks

By Krishnkant Swarnkar, Senior AI EngineerSeptember 28, 2026
Diagram showing a PowerPoint deck as a zip archive of code, with XML data for a bar chart and styling linked to their visual representation on a slide.

Any professional who has tried generating a slide deck with AI knows that just throwing a research brief at a frontier model does not suffice when it comes to generating a professional-grade deliverable. Whether it’s a pitch deck, company overview, an M&A teaser, or an IC memo, a general-purpose AI tool misses the mark in distinct, repeatable ways.

The output renders limited, flat graphics or missing elements. Worse, the AI-generated decks confidently present unverified claims such as tables with made-up figures and metrics that populate conflicting values across slides. What was supposed to save time instead ends up costing you more time and tokens, leaving you to review and rebuild a deck that has no use.

This goes beyond a hallucination problem in the traditional sense. AI-generated decks fail differently than human decks, and with greater magnitude. A junior analyst makes typos and formula errors that a senior review catches on the last pass. An AI agent, however, hands you a confident, impeccably formatted deck full of omissions, inconsistencies, and unsupported assumptions that are much harder to spot and correct. The gap between a deck that looks right and one you can actually stand behind is what we set out to close.

Closing this gap is a more complex undertaking than simply adding footnotes to the findings. Each figure must remain bound to its source from the moment it's retrieved through to the final slide, and every shared metric must stay consistent across the deck. The trust signal isn't that a deck has footnotes, but that provenance (the origin and custody of information) is bound at the source.

The Coding Harness

A deck is really just code. Replace the .pptx file extension with .zip, decompress it, and you’ll see the deck reveal itself in code. With every chart you add, every table you alter, and every layout you use, the deck evolves alongside its underlying code. This duality implies decks can be built from the ground up through code synthesis alone. As a result, we choose to let the agent write code that renders the native presentation objects. We do so by building an agent harness for coding slides. It keeps the agent from drowning in the .pptx grammar and gives it a well-crafted set of primitives that pre-solve the mechanics of canvas, page furniture, positioning, styling, and chart data-binding.

Letting an autonomous, code-writing agent run unchecked on corporate data invites all sorts of security problems. The agent needs the autonomy to write whatever code a given slide requires; the data demands strict isolation. Those pull in opposite directions, so we split the agent into two decoupled planes, separating judgement from execution. In one, the agent directly talks to the user, synthesizes research, commits to a plan, performs reasoning, and executes tools. Within the second, the agent operates in a disposable sandbox where the code is run and generated files are organized. Every file created, every chart rendered, every slide built lives inside a credential-free environment that is torn down when the session ends.

The sandbox filesystem doubles as the agent's persistent memory holding research, plans, per-slide outlines, generated scripts, rendered images, etc. This allows the agent to read a file when it needs one, preventing context pollution. As a result, we not only avoid unwanted distractions for the agent, but also save undesired token expenditure, latency, and cost. A disposable sandbox framework risks losing progress on interruption. We avoid this with frequent filesystem checkpoints. This further helps to maintain access to reusable components from previous turns in conversation threads.

Grounded Content Research

Auditable, evidence-based research sits at the core of the agent’s trajectory. Instead of presenting pre-bottled research to the agent, we let it interact with AlphaSense’s rich content library and finance data screeners. It fetches information on demand, while carrying citation notes every step of the way and rendering those as clickable links, providing auditability to readers.

When you bring hallucinations in check, the mode of failure shifts from one wrong number to two right ones. A share count behind the market cap on one slide conflicts with the figure implied on another, because two sources reported it differently. While each slide may be defensible alone, together they don't add up, and a reader who catches one error stops trusting the rest of the output.

We solve this issue with a single authoritative set of assumptions. Before any slide is drafted, we assign one master value to every shared metric, chosen by an explicit source hierarchy. All the slides generated read downstream from that set and are rebuilt in the event of drifts.

Getting the numbers right is half the battle. Rendering them into a native, fully editable, presentation-ready deck without letting the agent drown in formatting mechanics is the other. The craft here is focusing the model’s cognitive bandwidth on content presentation, spatial balance, and visual hierarchy rather than fighting file-format grammar.

Agentic Slide Generation

Left to write against raw presentation libraries, an LLM burns through tokens discovering file-format traps: canvas unit mismatches, paragraph-clearing quirks, or coordinate scaling errors. We pre-solve these mechanics by handing the agent an abbreviated suite of thin lifecycle primitives and vetted recipes for page furniture, positioning, and table construction, codifying these β€œgotchas” into a library of explicit antipatterns to avoid.

To avoid getting stuck with static image charts or unstyled and inconsistent graphics, we built a charting library for customizable plug-and-play routines that maintain styling consistency (gridlines, legend placement, tick marks) on par with those of institutional decks. With chart graphics being taken care of, the agent gets more bandwidth to focus on chart selection, data scaling, scale resetting, and data presentation without distortions.

To define the whole-deck geometry, we let the agent draw from a library of curated, deliverable-specific layouts where zone geometry and element rules are authored once (company overviews, comps tables, M&A teasers, etc), instead of guessing the layout slide by slide. During execution, every coordinate the agent writes adheres to a placement map, while the visual cross checks help maintain strict spatial discipline. Colors and fonts are named roles (section header, body, series accent) resolved through the active theme allowing users to generate decks in their own styles. The uploaded custom theme samples are processed once to capture the styling elements (like layouts, color roles, typography, chart templates, and headers and footers) and are added to a user-maintained theme library for future use.

Probabilistic models hit the same failure modes repeatedly, so there is a lot of value in building parts that absorb those failures. Before the agent hands over a slide, it checks its own work twice over, once against the interpreter, once against the pixels. It runs the code it wrote inside the sandbox. When something breaks, it reads the traceback, finds the real method it needs, patches its script, and runs it again. Once the code runs clean, it renders the finished slide to an image and inspects the pixels visually, confirming the numbers match the outline, nothing overlaps, spacing and typography hold, and fixes what it finds before moving on. When content threatens to overflow, it tightens and trims the slide content without dropping any material information quietly.

The Model Alone Is Not Enough

Frontier models will keep improving, and every firm will soon have access to exceptional raw intelligence. A strong model can write persuasive prose and produce a polished and well-argued slide outline, but it cannot guarantee a defensible output. The model is necessary, but not sufficient.

The system built around it is what completes the picture: the research tools that surface rich grounded content, the assumptions that keep metrics consistent, the grounding logic that ensures provenance and factuality along with the coding harness that produces native, editable decks. Those are the parts we spent time building, and they are what differentiate a deck that looks right but is rife with errors from one you can send with complete confidence.

About the Author
  • Krishnkant Swarnkar, Senior AI Engineer

    Krishnkant Swarnkar, Senior AI Engineer

    Krishnkant Swarnkar is a Senior AI Engineer at AlphaSense, where he works at the intersection of applied AI research and engineering, driving product innovation for market research and financial intelligence. Previously, he conducted NLP research at Robert Bosch and the UKP Lab at TU Darmstadt. He earned his undergraduate degree in Computer Science from IIT (BHU) Varanasi before completing his master’s from the University of Massachusetts Amherst.

Explore more

Delegate the Friction, Build Confidence, Own the Decision: Why AlphaSense Has Always Built for Accountability

AI can speed up research, but accountability still falls on you. See how AlphaSense builds the confidence you need to own your decisions.
accountability in ai-powered research

Frontier AI Models Need Frontier Context: Why the Smartest Model Alone Won't Win

Today’s bottleneck on answer quality is no longer raw model intelligence β€” it’s context. Learn what we’re building next at AlphaSense.
model quality vs. cost with AlphaSense Search

The Hidden Cost of Building Your Own AI Research Stack

Reusing AI models without a data warehouse means paying the same hidden tax on every query. See how AlphaSense removes that cost.
building your own ai research stack

Transform intelligence
into advantage

Develop bold strategies, seize opportunities,
and lead with clarity and confidence.