Applied AI Portfolio · Agent 11

Recommending products through
conversation and explainable reasoning

Agent 11 solves a real gap in retail personalisation: most recommendation engines are opaque black boxes that fail on cold-start. This agent builds a customer profile through dialogue and justifies every recommendation — giving customers clarity and product teams a feedback signal.

Domain
Retail
Type
Conversational Recommender
Stack
Claude · Cloudflare Workers
Year
2025
Retail Personalisation Recommendations Explainability Conversational AI

The Problem

Most recommendation systems are opaque — they surface products via collaborative filtering or embedding similarity without telling the customer why. The result is a feed that feels generic, loses trust when it misses, and gives product teams no signal to improve on.

The harder problem is cold-start: new or returning customers without rich behavioural data still deserve relevant recommendations. Waiting for enough interaction data to feed a model is not a product strategy.

And the deeper gap: when a recommendation fails, nobody knows why. Black-box scores can't explain themselves, which means they can't be fixed.

Design Decisions

Conversation as profile signal

Rather than relying on passive behavioural data, the agent opens with an unstructured discovery question and asks 1–2 targeted follow-ups on budget, use case, and constraints. A brief, well-structured conversation is a faster and more reliable signal than weeks of click-stream observation — and it works from the very first interaction.

Explainability baked into output format

Each recommendation includes a 2–3 sentence justification that maps directly back to what the customer said. This isn't post-hoc rationalisation — the reasoning is part of the output format, enforced by the system prompt. Customers understand why they're seeing a product; teams can audit the logic.

Tight token budget

The entire agent operates within a strict token envelope designed for production use at scale.

<300
System prompt tokens
800
Max output tokens
1
API call per interaction

Delimiter-based structured output

A delimiter pattern lets the client parse structured product data out of a free-form completion without JSON mode or a separate tool call. This keeps the single API call constraint intact while decoupling the LLM's natural language output from the UI's card rendering.

Output format (enforced by system prompt)
===PRODUCT===
NAME: [product name]
TAG: [category]
DESC: [2–3 sentence justification tied to stated preferences]
===END===

Conversation Flow

The system prompt encodes a lightweight state machine. The agent doesn't ask questions for the sake of it — it triggers recommendations as soon as it has enough signal.

Turn 1

Open discovery — establishes product category and core intent without constraining the customer.

Turns 2–3

Targeted follow-ups on budget, use case, and hard constraints. No unnecessary back-and-forth.

Turns 3–5

Recommendations triggered once sufficient context exists. 2–3 products ranked with full justification.

Post-rec

Follow-up questions handled conversationally. Alternatives surfaced on request.

What I Learned

Conversation beats passive data for cold-start

The most interesting finding: users are surprisingly willing to answer 2–3 direct questions when they understand the payoff. The explicit "tell me what you need" framing felt more trustworthy than a feed that silently guesses — and produced better recommendations on the first interaction than most behavioural systems manage after dozens.

Explainability as a product feature, not an afterthought

Making reasoning visible changes how customers interact with the output. When a recommendation includes "this fits because you mentioned a tight budget and need something portable", customers engage with it differently — they either confirm the logic or correct it, which is exactly the signal you want. Explainability isn't just transparency; it's a feedback mechanism.

Domain agnosticism requires careful prompt design

Letting the agent work across any product category without hard-coding domain logic meant the system prompt had to encode criteria-elicitation principles, not product-specific rules. Getting this right — so the agent asks smart follow-up questions in any domain — required more iteration than the recommendation logic itself.

The extension path to production is direct

The current implementation uses illustrative product generation. Swapping in a real-time catalogue lookup requires changing one step in the pipeline. The conversation layer, reasoning format, and output structure all carry forward unchanged. Build the reasoning layer first, plug in the data layer later.