{"version":2,"relationshipURLBase":"https://codingai-lec03.pages.dev/course/blocks/retrieval-metric-contract.html","relationshipResolution":"Resolve relative relationship URLs against relationshipURLBase; complete records and absolute URLs are in blocks.","title":"Hit、Recall 与 exact 重合率，各自在问什么","url":"https://codingai-lec03.pages.dev/course/blocks/retrieval-metric-contract.html","markdown":"https://codingai-lec03.pages.dev/course/blocks/retrieval-metric-contract.md","pages":[{"id":"reading-opening","title":"Hit、Recall 与 exact 重合率，各自在问什么","unit":"检索到底复用了什么，又省去了什么？","unitId":"retrieval-cache-and-evaluation","chapter":"III","number":1}],"aliases":[{"oldId":"b-49acad526bd66ff55d9bce21","targetId":"b-49acad526bd66ff55d9bce21","page":"reading-opening","operation":"move","beforeSHA256":"b7c98ed6dba8056b83c27f5415ee4870e0170a4e1c78b40ecd2baf69a4f36442","afterSHA256":"b7c98ed6dba8056b83c27f5415ee4870e0170a4e1c78b40ecd2baf69a4f36442","reason":"Same source body in authored semantic page"},{"oldId":"b-dcee1d785cec08dd6ab7a467","targetId":"b-dcee1d785cec08dd6ab7a467","page":"reading-opening","operation":"move","beforeSHA256":"f726d4dfd12721dd615d742d7afe75d70e549a32421c9fb296bd5365d8942054","afterSHA256":"f726d4dfd12721dd615d742d7afe75d70e549a32421c9fb296bd5365d8942054","reason":"Same source body in authored semantic page"},{"oldId":"b-1afc6f117e4e982d9870446b","targetId":"b-1afc6f117e4e982d9870446b","page":"reading-opening","operation":"move","beforeSHA256":"7d1e522bf167385f95073a108d6651706c7ab2f25d134521e17b40fe2992bc59","afterSHA256":"7d1e522bf167385f95073a108d6651706c7ab2f25d134521e17b40fe2992bc59","reason":"Same source body in authored semantic page"},{"oldId":"b-043e8421a62614d6e9c6dc44","targetId":"b-043e8421a62614d6e9c6dc44","page":"reading-opening","operation":"move","beforeSHA256":"e60979fc29d0931ab0fa6565feb357a2b9d204702fac523f27809082dbf318a7","afterSHA256":"e60979fc29d0931ab0fa6565feb357a2b9d204702fac523f27809082dbf318a7","reason":"Same source body in authored semantic page"},{"oldId":"b-26ca1cc492e8f100002539de","targetId":"b-26ca1cc492e8f100002539de","page":"reading-opening","operation":"move","beforeSHA256":"e6be9a71494e6e8c8f730b05c8896471180ddb04def85ade8acb5519b43a466f","afterSHA256":"e6be9a71494e6e8c8f730b05c8896471180ddb04def85ade8acb5519b43a466f","reason":"Same source body in authored semantic page"},{"oldId":"b-773dda57b734ee0b47084322","targetId":"b-773dda57b734ee0b47084322","page":"reading-opening","operation":"move","beforeSHA256":"c1afda030628985fb13e6d5c22f9cfe7d7b0fe2cab59e7e3f191abb1dcef9feb","afterSHA256":"c1afda030628985fb13e6d5c22f9cfe7d7b0fe2cab59e7e3f191abb1dcef9feb","reason":"Same source body in authored semantic page"},{"oldId":"b-e428aadc7f14be47808f9920","targetId":"b-e428aadc7f14be47808f9920","page":"reading-opening","operation":"move","beforeSHA256":"2b9ccef7e1220e2250cceff1abd8bdd736b42f8da5a223f26b029f44b962e807","afterSHA256":"2b9ccef7e1220e2250cceff1abd8bdd736b42f8da5a223f26b029f44b962e807","reason":"Same source body in authored semantic page"}],"blocks":[{"id":"b-49acad526bd66ff55d9bce21","type":"h1","scope":"retrieval-metric-contract","url":"https://codingai-lec03.pages.dev/course/blocks/retrieval-metric-contract.html#b-49acad526bd66ff55d9bce21","content":"# Hit、Recall 与 exact 重合率，各自在问什么","sha256":"b7c98ed6dba8056b83c27f5415ee4870e0170a4e1c78b40ecd2baf69a4f36442","chapter":{"id":"III","title":"视觉与语言"},"unit":{"id":"retrieval-cache-and-evaluation","title":"检索到底复用了什么，又省去了什么？"},"page":{"id":"reading-opening","title":"Hit、Recall 与 exact 重合率，各自在问什么","number":1},"sectionTitle":"Hit、Recall 与 exact 重合率，各自在问什么","currentQuestion":"Hit、Recall 与 exact 重合率，各自在问什么","sourceSlides":[],"knowledgeBlock":null,"formulas":[],"previousBlock":null,"nextBlock":"b-dcee1d785cec08dd6ab7a467","prerequisites":[{"id":"b-dcee1d785cec08dd6ab7a467","url":"#b-dcee1d785cec08dd6ab7a467","role":"problem-context"}],"relatedBlocks":[]},{"id":"b-dcee1d785cec08dd6ab7a467","type":"p","scope":"retrieval-metric-contract","url":"https://codingai-lec03.pages.dev/course/blocks/retrieval-metric-contract.html#b-dcee1d785cec08dd6ab7a467","content":"检索把同一个比较空间用于一组已有图片。图库向量可复用，查询只需编码一次再搜索；页面前三张结果来自已有真实缓存。工作量、相关性指标和近似索引在说明与 LAB12 中展开；检索系统的进一步组织留待第八讲。","sha256":"f726d4dfd12721dd615d742d7afe75d70e549a32421c9fb296bd5365d8942054","chapter":{"id":"III","title":"视觉与语言"},"unit":{"id":"retrieval-cache-and-evaluation","title":"检索到底复用了什么，又省去了什么？"},"page":{"id":"reading-opening","title":"Hit、Recall 与 exact 重合率，各自在问什么","number":1},"sectionTitle":"Hit、Recall 与 exact 重合率，各自在问什么","currentQuestion":"Hit、Recall 与 exact 重合率，各自在问什么","sourceSlides":[],"knowledgeBlock":null,"formulas":[],"previousBlock":"b-49acad526bd66ff55d9bce21","nextBlock":"b-1afc6f117e4e982d9870446b","prerequisites":[{"id":"b-49acad526bd66ff55d9bce21","url":"#b-49acad526bd66ff55d9bce21","role":"section-title"}],"relatedBlocks":[]},{"id":"b-1afc6f117e4e982d9870446b","type":"p","scope":"retrieval-metric-contract","url":"https://codingai-lec03.pages.dev/course/blocks/retrieval-metric-contract.html#b-1afc6f117e4e982d9870446b","content":"固定一个查询，相关集合为 $R(q)$，检索前 $K$ 个结果为 $A_K(q)$。三个常见指标不是同义词：Hit@K 问是否至少命中一个相关结果；Recall@K 为 $|A_K\\cap R|/|R|$；ANN overlap 问近似搜索是否复现精确搜索，计算 $|A_K\\cap E_K|/K$，其中 $E_K$ 为 exact 前 K。","sha256":"7d1e522bf167385f95073a108d6651706c7ab2f25d134521e17b40fe2992bc59","chapter":{"id":"III","title":"视觉与语言"},"unit":{"id":"retrieval-cache-and-evaluation","title":"检索到底复用了什么，又省去了什么？"},"page":{"id":"reading-opening","title":"Hit、Recall 与 exact 重合率，各自在问什么","number":1},"sectionTitle":"Hit、Recall 与 exact 重合率，各自在问什么","currentQuestion":"Hit、Recall 与 exact 重合率，各自在问什么","sourceSlides":[],"knowledgeBlock":null,"formulas":[{"latex":"R(q)","definitionContext":"Hit、Recall 与 exact 重合率，各自在问什么"},{"latex":"K","definitionContext":"Hit、Recall 与 exact 重合率，各自在问什么"},{"latex":"A_K(q)","definitionContext":"Hit、Recall 与 exact 重合率，各自在问什么"},{"latex":"|A_K\\cap R|/|R|","definitionContext":"Hit、Recall 与 exact 重合率，各自在问什么"},{"latex":"|A_K\\cap E_K|/K","definitionContext":"Hit、Recall 与 exact 重合率，各自在问什么"},{"latex":"E_K","definitionContext":"Hit、Recall 与 exact 重合率，各自在问什么"}],"previousBlock":"b-dcee1d785cec08dd6ab7a467","nextBlock":"b-043e8421a62614d6e9c6dc44","prerequisites":[{"id":"b-49acad526bd66ff55d9bce21","url":"#b-49acad526bd66ff55d9bce21","role":"section-title"},{"id":"b-dcee1d785cec08dd6ab7a467","url":"#b-dcee1d785cec08dd6ab7a467","role":"problem-context"}],"relatedBlocks":[]},{"id":"b-043e8421a62614d6e9c6dc44","type":"p","scope":"retrieval-metric-contract","url":"https://codingai-lec03.pages.dev/course/blocks/retrieval-metric-contract.html#b-043e8421a62614d6e9c6dc44","content":"假设某猫查询有四个猫裁剪算相关，前三名命中两个。Hit@3 是 1，Recall@3 是 $2/4=0.5$。若 exact 的前三名是 a,b,c，ANN 找到 a,b,d，二者 overlap 是 $2/3$；d 即使仍然是猫，语义命中也可能不变。模型相关性与索引逼近的是两个不同问题。","sha256":"e60979fc29d0931ab0fa6565feb357a2b9d204702fac523f27809082dbf318a7","chapter":{"id":"III","title":"视觉与语言"},"unit":{"id":"retrieval-cache-and-evaluation","title":"检索到底复用了什么，又省去了什么？"},"page":{"id":"reading-opening","title":"Hit、Recall 与 exact 重合率，各自在问什么","number":1},"sectionTitle":"Hit、Recall 与 exact 重合率，各自在问什么","currentQuestion":"Hit、Recall 与 exact 重合率，各自在问什么","sourceSlides":[],"knowledgeBlock":null,"formulas":[{"latex":"2/4=0.5","definitionContext":"Hit、Recall 与 exact 重合率，各自在问什么"},{"latex":"2/3","definitionContext":"Hit、Recall 与 exact 重合率，各自在问什么"}],"previousBlock":"b-1afc6f117e4e982d9870446b","nextBlock":"b-26ca1cc492e8f100002539de","prerequisites":[{"id":"b-49acad526bd66ff55d9bce21","url":"#b-49acad526bd66ff55d9bce21","role":"section-title"},{"id":"b-dcee1d785cec08dd6ab7a467","url":"#b-dcee1d785cec08dd6ab7a467","role":"problem-context"}],"relatedBlocks":[]},{"id":"b-26ca1cc492e8f100002539de","type":"p","scope":"retrieval-metric-contract","url":"https://codingai-lec03.pages.dev/course/blocks/retrieval-metric-contract.html#b-26ca1cc492e8f100002539de","content":"LAB12 的历史结果正体现这个区别：exact 文搜图 Hit@3=1；IVF 只查一个簇时 exact top-3 重合率为 0.7778，语义 Hit@3 仍为 1。它漏掉部分同源裁剪，却仍保留某个相关裁剪。这不是指标互相矛盾，而是各自回答了自己的问题。","sha256":"e6be9a71494e6e8c8f730b05c8896471180ddb04def85ade8acb5519b43a466f","chapter":{"id":"III","title":"视觉与语言"},"unit":{"id":"retrieval-cache-and-evaluation","title":"检索到底复用了什么，又省去了什么？"},"page":{"id":"reading-opening","title":"Hit、Recall 与 exact 重合率，各自在问什么","number":1},"sectionTitle":"Hit、Recall 与 exact 重合率，各自在问什么","currentQuestion":"Hit、Recall 与 exact 重合率，各自在问什么","sourceSlides":[],"knowledgeBlock":null,"formulas":[],"previousBlock":"b-043e8421a62614d6e9c6dc44","nextBlock":"b-773dda57b734ee0b47084322","prerequisites":[{"id":"b-49acad526bd66ff55d9bce21","url":"#b-49acad526bd66ff55d9bce21","role":"section-title"},{"id":"b-dcee1d785cec08dd6ab7a467","url":"#b-dcee1d785cec08dd6ab7a467","role":"problem-context"}],"relatedBlocks":[]},{"id":"b-773dda57b734ee0b47084322","type":"p","scope":"retrieval-metric-contract","url":"https://codingai-lec03.pages.dev/course/blocks/retrieval-metric-contract.html#b-773dda57b734ee0b47084322","content":"阅读结果先找查询集合、相关集合和 K，再看成绩。若一个查询只有一个正例，Hit@K 与单正例 Recall@K 恰好同值；换成多正例后必须重新写清口径。保存查询和命中 ID 比只保存平均数字更便于 AI 或同学追溯解释。","sha256":"c1afda030628985fb13e6d5c22f9cfe7d7b0fe2cab59e7e3f191abb1dcef9feb","chapter":{"id":"III","title":"视觉与语言"},"unit":{"id":"retrieval-cache-and-evaluation","title":"检索到底复用了什么，又省去了什么？"},"page":{"id":"reading-opening","title":"Hit、Recall 与 exact 重合率，各自在问什么","number":1},"sectionTitle":"Hit、Recall 与 exact 重合率，各自在问什么","currentQuestion":"Hit、Recall 与 exact 重合率，各自在问什么","sourceSlides":[],"knowledgeBlock":null,"formulas":[],"previousBlock":"b-26ca1cc492e8f100002539de","nextBlock":"b-e428aadc7f14be47808f9920","prerequisites":[{"id":"b-49acad526bd66ff55d9bce21","url":"#b-49acad526bd66ff55d9bce21","role":"section-title"},{"id":"b-dcee1d785cec08dd6ab7a467","url":"#b-dcee1d785cec08dd6ab7a467","role":"problem-context"}],"relatedBlocks":[]},{"id":"b-e428aadc7f14be47808f9920","type":"h2","scope":"retrieval-metric-contract","url":"https://codingai-lec03.pages.dev/course/blocks/retrieval-metric-contract.html#b-e428aadc7f14be47808f9920","content":"## 继续阅读与实验","sha256":"2b9ccef7e1220e2250cceff1abd8bdd736b42f8da5a223f26b029f44b962e807","chapter":{"id":"III","title":"视觉与语言"},"unit":{"id":"retrieval-cache-and-evaluation","title":"检索到底复用了什么，又省去了什么？"},"page":{"id":"reading-opening","title":"Hit、Recall 与 exact 重合率，各自在问什么","number":1},"sectionTitle":"Hit、Recall 与 exact 重合率，各自在问什么","currentQuestion":"Hit、Recall 与 exact 重合率，各自在问什么","sourceSlides":[],"knowledgeBlock":null,"formulas":[],"previousBlock":"b-773dda57b734ee0b47084322","nextBlock":null,"prerequisites":[{"id":"b-49acad526bd66ff55d9bce21","url":"#b-49acad526bd66ff55d9bce21","role":"section-title"},{"id":"b-dcee1d785cec08dd6ab7a467","url":"#b-dcee1d785cec08dd6ab7a467","role":"problem-context"}],"relatedBlocks":[]}]}
