ToecoArchitecture · Field notes

The next model
has to earn the work.

Choose the role. Define what matters. Let evidence decide which model gets the next request.

A sunflower at dusk, its intricate seed pattern catching warm light against a deep green garden.

When a new AI model arrives, I want to give it something more useful than my attention.

I want to give it a job interview.

The demonstrations can be extraordinary. But my application has a case to route, facts to extract or a proposal to check. A model earns its place by doing that work well.

That is the premise of my Adaptive AI Model Routing Engine. The application supplies a role, a prompt and its priorities. The engine chooses among permitted candidates using evidence about quality, speed and cost.

An application sends a composed prompt, a role and a named priority profile (the role default applies if none is named), shown as three separate objects. The engine selects one permitted model; a worker executes the call. The result returns through the worker and engine to the application with its execution identity. The role instructions are also a conceptual part of the composed prompt, distinct from role selection metadata.
01 / The job

Give the work a name

Consider an invented case: an incoming message needs to reach the right workflow. The application knows the destinations, supplies the context and can establish through review whether the routing was right.

The useful question is what this role must return, and what makes the answer correct. In Signal Flow, I make several kinds of work explicit.

Transcriber

Turn speech into text

Write down a voice note, ready for the Extractor to turn it into a structured task draft.

Sentinel

Look for instructions that do not belong

Check incoming material for attempts to steer the system away from its task. Flag suspicious content for the application to handle.

Router

Find where the case belongs

Read the case and work out where it belongs: the workflow, the lane or the intent. Each of those questions is its own role, judged on its own evidence.

Extractor

Find the facts that matter

Pull out the facts the application needs. Keep them grounded in the source, and leave missing information empty.

Normalizer

Give the facts a common form

Turn different ways of saying the same thing into a consistent form, without changing the meaning.

Splitter

Find the separate jobs

Notice when one arrival contains several concerns, and keep each case connected to the material it came from.

Decision proposer

Work out what to do next

Turn the case into proposed actions, with the information needed to carry them out.

Critic

Give the proposal a second look

Find problems in a proposal and explain them clearly enough for a reviewer to check.

Repairer

Put the proposal right

Fix the identified problem, keep what already works, and send the proposal through another check.

A good extractor is not automatically a good critic. Each role needs evidence for its own work. The role stays useful while the candidate models change.

02 / The choice

“Best” needs a set of priorities

A person waiting for a result needs a different balance from a background queue. Some work can wait. Some mistakes are expensive.

The application declares a role and a priority, and can name a registered request profile; otherwise the role’s default profile applies. The profile defines the balance of quality, speed and cost; these are inspectable policies.

I decide which models are permitted to compete. Within that permitted pool and the request’s constraints, the engine allocates work. The newest model has no special entitlement.

Three unnumbered dials represent quality, speed and cost. A registered request profile defines their balance; no scores or particular weights are shown.

The job can outlast the model

Candidates can run through different cloud endpoints, including self-hosted infrastructure. That is a deployment distinction. It does not change what the role asks them to do.

For an ordinary unpinned request, the application can leave the model choice to the engine. The engine’s execution workers carry out the selected call and return its result.

An application can also request a group of answers. The architecture needs to preserve which model produced each one.

Three well-separated generic endpoint groups: external clouds A and B, and Our Cloud meaning self-hosted infrastructure. Every candidate has the same model-block symbol. A single selected-call arrow points into cloud B. Counts and placement are synthetic, not a deployment map.
03 / The evidence

A test gets the interview started

A new candidate starts with gold sets: fixed examples, known expected outcomes and a grading rule appropriate to the role. They support qualification and regression checks.

An approved candidate can serve on this evidence while live judgments are scarce. That basis stays visible.

Trustworthy live results gradually take over. If they fall clearly below the test’s promise, a regression guard suspends the test evidence. Once enough live evidence has taken over, the test contribution retires and never returns.

A test case goes to the candidate model. Its answer and a separately held expected answer go to grading. The expected answer is not supplied to the candidate. Approved test evidence can support initial service; suspension and retirement conditions remain in the adjacent article prose.
04 / The hard question

What if the right answer lost the vote?

In our invented routing case, three models answer. Two say repairs. One says billing. The application follows the majority; a human later confirms billing.

Giving all three models the majority’s outcome rewards the wrong two and penalises the useful dissenter. Each answer needs its own grade.

Synthetic example: models A and B say repairs, model C says billing. A human confirms billing. The reviewed truth makes A and B incorrect and C correct, regardless of the majority vote.

The application owns the meaning of success. The engine owns how that evidence affects model selection.

The grader compares each answer with reviewed truth and preserves its execution identity. Neither agreement nor a model’s confidence establishes correctness.

Automatic acceptance alone earns no quality credit. Human judgments provide the reference. AI judgments gain weight only after enough human audits establish their agreement; until then, their quality weight is zero.

A correction can also introduce information the models never saw. The earlier comparison may need to be withdrawn or left unassessed. A changed answer is not automatically evidence of a poor model.

05 / Closing the loop

The verdict must reach the next choice

A judgment must survive a restart. A retry must not count it twice. A correction of equal or higher authority must replace what it invalidates; automation cannot overrule a human. Withdrawal must not quietly restore an older judgment.

The consumer records the verdict durably and reports the individual grades. The engine maintains the current assessment and recomputes the evidence. On a role switched to live selection, that evidence feeds subsequent choices.

A branching leaf structure seen in close detail, with warm light following its veins.
A gavel represents the consumer’s verdict; a marked comparison sheet represents per-answer grades; a linked ledger represents accumulated evidence; a routing junction represents the next choice for a live-enabled role. These are different symbols and responsibilities.

My test follows the whole path: an application verdict, per-answer grades, changed evidence and a later decision influenced by it. A dashboard number alone does not demonstrate adaptation.

06 / A fair opportunity

Let a challenger learn something

Routing everything to the incumbent can keep a newcomer untested indefinitely. The engine reserves a bounded exploration budget.

Where reviewed truth can judge an unseen answer, an approved challenger can run in shadow. Its answer is evaluated; it never becomes the application’s answer or triggers an action. Evidence can support admission, but serving still needs approval.

Tool use needs a world to act on. The serving model handles the real request with real tools. I record that execution as the baseline for comparison. Each challenger replays the task with simulated tools and its own snapshot of the starting state. The application keeps the live result; the replay cannot change production.

An ordinary serving answer returns to the application. A separate approved shadow answer goes only to evaluation where reviewed truth can judge it. Tool-using challengers use the separate copied-world simulation shown next.
The serving model executes the ordinary request with real tools and live state; that recorded execution is the baseline. Each challenger replays the task with simulated tools and an isolated snapshot of the starting state; the recorded serving execution supplies the baseline. Compare with the recorded execution and reviewed outcomes. The baseline is not automatically correct, and simulated evidence stays separate from live outcomes.

The simulated tools respond to the calls the challenger chooses, so it can explore a different path through the task. When the captured world cannot support that path, the result stays unassessed.

I compare the challenger’s calls, simulated effects and final answer with the recorded execution. Reviewed outcomes establish which answers were useful or correct; matching the serving model is no guarantee of either. I reuse the live execution, so the extra model work goes into evaluating challengers.

Separate gold tasks test general tool-handling capability using anonymized, app-neutral examples, synthetic records and simulated updates. Those scores stay separate from evidence for a production role. Challenger replays also remain identifiable as simulation evidence, distinct from observed production outcomes.

Evidence from copied tasks can earn only a bounded, approved trial with read-only tools and human review. Those human rulings supply real outcome evidence; ordinary serving still requires a separate qualification once the trial has passed. Trials that execute write tools need their own per-effect safeguards, and roles that produce artifacts such as generated documents stay outside this mechanism.

07 / The whole experiment

An answer has more than one ingredient

I keep four concerns conceptually distinct: role instructions, domain memory, case context and the case itself.

A capable model can still fail with wrong memory or missing context. Changing an input changes the experiment.

Evidence therefore stays associated with relevant prompt, memory and context versions, and execution conditions. A new version can inherit a bounded prior from compatible evidence in its own lineage; its own results remain identifiable.

That helps me investigate what changed. It does not establish the cause automatically. Improving domain memory is a learning problem of its own.

Role instructions: sky blue identity-card icon. Domain memory: green cloud. Case context: teal table. Case data: cyan folder. The assembled prompt uses these four coloured tabs consistently. These are conceptual concerns, not four mandatory transport fields.
08 / Architectural judgement

More traffic is not the same as more truth

Review only the difficult cases and the evidence describes that population. Reviewers can share blind spots. Narrow roles can stay short of data.

Conservative estimates, coverage checks and audits help; a formula’s confidence level is no guarantee for this changing, selectively reviewed system. Answer quality and the share of work a model can answer need separate attention.

A fixed model can also be justified by a required capability, a reproducible experiment or too little trustworthy feedback.

This remains research and development. Finding a generous grader, an overbroad role or a correction that breaks the loop is useful work. Those findings improve the architecture.

An imagined close study of a blade of grass, with fine repeating structures and light passing through its layers.

Give the models something worth competing for

I want a better candidate to earn work. I also want to keep a less fashionable model when it continues to do the job well.

The stable part is the responsibility, its constraints and the way we judge its outcome. I can explain what was requested, why the engine chose a candidate and where to investigate when the choice stops working.

A new release gives me another candidate.

The work, and the evidence, decide what it earns.

A stable Critic role badge is surrounded by four model blocks. Dotted association lines describe candidates, not executions.