Skip to main content

Real architecture · Mid

Ailo: LLM recommendation agent (16 s and nondeterminism)

An honest failure (the "cookie" shown to someone who ordered a hamburger, due to a taxonomy error), 16 s or more of latency, and two fixes. The bottleneck was the data, not the model.

15 min read · Source: iFood · Content reviewed on October 23, 2026

Short answer

An honest failure (the "cookie" shown to someone who ordered a hamburger, due to a taxonomy error), 16 s or more of latency, and two fixes. The bottleneck was the data, not the model. Ailo is iFood's AI agent for consumers. According to the post, it has stopped being just a small experiment and is becoming a product.

01 · CONTEXT

What Ailo is

Ailo is iFood's AI agent for consumers. According to the post, it has stopped being just a small experiment and is becoming a product. The person talks to the agent, which presents a carousel of items based on order history and the context of the interaction; then, the journey continues in the iFood app.

According to the post, Ailo is available in the iFood app in five cities and on WhatsApp.

The path began with a simple decision-tree bot on WhatsApp, which allowed orders at specific restaurants. The second experiment focused on basic recommendations of restaurants and dishes.

02 · DATA BEFORE THE MODEL

A recommender lives off its data foundation

The post states that the hardest part of building a recommender is not the model itself, but the quality of the data foundation. It cites iFood's structured base and the LCM, which ensures that user intent is always aligned with the offer options in real time.

  1. The person talks to the agent, in the iFood app or on WhatsApp.

    Architecture diagram: Ailo: overview
    CLCustomer (app or WhatsApp)conversa
    CPAgente Ailo
    DBOrder history
    CPLCM
    DBReal-time offers
  2. The agent presents a carousel of items based on order history and the context of the interaction.

    Architecture diagram: Ailo: overview
    CLCustomer (app or WhatsApp)
    CPAgente Ailo
    DBOrder historycarousel base
    CPLCM
    DBReal-time offers
  3. The LCM keeps the person's intent aligned with the offer options in real time.

    Architecture diagram: Ailo: overview
    CLCustomer (app or WhatsApp)
    CPAgente Ailo
    DBOrder history
    CPLCMaligns intent
    DBReal-time offers
  4. After the carousel, the journey continues in the iFood app, in the experience that already exists.

    Architecture diagram: Ailo: overview
    CLCustomer (app or WhatsApp)continues in the app
    CPAgente Ailo
    DBOrder history
    CPLCM
    DBReal-time offers

The post also describes a two-way street: Ailo learns from each interaction and improves from user feedback.

03 · THE LIVE FAILURE

The cookie for someone who asked for a hamburger

The development team was on call, watching a crucial demo for international investors. The plan was to show personalized recommendations from a single keyword.

The user asked for a hamburger, and at that hour in Brazil, only one burger place was open at the searched address. According to the post, the agent concluded that the user had not liked the only burger available and went off to run a new search; because of a small taxonomy classification error in the catalog, it presented a cookie.

  1. The person asks the agent for a hamburger.

    Architecture diagram: Ailo: the demo with a failure
    CLPerson in the demoasks for hamburger
    CPAgente Ailo
    DBOffer catalog
  2. At the searched address, only one burger place is open.

    Architecture diagram: Ailo: the demo with a failure
    CLPerson in the demo
    CPAgente Ailo
    DBOffer catalogsingle option
  3. The agent concludes that the person did not like the only burger available and runs a new search.

    Architecture diagram: Ailo: the demo with a failure
    CLPerson in the demo
    CPAgente Ailonew search
    DBOffer catalog
  4. Because of a small taxonomy classification error in the catalog, the agent presents a cookie.

    Architecture diagram: Ailo: the demo with a failure
    CLPerson in the demo
    CPAgente Ailo
    DBOffer catalogwrong taxonomy

The post also attributes the failure to the agent being nondeterministic: unable to find an offer, it looked for a solution at all costs. The team itself acknowledges it did not deliver its best.

04 · LATENCY

Sixteen seconds and two fixes

At first, the agent's latency reached sixteen seconds or more to generate results. The post describes two moves to reduce it: adjusting how each message is processed and showing micro-interactions during complex searches.

  1. At first, generating results took sixteen seconds or more.

    Architecture diagram: Ailo: latency path
    CLClient
    CPMessage processing
    CPDeep search
  2. Simple requests do not trigger deep searches, which ensures faster responses.

    Architecture diagram: Ailo: latency path
    CLClient
    CPMessage processingsimple request
    CPDeep search
  3. In complex searches, the person sees micro-interactions and notices that Ailo is working in the background.

    Architecture diagram: Ailo: latency path
    CLClientmicro-interactions
    CPMessage processing
    CPDeep search
CriterionSimple messageComplex search
TratamentoDoes not trigger deep searchShows micro-interactions while searching
Described effectFaster responsesThe person notices that Ailo is working in the background

The post says that, with research and constant monitoring, the time was reduced to acceptable levels, but it does not publish the final value.

05 · CHANNEL AND RESULTS

The channel shapes behavior

In the app, fewer than half of users run more than one search. According to the post, this happens because the comparison is always with the traditional iFood experience. On WhatsApp, the dialogue is more natural and continuous.

The post reports that Ailo users create twice as many carts as in the traditional app experience and that, in the team's surveys, eighty percent of users find Ailo useful in moments of indecision.

A current challenge mentioned is balancing two important moments: exploring new options and the comfort of surfacing what the user already knows and likes.

06 · LESSONS AND LIMITS

What to take into an interview

Among the team's lessons: it is not enough to recommend; you need to understand the moment, the time of day, the mood, and the story. And the person's final autonomy is not replaced by the agent without their permission.

Frequently asked questions

What is Ailo: LLM recommendation agent (16 s and nondeterminism)?

An honest failure (the "cookie" shown to someone who ordered a hamburger, due to a taxonomy error), 16 s or more of latency, and two fixes. The bottleneck was the data, not the model.

What does the Ailo: LLM recommendation agent (16 s and nondeterminism) design cover?

It is organized in these sections: What Ailo is, A recommender lives off its data foundation, The cookie for someone who asked for a hamburger, Sixteen seconds and two fixes, The channel shapes behavior, and What to take into an interview.

How long is Ailo: LLM recommendation agent (16 s and nondeterminism) and what level is it?

It takes about 15 minutes to read and is rated Mid level.

Now design it yourself

Run this case as an interview in the System Design school: you make the decisions, the tutor challenges them and you see how your design scores.