BojanJ
BojanJ2mo ago

Extracting scores from traces ?

What is the best way of extracting traces with scores ? When I do traces = langfuse.client.trace.list().data I get all the traces but the scores are uuids. What is the most best solution for this. Potentially I would love to have them in csv. The scores are from RAGAS metrics
Solution:
you can fetch the scores via the scores endpoint or get a list of scores via the list scores endpoint
Jump to solution
5 Replies
Solution
Marc
Marc2mo ago
you can fetch the scores via the scores endpoint or get a list of scores via the list scores endpoint
Marc
Marc2mo ago
By the way, I'd recommend to use the fetch_* methods (docs) in the Python SDK as they are covered by tests and semver whereas the client.* are considered internal
BojanJ
BojanJ2mo ago
So if I have the score_id right, I need to use the /api/public/scores/:scoreId to get that score right? The baseurl because I use cloud langfuse just to use the https://cloud.langfuse.com ?
Marc
Marc2mo ago
that's right, we will add a fetch_score method soon + we plan to add an api to fetch all traces which do not have a specific score yet to make it easier to run external evaluation pipelines
BojanJ
BojanJ2mo ago
Thanks a lot !