[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"i-ri:search-line":3,"i-ri:moon-line":8,"i-ri:sun-line":10,"i-ri:menu-3-line":12,"i-ri:close-line":14,"notes-module-items-ai":16,"notes-page-ai-04-document-extraction\u002F01-ocr-field-evidence":74,"i-ri:arrow-left-s-line":212,"i-ri:menu-2-line":214,"i-ri:arrow-right-s-line":216},{"left":4,"top":4,"width":5,"height":5,"rotate":4,"vFlip":6,"hFlip":6,"body":7},0,24,false,"\u003Cpath fill=\"currentColor\" d=\"m18.031 16.617l4.283 4.282l-1.415 1.415l-4.282-4.283A8.96 8.96 0 0 1 11 20c-4.968 0-9-4.032-9-9s4.032-9 9-9s9 4.032 9 9a8.96 8.96 0 0 1-1.969 5.617m-2.006-.742A6.98 6.98 0 0 0 18 11c0-3.867-3.133-7-7-7s-7 3.133-7 7s3.133 7 7 7a6.98 6.98 0 0 0 4.875-1.975z\"\u002F>",{"left":4,"top":4,"width":5,"height":5,"rotate":4,"vFlip":6,"hFlip":6,"body":9},"\u003Cpath fill=\"currentColor\" d=\"M10 7a7 7 0 0 0 12 4.9v.1c0 5.523-4.477 10-10 10S2 17.523 2 12S6.477 2 12 2h.1A6.98 6.98 0 0 0 10 7m-6 5a8 8 0 0 0 15.062 3.762A9 9 0 0 1 8.238 4.938A8 8 0 0 0 4 12\"\u002F>",{"left":4,"top":4,"width":5,"height":5,"rotate":4,"vFlip":6,"hFlip":6,"body":11},"\u003Cpath fill=\"currentColor\" d=\"M12 18a6 6 0 1 1 0-12a6 6 0 0 1 0 12m0-2a4 4 0 1 0 0-8a4 4 0 0 0 0 8M11 1h2v3h-2zm0 19h2v3h-2zM3.515 4.929l1.414-1.414L7.05 5.636L5.636 7.05zM16.95 18.364l1.414-1.414l2.121 2.121l-1.414 1.414zm2.121-14.85l1.414 1.415l-2.121 2.121l-1.414-1.414zM5.636 16.95l1.414 1.414l-2.121 2.121l-1.414-1.414zM23 11v2h-3v-2zM4 11v2H1v-2z\"\u002F>",{"left":4,"top":4,"width":5,"height":5,"rotate":4,"vFlip":6,"hFlip":6,"body":13},"\u003Cpath fill=\"currentColor\" d=\"M3 4h18v2H3zm6 7h12v2H9zm-6 7h18v2H3z\"\u002F>",{"left":4,"top":4,"width":5,"height":5,"rotate":4,"vFlip":6,"hFlip":6,"body":15},"\u003Cpath fill=\"currentColor\" d=\"m12 10.587l4.95-4.95l1.414 1.414l-4.95 4.95l4.95 4.95l-1.415 1.414l-4.95-4.95l-4.949 4.95l-1.414-1.415l4.95-4.95l-4.95-4.95L7.05 5.638z\"\u002F>",[17,22,26,30,34,38,42,46,50,54,58,62,66,70],{"path":18,"title":19,"meta":20},"\u002Fnotes\u002Fai\u002F01-llm-basics\u002F01-hello-llm","LLM 交互基础：透过现象看本质",{"date":-1,"tags":-1,"summary":-1,"lastUpdated":21},"2026-11-05T09:47:15.000Z",{"path":23,"title":24,"meta":25},"\u002Fnotes\u002Fai\u002F01-llm-basics\u002F02-streaming-and-prompts","进阶交互：流式传输与提示词工程",{"date":-1,"tags":-1,"summary":-1,"lastUpdated":21},{"path":27,"title":28,"meta":29},"\u002Fnotes\u002Fai\u002F01-llm-basics\u002F03-function-calling","结构化输出与 Function Calling",{"date":-1,"tags":-1,"summary":-1,"lastUpdated":21},{"path":31,"title":32,"meta":33},"\u002Fnotes\u002Fai\u002F02-agent-architecture\u002F01-tool-use","Agent 核心能力 ①：Tool Use（工具调用）",{"date":-1,"tags":-1,"summary":-1,"lastUpdated":21},{"path":35,"title":36,"meta":37},"\u002Fnotes\u002Fai\u002F02-agent-architecture\u002F02-mini-cursor-cli","实战项目：Mini Cursor（CLI 版）",{"date":-1,"tags":-1,"summary":-1,"lastUpdated":21},{"path":39,"title":40,"meta":41},"\u002Fnotes\u002Fai\u002F02-agent-architecture\u002F03-memory","Agent 核心能力 ②：Memory（记忆管理）",{"date":-1,"tags":-1,"summary":-1,"lastUpdated":21},{"path":43,"title":44,"meta":45},"\u002Fnotes\u002Fai\u002F02-agent-architecture\u002F04-planning","Agent 核心能力 ③：Planning（规划能力）",{"date":-1,"tags":-1,"summary":-1,"lastUpdated":21},{"path":47,"title":48,"meta":49},"\u002Fnotes\u002Fai\u002F02-agent-architecture\u002F05-review-diff-chunking","代码改了很多，AI 为什么只审了前面？",{"date":-1,"tags":-1,"summary":-1,"lastUpdated":21},{"path":51,"title":52,"meta":53},"\u002Fnotes\u002Fai\u002F02-agent-architecture","Agent 架构笔记",{"date":-1,"tags":-1,"summary":-1,"lastUpdated":21},{"path":55,"title":56,"meta":57},"\u002Fnotes\u002Fai\u002F03-rag\u002F01-vector-db-and-embeddings-node","RAG ①：Embeddings 与向量数据库入门（Node.js 优先）",{"date":-1,"tags":-1,"summary":-1,"lastUpdated":21},{"path":59,"title":60,"meta":61},"\u002Fnotes\u002Fai\u002F04-document-extraction\u002F01-ocr-field-evidence","OCR 读对了字，为什么地址仍然错？",{"date":-1,"tags":-1,"summary":-1,"lastUpdated":21},{"path":63,"title":64,"meta":65},"\u002Fnotes\u002Fai\u002F05-development-workflow\u002F01-task-recovery","AI 任务做一半，中断后怎么继续？",{"date":-1,"tags":-1,"summary":-1,"lastUpdated":21},{"path":67,"title":68,"meta":69},"\u002Fnotes\u002Fai","AI 应用开发",{"date":-1,"tags":-1,"summary":-1,"lastUpdated":21},{"path":71,"title":72,"meta":73},"\u002Fnotes\u002Fai\u002Froadmap","AI Agent 全栈开发学习路线图 (Roadmap)",{"date":-1,"tags":-1,"summary":-1,"lastUpdated":21},{"id":75,"type":76,"sourcePath":77,"routePath":59,"path":59,"title":60,"description":78,"updatedAt":21,"meta":79,"body":88,"toc":204},"bm90ZTpub3Rlcy9haS8wNC1kb2N1bWVudC1leHRyYWN0aW9uLzAxLW9jci1maWVsZC1ldmlkZW5jZS5tZA","note","notes\u002Fai\u002F04-document-extraction\u002F01-ocr-field-evidence.md","从信封照片提取收件人和地址时，同一张图上往往还有寄件人、公司名称、页脚和打印标记。OCR 可能每个字都读对，最终填进表单的却是寄件地址。",{"id":75,"type":76,"sourcePath":77,"slug":80,"title":60,"updatedAt":21,"description":78,"tags":81,"date":85,"comment":86,"summary":87,"lastUpdated":21},"ai\u002F04-document-extraction\u002F01-ocr-field-evidence",[82,83,84],"AI","OCR","数据质量","2026-03-18",true,"信封识别既要读文字，也要判断它属于寄件人还是收件人。结合位置、规则与模型整理结果，再决定哪些字段可以进入业务。",{"type":89,"children":90},"root",[91,99,104,109,116,121,126,131,137,142,147,152,158,163,168,173,178,183,189,194,199],{"type":92,"tag":93,"props":94,"children":96},"element","h1",{"id":95},"ocr-读对了字为什么地址仍然错",[97],{"type":98,"value":60},"text",{"type":92,"tag":100,"props":101,"children":102},"p",{},[103],{"type":98,"value":78},{"type":92,"tag":100,"props":105,"children":106},{},[107],{"type":98,"value":108},"因此这个问题不能只看识字准确率。还要判断文字来自哪个区域，以及整理后的字段是否满足业务要求。",{"type":92,"tag":110,"props":111,"children":113},"h2",{"id":112},"一段纯文字为什么不够用",[114],{"type":98,"value":115},"一段纯文字，为什么不够用？",{"type":92,"tag":100,"props":117,"children":118},{},[119],{"type":98,"value":120},"把所有 OCR 文本拼成一段交给模型，位置关系就弱了。人看到的是信封上的两个区域，模型收到的可能只是一串名字与地址，难以分清归属。",{"type":92,"tag":100,"props":122,"children":123},{},[124],{"type":98,"value":125},"可选办法包括按版式写规则、让模型结合位置整理字段，或让两者配合。项目要求 OCR 同时返回每块文字的包围盒，用位置寻找信封地址窗口，再整理姓名和地址行。",{"type":92,"tag":100,"props":127,"children":128},{},[129],{"type":98,"value":130},"这里的包围盒就是文字在图片中的范围。如果先裁切、缩放或旋转了图片，坐标也要一起转换，否则窗口和文字落在不同坐标系，比较出来的位置没有意义。",{"type":92,"tag":110,"props":132,"children":134},{"id":133},"加了-ai规则还怎么用",[135],{"type":98,"value":136},"加了 AI，规则还怎么用？",{"type":92,"tag":100,"props":138,"children":139},{},[140],{"type":98,"value":141},"项目先尝试 AI 提取。没有启用 AI、调用条件不足、响应解析失败或调用抛错时，得到的是“没有结果”，随后走规则识别，并在输出中记录使用了哪条路径。",{"type":92,"tag":100,"props":143,"children":144},{},[145],{"type":98,"value":146},"但“没有结果”和“结果里的类型未知”不同。模型返回能整理成字典的数据，即使字段不全、类型是 UNKNOWN，也可能直接进入 AI 结果分支，并不会自动回退。",{"type":92,"tag":100,"props":148,"children":149},{},[150],{"type":98,"value":151},"如果业务要求缺地址就必须转人工或重新识别，就要另设完整度判断。接口处理成功，只表示这次处理结束了，不能代替字段正确性或可提交性的判断。",{"type":92,"tag":110,"props":153,"children":155},{"id":154},"json-合法以后还检查什么",[156],{"type":98,"value":157},"JSON 合法以后，还检查什么？",{"type":92,"tag":100,"props":159,"children":160},{},[161],{"type":98,"value":162},"项目会归一化类型枚举、窗口坐标、收件人和地址行。输入不是字典时拒绝；非法类型归为 UNKNOWN，收件人再结合 OCR 文字和窗口位置清理。",{"type":92,"tag":100,"props":164,"children":165},{},[166],{"type":98,"value":167},"类型未知时，规则会尝试补分类，并保留命中的规则。模型已经给出已知类型时，当前流程不会再用规则逐项否决。规则在这里是有限补充，不是对全部 AI 输出做第二轮审定。",{"type":92,"tag":100,"props":169,"children":170},{},[171],{"type":98,"value":172},"规则本身也会误认。缩写可能嵌在公司名里，组合分类可能缺少必要连接词。已有负例用 trading、CTR 等相似文本与不完整组合检查误判；拿不准时保留 UNKNOWN，比为了命中而放宽匹配更容易核对。",{"type":92,"tag":100,"props":174,"children":175},{},[176],{"type":98,"value":177},"未知、失败和没有输入应分别记录。前端显示未知分类时，也应保留待确认状态，不能把它展示成已确认结果。",{"type":92,"tag":100,"props":179,"children":180},{},[181],{"type":98,"value":182},"已有固定输入用例覆盖分类负例、归一化和识别路径切换，真实图片准确率仍需人工标注样本，按版式、拍摄质量和字段分别统计。",{"type":92,"tag":110,"props":184,"children":186},{"id":185},"怎么追查某个字段为什么填错",[187],{"type":98,"value":188},"怎么追查某个字段为什么填错？",{"type":92,"tag":100,"props":190,"children":191},{},[192],{"type":98,"value":193},"项目可以按选项返回识别来源、模型置信分、解释、规则编号和原始 OCR 数据。回查时，更有用的问题是：用了哪几块文字，文字在窗口的什么位置，哪条规则改过类型。",{"type":92,"tag":100,"props":195,"children":196},{},[197],{"type":98,"value":198},"模型给出的 0.95 没有校准成真实正确率，不能直接解释为字段有 95% 概率正确；模型生成的解释也仍要与原始输入对照。是否直接提交或只填入待确认表单，应由业务对完整度的要求决定。",{"type":92,"tag":100,"props":200,"children":201},{},[202],{"type":98,"value":203},"当前 AI 异常都归成无结果，进一步区分超时、格式错误与调用条件不足，有助于知道为何回退。日志可以记录原因和耗时，避免把密钥及整段姓名地址长期保存下来。",{"title":205,"searchDepth":206,"depth":206,"links":207},"",2,[208,209,210,211],{"id":112,"depth":206,"text":115},{"id":133,"depth":206,"text":136},{"id":154,"depth":206,"text":157},{"id":185,"depth":206,"text":188},{"left":4,"top":4,"width":5,"height":5,"rotate":4,"vFlip":6,"hFlip":6,"body":213},"\u003Cpath fill=\"currentColor\" d=\"m10.828 12l4.95 4.95l-1.414 1.415L8 12l6.364-6.364l1.414 1.414z\"\u002F>",{"left":4,"top":4,"width":5,"height":5,"rotate":4,"vFlip":6,"hFlip":6,"body":215},"\u003Cpath fill=\"currentColor\" d=\"M3 4h18v2H3zm0 7h12v2H3zm0 7h18v2H3z\"\u002F>",{"left":4,"top":4,"width":5,"height":5,"rotate":4,"vFlip":6,"hFlip":6,"body":217},"\u003Cpath fill=\"currentColor\" d=\"m13.172 12l-4.95-4.95l1.414-1.413L16 12l-6.364 6.364l-1.414-1.415z\"\u002F>"]