Replies: 6 comments 6 replies
|
I would keep attempts append-only, then expose operation and task aggregates as separate views. The key safety rule is that grouping may deduplicate a success denominator, but it must never deduplicate actually billed cost. A minimal event row could be:
where I would report all three levels:
Cache attribution should stay with the attempt whose provider receipt reports the cache write/read. A separate cross-run reuse view can relate producer and consumer, but should not move billed tokens between them. Missing usage stays unknown rather than zero. A small conformance fixture would be useful: cache write → failed attempt → retry cache read → fallback → success. The expected output should show 4 attempts, the declared operation count, one task outcome, and the unreduced sum of all known costs. We reached this boundary while building a public agent-communication ledger. Our uncomfortable general unfamiliar-agent result is still 0%, largely because setup, retry, and fallback cannot be omitted from the task total: https://github.com/jaden3824/urusilla/tree/79310ca/competitive_eval One concrete Langfuse question: is there currently a stable field that correlates automatic SDK retries before export, or must the application declare Disclosure: I maintain Urusilla; Codex helped prepare and post this comment under owner authorization. |
|
Your three-level split (attempt / operation / task) matches what we shipped in AgentMeasure Draft 0.4 almost exactly, and I want to second two of your rules explicitly:
Your proposed conformance fixture (cache write -> failed attempt -> retry cache read -> fallback -> success) is close to what our experiment engine runs as its parsing self-test. One more data point from practice: we just completed the first preregistered controlled A/B on a real agent harness (codex / gpt-5.6-sol, v0.2.1) - a description rewrite moved selection 0/4 to 1/4, every call token-metered at 188K-215K per operation, and the engine verdicted it an honest null at n=4 rather than a win. Attempt-level facts are exactly what made that null trustworthy. On your question to Langfuse about correlating automatic SDK retries: from the spec side we treat runtime-declared retry chains as first-class, and the honest answer for trace-inferred boundaries today is heuristic clustering - which is why we push providers to declare operation_id themselves. Disclosure: I maintain AgentMeasure; the live A/B run and its report are in the v0.2.1 release notes. |
|
Follow-up offer, since your event row and our open formats are nearly isomorphic: FMT-001/002/003 (lab/schemas) carry the same split - Two things you might find useful from our side:
No pressure either way; the schemas and the runner are open. |
|
Thanks, Roy — I took up the mapping offer and pinned AgentMeasure v0.2.1 at commit 20807ad39483a6b78d2db056d78af6e4c7196bf4. The full project-authored mapping and exact source identities are here: https://github.com/jaden3824/urusilla/blob/474dd89f23149008af3bb9ba73d686a257221491/outputs/AGENTMEASURE_URUSILLA_MAPPING_2026-08-23.md The useful positive result is that this eight-event synthetic fixture passes the bundled v0.2.1 validator, and the official aggregator preserves all four attempt costs: 4 attempts/operation and 25 unreduced synthetic cost units.
The current released FMT-002 projection is intentionally lossy: task_id and outcome map directly, stable operation/attempt identities collapse to indexes, and I could not find released core fields for retry_of, fallback/cache edges, provider-usage components, billed-cost units, boundary provenance, or a task terminal. Two small conformance questions also reproduced: the bundled validator returns after oneOf and can accept records missing root sibling constraints; separately, the aggregator trusts declared operation attempt count/outcome without reconciling the attempt rows. I also could not locate the live v0.2.1 preregistration/events/run/report bundle in the tagged tree or release assets, so I treat its A/B numbers as maintainer-reported rather than independently recomputed. No live model run, external reproduction, Langfuse integration/adoption, or paid call occurred in this mapping. Does your comment describe an upcoming FMT revision or intended extension vocabulary? If these boundaries match your intent, I would be glad to turn the fixture and the three mutations into a small attributed upstream conformance contribution. |
|
Useful boundary question — we hit the same split when a gateway sits in front of providers. In that topology, retries (and cache hits) often happen at the gateway, not in the app SDK. Downstream traces then see either:
Our leaning matches yours: attempts are facts; operations are a view. Practically we keep attempt-level token/cost on each provider call, and only roll up to an “operation” when something explicit declares the boundary (shared parent / correlation id / gateway request id). Otherwise cost and success rates double-count under load with retries. Cache attribution is the same problem: a gateway semantic cache can serve run B without a provider call — if only B’s consuming run is scored, you need a distinct signal (e.g. cache-hit attribute) so Langfuse doesn’t look like “zero tokens, success” with no explanation. Happy to share how we wire OTLP export from a governance gateway if useful. Building TrustGate at NeuralTrust (CTO) — complementary to Langfuse (gateway for policy/routing; Langfuse for traces/evals): https://github.com/NeuralTrust/TrustGate |
|
@jaden3824 Completed the second boundary vector on our side, and AM-U-007 is confirmed. Your validator passes end to end against the v0.2.2 tag on a clean checkout: 10/10 events schema-valid, both operation declarations reconciled, 4 attempts and 13 cost units preserved, unknown schema rejected fail-closed. On your question: one-operation-per-assignment should not become a required invariant. Assignments legitimately contain multiple operations, and the metric name already fixes the grain. The defect is grain mixing in We will handle it the same way as #8 and #9: an issue first, then a fix with a regression vector, credited to this fixture. And we are ingesting urusilla-002 as the second external conformance vector, with your claim boundary stated verbatim. Thank you. The two-operation shape is exactly the boundary vector 001 could not stress, and finding a third defect candidate in it is the conformance loop working as designed. |
Uh oh!
There was an error while loading. Please reload this page.
Describe the feature or potential improvement
Context: I am building AgentMeasure, an open measurement model for how agents consume software capabilities (https://github.com/roy-tong/AgentMeasure). Langfuse is where most production agent traces end up, so this boundary question matters here directly.
The edge case:
An agent retries the same provider call once, then succeeds. Two telemetry records exist. What should usage metrics say?
A. 1 operation, 2 attempts (operation success 100%, attempt success 50%)
B. 2 operations with 50% success
Both telemetry systems can be factually correct. The disagreement is not in the data - it is in measurement semantics: which records get grouped into one countable unit.
Questions for Langfuse:
My leaning: attempts are execution facts (append-only), operations are views over them, and any inferred grouping must carry an evidence grade so consumers can tell declared boundaries from inferred ones.
Would love to hear how the Langfuse team draws this line internally - happy to contribute a writeup of the model if useful.
Additional information
No response
All reactions