DEV Community

Avery Wang
Avery Wang

Posted on

Matching a Model Request to Its Usage Record

A model can appear in a picker, a decision log can record an accepted request, and a usage export can contain a row for the same team. Putting those observations on one dashboard does not establish that they describe the same attempt. Assigning a usage row to the nearest accepted request becomes especially misleading when two members submitted work around the same time.

Define one observation

This hypothetical worksheet assigns each attempt a distinct request ID. The collector attaches that ID to the picker observation made for the attempt. The decision export carries the same ID. Each usage row names the request and the team to which usage was attributed. These are requirements of the exercise. If an export lacks a shared identifier, document its mapping before combining the records.

A trace ID has a different scope. In the OpenTelemetry traces example, several spans share one trace ID and have distinct span IDs. A trace containing two attempts therefore needs another way to distinguish them. OpenTelemetry traces

Assemble the worksheet

The complete input below consists of four picker observations, four decisions and one usage entry. Rows within each source are intentionally sorted differently. Before reading the outcomes, designate C1 and C2 as negative controls whose expected decision is denial. R1 and R2 are ordinary observations.

Picker observation Recorded decision Usage attribution
R1 visible C2 accepted R1 Team Blue
R2 hidden C1 denied
C1 visible R2 accepted
C2 visible R1 accepted

To reconcile the exports, write one request ID per row on a new sheet. Find the matching ID independently in each source column. Copy the observation or write “unknown” if that source contains no matching entry. Then compare each designated control's decision to its expected outcome.

Request Picker Decision Usage owner Control result
R1 Visible Accepted Team Blue Ordinary
R2 Hidden Accepted Unknown Ordinary
C1 Visible Denied Unknown Passed
C2 Visible Accepted Unknown Failed

R2 has an explicit hidden observation. Its missing usage row supplies neither an owner nor a monetary amount. A request ID absent from all three sources would have three unknowns, including visibility. C1 passes because its recorded denial matches the intended control. Unexpected acceptance makes C2 fail. Keep its evidence, mark the control comparison invalid, and leave the cause open. If a control has no decision row, its result is inconclusive.

The exercise assumes at most one entry per request in each source. If an export contains duplicate decisions, keep their row IDs and investigate the conflict. If several usage components legitimately share a request ID, retain all their attributions. Include each source's collection cutoff so a colleague can reconstruct what was available when the worksheet was prepared.

The team preparing material about MonkeyAI commissioned this AI-assisted article. All observations in the worksheet are synthetic.

Top comments (0)