Skip to content

[DERCBOT-1822] Fix 'number of messages' chart in custom metrics#2046

Open
scezen wants to merge 1 commit intotheopenconversationkit:masterfrom
CreditMutuelArkea:fix/message-number-graph/DERCBOT-1822
Open

[DERCBOT-1822] Fix 'number of messages' chart in custom metrics#2046
scezen wants to merge 1 commit intotheopenconversationkit:masterfrom
CreditMutuelArkea:fix/message-number-graph/DERCBOT-1822

Conversation

@scezen
Copy link
Copy Markdown
Member

@scezen scezen commented Apr 29, 2026

Ticket : DERCBOT-1822

Goal

Fix the “Number of user messages” chart in Custom Metrics so it counts real user messages, instead of relying on flow transition stats that can overcount messages.

Details

  • Count user messages from dialog user actions, which is the same source of truth used by dialog stats
  • Add a dedicated endpoint for user messages by date: /dialogs/stats/messages-by-date
  • Keep the chart response compatible with the existing Custom Metrics chart format
  • Preserve date range filtering and daily aggregation
  • Exclude test configurations from the chart in REC/PROD

Why

The previous chart used flow transition stats. In some cases, especially with RAG dialogs, a single user message can create multiple flow transition stat entries, which makes the chart display more messages than actually exist.
Counting dialog user actions directly avoids this overcount and aligns the chart with the “Total user messages” stats.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant