Skip to content
Tools

AI stack builder

Four choices: models, vector store, hosting, evaluation. What comes back is an architecture with the trade-off behind every decision and the condition that would reverse it, because product names change every few quarters and trade-offs do not. Two of the options recommend no component at all.

Four steps

All four are on the page at once, because the last one changes the order of the first three. Nothing is sent anywhere: the architecture is worked out in your browser and the only record is the link in the address bar.

Step 1 of 4 · 0 answered.

Step 1Models

What does the work actually look like?

Pick the shape of the majority of requests, not the most interesting one.

Step 2Vector store

How much are you retrieving over, and what do you already run?

Chunks, not documents. One long contract is often several hundred chunks.

Step 3Hosting

Where is this allowed to run?

Answer from the contract or the regulation, not from the preference.

Step 4Evaluation

How do you know today whether an answer is right?

This answer changes the order of everything above it, which is why it is a step rather than a footnote.

The address bar updates as you choose, so the architecture is shareable by sending it.

Recommended architecture

Nothing chosen yet

Four choices produce four layers, each with the thing it costs you.

The output is not a list of product names. Each layer comes with the trade-off behind the choice and the condition that would reverse it, because the names change every few quarters and the trade-offs do not.

Two of the options return no component at all. If the material fits in the context window there is no vector store, and if the residency requirement has not been established in writing the hosting decision is deferred rather than guessed.

The four decisions

Everything else is downstream of these.

Frameworks, observability, orchestration and agent libraries are choices about how to implement these four. Treating them as peers is how a stack acquires six systems and one untested assumption.

01

Models

What does the work actually look like?

The shape of the majority of requests decides this, not the most interesting request. Long-document, multi-step reasoning justifies one strong model and no routing until cost is a measured problem. High-volume short tasks justify a small model with escalation, at the price of having to define what uncertain means. A genuine mix justifies a cascade, which is two models to evaluate plus a routing rule that is the hardest of the three to debug. And a hard constraint against data leaving your infrastructure points at an open-weight model you host, where the capability gap is widest on exactly the long-document reasoning regulated work tends to need.

02

Vector store

How much are you retrieving over, and what do you already run?

Count chunks rather than documents: one long contract is often several hundred. Under a few million chunks with PostgreSQL already in the estate, pgvector is the answer and adding a second database is the mistake. Above tens of millions, the tuning effort genuinely exceeds the cost of a purpose-built store, which is the one scale where the usual advice inverts. Where exact identifiers matter as much as meaning, hybrid retrieval is not optional: statute numbers and policy codes are semantically almost identical to each other, so a pure vector search returns a plausible neighbor with total confidence. And if the material fits in the prompt, the correct vector store is none.

03

Hosting

Where is this allowed to run?

Answer from the contract or the regulation, never from the preference. EU residency means an EU region and an EU inference endpoint with zero retention in writing, and it costs you a smaller menu of models. A US deployment with no residency constraint should sit close to the model provider, because on a conversational surface time to first token is the whole of perceived quality. Self-hosting means you now operate the inference stack, which is a staffing decision as much as an architectural one. And if nobody has established the requirement yet, defer: residency does not adjust an architecture, it invalidates one, which is why this is the most common cause of a rebuild in this class of project.

04

Evaluation

How do you know today whether an answer is right?

This is a step rather than a footnote because it changes the order of the other three. With no evaluation at all, the first piece of work is a golden set of a hundred real questions marked by an expert, before a line of the system is written; every choice above is untestable without it. Spot checks become a fixed set, which is a number that can get worse in public, and that is the point of having one. A golden set run by hand becomes a CI gate with a threshold that fails the build, since an eval that cannot block a release is documentation. And a working CI gate becomes production drift monitoring, because the CI set and live traffic will eventually disagree, and finding that out is the entire value.

The one ordering rule

If you cannot measure whether an answer is right, do not start with the model.

The model is the interesting decision and the one every stack discussion opens with, and it is the one that cannot be evaluated until the golden set exists. A team that picks the model first will defend that pick later with the only evidence available, which is how it felt in a demo. That is why the tool above reorders the work when the evaluation answer comes back thin, and it is the single piece of advice on this page most likely to save real money.

The corollary is cheerful: the golden set is the only part of this you can do today, without choosing a vendor, signing anything, or asking us. A hundred real questions and an expert with a week.

Questions

Stack decisions, answered directly.

These answers are the same ones in the structured data on this page, so an answer engine quoting us quotes this.

What is an AI stack?
The four decisions underneath a production AI system: which model or models answer the request, where retrieved content is indexed and searched, where the whole thing is allowed to run, and how you know an answer is right. Everything else is downstream. Frameworks, observability and orchestration are choices about how to implement these four, not additional layers of the same importance.
Should I use pgvector or a dedicated vector database?
Use pgvector if you already run PostgreSQL and your corpus is under a few million chunks. You keep one system to secure, back up and monitor, and the chunks stay transactionally consistent with the rows they came from. Move to a dedicated store when measured query latency at your real corpus size stops meeting the requirement after index tuning, or above roughly tens of millions of chunks where the tuning effort exceeds the cost of running a purpose-built store. The failure people underestimate is synchronization: a separate index drifts from the source of truth, and the system starts citing text that no longer exists.
Do I need a vector database at all?
Not if the material fits in the context window. Retrieval adds a failure mode, a latency budget and an index to keep in sync, and prompt caching handles a large stable prefix more cheaply than a retrieval pipeline handles the correctness risk it introduces. You do need retrieval, regardless of size, as soon as somebody needs a citation to a specific passage rather than an answer, which in regulated work arrives sooner than teams expect.
When should I use a cheap model with escalation instead of one strong model?
After you can measure quality, not before. A cascade trades quality for cost at a rate that is invisible without an evaluation set, so a cascade built first is a saving nobody in the room can size. Build the golden set, run one strong model against it, then introduce a cheaper tier and prove the escalation trigger actually correlates with correctness. A model confidence score is not a probability of being correct, and treating it as one produces a system that is most wrong where it is most confident.
What does EU data residency require for an AI system?
Inference and storage inside an EU region, from a provider offering an EU endpoint with a written zero-retention commitment in the contract rather than on a marketing page. Check the logging path as well as the inference path: a provider can be zero-retention on prompt content and still write request metadata outside the region. The practical cost is a smaller menu of models, and in-region availability often lagging the newest release.
What is a golden set and why does it come first?
A fixed set of real questions with answers marked by somebody whose judgment you would defend to a customer, roughly a hundred to start. It comes first because without it every other decision is untestable: you cannot tell whether a cheaper model is good enough, whether a retrieval change helped, or whether a release made things worse. Building one costs one to two weeks of expert time, produces no demo, and is the cheapest fortnight in the project.
Does this tool send my choices to MetaMinds?
No. The recommendation is worked out entirely in your browser, with no server call and no database. Your choices are encoded in the query string of your own address bar, which is what makes an architecture shareable by sending the link.

Two more tools alongside this one: the AI readiness assessment and the chatbot ROI calculator. Both work the same way: client-side, shareable by link, and willing to tell you to do nothing.

Start here

Send us the architecture and tell us where you disagree.

These four choices are opinions with reasons attached, and the reasons are the part worth arguing with. Thirty minutes with the engineer who would build it, no deck.

Typical reply within one business day · RAG system diagnostic $5,500 · Builds from $18,000