The full problem statement is available to Pro members.
preloaded fixtures
import pandas as pd
import numpy as np
requests = pd.DataFrame({
"org": ["Northwind", "Northwind", "Playform", "Serene", "Hooli", "Hooli", "Globex", "Globex"],
"model": ["gpt-flash", "gpt-pro", "gpt-flash", "gpt-flash", "gpt-pro", "gpt-flash", "gpt-pro", "gpt-flash"],
"input_tokens": [1200, 5000, 300, 150, 12000, 800, 7000, 1100],
"output_tokens": [400, 1800, 90, 40, 4200, 200, 2500, 350],
"latency_ms": [820, 3200, 450, 510, 5100, 530, 3900, 700],
"status": ["ok", "ok", "ok", "error", "ok", "ok", "ok", "rate_limited"],
})
pricing = pd.DataFrame({
"model": ["gpt-mini", "gpt-flash", "gpt-pro"],
"input_per_1k": [0.0002, 0.0010, 0.0100],
"output_per_1k": [0.0008, 0.0030, 0.0300],
})
This is a Pro problem
“Latency percentiles per model” is part of the Pro problem set. Upgrade to unlock the harder half of every track — SQL, Python and pandas.
The first problems in each track stay free.