infiniflow / ragflow

RAGFlow is an open-source RAG (Retrieval-Augmented Generation) engine based on deep document understanding.
https://ragflow.io
Apache License 2.0
10.07k stars 974 forks source link

[Feature Request]: Adding Statistics to Chat Assistant #1204

Open cyhasuka opened 1 week ago

cyhasuka commented 1 week ago

Is there an existing issue for the same feature request?

Is your feature request related to a problem?

NO. This is a feature request.

Describe the feature you'd like

Adding statistical functions. Including the approval/disapproval, visits, etc.

Describe implementation you've considered

When multiple users use the same chat assistant for Q&A, administrators usually want to know whether the prompt and parameter adjustments of the chat assistant are reasonable. This requires the system backend to give statistical functions, including the approval/disapproval of the Q&A and the statistics of the number of visits. This function provides data support for subsequent evaluation and is necessary for productisation.

Documentation, adoption, use case

This function provides data support for subsequent evaluation and is necessary for productisation.
The following figure shows the "Monitoring Statistics" column, which contains the total number of users, the number of questions asked, the total number of tokens consumed, and the user satisfaction in the past N days.

Additional information

image image

cyhasuka commented 2 days ago

Update: I found a similar feature in the "Chat api" field, but it seems that I can't get user satisfaction feedback when I call the model through the api for Q&A. And statistics such as number of sessions cannot be generated. May I ask if this section is not yet complete in the open source version? Will it be updated subsequently? Thank you. @KevinHuSh @yingfeng image

KevinHuSh commented 1 day ago

You can see the stats since 'yesterday'.

cyhasuka commented 1 day ago

You can see the stats since 'yesterday'.

Yes, the stats feature only shows data prior to yesterday. However, to achieve this, the date range must be reselected each time to display it properly (even if the default range already contains the desired date), which I think could be a potential bug where the table isn't refreshing correctly when entering the tab. Also, the api interface seems not include 👍 and 👎 for satisfaction ratings yet.