You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
refactor: remove score_decay_rate and update formatting
Removed unused score_decay_rate from schema and documentation.
Cleaned up code formatting and improved consistency across methods.
Updated markdown documentation to align with current schema changes.
Here’s an updated markdown version with explanations for `SemanticVector` and `score_decay_rate`:
2
-
3
-
---
4
-
5
-
# Graph Representation
6
-
7
1
## Nodes
8
2
9
3
### Channel
@@ -24,9 +18,9 @@ Here’s an updated markdown version with explanations for `SemanticVector` and
24
18
25
19
-**topic_id**: Unique identifier
26
20
-**name**: Summary of the topic
27
-
-**keywords**: List of key terms with scores
28
-
-**overall_score**: Average or cumulative score
21
+
-**keywords**: List of key terms with associated weights (e.g., `[{"term": "AI", "weight": 0.35}, {"term": "neural networks", "weight": 0.28}]`)
29
22
-**bertopic_metadata**: BerTopic metadata
23
+
-**topic_embedding: Topic embedding
30
24
-**updated_at**: Last updated timestamp
31
25
32
26
---
@@ -45,58 +39,31 @@ Here’s an updated markdown version with explanations for `SemanticVector` and
45
39
### SemanticVector
46
40
47
41
-**vector_id**: Unique identifier
48
-
-**semantic_vector**: Aggregated representation of recent message semantics in a channel. This vector captures the
49
-
summarized, anonymized essence of new content without storing individual messages, aligning with privacy requirements.
42
+
-**semantic_vector**: Aggregated representation of recent message semantics in a channel, preserving privacy by summarizing content instead of storing individual messages.
50
43
-**created_at**: Creation date
51
44
52
-
> **Explanation**: The `SemanticVector` represents the semantic profile of recent messages in a channel, allowing
53
-
> Concord to adjust topic relevance without storing each message. Each vector aggregates the semantics of recent content
54
-
> into a general representation, which can influence the `channel_score` in `ASSOCIATED_WITH` relationships between
55
-
> channels and topics. This approach maintains user privacy while updating topic relevance dynamically.
45
+
> **Explanation**: The SemanticVector node represents a general semantic profile of recent messages in a channel, supporting dynamic topic relevance without storing each message individually. This approach aligns with privacy requirements while allowing for the adjustment of topic relevance.
56
46
57
47
---
58
48
59
49
## Relationships
60
50
61
51
### ASSOCIATED_WITH (Channel → Topic)
62
52
63
-
-**channel_score**: Cumulative or weighted score representing a topic’s importance or relevance to the channel
64
-
-**keywords_weights**: Channel-specific keywords and their weights, reflecting the unique relationship between the
65
-
channel and topic
53
+
-**topic_score**: Cumulative or weighted score representing a topic’s importance or relevance to the channel
54
+
-**keywords_weights**: Channel-specific keywords and their weights, highlighting the unique relationship between the channel and topic
66
55
-**message_count**: Number of messages analyzed in relation to the topic
67
56
-**last_updated**: Timestamp of the last update
68
-
-**score_decay_rate**: Rate at which `channel_score` decreases over time if no new relevant messages are analyzed. This
69
-
decay rate allows topic scores to adjust gradually, so less active or outdated topics diminish in relevance without
70
-
active content.
71
57
-**trend**: Indicator of topic trend over time within the channel
72
58
73
-
> **Explanation**: `score_decay_rate` ensures that topics associated with a channel decrease in relevance if no new
74
-
> messages support their ongoing importance. This helps maintain an accurate and current reflection of active discussions
75
-
> in a channel, giving more weight to trending or frequently discussed topics while allowing older or less relevant topics
76
-
> to fade naturally.
59
+
> **Explanation**: This relationship captures the importance of each topic to specific channels, with channel-specific keyword weights providing additional insight into unique topic-channel dynamics. `trend` enables tracking how each topic's relevance changes over time within the channel.
77
60
78
61
---
79
62
80
63
### RELATED_TO (Topic ↔ Topic)
81
64
82
65
-**similarity_score**: Degree of similarity between two topics
83
-
-**temporal_similarity**: Time-based similarity metric to track changing topic relationships over time
84
-
-**co-occurrence_rate**: Frequency with which two topics are discussed together across channels
66
+
-**temporal_similarity**: Metric to track similarity over time
67
+
-**co-occurrence_rate**: Frequency of concurrent discussion of topics across channels
85
68
-**common_channels**: Number of shared channels discussing both topics
86
-
-**topic_trend_similarity**: Similarity in trends or changes in relevance for each topic
87
-
88
-
```mermaid
89
-
graph TD
90
-
%% Nodes
91
-
Channel["Channel<br>-------------------------<br>channel_id: Unique identifier<br>platform: Platform (e.g., Telegram)<br>name: Name of the channel<br>description: Description of the channel<br>created_at: Creation date<br>active_members_count: Number of active members<br>language: Language of the channel<br>region: Geographical region<br>activity_score: Posting activity score"]
92
-
Topic["Topic<br>-------------------------<br>topic_id: Unique identifier<br>name: Summary of the topic<br>keywords: List of key terms with scores<br>overall_score: Average or cumulative score<br>bertopic_metadata: BerTopic metadata<br>updated_at: Last updated timestamp"]
93
-
TopicUpdate["TopicUpdate<br>-------------------------<br>update_id: Unique identifier<br>channel_id: Associated channel<br>topic_id: Associated topic<br>keywords: Keywords from the update<br>score_delta: Change in topic score<br>timestamp: Update time"]
Channel -.-> ASSOCIATED_WITH["ASSOCIATED_WITH Relationship<br>-------------------------<br>channel_score: Cumulative or weighted score<br>keywords_weights: Channel-specific keywords and weights<br>message_count: Number of messages analyzed<br>last_updated: Timestamp of last update<br>score_decay_rate: Rate of score decay<br>trend: Topic trend over time"] --> Topic
97
-
Topic -.-> RELATED_TO["RELATED_TO Relationship<br>-------------------------<br>similarity_score: Degree of similarity<br>temporal_similarity: Time-based similarity<br>co-occurrence_rate: Co-occurrence of keywords<br>common_channels: Number of shared channels<br>topic_trend_similarity: Trend alignment"] --> Topic
98
-
TopicUpdate --> Topic
99
-
SemanticVector --> Channel
100
-
```
101
-
102
-
---
69
+
-**topic_trend_similarity**: Measure of similarity in topic trends across channels
0 commit comments