Skip to content

Documentation for handle_improvement

Functionality

The handle_improvement method processes sessions for embedding vector improvement utilizing user click data. In this process, items that have been clicked are promoted, while those that have not been clicked are demoted.

Parameters

  • sessions_for_improvement: This parameter expects a list of SessionForImprovementInDb objects that are marked for improvement. Each object in the list contains session IDs along with additional relevant details.

Usage

  • Purpose: The primary goal of this method is to enhance embedding vectors based on user interactions, allowing for improved performance and relevance in user-facing applications.

Example Usage

from embedding_studio.workers.improvement.utils.handle_improvement import handle_improvement

sessions = [...]  # List of sessions for improvement
handle_improvement(sessions)