Skip to content
← All use cases

Use case 19 of 28

AI Recommendation Engines

catalog → profile → rank → explain

Recommendations are produced at the volume of page views. Sending the catalogue structure, the merchandising rules and the user's full history with each one is where an otherwise cheap feature becomes a line item.

Where the spend goes

The same knowledge, paid for at every step.

This is the shape of the problem in AI recommendation engines: a pipeline where each step re-establishes context the previous step already had.

Recurring context by stepTypical pattern
candidate generationcatalogue attributes, taxonomy
profile matchfull user history
rankingmerchandising and business rules
explanationcatalogue and rules once more

What we do here

How ensemble helps in AI recommendation engines.

01

Resolve the shortlist, not the catalogue

Candidate items resolve as objects with only the attributes ranking needs, replacing bulk catalogue text.

02

Compress the profile

User history becomes structured preference facts that update, so a request resolves current state rather than an event log.

03

Make merchandising rules explicit

Margin targets, stock rules and promotions become policy objects applied at ranking, so business rules are enforced rather than described.

04

Explain from the same objects

The explanation resolves the facts that drove the rank, so the reason is accurate rather than reconstructed.

The context each agent gets

These are the dimensions your agents resolve against.

Each one is a set of objects with relations, not a section of a prompt. An agent asks for what its task needs and receives that much.

  • Catalogue and taxonomy
  • Item attributes
  • User preference state
  • Merchandising rules
  • Inventory state
  • Interaction outcomes

The layer underneath

Business logic as objects, not as prose.

Most AI products keep business knowledge as prompt text — long strings pasted in front of every call. Text has no structure, so nothing can be selected out of it. The only available move is to send all of it, every time. ensemble models the same knowledge as objects with typed attributes and explicit relations, and objects can be queried.

Today

A prompt preamble

Everything the agent might need, concatenated and re-sent. It cannot be narrowed, because there is nothing in a paragraph to select on. Cost grows with how much your business knows.

With ensemble

A resolved context

Exactly the objects this agent needs for this task, assembled at call time. Cost grows with the complexity of the task, which is the thing your customer is actually paying for.

Domain

What the thing is — a product, an account, a campaign, a policy, a prior decision.

Scope

Who it belongs to — this tenant, this customer, this department, or everyone.

Time

When it was true, what superseded it, and which version applied at the moment in question.

Confidence

Validated fact, inference, or unverified claim — so an agent knows what it is standing on.

Purpose

Which kind of task the fact is actually useful for. Most knowledge is irrelevant to most tasks.

Multidimensional means every object carries those five axes at once, and a request resolves along all of them. In AI recommendation engines, that is the difference between sending the whole business and sending 6 kinds of fact, filtered to the task in front of the agent.

How it integrates

One call replaces the block of text you assemble today.

No model change, no framework migration, no rewrite of your agents. The only thing that changes is where the context comes from.

Step 01

Audit

You send 100 production runs. We measure token usage per agent, how much of it is repeated business knowledge, and what a completed task costs today. Read-only — nothing is integrated yet.

No integration · Free

Step 02

Model

We build the object model of your business logic from what you already have — databases, documents, existing prompts and the production runs themselves. This is where the pipeline below earns its keep.

Weeks, not quarters

Step 03

Route

Replace the place where your agents assemble context with one resolve call. Run it side by side with your current prompt first — same outputs, fewer tokens — then cut over.

Shadow mode first

Your agent, after — AI recommendation engines
const context = await ensemble.resolve({
  agent:   "ranker",
  task:    "rank_candidates",
  subject: { user: u-55210 },
});

// context.block is the resolved business knowledge —
// typically a fraction of what you send today.
const answer = await model.complete({
  system: context.block,
  messages,
});

// every resolution is metered
context.usage; // { tokensIn, baseline, saved }
Provider-agnosticWorks with the models you already run. ensemble assembles the context; it does not sit in the inference path unless you want it to.
Measured, not claimedEvery resolution logs tokens against the baseline your prompt would have sent, so the saving is a number in your dashboard.
Your data stays yoursThe object model is yours. It can run inside your perimeter, and it can be exported.

Who builds it

Modelling business logic is the hard part. It is also what we have been doing for 25 years.

25+

Years building complex systems where the business logic — not the interface — was the product

Structuring a company's knowledge into objects that an agent can query is not a prompt-engineering exercise. It is domain modelling, and doing it by hand is why most teams never get past a prompt preamble.

We built an automated pipeline for it. It reads a product — its code, its data, its documents and its actual production runs — and produces a visual model of the business logic inside: the entities, the rules, the relations and the places where agents are re-deriving something the system already knows.

That model is the deliverable you can look at and argue with, and it is also the thing your agents resolve against. Both come out of the same pipeline, which is why the timeline is weeks rather than a consulting engagement.

What the pipeline produces
01A map of your product's business logic, drawn from its own code and data
02The entities, rules and relations your agents actually depend on
03Agent-by-agent cost attribution against that map
04The context routing rules that follow from it, ready to run

Find out what this costs you today.