-
Notifications
You must be signed in to change notification settings - Fork 3
Open
Description
Topic Analysis and Score Updates Logic:
-
Identify Relevant Topics:
- When a new message is posted, analyze its semantic content using
SemanticVector
. - Match the message’s semantic content with existing topics in the channel’s
ASSOCIATED_WITH
relationships by comparing keywords and thesemantic_vector
.
- When a new message is posted, analyze its semantic content using
-
Amplify Scores for Matching Topics:
- For each existing topic in the channel that appears in the message:
- Apply the
amplify_score
function to calculate a smallscore_delta
, increasing the topic’soverall_score
based on relevance or semantic similarity. - Update
message_count
and refresh thelast_updated
timestamp.
- Apply the
- For each existing topic in the channel that appears in the message:
-
Create New Topics:
- For topics in the message that don’t already exist in the channel:
- Create a new
Topic
node if it doesn’t exist, or establish anASSOCIATED_WITH
relationship to the channel. - Initialize fields like
overall_score
,message_count
, andlast_updated
to begin tracking the topic’s relevance in this channel.
- Create a new
- For topics in the message that don’t already exist in the channel:
-
Diminish Scores for Unmentioned Topics:
- For all existing topics that aren’t referenced in the message:
- Use the
diminish_score
function to apply a gradualscore_delta
reduction, decreasing theoverall_score
based on thescore_decay_rate
. - This decay reflects the gradual fading relevance of less active topics in the channel.
- Use the
- For all existing topics that aren’t referenced in the message:
Suggested Function Names:
-
Amplify Function (
amplify_score
):amplify_score
: This function calculates a small positivescore_delta
to incrementally increase theoverall_score
based on semantic similarity, with gradual progression towards a maximum limit.
-
Diminish Function (
diminish_score
):diminish_score
: This function calculates a small negativescore_delta
to gradually decrease theoverall_score
, applying a decay that starts slowly and accelerates toward zero for topics not mentioned over time.
--
Example
Topic | Initial Score | New Message Weight | Updated Score | Score Delta |
---|---|---|---|---|
topic_0 | 0.5 | 0.6 | 0.505 | +0.005 |
topic_1 | 0.5 | 0.2 | 0.485 | -0.015 |
topic_2 | 0.5 | 0.45 | 0.4975 | -0.0025 |
The updated table includes the Score Delta
for each topic, showing how much the overall_score
changed based on the new message weights:
- Topic 0: Initial Score = 0.5, New Message Weight = 0.6, Updated Score = 0.505, Score Delta = +0.005
- Topic 1: Initial Score = 0.5, New Message Weight = 0.2, Updated Score = 0.485, Score Delta = -0.015
- Topic 2: Initial Score = 0.5, New Message Weight = 0.45, Updated Score = 0.4975, Score Delta = -0.0025
Adjusted score_delta Function for Topic overall_score Updates
Objective: Enhance the calculation of score_delta for updating the overall_score of topics in a channel, ensuring incremental changes are context-sensitive based on the initial score. This adjustment will use a non-linear function that:
- Limits rapid increments for very low (e.g., < 0.2) and very high (e.g., > 0.8) scores.
- Promotes normal growth between 0.2 and 0.8.
- Applies to both amplifying and diminishing the topic's overall_score.
Rationale:
- Stability of High-Scored Topics: Topics with an overall_score above 0.8 should not reach 1 too rapidly. This ensures dominant topics stabilize and do not skew the topic mapping unfairly.
- Controlled Growth for Low-Scored Topics: Topics with an overall_score below 0.2 should have limited growth to prevent sudden amplification due to noise or isolated messages.
- Consistent Normal Growth: The function should provide a standard growth pattern for scores between 0.2 and 0.8 to reflect typical topic relevance.
Function Design: Use a modified logistic function to calculate score_delta, allowing gradual increases that slow at the boundaries (near 0 and 1):
Topic | Initial Score | New Message Weight | Score Delta | Updated Score |
---|---|---|---|---|
topic_0 | 0.2 | 0.6 | +0.000949 | 0.200949 |
topic_1 | 0.7 | 0.2 | -0.022020 | 0.677980 |
topic_2 | 0.5 | 0.45 | -0.001250 | 0.498750 |
Metadata
Metadata
Assignees
Labels
No labels