To get annotations for a specific span_id via code, use the Phoenix client’s get_span_annotations_dataframe method in Python, or the getSpanAnnotations function in TypeScript. Both allow you to retrieve all annotations for given span IDs within a project. Example for Python: LBKSfrom phoenix.client import Client client = Client() annotations = client.spans.get_span_annotations_dataframe( span_ids=[span_id], # replace with your span_id project_identifier="your_project" )LBKSFor TypeScript, use: LBKSimport { getSpanAnnotations } from '@arizeai/phoenix-client'; const result = await getSpanAnnotations({ client, project: { projectName: "your_project" }, spanIds: [spanId], limit: 100 });LBKSAccording to Phoenix Python SDK docs and TypeScript API docs, this will return all annotations for the specified span.Would you like more detail?Sources:
- https://arize.com/docs/phoenix/sdk-api-reference/python/arize-phoenix-client#«Raa6jtt9lffffffb»
- https://arize-ai.github.io/phoenix/functions/_arizeai_phoenix-client.spans_getSpanAnnotations.getSpanAnnotations.html
💡Hint: Mention RunLLM in the thread for followups.