zappz

Articlesai product stack

What Is an AI Product Stack for a Startup? Five Layers

What an AI product stack is, its five layers from interface to model, how a small startup picks each one, and one stack worked through for a clinic email tool.

AI Entrepreneur

Short lessons on becoming an entrepreneur in the age of AI: the history that led here, how modern AI works, and how to build, launch and grow a business with it.

An AI product stack is the set of layers a product built on AI runs on, from the screen the user sees down to the model that writes the answer. For a startup, knowing the AI product stack matters because most of the work, and most of what makes the product worth using, sits in the layers around the model rather than in the model itself.

Short lessons on building and launching a first business with AI, including a course on this very stack, are at AI Entrepreneur. This page sets out the five layers, what each one does, how a small team picks each one, and a full stack for one invented product.

Where the idea of a stack comes from

In computing, a solution stack, also called a software stack or tech stack, is the set of components needed to make a complete platform that an application runs on top of. A classic web application's stack is its operating system, web server, database and programming language. Each part is often built by a different team, and the parts are chosen to fit together.

An AI product adds new layers to that picture. Somewhere in the stack, the product sends text or images to a model and gets an answer back. What you put around that call decides whether the answer is useful, safe and affordable.

The five layers of an AI product stack

Most small AI products, whatever they do, can be described in five layers.

  1. The interface. Where the user meets the product: a web page, a chat window, an email inbox, a spreadsheet, a phone app. The best interface is often one the customer already uses every day.
  2. The logic and instructions. The steps the product follows and the written instructions, or prompt, it sends to the model. This layer decides what goes in, in what order, and what happens with the answer.
  3. The data and retrieval. The information the product looks up each time: the customer's documents, records or past work. This is usually what makes the answer specific to one customer instead of generic.
  4. The model. The language or image model that produces the output. Most startups call a model run by another company, through an API, rather than training their own.
  5. The checks and logs. The examples that show the output is right, and the records of what happened on each request. This layer runs across all the others.
Diagram of the five stacked layers of a small AI product: interface, logic and instructions, data and retrieval, model, and checks and logs, with a clinic email tool as the example
Five layers, with one clinic email tool as the example.

Why the data layer does so much of the work

A model on its own knows only what was in its training data. It does not know a given customer's opening hours, policies or past jobs. The common way to fix that is retrieval-augmented generation, or RAG: before the model answers, the product looks up the relevant documents and hands them to the model with the question.

RAG was first proposed in 2020 and is now widely used. It lets a model use specific or recent information without being retrained, it helps reduce answers that are confidently wrong, and it lets the product show the sources an answer came from so a person can check it. For a small startup, a well-kept set of customer documents and a sound way to find the right part of them is often worth more than a bigger model.

A worked example: an email tool for a small clinic

Take an invented product: a tool that drafts replies to patient emails for a small dental clinic, using the clinic's own rules. Here is a whole AI product stack for it, layer by layer.

  • Interface: the draft reply appears in the clinic's existing inbox. Staff read it, change it if needed, and send it. Nobody learns a new screen.
  • Logic and instructions: sort each email into booking, opening hours, insurance or something else; write in the clinic's friendly, short tone; and pass anything about symptoms or treatment straight to a person, with no draft.
  • Data and retrieval: the clinic's 30-page policy file and its opening hours, split into short sections, with the two or three most relevant sections looked up for each email.
  • Model: a language model from a model provider, called through its API, chosen for good writing at a low cost per email.
  • Checks and logs: a set of 50 real past emails with the answers staff actually gave, run against every change to the instructions or the model; and a log of each draft and whether staff sent it as written or changed it.

Read the stack from the top. The interface choice removes the hardest part of getting staff to use something new. The rule about medical questions lives in the logic layer, not in the model, so it holds even if the model changes. The policy file is the clinic's own, which is why the drafts read in the clinic's own voice. And the share of drafts sent without changes, from the log, is the plainest measure of whether the product works.

The checks layer is what an eval for an AI product describes in detail: real inputs, a rule for a pass, and a pass rate compared before and after each change.

How a startup picks each layer

Pick the layers from the top down, starting with the customer, not from the model up.

Interface first. Ask where the customer already works. An inbox, a spreadsheet or a chat tool they use daily beats a new app they must remember to open.

Logic second. Write down, in plain words, the steps a skilled person would follow to do this job by hand. Those steps become the logic layer. Many first versions can be built with no-code tools, as the article on whether you need to code to build an AI startup covers.

Data third. List what a skilled person would look up while doing the job. That list is the data layer. Keep it small and accurate at first.

The model last. Try two or three ready-made models on the same 20 or 30 real examples and keep the one that does well enough at a cost you can carry. Keep the call to the model in one place, so you can swap it later without rewriting the rest.

Each request to a model has a cost, so the model layer feeds straight into unit economics: what one customer costs to serve against what they bring in.

Mistakes that show up in a first stack

Building a model layer when a ready-made one would do. Training a model is slow and costly, and a first product rarely needs it.

Putting rules only in the prompt. A rule that must never break, such as passing medical questions to a person, is safer in the logic layer as a plain check than as one more line of instructions.

No checks until something goes wrong. Without a set of real examples to run, every change is a guess, and a better model can still make the product worse for one customer.

Tying everything to one model. Models change and their makers change their terms. A product whose whole logic depends on one model's quirks is hard to move.

Frequently asked questions

What is the difference between a tech stack and an AI product stack?

A tech stack is the set of software components an application runs on, such as the server, database and language. An AI product stack adds the model, the instructions sent to it, the data it looks up and the checks on its output.

Does a startup need to train its own AI model?

Usually not. Most small products call a ready-made model through an API and put their effort into the interface, the logic, the data and the checks.

What is RAG in an AI product?

Retrieval-augmented generation is when the product looks up relevant documents and gives them to the model with the question, so the answer can use information the model was never trained on.

Which layer matters most?

For most small products, the data and the checks. They make the answers specific to the customer and show whether they are right.

Choosing an AI product stack you can change

The layers of an AI product stack change at different speeds. The interface and the customer's data change slowly, because they belong to the customer's daily work. The model changes fast, as new ones appear every few months. A stack built for a startup keeps the slow layers steady and the fast one easy to replace, and lets a set of real examples decide every swap.

AI Entrepreneur

Building a business in the age of AI, from a first project to a company. Visit aientrepreneur.vlvd.net

AI Entrepreneur on desktop
AI Entrepreneur on tablet
AI Entrepreneur on phone

Related articles

More on ai product stack
  1. business model canvasWhat Is a Business Model Canvas and How Do You Fill It In?The nine boxes of a business model canvas, the order to fill them in, and one canvas worked through for a small AI tool that drafts tutors' weekly notes to parents. · 8 min read
  2. market segmentationMarket Segmentation for a Small Business: Picking One GroupWhat market segmentation means, the four usual ways to split a market, five signs a group is worth picking, and one split worked through for a small AI tutoring tool. · 7 min read
  3. value propositionWhat Is a Value Proposition and How Do You Write One?What a value proposition is, where the phrase came from, the four parts of a good one, and one written step by step for a small AI scheduling tool. · 9 min read

Keep reading

All articles
  1. dependency confusionWhat Is Dependency Confusion in Package Managers?Dependency confusion makes a package manager install a stranger's public package in place of your private one. How the trick works, and the settings that stop it. · 7 min read
  2. bluetooth headsetWhy a Bluetooth Headset Microphone Sounds Bad on RecordingsA Bluetooth headset microphone sounds bad because using it switches the headset into a low-quality call mode. Keep it for listening and record your voice with a wired one. · 6 min read
  3. cpuWhat Is a CPU Core in a Processor? More Cores, Real LimitsA CPU core is one unit that reads and runs instructions. Several on one chip run work at once, but only the parallel part of a job speeds up. · 6 min read