Description
Description (Actual Behavior)
The current prototype has no tracking mechanism regarding recommendations that users accepted/rejected. Hence, we should have a way to log requests submitted to the recommend/ endpoint and subsequent turns for the same session. This way, we can perform an approach similar to search-log analysis to track recommendations that were added to the prompt as-is or sentences that were rephrased by users.
PS: This analytics feature will be developed after having this logging mechanisms.
Expected Behavior
Our API will register prompts sent to the recommend/ endpoint in a way to keep the history of how the prompt evolved, which allows identifying recommendations that users accepted, the values users used the most, and sentences that users rephrased before submitting to a GenAI.
Log lines should have, at least, timestamp, prompt, and session ID.
Possible Fix
The following stack overflow can be a starting point to add such log:
https://stackoverflow.com/questions/34632730/flask-how-to-store-logs-and-add-additional-information
Moreover, we can also create an endpoint only to register when users click on the recommendations, so we can also register when users interacted with social values and recommendations. This last aspect could be organized in an additional issue as soon as we have the logging mechanism in place.
Steps to Reproduce
NA
Context
API requests.