fflow module

features.fflow.get_forward_flow(chat_data, vect_data, conversation_id_col)

Measures the extent to which each chat in the conversation ‘builds on’ the previous chats in the conversation. This is a chat level feature.

Parameters:
  • chat_data (pd.DataFrame) – pd.DataFrame containing chat data with ‘conversation_num’ and ‘message_embedding’ columns.

  • vect_data (pd.DataFrame) – pd.DataFrame containing vectorized data.

  • conversation_id_col (str) – The name of the column representing conversation IDs.

Returns:

List of cosine similarities representing forward flow for each chat in the conversation.

Return type:

List