tonytautai home/local-ai/run-local-ai/running/agents/concepts/multi-model

./route --by-task

Routing Work Between Several Models.

A multi model ai architecture is mostly a routing decision: which model sees which input, what travels across each hand-off, and how several models share one box.

Tony Tautai

multi model ai architecture

The Routing Problem

multi model ai architecture

Once you run more than one model, something has to decide which one sees which input. That decision is the architecture. Get it wrong and you have three models each doing a third of a job badly. Get it right and each model only ever sees the kind of input it was trained for. The vocabulary is in the page on local ai agent concepts; this page is about the shape.

Three Shapes We See

Sequential: every document goes through the same chain, read, extract, redact, in that order. Simple to reason about, simple to test. Branching: a classifier at the front sends invoices one way and contracts another, each with its own chain. More models, but each branch stays simple. Cascading: a cheap model tries first, and only the inputs it is unsure about go to a heavier one. This saves compute on a shared mini PC and is the pattern we reach for when a general model has to be in the loop at all.

Hand-offs Are the Weak Point

multi model ai architecture

Every arrow between two models is a contract about data format and a place where confidence must be carried along. We insist on three things at each hand-off. A typed schema, so the next model never receives free text when it expects fields. A confidence score, so a low value can divert the item to a review queue. And a trace identifier, so that when the final output is wrong you can replay exactly which model said what, on which page.

Resources on One Box

Several models on one appliance compete for memory. Loading them all at once is the simplest; it only works if they fit. Loading on demand costs a few seconds per swap and is fine for overnight batches. For an office sharing a single Tavaka, we size the models so the daily chain stays resident, and we schedule anything heavier for the night. Say no to a chain that needs more memory than the hardware you are prepared to provide.

Relation to Compound AI

multi model ai architecture

If compound AI is the principle, multi-model architecture is the wiring diagram. The principle is laid out in our guide to compound ai systems explained, and the honest version of both is that the wiring, not the models, is where most of our engineering time goes.

ssh [email protected]

Prove it on your documents.

Every engagement starts the same way: we run the system on a sample of your own files, under NDA/DPA, and hand you a written report with the scores, misses included. No commitment.

Test it on my documents Request a diagnostic