省 token:查卡只返回需要的段落(BUG-1814) #171
Open
opened 2026-11-09 00:16:06 +08:00 by Claude
·
2 comments
No Branch/Tag Specified
main
codex/ondemand-transit-date-20261109
codex/token-card-compress-20261109
codex/muhurta-20261109
codex/counterexamples-20261109
codex/dasha-dates-engine-only-20261109
codex/token-lookup-20261109
codex/reports-no-web-wording-20261109
staging
codex/login-rectify-loading-1103
codex/rectification-stuck-1516
codex/birth-time-stability-165
codex/birth-time-intake-144
codex/consult-preset-prompts-20261102
codex/birth-time-source-intake-20261102
codex/report-refund-1505
codex/launch-prep-119
codex/chart-base-layer-label
codex/annual-153
codex/rectify-others-160
codex/learn-157
codex/rectification-d60-two-way-20261028
codex/consult-classify-parallel-20261029
codex/answer-effort-default-20261029
codex/subject-switcher-details-20261028
codex/rectification-screen-146-147-20261028
codex/rectification-entry-page-20261028
codex/upstream-sync9b-20261028
codex/upstream-sync9-20261028
codex/home-crash-saved-people-20261027
codex/voice-reading-20261027
codex/ui-kit-fix3-20261027
codex/lagna-precheck-20261027
codex/ui-kit-onboarding-fix-20261026
codex/gate-birth-journey-contract-20261025
codex/ui-kit-7-cleanup-20261023
codex/ui-kit-6-rectification-20261023
codex/ui-kit-5-pages-20261023
codex/ui-kit-4-people-20261023
codex/ui-kit-3-chart-20261023
codex/ui-kit-2-chat-20261023
codex/onboarding-4-motion-20261022
codex/ui-kit-1-shell-20261023
codex/onboarding-3-checklist-20261022
codex/onboarding-2-intake-20261022
codex/ui-kit-0-base-20261023
codex/full-data-parity-3-20261022
codex/full-data-parity-2-20261021
codex/full-data-parity-1-20261021
codex/rectification-explicit-open-20261023
codex/chart-table-span-20261023
codex/onboarding-1-data-20261022
codex/report-english-han-leak-20261021
codex/chart-dasha-yogini-20261021
codex/goel-jaimini-strength-20261022
codex/synastry-staging-fix-20261021
codex/chart-subject-table-20261021
codex/chart-ascendant-slash-20261021
codex/report-export-dialog-polish-20261021
codex/synastry-report-chat-20261018
codex/synastry-full-report-20261018
codex/niryaana-shoola-pvr-20261018
codex/rectification-narrower-delivery-20261016
codex/full-reading-module-parity-20261018
codex/marriage-match-p1-20261017
codex/upstream-sync8-20261017
codex/people-archive-limit-20-20261017
codex/api-server-service-extract-20261013
codex/dasha-unify-20261013
codex/python-hygiene-20261013
codex/contracts-helpers-dedupe-20261013
codex/pl9-render-split-20261013
codex/consult-route-split-20261013
codex/beta-safety-net-20261014
codex/beta-capacity-20261014
codex/answer-effort-ab-20261013
codex/api-chart-subprocess-gate-20261013
codex/chart-ascendant-row-20261015
codex/data-layer-types-20261013
codex/release-path-production-20261014
codex/beta-main-path-20261014
codex/frontend-dead-code-20261013
codex/consult-prep-parallel-20261013
codex/report-reference-perf-20261013
codex/home-sidebar-rerender-20261013
codex/node-runtime-resources-20261013
codex/api-disk-cache-retention-20261013
codex/rect-scoring-perf-20261013
codex/upstream-sync7-20261014
codex/rectification-step0-entry-20261013
codex/report-focus-card-20261013
codex/report-translation-gaps-20261013
codex/composer-first-glyph-clip-20261013
codex/agent-loop-pilot-20261013
codex/rectification-offer-opened-state-20261012
codex/rectification-nearest-boundary-opening-20261012
codex/rectification-d12-parent-probes-research-20261012
codex/rectification-explicit-entry-20261012
codex/consult-career-type-residual-20261009
codex/consult-card-full-source-20261007
codex/rashi-dashas-native-20261008
codex/ephemeris-nutation-20261008
codex/report-full-data-edition-20261007
codex/special-lagnas-native-20261008
codex/upstream-sync6-20261007
codex/rectification-delivery-dup-adopt-20261006
codex/consult-conversational-answer-20261006
codex/consult-latency-quickwins-20261005
codex/rectification-nadi-seconds-research-20261005
codex/gate-log-volume-20261004
codex/astrologer-rulings-batch6-20261004
codex/consult-timeline-no-plan-20261001
codex/consult-answer-clock-20261001
codex/consult-plain-answer-20261001
codex/rectification-varga-resolution-fix-20261001
review/rectification-varga-resolution-20260930
codex/jev-intent-v2-20260927
codex/consult-evidence-card-research-20260927
codex/people-archive-p1-20260924
codex/chart-dasha-western-redesign-20260924
codex/home-page-split-20260925
codex/report-reader-main-20260924
codex/rectification-midnight-date-anchor-20260920
codex/rectification-cross-midnight-gate-fix-20260920
codex/rectification-cross-midnight-20260920
codex/owner-case-purge-20260919
codex/rectification-jev-intent-research-fix2-20260919
codex/rectification-jev-intent-research-fix-20260919
codex/rectification-jev-intent-classifier-research-20260919
docs/three-channel-redesign-20260918
codex/session-list-single-source-fix-20260917
codex/session-list-single-source-20260917
codex/rectification-session-composer-guard-20260917
codex/chart-copy-trim-20260917
codex/rectification-dead-d9-choice-fix-20260916
codex/rectification-mobile-timeline-readout-20260917
codex/session-capacity-bool-assert-20260916
codex/home-state-lowering-20260915
codex/freeze-metric-change-20260915
codex/rectification-engine-memoization-fix-20260915
codex/consultation-session-capacity-20260915
codex/consultation-context-memory-20260915
codex/consultation-external-evidence-cache-20260915
codex/rectification-request-dossier-cache-20260915
codex/rectification-settled-render-split-20260915
codex/rectification-engine-memoization-20260915
codex/rectification-failure-attribution-20260915
fix/sidebar-hard-nav
codex/rectification-spoken-orphan-20260914
codex/rectification-targeted-collect-spoken-focus-20260913
codex/rectification-house-lord-gochara-research-20260913
codex/rectification-new-minute-inherit-20260908
codex/rectification-same-year-probe-dedupe-20260908
codex/rectification-probe-replay-loss-20260908
codex/rectification-range-delivery-fix-20260907
codex/rectification-range-delivery-card-20260907
codex/rectification-stale-compare-fix-20260907
codex/rectification-declared-uncertainty-20260907
codex/report-md-page-20260906
codex/rectification-collect-vs-offer-consistency-20260905
codex/rectification-probe-answer-covers-domain-20260905
codex/rectification-quality-probe-dedupe-20260904
codex/rectification-post-adopt-verify-20260904
codex/report-candidate-range-20260904
codex/report-sensitivity-crash-20260904
codex/rectification-adopt-narration-fix2-20260904
codex/rectification-adopt-narration-fix-20260904
codex/rectification-adopt-narration-20260904
codex/repo-hygiene-20260903
codex/rectification-ux-20260903
codex/rectification-ux-20260902
codex/diagnose-rectification-request-20260827
fix/staging-gate-checkout-retry
No results found.
Labels
Clear labels
agent/待执行
agent/待真机
agent/待规划
agent/待验收
agent/执行中
agent/排队
agent/规划中
agent/试点
agent/部署中
agent/需拍板
agent/验收中
ready-for-agent
wayfinder:map
wayfinder:task
Grok 领:按任务书实现
产品负责人真机走查
Claude 领:诊断并写任务书
Claude 领:验收 Grok 回报的 SHA
锁:Grok 执行中
任务书已写好,等前置单合入 staging 后由 Claude 改成 agent/待执行;循环两侧都不处理
锁:Claude 规划中
试点期只处理带此标签的 issue
已推 staging,等部署核对(脚本自动)
需要产品负责人决定
锁:Claude 验收中
Fully specified, ready for an agent
Wayfinder map issue holding the notes and child tickets
Wayfinder child ticket
Milestone
No items
No Milestone
Projects
Clear projects
No projects
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: root/Jyotisha#171
Reference in New Issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
模型调用查卡工具(read-consultation-evidence)时,现在每次都把整份 system 和约 9 万字符的工具结果重新发一遍。改成只返回模型要的那几段,减少重复发送。验收:同一批题的输入 token 下降,必需字段送达率不变,盲测不下降。
状态:排队。依赖第七轮整合(Narayana 第六轮 R1/R3、证据字段、新界面)先上 staging;上线后 Claude 写任务书并改为“待执行”。验收由 Claude(jyotisha-2a)负责。
这一单要做什么:省 token。先量一量:模型查卡时每多一步,前面约 9 万字的材料就要再发一遍。若一次能取多段、只取要的字段,可以省下多少。省得够(≥10%)就改:查卡一次可取多段,内容与原来逐段取完全一样。
不能碰:答题规则与提示词、占星师方法文件、数据卡本身、每轮 3 次的上限。
怎么算做完:测量表;测试证明多段一次取回的内容与逐段取一字不差;必需字段 100% 送达。真实 token 和盲测由 Claude 验收时跑。Bug 记录写 BUG-1814。如果量下来省不到 10%,就停下来交产品决定。
先量后改:k=2 时总输入字符下降约 29–30%,过 10% 门槛,改造已做。多段一次取回的内容与逐段取一字不差。
测量(真实链路,Steve Jobs / career)
每段查卡本身很小(常用段 535–857,最大段
western:*约 28.4k,upstream_techniques约 20k),贵的是「每多一步就把 93,202 字符再发一遍」。(另一组用两个小段 D60+yogas 实测:533,075 → 377,xxx,下降 29.4%。)
改了什么(
consultation-tools.ts两处)z.union:{ section }单段写法保留(新增可选fields);新增{ sections: [...] },2–6 段去重,多段仍计 1 次调用,仍受每轮 3 次上限。{ status, results: [{ section, status, data|reason }], note };单段形状与键序不变(status / section / data / note,带 fields 时多unknown_fields)。fields只取顶层键,未知键进unknown_fields,不改值、不截断数组。sections与chars(内部字段;publicConsultationRuntimeSteps不导出,公开回执不变)。没动:
EVIDENCE_LOOKUP_SECTIONS/consultation-evidence-card.ts、references/**、答题提示词与 methodology、route.ts、3 次上限数值、序列化区(#170)、计算 execute(#172)、工具表(#173)。stream-agent-response.ts的答案重启只看工具名和已输出文字,不读section,不用改。测试
consult-evidence-lookup-batch-20261109.test.tsconsult-evidence-lookup-20260927.test.tsconsult-same-source-check-1773/-independence-1773consultation-agentic-runtime.test.tstsc --noEmit -p frontendnpm run lint新测试覆盖:旧单段形状不变;多段每段
data与逐段取 deepEqual;fields只少键、数组不截断;多段计 1 次、第 4 次仍 refused;>6 段 / 单段/ 未知段名 / 混写 / 多余键被 schema 拒绝;三张 golden 盘 × career / marriage / health 的missing_route_layers` 全空(送达不退步)。交给你验收的两项:
consult-evidence-traceability.mts与consult-same-source-check.mts改前改后对比、盲测准确度对比——本机没有模型凭据,按环境缺口留给你。测量脚本在分支里可复跑:
frontend/scripts/research/consult-lookup-token-probe-171.mts、consult-lookup-section-sizes-171.mts。进度记录:docs/tasks/PROGRESS-token-lookup-20261109.md;Bug:BUG-1814。