Replies: 2 comments 12 replies
-
To query spans along with their feedback annotations programmatically in Arize Phoenix, you can use the Here's an example of how you might construct a query to filter spans based on the feedback annotation: import phoenix as px
from phoenix.trace.dsl import SpanQuery
# Create a query to filter spans based on the feedback annotation
query = SpanQuery().where(
"annotations['user feedback'].score >= 0"
)
# Use the Phoenix Client to execute the query
px_client = px.Client()
result_df = px_client.query_spans(query)
# Display the result
print(result_df) This query filters spans where the If you need to access specific annotation details, you might need to handle annotations separately by querying them through the API and then merging the results with the spans DataFrame programmatically. Unfortunately, direct support for annotations in To continue talking to Dosu, mention @dosu. Help Dosu learn! Give it feedback: Great Response | Irrelevant Answer | Incorrect Sources | Too Verbose | Hallucination | Other |
Beta Was this translation helpful? Give feedback.
-
If someone can pitch in with an idea, so far I have reached the conclusion that it is not possible to export the user feedback, which is a bit weird in my opinion. I can export it through the UI if I create an experiment, and I do have the inpout and output which is great but I dont have the timestamp then... The feedback from dosu is appreciate but I don think it is correct... |
Beta Was this translation helpful? Give feedback.
-
Hi,
I am instrumenting a llamaindex workflow and am updating the CHAIN with user feedback like this:
In the UI the annotation is properly reflected:

However I am trying to query all the spans together with the feedback annotation and see no way of doing this...
tried through
px_client.query_spans
however there if I understood correctly annotations are not supported, tried frompx_client.get_evaluations
however this returns an empty list.From the UI I can actaully filter on the feedback through the spans:
annotations['user feedback'].score >= 0
And I can see them in the 'user feedback' column however did not manage to actually query and select this column programatically. any help would be highly appreciated :)
Beta Was this translation helpful? Give feedback.
All reactions