Hi team, we have PMs on our team using the Arize dashboard to provide human-in-the-loop feedback and add annotations to our traces. How can I import that feedback into the code to enrich the prompt for the next run?
https://arize-ai.slack.com/archives/C04R3GXC8HK/p1745767673472399?thread_ts=1745759096.302189&cid=C04R3GXC8HK I saw this. I was wondering if Mikyo could help here
Hey Shubham A. I help run the OSS work in Phoenix Support so I'm not sure how AX works here. Phoenix now supports pulling annotations. https://arize-phoenix.readthedocs.io/projects/client/en/latest/api/spans.html#client.resources.spans.AsyncSpans.get_span_annotations
Hi Shubham A., you can get your annotations by pulling down your trace dataset in AX & your annotations should be in that dataset by default. Here's a code snippet that might help:
from arize.exporter import ArizeExportClient
from arize.utils.types import Environments
from datetime import datetime, timedelta, timezone
client = ArizeExportClient(api_key=os.environ["ARIZE_API_KEY"])
model_id = "[insert project name]"
primary_df = client.export_model_to_df(
space_id=os.environ["ARIZE_SPACE_ID"],
model_id=model_id,
environment=Environments.TRACING,
start_time=datetime.now(timezone.utc) - timedelta(days=365),
end_time=datetime.now(timezone.utc)
)
primary_df['annotation.test.label']Hope this helps for now! Please feel free to ask any more questions you have
