Evals & Observability·Question 13 of 83Basic

What are OpenTelemetry's GenAI semantic conventions, and why should you care?

Type it the way you would explain it to an interviewer. A few sentences is enough; you can't break anything.

Model answer: the part to lead with

They are a standardised vocabulary for describing LLM operations in traces: agreed attribute names under a gen_ai.* namespace, such as gen_ai.request.model, gen_ai.usage.input_tokens and gen_ai.operation.name, plus conventions for how a model call, a tool call and an agent step should be shaped as spans.

Full worked answer with diagram

They are a standardised vocabulary for describing LLM operations in traces: agreed attribute names under a gen_ai.* namespace, such as gen_ai.request.model, gen_ai.usage.input_tokens and gen_ai.operation.name, plus conventions for how a model call, a tool call and an agent step should be shaped as spans.

Why care: it decouples instrumentation from backend. If your app emits standard OTel spans, you can point them at Langfuse, Phoenix, Datadog, Honeycomb or your own collector without touching application code. The alternative is a vendor SDK threaded through every call site, which quietly becomes the reason you cannot leave that vendor. It also means LLM spans sit in the same trace as your HTTP and database spans, so you can see that the 4 second p95 was 300ms of model and 3.7s of your own retrieval code. Many frameworks now emit compliant spans natively or through an instrumentation package, so you often get this close to free.

Going further: follow-up territory

Two caveats worth raising. First, as of late 2026 the gen_ai.* conventions are still at Development stability (what OTel used to call experimental), not Stable, and the work has moved into its own repository (open-telemetry/semantic-conventions-genai), which had no tagged release as of early November 2026 and was still changing emitted names. In November 2026 it folded invoke_workflow into invoke_agent, dropped gen_ai.workflow.name and deprecated the gen_ai.retrieval.client span. Attribute names and span shapes can change without a deprecation window. Pin your instrumentation version, read the changelog on upgrade, and expect churn rather than treating the names as settled.

Second, and more important in interviews: the conventions cover mechanics, not quality. Tokens, models, parameters, latency, finish reasons. There is no standard for "was this answer correct" or "did this violate policy". Eval scores and safety verdicts are your own custom attributes layered on top. OTel gives you the skeleton and portability; the judgement is still yours to build.

Also note that capturing prompt and completion content is deliberately opt-in, because that content is where the privacy exposure lives.

Worth sketching. It shows the seam that keeps you portable, and where the conventions stop and your own judgement starts.

flowchart LR
    A["App and framework code"] --> S["OTel GenAI spans:<br/>model, tokens, latency"]
    H["HTTP and DB spans"] --> S
    S --> B1["Langfuse or Phoenix"]
    S --> B2["Datadog or Honeycomb"]
    S --> B3["Your own collector"]
    S --> Q["Eval score and policy verdict:<br/>custom attributes you add"]

What a good answer covers

  • Why care: it decouples instrumentation from backend
  • If your app emits standard OTel spans, you can point them at Langfuse, Phoenix, Datadog, Honeycomb or…
  • The alternative is a vendor SDK threaded through every call site, which quietly becomes the reason you…
  • It also means LLM spans sit in the same trace as your HTTP and database spans, so you can see that the 4…
  • Many frameworks now emit compliant spans natively or through an instrumentation package, so you often…

Interviewer follow-ups to expect

  1. How would you attach an eval score to a span after the fact?

  2. What would you do when a convention you depend on changes names in a new release?

Worked answer from AI-Engineer-Interview-Questions by Om (MIT), reformatted for LLM Prep · answer text last updated 6 November 2026 · scoring and review schedule by LLM Prep