S3-05 · 进阶 S3-05 · Advanced

键向量 · “我能被怎样匹配” Key · “How Can I Be Matched?”

candidate position → Key direction → Query match

键向量(Key,K)是每个候选位置用于表明“我能被怎样匹配”的向量。它像候选随身带的一把匹配钥匙;转动 Key 会改变匹配分数,却不该改掉候选携带的内容。 A Key (K) is a candidate position's vector for “how I can be matched.” Think of it as a matching key carried by the candidate: rotating K changes the match score, not the content the candidate carries.

01 · 钥匙转了,行李没换 01 · Turn the key, keep the luggage

同一个候选把“匹配钥匙”转向 Query 后,为什么更容易被选中,却仍携带原来的内容? When a candidate turns its matching key toward the Query, why is it easier to select while still carrying the same content?

02 选择一个词,转动它的 Key Select a Word and Rotate Its Key

钥匙匹配隐喻 Key-match metaphor
所选候选 Selected candidate
皮球
正在转动它的 K rotating its K
匹配权重 Match weight
三候选归一化 normalized across three
携带内容 Carried content
圆形物体
正常时保持不变 normally unchanged

复用 S3 线宽语法:lineWidth = 1.5 + weight × 10。Key 只参与“匹配”,携带内容在这次操作中锁定。 S3 line grammar reused: lineWidth = 1.5 + weight × 10. The Key participates in matching; carried content stays locked during this action.

03 Key 匹配台的 4 个零件 Four Parts of the Key-Matching Bench

匹配标签 ≠ 携带内容 Match tag ≠ carried content
PART 01

固定 Query Fixed Query

Q 保持 10°,表示当前位置的需要不变。 Q stays at 10°, so the current need does not change.

PART 02

候选 Key Candidate Key

每个词各有一个可用于匹配的方向。 Every word has its own direction used for matching.

PART 03

匹配权重 Match weight

Q 与 K 越对齐,归一化后线越粗。 Closer Q–K alignment yields a thicker normalized line.

PART 04

携带内容 Carried content

候选真正贡献的内容不是 Key 本身。 The candidate's contributed content is not the Key itself.

04 最小机制:Key 决定可匹配性,不决定所携内容 Minimal Mechanism: Key Controls Matchability, Not Content

scorei = Q · Ki
rotate Ki → Q · Ki changes
Vi stays fixed
此页把内容写成卡片底部标签。无论怎样转 Key,正常状态下标签不变。 Content appears as the label at the bottom of each card. Rotate the Key freely; in the normal state, that label does not change.
转动一个 K Rotate one K 候选匹配方向改变 Match direction changes
重算 Q · K Recompute Q · K 权重与线宽变化 Weight and width change
内容锁定 Keep content locked 匹配与取内容分工 Match and content stay separate

05 边界实验:让 Key 角度改掉携带内容 Boundary Test: Let Key Rotation Rewrite the Content

主动制造失败 Create a failure

把 K 和内容绑死,会混淆 Q/K/V 分工 Coupling K to content confuses Q/K/V roles

开启错误耦合后,转动“皮球”Key 会把其内容标签改成“小狗”。这正是本页要排除的错误模型。 Under the incorrect coupling, rotating the ball Key rewrites its content label to dog. That is the mistaken model this page rules out.

尚未执行。Key 改匹配,内容保持不变。 Not run yet. Key changes matching while content stays fixed.
Key 是数据库主键。 A Key is a database primary key. → ✓ 它是用于向量匹配的表示。 It is a vector representation used for matching.
Key 就是候选的内容。 The Key is the candidate's content. → ✓ K 用来匹配,V 才提供聚合内容。 K matches; V provides gathered content.
转动 K 会改掉原词。 Rotating K changes the original word. → ✓ 这里仅改变它被当前 Q 匹配的程度。 It only changes how strongly this Q matches it.
06 · 一句话带走 06 · One line to keep

Key 表明每个候选“能被怎样匹配”;转动某词的 Key,会改它与同一 Query 的分数和线宽,但不改它携带的内容。 A Key describes how a candidate can be matched. Rotate a word's Key and its score and line width against the same Query change, while its carried content does not.