Listening to eval scores #11217
Replies: 3 comments 3 replies
|
Langfuse does not currently provide a built-in event-driven mechanism or webhook system to trigger notifications when evaluation scores are generated for a specific trace.(1)(2)(3) However, you can implement a polling-based approach to retrieve scores for downstream processing:
The documentation shows you can create and retrieve scores via the SDK/API, but there's no mention of real-time event notifications or webhooks for score generation.(1)(2)(3) Workaround approach:
For a more integrated solution, you might want to submit a feature request on the Langfuse GitHub discussions for webhook support or event-driven score notifications.(2) 📚 Sources: Have another question? Just tag @inkeep. |
|
I understand the limitation you're facing with the polling approach - it creates a circular dependency where you need the traceId to poll, but you also need a mechanism to know when to start polling in the first place. Based on the available documentation, Langfuse doesn't currently offer native webhook or event-driven integrations to push evaluation scores to external systems like SQS queues. This type of event-driven score publishing feature would indeed be valuable for your use case of feeding evaluation scores back into an agent loop without continuous polling overhead. Potential workarounds to consider:
Feature request recommendation: Your use case for event-driven score publishing (webhooks, SQS integration, or similar pub/sub mechanisms) is a legitimate architectural need. I'd recommend opening a feature request on the Langfuse GitHub repository describing:
This would help the Langfuse team understand the demand for this capability and potentially prioritize it in their roadmap. Have another question? Just tag @inkeep. |
|
Langfuse Scores can be attached to multiple levels beyond just traces(1). According to the documentation, Scores reference one of the following objects(1):
For your specific use case: ConversationId level: If you're using AgentId level: There's no native "agentId" concept in Langfuse's score data model(1). However, you could potentially use metadata filtering if you tag traces/sessions with agent identifiers, though the GitHub discussion indicates metadata filtering isn't fully supported across all APIs yet(2). Aggregation: Langfuse doesn't appear to provide built-in aggregation of scores across sessions or custom groupings. You would need to:
The Score object includes these reference fields: 📚 Sources: Have another question? Just tag @inkeep. |
Uh oh!
There was an error while loading. Please reload this page.
Describe your question
Is there a way to trigger an event as soon as evaluation scores are generated for a specific traceId, so that I can publish those scores to an SQS queue for downstream processing?
I also need all evaluation metric scores for that traceId to be included in a single event before sending them to Lambda or any other consumer. The goal is to use the full set of eval scores as feedback in an agent loop.
Langfuse Cloud or Self-Hosted?
Langfuse Cloud
If Self-Hosted
No response
If Langfuse Cloud
No response
SDK and integration versions
No response
Pre-Submission Checklist
All reactions