Skip to content

feat(memory): add optional Jev reranking and comparison - #2005

Merged
hidb4ai merged 8 commits into
oceanbase:masterfrom
Oxidaner:feat/1937-jev-memory-reranker
Oct 24, 2026
Merged

hidb4ai merged 8 commits into
oceanbase:masterfrom
Oxidaner:feat/1937-jev-memory-reranker

Conversation

@Oxidaner

@Oxidaner Oxidaner commented Oct 15, 2026 •

Copy link
Copy Markdown
Contributor

Which issue or RFC does this PR close?

Refs #1937, restored from #1643. The implementation follows RFC 0080's existing MemoryReranker boundary and explicit inference-failure contract. The hosted three-arm empirical acceptance remains open.

Rationale for this change

Deployments can opt into pinned Jev System One relevance scoring for authorized Atomic Memory candidates. Provider timeouts, unavailability, invalid scores, missing usage, and model-version drift surface as inference errors, so callers can retry idempotent retrieval and preparation without mistaking provider failure for successful ranking.

What changes are included in this PR?

  • Add an opt-in Noul adapter with shared concurrency, a total deadline, a UTF-8 request bound, stable original-rank selection, cancellation propagation, and validated usage receipts. Outstanding requests are cancelled and awaited on failure.
  • Apply the existing recall-expansion policy to injected rerankers. Runtime owns exact revisions, authorization, lifecycle eligibility, and PreparedContext byte fitting.
  • Add a LoCoMo Jev arm, a complete answer-payload byte budget, and a comparator for paired none/LLM/Jev runs. Require matching queries, ordered candidate pools, downstream settings, budgets, and predeclared zero quality-regression tolerance.
  • Fingerprint actual provider-resolved generation and independent LLM reranker endpoints, including environment defaults. Reject endpoint drift on resume; reject different downstream services across comparison arms. Reuse the resolved generation endpoint when reranking inherits that model.
  • Disable native SDK retries for compared answer, judge, and LLM rerank models, using Runtime's provider resolution. Validate every model response's token receipt before structured generation can normalize missing fields to zero. Preserve errors, explicit retries, resumed attempts, and unavailable receipts as unknown cost. Legacy manifests without the observable-billing policy cannot establish complete cost or recommend adoption.
  • Report evidence recall/MRR, downstream correctness, delivered evidence/bytes, latency percentiles, requests/tokens, fallbacks, retries, and priced costs. Require measured retrieval cost when embeddings are used.
  • Run all six Jev SQLite/OceanBase integration scenarios in the real OceanBase CI job, reject skipped database contracts, and publish JUnit evidence. Successful ranking preserves identity, authorization, read-only preparation, and byte limits; rate limits and total deadlines surface through Python and HTTP.
  • Document setup and reproducible runs, and retain non-secret hosted Jev adapter evidence with exact dataset/adapter hashes.

Minimal-diff audit: no added dependencies or Server configuration options in this PR. HTTPX 0.28.1 already defaults to zero transport retries. OpenAI 2.46.0 and Anthropic 0.117.0 default to two SDK retries; comparison models require the explicit zero override so runner retry accounting is complete. The billing-policy marker prevents applying that guarantee retrospectively to legacy records. Provider resolution and header merging reuse Runtime behavior, and inspected model clients are closed.

Are there any user-facing changes?

Python deployments can inject JevMemoryReranker explicitly. Normal installations require no Jev key. The evaluation CLI adds --rerank-mode jev, --answer-max-bytes, and compare-rerank. Jev provider failures use the existing inference-error contract; HTTP timeout/unavailability are explicit 503 responses. Comparison runs pin effective provider endpoints and require usable per-response receipts before declaring cost complete.

How was this change tested?

  • make check: passed, including lock consistency, all hooks, type checking, and 50 integration-manifest tests.
  • Related Memory/runtime/LoCoMo checks: 276 passed, 3 skipped locally because POWERCONTEXT_TEST_OCEANBASE_URL is absent.
  • Final native-provider and HTTP regression checks: 34 passed, 3 OceanBase cases skipped locally. Actual locked OpenAI and Anthropic SDKs use simulated HTTP responses; valid receipts succeed, read timeouts cause one wire attempt, and missing/partial receipts cannot produce a complete-cost adoption recommendation. Both answer/judge and injected LLM rerank paths are covered.
  • Independently reproduced the previous implementation accepting provider failures and changed reranker endpoints. Native OpenAI timeout and missing-usage responses also reproduced successful observations on the previous runner; the regressions reject those cases after the fix.
  • Code commit 60b6ffc passed the cloud test matrix, quality, website, and host acceptance checks. CLA remains pending. The follow-up commit changes only the evidence report and passes file-scoped pre-commit checks, including type checking.
  • Real OceanBase database contracts passed nine cases without skips on code commit 60b6ffc, including all six Jev SQLite/OceanBase scenarios with explicit failure propagation. The same job passed 307 broader recall tests: https://github.com/oceanbase/powercontext/actions/runs/38928735027/job/117079194023
  • Actual hosted Jev endpoint https://jevmodel.org/v1/systemone returned HTTP 200 and resolved jev-latest to jev-1.13.0. Initial pinned adapter probes completed four of eight cases; follow-up diagnostics returned HTTP 402 insufficient_credits for two Chinese cases. Those responses establish request rejection, not a zero account balance.
  • On 2026-10-17 (Asia/Shanghai), nine further requests using the same configured key and pinned adapter all returned HTTP 200 with valid usage receipts. They covered the two previously failing Chinese cases, an English control, and an identical three-candidate Chinese case run serially and concurrently. Both complete rankings selected [2, 1]. The last x-tokens-remaining header reported 84421. These probes used 3702 input and 189 output tokens. The earlier 402 did not recur; its cause remains undetermined. No new one-off raw diagnostic snapshot is added to the repository.
  • git diff --check and staged-content checks: passed; no credentials or private local paths are included.

SQLite uses an actual local database and Runtime/HTTP/preparation paths. The native SDK regression responses are simulated. Hosted Jev probes execute the actual adapter against public session text; they do not perform ingestion, downstream answering/judging, or a held-out three-arm comparison. No quality, latency, or cost improvement is claimed. See evaluation/memory/locomo/JEV_EVALUATION.md and evaluation/memory/locomo/evidence/jev_live_smoke_2026-10-16.json for evidence and limits.

AI usage statement

Implemented and verified with OpenAI Codex.

Add bounded native System One scoring with coarse-order fallback and usage accounting. Preserve Atomic Memory identity, authorization, read-only preparation, and delivery budgets. Include matched three-arm evaluation, bilingual smoke inputs, and reproducible evidence limits.

Refs oceanbase#1937 (restores oceanbase#1643). Validation: 205 related tests passed, 3 OceanBase cases skipped; make check passed. Live Jev comparison and OceanBase acceptance require deployment credentials.
@CLAassistant

CLAassistant commented Oct 15, 2026 •

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

@hireview001 hireview001 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • CI failed: controlled-cli (failure).
  • CI failed: ZCode acceptance (failure). Failed steps: controlled-cli / Run two independent controlled CLI acceptances.

Comment thread evaluation/memory/locomo/runner.py Resolved
@oceanbase oceanbase deleted a comment from hireview001 Oct 15, 2026
@hidb4ai

hidb4ai commented Oct 15, 2026

Copy link
Copy Markdown
Contributor

Is ready to review ?

Resolve comparison identities through the same provider used by answer and judge inference, including environment-derived endpoints and provider defaults. Close the inspection client before execution. Add endpoint-drift regression coverage and run Jev integration in the real OceanBase CI job without skipped cases.

@hidb4ai hidb4ai left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Two evaluation correctness issues remain at 2392a670: incomplete billing can pass the adoption gate, and resumed runs do not pin the independent LLM reranker's effective endpoint. Details inline.

Comment thread evaluation/memory/locomo/runner.py Outdated
(
jev_config.endpoint
if jev_config is not None
else str(settings.inference.rerank_base_url or settings.inference.generation_base_url)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[P2] Fingerprint the resolved independent reranker endpoint

With generation_model="openai:test-chat", rerank_model="anthropic:test-rerank", and both explicit base URLs unset, changing only ANTHROPIC_BASE_URL from service A to service B changes the actual reranker endpoint but leaves this hash at sha256("None"). I reproduced prepare_run() accepting the same output directory after that change with an identical manifest. The downstream fingerprint stays unchanged because the answer/judge provider is still OpenAI. Resuming can therefore mix baseline results from different services without invalidating the comparison. Resolve and fingerprint the provider endpoint actually used by the independent LLM reranker, including environment values and defaults, before accepting a resumed run.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

独立复核确认该问题在 head 2392a6703a747e20a65da61779eba5c2f276e4de 仍然存在,而且与同一 PR 已经修好的同类问题形成了不对称。

  • evaluation/memory/locomo/runner.py 现在对 generation 端点走的是解析后的值:async with infer_model(settings.inference.generation_model) as downstream_model: downstream_base_url = downstream_model.base_url(infer_model 来自 pydantic_ai.models,会带上 provider 的环境默认端点)。
  • 但同一个 manifest 里的 comparison_reranker.endpoint_sha256 仍取 settings.inference.rerank_base_url or settings.inference.generation_base_url。这两个都是 InferenceSettings 的普通配置字段(src/powercontext/builtin/runtime/config.py:312 为 rerank_base_url: AnyHttpUrl | None = None),不包含 provider 环境变量的解析结果;composition.py:1452 是把该配置值直接交给 reranker provider,取值为 None 时由 provider 自身的环境默认值兜底。
  • 因此在 rerank_model 指向另一个 provider(例如 anthropic:...)、且未显式配置 rerank_base_url 时,只改该 provider 的环境变量(ANTHROPIC_BASE_URL)就会改变真实 reranker 端点,而指纹恒为 sha256("None"),prepare_run() 会接受同一输出目录、比较也会放过这次漂移;同一头部的 generation 端点却会因 downstream_base_url 变化而被拒绝。

建议对 reranker 也走解析路径(与 generation 对称,取 provider 解析后的 base_url),而不是读取原始设置字段;comparison_reranker.model 若与 generation 模型相同,也应避免同一事实在 manifest 里出现两个不同来源。

@hidb4ai
hidb4ai marked this pull request as ready for review October 16, 2026 16:02

@hidb4ai hidb4ai left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Two non-blocking design notes: distinguish reusable test fixtures from one-off execution records, and keep the evaluation workflow reusable across reranker implementations. The existing MemoryReranker injection boundary is already provider-neutral.

) -> dict[str, Any]:
"""Reject changed inputs, then report each run on the same question denominator."""

if set(runs) != {"none", "llm", "jev"}:

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Design note (non-blocking): Keep reranker comparison independent of Jev

The comparator requires exactly none, llm, and jev, and the quality/adoption logic below also names Jev directly. I verified that our real none/llm pair is rejected with comparison requires none, llm, and jev runs. This makes the shared comparison workflow require a Jev arm even when evaluating another candidate or only the existing baseline. Consider accepting named runs with explicit baseline/candidate selections and per-run pricing. Keep Jev's protocol, model pinning, and credentials in its adapter, and vendor selection in the evaluation composition layer rather than adding a core MemoryRerankMode member for each provider. The existing MemoryReranker interface is sufficient; a new provider framework is unnecessary.

@AlexStocks AlexStocks added the 1.4.1 v1.4.1 release tracking label Oct 17, 2026
@hidb4ai

hidb4ai commented Oct 19, 2026

Copy link
Copy Markdown
Contributor

@Oxidaner The billing-completeness and independent-reranker endpoint issues are fixed in the current head (57e81148). Please also address the two remaining design notes:

  1. Separate one-off evidence from reusable fixtures (thread). The dated hosted-run snapshot is still committed. Move it to PR evidence or a CI artifact and link it from the evaluation documentation. Keep the reusable regression inputs, setup commands, and evidence limitations in the repository.
  2. Make the comparison provider-neutral (thread). The comparator still requires exactly none, llm, and jev. Accept named runs with explicit baseline/candidate selections and per-run pricing, so a none/llm comparison or another provider does not require a Jev arm. Keep Jev-specific protocol and credentials in its adapter, with provider selection in the evaluation composition layer; the existing MemoryReranker interface is sufficient.

These remain non-blocking design notes. Please implement them or explain the rationale for retaining the current choices in the respective threads, and resolve the two fixed P2 threads.

@hidb4ai

hidb4ai commented Oct 21, 2026

Copy link
Copy Markdown
Contributor

@Oxidaner This PR is now blocked by a merge conflict with master in src/powercontext/builtin/runtime/composition.py. I confirmed the conflict with git merge-tree using PR head 57e81148 and master 1eb7c2ed.

Please update the branch and resolve the conflict while preserving both master's new recall_embedding_timeout_seconds setting and this PR's handling of injected rerankers in RecallSufficiencyPolicy. Re-run the relevant runtime and recall checks on the merged result.

The two earlier non-blocking design notes also remain open: move the one-off hosted-run snapshot out of the source tree, and make the comparison usable without a mandatory Jev arm. Please address them or explain the rationale for retaining the current choices in those threads.

The two P2 correctness fixes are already present; please mark those threads as resolved as well.

@hidb4ai

hidb4ai commented Oct 23, 2026

Copy link
Copy Markdown
Contributor

@Oxidaner Please update this PR and share an expected timeline. The branch is still at 57e81148, and our previous follow-up has not received a response.

Please sync with the latest master, address the reported composition.py merge conflict, and rerun the relevant runtime and recall checks on the updated branch.

Please also respond to the two remaining non-blocking design notes—moving the one-off execution snapshot and making comparisons work without a mandatory Jev arm—either with changes or a rationale in the respective threads. The two fixed P2 threads can be marked resolved.

If anything is blocking progress, please let us know.

@Oxidaner

Copy link
Copy Markdown
Contributor Author

Jev 记忆重排评测报告

结论

**建议继续作为可选适配器评估,不建议凭现有数据宣布 Jev 提高了最终答题准确率或关闭 issue。**在同一段公开 LoCoMo 对话的 16 道预选题中,Jev 的官方标注证据会话召回为 67.9%,高于 Qwen 文本向量的 44.5%;MiniMax 普通重排是 65.0%,gpt-6-sol 普通重排是 73.3%。两种生成模型下,Jev 与普通重排对 11 道事实题的本地逐项核对分别为 7/11 对 7/11、7/11 对 8/11。该审核并非外部独立标注,不能代替更大规模的盲审。

已完成的 12 道 PowerContext 产品链路短题在 MiniMax 生成条件下,三种重排均为 12/12,无法比较准确率提升。Jev 产品阶段耗时的中位数低于普通 MiniMax 重排,p95 反而更高。网络、可能的代理、网关和服务端等待均混在耗时里,不能由此比较模型自身推理速度。

测试设计

层次 题目与证据 三组比较 能回答的问题
PowerContext 产品链路 12 道预先冻结的自编双语题,共用 12 个已入库会话、15 条 Atomic Memory、同一份 SQLite 快照;全部记忆向量用 qwen3.7-text-embedding 重建 不重排、普通 LLM 重排、Jev 重排;同一生成和判分模型,每题同一有序检索候选 适配器是否能工作,以及这批短题的产品耗时、参考成本和结果
公开原始会话诊断 LoCoMo conv-26 预选的全部 16 道题;每题均面对相同的 19 个原始会话全文,从中选择最多 3 个供回答 Qwen 文本向量、MiniMax 普通 LLM、Jev;三组均由 MiniMax-M3 回答 会话证据排序的配对差异;不代表 PowerContext 提取/检索后的准确率
生成模型交叉核对 相同的 12 道产品短题、相同的冻结记忆及向量;另有完全相同的 16 道公开原始会话题 gpt-6-sol 生成/普通重排/判分;Qwen 向量及 Jev 排序保持不变 相同题集在第二个生成模型下的排序、事实覆盖、费用

Jev 调用 TypeSafe 官方接口固定模型 jev-1.13.0;Qwen 向量使用阿里云百炼 qwen3.7-text-embedding、1024 维;本轮 MiniMax 生成与普通重排使用官方 Anthropic 兼容接口 MiniMax-M3。12 道题的历史记忆提取曾使用 qwen-plus,上述运行未再调用它。原始会话的 Jev 结果来自对每道题所有 19 个相同文本候选的 304 次成功评分,冻结文本摘要与候选身份均已核对。原始会话测试没有运行完整 PowerContext Source 提取、Atomic Memory 和 Runtime 搜索。

题目来自公开 LoCoMo 数据集。16 题包括 6 道单会话证据题、8 道 2–3 会话证据题,以及 2 道证据跨 4 或 5 个会话的题。由于只准返回 3 个会话,最后两题不可能召回全部官方标注证据;它们仍计入平均召回,但不能用“全部证据入选”判断重排器是否有效。题目全部来自同一段对话,并非 LoCoMo 全集或跨对话抽样。

公开题:16 道配对证据召回

召回 = 所选 3 个会话与官方标注证据会话的交集 / 官方标注证据会话数。每题三组共享问题、19 个候选、会话日期和输出上限。MiniMax 两次批次的冻结数据哈希、候选身份、Jev 回执哈希、模型与预算一致,题号互不重叠;向量组前 8 道在另一次同模型运行中得到完全相同的前三名。

原始会话排序 全部 16 题平均召回 单会话题(6) 2–3 会话题(8) 4–5 会话题(2) 全部证据入选
Qwen 文本向量 44.5% 66.7% 33.3% 22.5% 4/16
MiniMax 普通 LLM 65.0% 83.3% 56.2% 45.0% 7/16
Jev 67.9% 83.3% 64.6% 35.0% 7/16

Jev 对向量逐题召回赢 9、输 1、平 6,平均高 23.4 个百分点;对普通 MiniMax 重排赢 2、输 1、平 13,平均高 2.9 个百分点。Jev 对 MiniMax 的三道不同题分别是 q016、q039、q070:前后两道 Jev 多召回 1 个标注会话,中间一道 MiniMax 多召回 1 个。标注会话召回是来源代理指标,不等于答案一定有或没有相应事实;同一事实可能在其他会话重复出现。

公开题:答案核对

三组都由同一个 MiniMax-M3 生成并由它判分。模型原始自判为向量 4/16、普通重排 8/16、Jev 6/16;这些数字不能当作准确率:q016 标准答案要求 pottery、camping、painting、swimming,向量与普通重排的答案遗漏 swimming 却被判对,Jev 的答案包含四项却被判错;q049 的标准答案要求 bowls 和 cup,Jev 答案两者都有却被判错。

为核对显而易见的错判,我们另外对其中 11 道事实/日期题列出标准答案中的 29 个必要事实;只有回答覆盖该题全部事实才算通过,允许同义表达和换算明确的相对日期。逐题规则与三组勾选记录已保存。核对结果:向量 2/11(17/29 项事实)、MiniMax 7/11(24/29)、Jev 7/11(23/29)。例如 q016 这套规则判 Jev 对、其他两组错;q040 判 MiniMax 对、其他两组缺少“加入行动团体”;q049 判 MiniMax 与 Jev 都对。

这个逐项核对由本次评测代理编写,未盲化、没有第二位独立核查者,也没有逐一裁定额外事实是否受所选会话支持。其作用是暴露自判错误和提供可审查依据,不是外部独立验证过的答题准确率。剩余 5 道推断题(例如反事实职业意愿和性格判断)没有并入这组事实题分母。

gpt-6-sol:同一批 16 道公开题

相同的 19 个原始会话、题目、三会话回答预算、向量前三名及 Jev 前三名;普通重排、回答和判分改用 gpt-6-sol。两批各 8 题均已完成,48 条逐题观察全部成功。向量和 Jev 所选会话与 MiniMax 两批逐题完全一致。测试使用第 7 条 OpenAI 兼容接口 https://api.ctmoai.com/v1,回执模型名为 gpt-6-sol;并非 OpenAI 官方直连,上游实际执行模型和账户账单未独立核实。

原始会话排序 全部 16 题平均召回 单会话题(6) 2–3 会话题(8) 4–5 会话题(2) 全部证据入选
Qwen 文本向量 44.5% 66.7% 33.3% 22.5% 4/16
gpt-6-sol 普通重排 73.3% 100.0% 60.4% 45.0% 8/16
Jev 67.9% 83.3% 64.6% 35.0% 7/16

Jev 对 gpt-6-sol 逐题召回赢 1、输 2、平 13;整体平均低 5.4 个百分点。沿用同一组 11 道事实题、29 项标准答案事实和相同的核对规则,gpt-6-sol 生成的回答核对为:向量 3/11(18/29 项)、gpt-6-sol 普通重排 8/11(26/29 项)、Jev 7/11(23/29 项)。q040 中普通重排回答明确说出加入行动团体,Jev 回答只笼统提及倡议,构成这一分差;q016 三组中后两组都包含标准答案要求的四项活动,却被 gpt-6-sol 自判为错。自判的原始数字为 3/16、6/16、6/16,不能替代逐项核对。同样需要强调:本地核对不盲化,无法建立跨对话的普遍准确率差异。

产品链路:12 道短题

每题检索候选最多 10 条、供回答最多 3 条,完整回答输入最多 4096 UTF-8 字节,三组逐题有序候选摘要全部一致。产品耗时为检索 + 重排 + 回答,排除判分;仅统计成功完成的题。

重排 完成 / MiniMax 判对 产品 p50 产品 p95 产品阶段官网参考价*
不重排 12/12 1.799 秒 3.500 秒 $0.00233760 + ¥0.000178
MiniMax 12/12 4.019 秒 6.027 秒 $0.00354402 + ¥0.000178
Jev 12/12 2.130 秒 8.504 秒 $0.002477922 + ¥0.000178

* 价格仅含查询向量、重排和回答,排除判分及已存在记忆的提取/重建。美元和人民币不相加。这 12 道自编题已出现三组同时满分的天花板,不能证明 Jev 改善答题质量,也不能代表公开难题上的产品表现。

16 道公开题的价格对比:MiniMax 生成

三组使用同一个 MiniMax-M3 回答模型,每题最多交给它 3 个原始会话。下表统计 16 道题每组各完成一次所对应的成功模型调用参考价。向量组还需支付百炼的文档及查询向量费用;另外两组直接阅读原始文本,没有发生 Qwen 向量调用。判分单列。

排序方式 重排美元 回答美元 重排 + 回答美元 向量人民币 判分美元(另计)
Qwen 向量 $0 $0.01821588 $0.01821588 ¥0.0208855 $0.00155742
MiniMax 普通 LLM $0.09580188 $0.01751826 $0.11332014 ¥0 $0.00165072
Jev $0.01831032 $0.01661178 $0.03492210 ¥0 $0.00143202

平均每题(排除判分):向量组 $0.00113849 + ¥0.00130534,MiniMax 组 $0.00708251,Jev 组 $0.00218263。在这个原始会话诊断里,Jev 的美元重排+回答参考价比 MiniMax 普通重排低约 69.2%;向量组同时使用美元与人民币,未换汇,因此不比较它与 Jev 的总价高低。Jev 与 MiniMax 的证据召回和 11 道事实题结果接近,不能只凭价格选择。

MiniMax 价格按成功回执的普通输入 $0.30/百万、缓存读取 $0.06/百万、输出 $1.20/百万 token 计算。Jev 对这 16 道题的 304 次成功评分共 435,960 输入 token,按 $0.042/百万输入计为表中的 $0.01831032;评分发生在更早的同一冻结题集上,此处计入一次完整成本,没有当成补测时新发的请求。向量组的两批独立运行各自重新嵌入了 19 个文档,连同 16 个问题向量共 41,771 输入 token,按北京地域 ¥0.50/百万 token 换算为表中的 ¥0.0208855。这反映本次两批实际运行;若在一次运行中复用文档向量,向量组成本会下降。判分三组合计 $0.00464016,不在“重排+回答”列中。美元和人民币未相加。

16 道公开题的价格对比:gpt-6-sol 生成

同样是 16 道题、19 个原始会话和三会话回答上限,回答/普通重排/判分均使用 gpt-6-sol。下表美元金额按照OpenAI 官方 gpt-6-sol 标准价及测试接口回执 usage折算,仅供参考;实际接口报价和账户账单未知。

排序方式 重排美元 回答美元 重排 + 回答美元 向量人民币 判分美元(另计)
Qwen 向量 $0 $0.20069960 $0.20069960 复用同一向量基线* $0.07910000
gpt-6-sol 普通重排 $0.77049520 $0.17959200 $0.95008720 ¥0 $0.06077240
Jev $0.01831032 $0.17974800 $0.19805832 ¥0 $0.05263160

平均每题(排除判分和向量准备):向量组 $0.01254373、gpt-6-sol 普通重排 $0.05938045、Jev $0.01237865。在官网换算价口径下,Jev 的重排+回答比 gpt-6-sol 普通重排低约 79.2%;但后者的标注证据召回 73.3% 高于 Jev 的 67.9%,11 道事实题的本地核对为 8/11 对 7/11。因此这不是“质量相同而费用更低”的证据。

* 向量组使用的 Qwen 排序与 MiniMax 表为同一批已核对的结果;如将两种生成模型分别视为独立方案,须为各自准备向量,参考上表测得的 16 题向量开销 ¥0.0208855。实际追加 gpt-6-sol 测试时,前六题还重复计算了一次文档/问题向量,新增 ¥0.0104195,其余题复用既有向量。这个重复开销是本次测试执行成本,不混进上表模型费用。Jev 对 16 题的 304 次评分也在两张方案表中各展示一次完整重跑所需的成本,实际历史评分只发生一次,不能把两张表的 Jev 费用相加当作账单。gpt-6-sol 的 112 次成功响应合计 1,003,021 输入 token(其中 305,024 缓存)和 6,604 输出 token;包括判分的官方标价等价额为 $1.5230388,仍不是实际账单。

耗时与计费边界

价格来源:MiniMax 官方价格、百炼模型价格、TypeSafe 模型价格。这些是按成功 usage 回执与网页标价得到的参考额,未计优惠、税费或账单差异。原始会话评分不是 PowerContext 产品耗时;12 道产品耗时受本机网络、可能的代理、服务网关与模型调用共同影响,未测每一跳,不应推断 Jev 模型本身更快或更慢。

gpt-6-sol 产品短题三组均完成 12/12;模型自判为 12/12、12/12、11/12,最后一组标错的答案正确说明演示环境标签不支配生产配置。16 道公开题的两批生成/判分均已完成,判分仍有可核实的错判。前 8 题的预算调整及逐阶段用量详见同目录的 minimax-results-for-review.md 和本报告对应的本地回执。

判断与后续验收

现有数据支持两点:Jev 在这段对话上的证据会话召回明显优于文本向量;与 MiniMax 普通重排的差异很小,而使用 gpt-6-sol 时,普通重排的标注证据召回和 11 道事实题本地核对均略高于 Jev。Jev 在两种模型下的官网参考重排成本均低于普通重排。现有数据不支持跨对话准确率提升、产品难题胜出、实际账单节约或模型推理更快的结论。

如果 issue 的验收要求是“在真实产品路径上提升或保持公开难题质量”,仍需完成多段对话的 Source→Atomic Memory→Runtime 入库与检索、对答案作独立盲审,并记录实际提供商账单与网络分段耗时。两次尝试的公开对话原生提取尚未完成,不能把这里的原始会话诊断冒充产品链路评测。建议在 PR 中报告这些结果及限制,保留 Jev 为可选适配器,暂不关闭 #1937。

@hidb4ai hidb4ai left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@hidb4ai
hidb4ai merged commit 5738ca0 into oceanbase:master Oct 24, 2026
51 of 54 checks passed
@Oxidaner
Oxidaner deleted the feat/1937-jev-memory-reranker branch November 26, 2026 12:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

1.4.1 v1.4.1 release tracking

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants