Is there a way to get the total input / output tokens in the traces table? Given that input and output tokens are priced differently, it would be helpful to be able to quantify the price per query going through the system
Yes, you can obtain the total input and output tokens in the traces table. According to this GitHub pull request, Phoenix has added a feature to calculate the total token count for trace pages, which includes both input (prompt) and output (completion) tokens. This allows you to quantify the cost per query by summing these token counts.Would you like more detail on how to implement this or access these token counts?Sources: - this GitHub pull request
💡 Hint: Mention RunLLM in the thread for followups.
Looks like the api supports getting these values separated but it’s just not surfaced in the UI https://github.com/Arize-ai/phoenix/blob/main/app/schema.graphql#L1278-L1280
I can look at it at a per trace level, but I would love for the 2 to be broken out in the header. Right now, it just shows total tokens for the time period and I expected a similar tool tip
Got it - makes total sense Ben M. - I'm tracking it here and we should have a fix out soon https://github.com/Arize-ai/phoenix/issues/5872
A small fix should be in tonight's build https://arize-ai.slack.com/archives/C04RSEQ27QQ/p1735863028952579
