Symbolic alignment lane for retrieval — rank by RSI, keep BM25/BM25F intact.
K1) Index & Query Representation (SSMS grammar)
Add an alignment side-car to your existing retrieval stack:
• Tokens: SSMS symbols + plain text
• Fields: title, body, code, meta, time
• Classical score (unchanged):
m_retrieval := BM25F * boost_kind * decay_time
# SSM-Search never edits m_retrieval → phi((m,a)) = m
• Lane carriers (dimensionless features)
- Support: semantic quality, freshness, authority/trust
- Penalties: risk/toxicity, contradiction, spam signals
Emit per-hit:(doc_id, m_retrieval, quality, freshness, authority, risk_penalty, coherence_penalty)
K2) Lens → Alignment (per result)
Single-equation
e := ( alpha*quality + beta*freshness + gamma*authority
- delta*risk_penalty - eta*coherence_penalty ) / Unit
a_search := tanh( c * e ) # |a_search| < 1
Two-channel (support vs penalty)
e_out := (alpha*quality + beta*freshness + gamma*authority) / Unit_out
e_in := (delta*risk_penalty + eta*coherence_penalty) / Unit_in
a_out := tanh(+c * e_out)
a_in := tanh(-c * e_in)
Chooser (bounded index)
U_in += w * atanh(a_in)
V_out += w * atanh(a_out)
W += w
RSI := tanh( (V_out - U_in) / max(W, eps_w) ) # |RSI|<1
RSI_env := g_t * RSI # optional gate, m untouched
Defaultsc = 1.0, eps_w = 1e-12, weights: w := 1 or w := |m_retrieval|^gamma, gamma = 1
Purity: phi((m,a)) = m everywhere
K3) Order-Invariant Ranker (shards, streams, online)
Shards, page streaming, and permutations all match batch:
U += w * atanh(a_component)
W += w
a_pool := tanh( U / max(W, eps_w) ) # identical if shuffled or sharded
Final ranking
1️⃣ Primary: RSI_env (or RSI if no gate)
2️⃣ Secondary: m_retrieval (tie-break, classical semantics stable)
3️⃣ Band for policy/UI: A++ / A+ / A0 / A- / A–
Why this matters
- No reruns or re-scoring when merging shards
- Full streaming parity with batch retrieval
- Classical rank stays authoritative if evidence is weak
Navigation
Previous: SSM-AI – Appendix J — SDK Packaging & Golden Tests (J10)
Next: SSM-AI – Appendix K — SSM-Search (K4–K6)
Directory of Pages
SSM-AI — Table of Contents