Journals / Case study

How Nubank guesses why you are calling before you say it

Phone menus make customers explain themselves to a machine. In 2023 Nubank described Precog, which turns the last three hours of app activity into a guess about the problem and sends the call straight to a specialist.

21 OCT 20267 min readCustomer service · Intent prediction · Real-time ML Based on: Nubank, 2023
Nubank's Precog architecture. App events flow through Kafka into a batch path (data lake, embedding training, model training) and a real-time path (an event consumer writing to a low-latency event cache, read by the model service that the application backend calls).
Image: Nubank

Most bank hotlines start with a menu: press 1 for cards, 2 for loans, 3 for everything else. Nubank, the Brazilian digital bank, wanted to skip that step. In June 2023, ten people at Nubank described Precog on the company's engineering blog, a system for "predicting customer’s support needs in real time". The promise: "No more navigating through tedious menus, listening to endless recordings, or being transferred from one agent to another." The idea behind it is simple. Before you call your bank, you were probably just doing something in its app.

The problem: the menu is a poor model of the customer

Nubank sells many products, each built by its own team on its own services, and hand-built model features could not keep pace. In the post's words, "our models started to lag behind product evolution". The richest signal was the stream of taps and screens in the app, and that stream is messy: "there is no centralized governance, and these values can change quickly with each update of the app."

So the team wanted a way to describe what a customer is doing that needs no hand-made features for each product, and that stays useful when the app changes.

How they built it

Clicks become words. Every app event becomes text. "Precog turns records into sequences of text-based identifiers, while dropping infrequent symbols, like unique ids." A tap on a savings transfer turns into tokens such as the event name, the product, the flow and the screen; the transaction's unique ID is thrown away.

Table: a raw app event called feed_item__clicked with JSON properties (product nuconta, flow savings_dashboard, current screen, identifier 'Transferência enviada' and a link with a unique ID) becomes one line of normalised tokens, with the link and its ID struck out
How Precog turns a raw app event into tokens: names and values stay, unique IDs go. Image: Nubank

A bag of words, on purpose. The team chose the simple option first: "we decided to represent customers with a bag-of-words of their events’ symbols." The post is open about the trade-off: "Our current modeling approach doesn’t take into account the order or age of the events". Embeddings for the tokens are learned "in a self-supervised manner, using contrastive learning" with the open-source StarSpace library, so no labelled data is needed for that step.

Three hours of context. Only recent activity counts: "we settled on a 3 hour window for now". Longer was not better; "increasing the event window reduced model performance".

Two pipelines. In batch, events land in a data lake that trains the embeddings and the model on top of them. In real time, a consumer "transforms the raw event data into a string format and stores it in a low-latency, temporary storage (Redis)". When a call comes in, the model service "retrieves relevant events from the cache, computes embeddings, and uses them as features for a classification model." Storage choice mattered: an earlier design on DynamoDB "made the cost prohibitive", and Redis "reduced the cost to a small fraction of the original version".

Route only when confident. The model ranks "the most likely product that the customer needs help with. If the model is confident enough, the system routes customers directly to specialists". Otherwise a generalist answers and transfers when needed.

Diagram: a customer's phone call reaches the phone routing system, which asks the model service (backed by the event cache and the event embedding map) and then sends the call to a generalist agent or straight to a specialised agent
The routing flow: the phone system asks the model, then picks a generalist or a specialist. Image: Nubank

What it delivered

Nubank reports that Precog helped "increase the volume of calls that are correctly routed to specialized agents without need for customer input by more than 50%, compared to the previous model"; its chart labels the gain +54%. It also reports "significant decreases in time to solve issues and increases in customer satisfaction", and "improvements for all the products we tested", with the biggest gains "in newer products for which we hadn’t implemented traditional features yet". Building a new feature on top of Precog took "a couple of weeks, versus months for traditional approaches".

Read the headline with care. The post gives no absolute rates, sample size or test period, does not say whether the result came from a live A/B test, and does not describe "the previous model". The biggest gains came where the old model had the least to work with. A month later Nubank's own summary restated the result as improving its "ability to predict customer intent during customer service interactions by over 50%", a broader claim than the original. The team also notes a running cost: "we also need to retrain the embeddings often."

What has changed since

Nubank bought more AI capacity. In June 2024 it announced the "acquisition of Hyperplane", a Silicon Valley data intelligence company, and in 2025 it published nuFormer, foundation models trained on transaction data.

Chat moved to language-model agents. In a 2025 OpenAI customer story, Nubank's assistant "Resolves 55% of Tier 1 inquiries, handling over 2 million monthly chats". By March 2026 Nubank wrote that "For a neo-bank of this scale, the “chatbot” era is over", with an auditor model that checks "every single conversation". Its June 2026 post on the chat platform says it "routes each interaction to the appropriate agent", through a new "agent selector component". And its second-quarter 2026 results say "AI agents handle more than 60% of customer support conversations in Brazil at or above human parity", without defining parity.

We found no later post that names Precog, so we cannot say whether it still routes calls, or whether the new agent selector builds on it.

Why it matters for your business

Any bank, fintech, insurer, telco or online shop in Indonesia that runs both an app and a contact centre already has Precog's raw material: what the customer did in the app just before they reached out. Routing them right the first time costs less than a transfer, and customers notice.

The rules give speed a direct value. OJK's POJK 22/2023, in force since 22 December 2023, requires financial firms to resolve oral complaints within "paling lama 5 (lima) hari kerja" and written ones within "paling lama 10 (sepuluh) hari kerja", down from 20 working days under the old POJK 18/2018. It also requires recording "seluruh proses Layanan Pengaduan secara lisan". Payment firms supervised by Bank Indonesia follow PADG 20/2023, which keeps 20 working days for written complaints.

The data deserves care. App activity linked to a customer is personal data under Indonesia's data protection law (UU No. 27 of 2022), and "data keuangan pribadi" counts as specific, more protected data. Pasal 10 gives people the right to object to decisions based only on "pemrosesan secara otomatis, termasuk pemrofilan" that have legal or significant effects. Whether routing a call meets that bar is an open question; we are engineers, not lawyers, so ask yours, and plan a data protection impact assessment for systematic scoring of customers.

We found no Indonesian bank that publicly describes predicting the reason for a call before it starts. The public examples we found are chatbots and tools that help agents during a call.

How we would build it today

  1. Log app events with a stable vocabulary. Event names and a few key properties, unique IDs stripped, as Precog does.
  2. Label from what you already have. The contact reason your agents record at the end of each call or chat is the training label.
  3. Start simple. Count events in the last few hours, add a gradient-boosted classifier, and predict the contact reason. Precog's lesson is that simple and fast beats clever and slow at the start.
  4. Serve from a cache. Keep each customer's recent events in Redis or similar, expiring with the window, so the phone or chat system gets an answer in milliseconds.
  5. Route only when confident. Above a threshold, go straight to the specialist; below it, a generalist. Track wrong routes and transfers.
  6. Test it properly. A/B test against today's menu: correct first routes, transfers, handling time and repeat contacts within seven days, reported as absolute numbers.
  7. Do the privacy work first. A data map, retention no longer than the window, a human route always available, and a documented assessment.

The lasting lesson from Nubank: the best question a support line can ask is the one it no longer needs to ask.