1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
//! Interaction-weight signal — boosts chunks the user actively engaged with.
//!
//! Direct engagement is one of the strongest retention signals — "a message
//! you replied to" is almost always worth remembering, even if its content
//! looks noisy by other signals.
//!
//! Phase 2 infers engagement from a small set of reserved **tags**:
//! - `reply` — the user replied to this message/thread
//! - `sent` — the user authored this content
//! - `mention` — the user was @-mentioned
//! - `dm` — this arrived in a direct-message channel
//!
//! Ingest adapters can attach these tags during canonicalisation when the
//! upstream source supports the distinction. Absent tags → neutral score.
use crateMetadata;
/// Tag set when the user replied to this message/thread.
pub const TAG_REPLY: &str = "reply";
/// Tag set when the user authored this content.
pub const TAG_SENT: &str = "sent";
/// Tag set when the user was @-mentioned.
pub const TAG_MENTION: &str = "mention";
/// Tag set when the message arrived in a direct-message channel.
pub const TAG_DM: &str = "dm";
/// Score in `[0.0, 1.0]` based on engagement tags present on the chunk.
///
/// Multiple tags stack (capped at 1.0):
/// - `sent` → +0.6 (author)
/// - `reply` → +0.5 (active dialogue)
/// - `dm` → +0.3 (scoped audience)
/// - `mention` → +0.2 (addressed)
///
/// Absent any of these → 0.5 (neutral — don't drop the chunk on this signal
/// alone since most content lacks explicit engagement tags).