October 10, 2026

Prompt: Optimizing Multi-Stage Acquisition Funnels with Contextual Bandits on AWS

← AI for Your Work

The article explains how Amazon Payments applied a multi‑objective contextual bandit (LinUCB) on Amazon SageMaker AI to personalize content across an acquisition funnel, achieving single‑digit conversion lift while maintaining brand control.

Copy This Prompt

Create a Python class `MultiObjectiveLinUCB` that takes `n_arms`, `n_features`, `alpha`, and `weights`. Implement `select_arm(context)` returning the arm with highest weighted UCB sum, and `update(arm, context, rewards)` where `rewards` is a list of per‑stage rewards. Include placeholders `{n_arms}`, `{n_features}`, `{alpha}`, `{weights}`.

Example input

Use the placeholders in the prompt with permitted, anonymized source data.

Expected output

Follow the output format requested in the prompt and verify the result against the source.

Tools

Amazon SageMaker AI, Amazon S3, Amazon DynamoDB, Python, Jupyter Notebook, AWS CLI