---
title: "Part 1: Simulation-first AI experimentation for ads at Grab"
description: "Grab built an offline ads simulator that sequentially replays historical ad opportunities, applies candidate bidding, ranking and pacing logic, and probabilistically generates user responses from calibrated engagement models."
url: "https://swe.quest/articles/part-1-simulation-first-ai-experimentation-for-ads-at-grab-b9e77470bd59260e"
canonical: "https://engineering.grab.com/part-1-ads-simulation-blogpost"
source: "Grab Engineering"
published: "2026-11-23"
difficulty: "medium"
kind: "Case study"
reading_minutes: 11
tags: ["ads","evals","testing","system-design"]
---

# Part 1: Simulation-first AI experimentation for ads at Grab

A post on [Grab Engineering](https://swe.quest/sources/grab.md), published 2026-11-23, 11 min read, Case study. Original: [https://engineering.grab.com/part-1-ads-simulation-blogpost](https://engineering.grab.com/part-1-ads-simulation-blogpost)

## Summary

Grab built an offline ads simulator that sequentially replays historical ad opportunities, applies candidate bidding, ranking and pacing logic, and probabilistically generates user responses from calibrated engagement models. Shortlisted candidates that pass business and user guardrails across many traffic conditions then go to live A/B tests. Fidelity is checked continuously at the mechanism level (matching production logic) and the outcome level (comparing metric distributions against production). Two use cases illustrate the approach: narrowing the mix-ranking alpha parameter that blends ads with organic results, and comparing a Primal-Dual Adaptive Pacing controller against a harder-to-tune PID budget pacer. Lessons include treating the simulator as a product and recognizing that idealized spend-signal timing can hide live instability.

Written by swe.quest, not by the author.

**Difficulty:** Medium: assumes a working developer; shows how it is built or done

## Topics

- [Ads](https://swe.quest/tags/ads.md) (Domains)
- [Evaluation](https://swe.quest/tags/evals.md) (AI & ML)
- [Testing](https://swe.quest/tags/testing.md) (Engineering practices)
- [System design](https://swe.quest/tags/system-design.md) (Architecture & design)

## Prerequisites

- ad auctions
- A/B testing ([easy posts on Testing](https://swe.quest/tags/testing.md?difficulty=easy))
- PID controllers

## Keywords

Grab, PID controller, Primal-Dual Adaptive Pacing, mix-ranking, budget pacing, A/B testing

## Related posts

- [Part 2: Generative bidders for ads at Grab](https://swe.quest/articles/part-2-generative-bidders-for-ads-at-grab-c23bf975df8e9eb8.md): Grab Engineering · 2026-11-25 · Hard · 12 min read · Ads, Machine learning, Model training, Evaluation
  Grab Ads replaces reactive PID budget pacing with a generative bidder that plans 30-minute sequences of per-minute pacing actions.
- [Turning Opportunistic AI Inference Capacity Into Better Ads Recommendations](https://swe.quest/articles/turning-opportunistic-ai-inference-capacity-into-better-ads-recommendations-a2893f4d3d62c2b4.md): Meta Engineering · 2026-10-12 · Medium · 10 min read · Ads, Inference & serving, Recommendations & ranking, Resilience, Capacity planning
  Meta aggregates locally idle inference capacity, stranded by peak provisioning, delivery timing, resource-ratio and accelerator-type mismatches, into a preemptible opportunistic pool used to improve ads recommendations.
- [How we built ChatGPT’s novel ad stack for user trust and relevance](https://swe.quest/articles/how-we-built-chatgpt-s-novel-ad-stack-for-user-trust-and-relevance-d3146d4ee40db504.md): OpenAI · 2026-10-21 · Medium · 14 min read · Ads, AI agents, LLMs, System design, Vector search
  ChatGPT's ad stack replaces the event-driven request/response ads pipeline with stateful ads sessions that track evolving intent across turns and conversations, orchestrated by a post-trained LLM that calls tools for query rewriting, ANN retrieval over multiple embedding indices, eligibility filtering (budget, pacing, targeting, policy, dedup), relevance and engagement scoring, and a separate auction tool that handles pricing and final selection.
- [Powering AI-led research through simulation](https://swe.quest/articles/powering-ai-led-research-through-simulation-d6d1409659075b73.md): Grab Engineering · 2026-10-05 · Medium · 9 min read · AI agents, System design, Testing, Performance engineering, Rust
  Grab built sim-rs, a self-contained tick-based marketplace simulator that replays a city-day of bookings and drivers through a closed dispatch loop (demand, supply movement, cancellation models, batching, solver-based allocation, recycling) in tens of minutes, with pluggable stages, portable reproducible run packages, and built-in switchback/spatial A/B/n experiments.
- [Ensuring Even Ad Spend on the Zalando Homepage: How Our New Bidding Algorithm Maximizes Value for Advertisers and Shoppers](https://swe.quest/articles/ensuring-even-ad-spend-on-the-zalando-homepage-how-our-new-bidding-algorithm-bfbd38b714353cd8.md): Zalando Engineering · 2024-09-16 · Medium · 5 min read · Ads, Algorithms, E-commerce
  Zalando Marketing Services replaced its homepage ad bidding formula with a feedback-controlled pacing strategy that scales each bid by (1 − spent)/(1 − expected even spend), splitting budget into hourly buckets based on traffic forecasts.

Browse: [Latest posts](https://swe.quest/index.md) · [Topics](https://swe.quest/tags.md) · [Sources](https://swe.quest/sources.md) · [Topic map](https://swe.quest/map.md) · [Site guide (llms.txt)](https://swe.quest/llms.txt)
