Title: Quiz 6 — Cost, Latency, and Observability Instrumentation
Course: AIINFRA 300: Agentic AI & the Model Context Protocol (MCP) > Section: Week 06 — Cost, Latency, and Observability Instrumentation

Q: Which OpenTelemetry GenAI semantic convention attribute captures the number of tokens sent to the model in a given call?
- `gen_ai.usage.output_tokens`
- `gen_ai.usage.input_tokens`
- `gen_ai.request.model`
- `gen_ai.system`
A: `gen_ai.usage.input_tokens`

Q: Because OTel GenAI semantic conventions are standardized at the instrumentation layer, cost and latency can be computed consistently across different frameworks like OpenLLMetry, Phoenix, and TruLens.
- True
- False
A: True

Q: What OpenTelemetry mechanism, combined with a BaggageSpanProcessor, allows context (such as a feature name or user ID) to propagate across every span in a multi-framework agent call?
- Span Links
- Baggage
- Resource Attributes
- Sampling Rate
A: Baggage

Q: Name the specific endpoint that Langfuse uses to ingest traces sent over OTLP.
Feedback: Sample/expected answer: `/api/public/otel`

Q: A trace in which every span shows a healthy status code, normal latency, and reasonable token counts guarantees that the agent successfully completed the user's task.
- True
- False
A: False

Q: An agent observability platform primarily represents a single agent run as which of the following?
- A flat list of timestamped log lines
- A single aggregate cost number
- A tree of nested spans representing LLM calls, tool calls, and retries
- A CSV export of token counts
A: A tree of nested spans representing LLM calls, tool calls, and retries

Q: Your total monthly token count jumped 40%. Name two of the three distinct root causes discussed this week that could each explain rising token usage, and note that each requires a different fix.
Feedback: Sample/expected answer: Any two of: prompt bloat (system prompt/few-shot examples grew), context pressure (conversations running longer before hitting a context limit), and a runaway/retry loop — each needs a different fix (trim the prompt, summarize/truncate context, or fix agent termination logic), which is why per-call/per-step breakdowns are needed instead of relying on the aggregate total.

Q: Helicone's cost-tracking approach is primarily based on which of the following?
- Requiring a full rewrite of your agent's LLM call sites
- A one-line proxy swap plus an open-source cost repository (300+ models) or its Model Registry v2 as an AI Gateway
- Manual entry of per-request cost by the developer
- Parsing raw HTTP response headers for pricing data
A: A one-line proxy swap plus an open-source cost repository (300+ models) or its Model Registry v2 as an AI Gateway