-
Notifications
You must be signed in to change notification settings - Fork 838
Open
Description
Which component is this feature for?
LLM Semantic Conventions
🔖 Feature description
The current TraceloopSpanKindValues covers orchestration layers (WORKFLOW, TASK, AGENT, TOOL, UNKNOWN) but lacks domain-specific stages frequently used in GenAI/RAG pipelines. This limits clear attribution of latency, errors, and cost by stage.
Proposed Change
We should add following span kind:
- EMBEDDING: The vectorization step that converts input (text/images) into dense/sparse vectors.
- RETRIEVER: The candidate-fetch step that queries an index/store like vector DB to return top-K items with optional filters.
- RERANKER: The post-retrieval reordering step that re-scores candidates (e.g., LLM-based judge) and outputs the final top-N.
Besides this, we should also add an span kind specifically for the span that calls the large model directly(like OpenAI SDK invoke in langchain), which we can name GENERATION, referring to Langfuse.
@nirga I can start with the Langchain/LangGraph instrumentation.
🎤 Why is this feature needed ?
Make consistent with the implementations of other observability platform.
✌️ How do you aim to achieve this?
Change the semconv SDK.
🔄️ Additional Information
No response
👀 Have you spent some time to check if this feature request has been raised before?
- I checked and didn't find similar issue
Are you willing to submit PR?
Yes I am willing to submit a PR!
Metadata
Metadata
Assignees
Labels
No labels