Early Awareness · OPeRA-EA benchmark · BM25 diagnosis
OPeRA-EA:先把“提前感知最终 intent”问题做清楚,再证明方法超过 BM25
EA 的目标是:session prefix → calibrated final intent distribution + uncertainty。这版页面重写后不再把结果包装成“EA-Predictor 已经显著优于 BM25”;相反,它明确指出当前公开模型的排序能力几乎等价于 lexical retrieval,真正有改善的是 calibration / NLL / Brier。下一版必须用 EA-hard 数据和真正的 Step Encoder + Noise Gate + Aggregator 才能验证你的方法。
prefixes 803 · pre-t* 249
product-title clusters; not open-world discovery
ranking delta = 0.0000; this is the design warning, not a win claim.
Root-cause diagnosis
为什么 BM25 和 EA-Predictor 排名几乎一样
当前 EA-Predictor 本质上是 calibrated lexical candidate scorer:代码先计算 prefix 文本与 intent 描述之间的 TF-IDF cosine similarity,然后只学习一个全局 similarity_scale,最后做 softmax。对同一个 prefix 来说,scale * similarity 是对 BM25/TF-IDF 分数的正向单调变换;单调变换不会改变排序,所以 Hit@5、NDCG@5、MRR@10、LeadTime@5 与 BM25 几乎一致是预期结果。
{
"hit@1": 0.0,
"hit@5": 0.0,
"hit@10": 0.0,
"hit@20": 0.0,
"ndcg@5": 0.0,
"mrr@10": 0.0,
"pre_t_star_auc_ndcg@5": 0.0,
"pre_t_star_auc_mrr@10": 0.0,
"leadtime@5": 0.0,
"normalized_lead@5": 0.0,
"coverage@5": 0.0,
"ece": -0.3867098485111699,
"brier": -0.007764194829367039,
"nll": -1.142707594800669,
"fcr@0.5": 0.0
}这说明当前实验只能证明两件事:第一,OPeRA-EA 的 label/schema/metric pipeline 跑通了;第二,校准后的 lexical scorer 明显改善 probability quality:ECE 从 0.7240 到 0.3373,Brier 从 0.0164 到 0.0087,NLL 从 2.6234 到 1.4807。它不能证明你的 EA 方法已经学到超越 BM25 的时序/噪声/偏好状态能力。
Motivation
Motivation:为什么需要 Early Awareness
普通 session recommendation 往往预测 next item;Life Agent 更需要在用户还没明确说出目标前,理解“最终会完成什么”,并知道什么时候不该过早承诺。
Research pain point
电商/生活 Agent 的失败经常不是不会推荐,而是太晚感知用户真实目标,或者看到早期噪声后过早锁错 top-1。EA 把问题收敛为 closed-domain final intent distribution:在每个 prefix 上输出 top-k + uncertainty,让 Planner 决定 ASK / ACT / DEFER。
和 BM25 的边界
BM25 能利用搜索词、商品标题、ASIN/title overlap;在 OPeRA 这种 title-heavy 数据上非常强。你的方法要成立,必须在 BM25 不容易解决的场景中赢:目标晚暴露、早期是 use-case/constraint 而非商品名、存在 hard negative drift、需要 step aggregation 和 noise gate。
Data construction
数据构造流水线
不修改原始 OPeRA;复制到 OPeRA_EA 后生成 ea_v1/full_session_only。本 workspace 中用户给定的 top-level dataset/OPeRA 当时不存在;真实 raw 文件位于 dataset/NEU-HAI/OPeRA。
- Raw copy: OPeRA_full action/session/user parquet → workspace-local OPeRA_EA copy。
- Unified actions: 解析 element_meta/page_meta/products,统一成 user、session、timestamp、action_type、click_type、input_text、product_title、asin、cart、search terms。
- Product catalog: 从 ASIN/title/cart/purchase 聚合商品与 title aliases。
- Final intent: 每个 session 用 purchase click、cart delta、last engaged product 推断最终目标,再聚成 50 个 product-title cluster intents。
- Trajectory: 压缩 scroll/review/option loops,生成中文 state/action 文本,标注
t*、noise、evidence strength。 - Prefix: 按 10%-90%T 和 t* 附近切点生成 prefix-level examples;每个 prefix 标签是同一个 final_intent_id。
- Split/leakage: user-disjoint train/valid/test;pre-t* prefix 中检查不含显式 final-intent。
Schema
Schema: trajectory / prefix / intent / prediction
下面是公开报告要固定讲清楚的四层 schema。训练时可以用 label 字段;推理时 EA 只能看 prefix text 和 candidate catalog。
Trajectory schema
{
"traj_id": "op_s_000123",
"source_session_id": "original OPeRA session id",
"user_id": "workspace-local anonymized user id",
"split": "train|valid|test (user-disjoint)",
"domain": "amazon_shopping",
"final_intent_id": "op_g_042",
"final_intent_name": "product-title cluster name",
"final_intent_source": "purchase_click_direct_asin|cart_delta_unique|last_engaged_product",
"label_confidence": "strong|medium|weak",
"T_raw": 74,
"T": 30,
"t_star": 21,
"t_star_source": "asin_match|product_title_match|cart_asin_match|anchor_fallback",
"noise_ratio": 0.2,
"steps": [
{
"t": 1,
"s": "state text",
"a": "action text",
"action_type": "search|click|scroll|navigation",
"explicit_final_intent": false,
"is_noise": false,
"noise_type": null
}
]
}Prefix schema
{
"prefix_id": "op_s_000123_p021",
"traj_id": "op_s_000123",
"user_id": "...",
"split": "test",
"prefix_t": 21,
"prefix_ratio": 0.5,
"is_pre_t_star": true,
"t_star": 29,
"T": 42,
"final_intent_id": "op_g_042",
"candidate_intents": [
"op_g_000",
"op_g_001",
"..."
],
"text_prefix": "[STATE] ... [ACTION] ... [TYPE] ...",
"steps": "prefix steps only; labels not used at inference",
"noise_ratio_in_prefix": 0.19,
"contains_explicit_final_intent": false,
"label_confidence": "strong"
}Intent catalog schema
{
"intent_id": "op_g_042",
"intent_type": "product_title_cluster",
"name": "lightweight sleep tracker band / product phrase",
"aliases": [
"title alias"
],
"representative_asins": [
"ASIN..."
],
"representative_titles": [
"raw product title"
],
"support": {
"sessions": 10,
"purchase_clicks": 8,
"cart_delta": 1,
"last_engaged": 1
},
"neighbor_intents": [
"op_g_018"
],
"hard_negative_intents": [
"op_g_019"
]
}EA prediction schema
{
"prefix_id": "op_s_000123_p021",
"gold": {
"intent_id": "op_g_042",
"name": "..."
},
"top_k_intents": [
{
"intent_id": "op_g_042",
"name": "...",
"prob": 0.38
}
],
"uncertainty": "high|medium|low",
"suggested_policy": "ASK_DISAMBIGUATING_QUESTION|ACT_WITH_TOP_K_GUARDRAILS",
"text_prefix_excerpt": "first 600 chars"
}Dataset diagnostics
规模、t* 分布与 leakage control
OPeRA-EA v1 是 small realistic case study,不是最终主 benchmark。当前数据过小、title 过强、intent long-tail,正是 BM25 强到接近 ceiling 的原因之一。
Dataset stats
{
"dataset": "OPeRA-EA",
"source_copy": "/root/code/vepfs/hermes/autoresearch/life_agent/1_EA/dataset/OPeRA_EA",
"version": "full",
"sessions_raw": 692,
"actions_raw": 28904,
"unified_actions": 28904,
"users": 54,
"intents": 50,
"trajectories": 80,
"prefixes": 803,
"pre_t_star_prefixes": 249,
"mean_T": 18.825,
"mean_noise_ratio": 0.40297374337903796,
"label_confidence_counts": {
"strong": 56,
"medium": 5,
"weak": 19
},
"dropped_sessions": {
"not_in_top_intents_or_unresolved": 570,
"too_short": 42
}
}Leakage checks
{
"user_overlap_train_valid": 0,
"user_overlap_train_test": 0,
"user_overlap_valid_test": 0,
"pre_t_star_prefix_contains_explicit_final_intent": 0,
"prefix_text_contains_final_intent_id": 0
}Public artifacts
可复查 artifact 链接
页面只发布轻量样本和指标,不发布完整 8GB 数据副本;artifact links 使用绝对路径,避免 Next catch-all route 下相对路径 404。
metrics.json
Random / Popularity / BM25-TFIDF / EA-Predictor / EA-BiGRU-ablation 的完整指标。
Datasetdataset_stats.json
trajectory、prefix、intent、label confidence 与 dropped session 统计。
Diagnosticsleakage_checks.json
User-disjoint split 和 pre-t* leakage 检查。
Schema sampleintent_catalog_sample.jsonl
product-title cluster intent 的公开样本。
Prefix sampleprefixes_sample.jsonl
prefix JSONL 样本,包含 candidate_intents 与 text_prefix。
EA outputea_predictions_sample.jsonl
top-k distribution + uncertainty + suggested_policy 示例。
Evaluation
Evaluation metrics and formulas
主指标来自你的 EA 定义:ranking、pre-t* early awareness、lead time、calibration、false commitment。下面用公式固定评测口径。
Metric definitions
{
"Hit@5 = 1[rank(g*) ≤ 5]": "gold final intent appears in the top-5 candidate distribution.",
"NDCG@5 = 1/log2(rank(g*)+1) if rank≤5 else 0": "rank-sensitive top-5 quality; higher if the true intent is ranked earlier.",
"MRR@10 = 1/rank(g*) if rank≤10 else 0": "reciprocal-rank metric for top-10 retrieval.",
"Pre-t* AUC_NDCG@5": "mean NDCG@5 over prefixes with prefix_t < t*, before explicit final-intent exposure.",
"LeadTime@5 = t* - min{t<t*: g* in Top5(prefix_t)}": "how many steps before explicit exposure the model already includes the final intent in top-5.",
"NormalizedLead@5 = LeadTime@5 / T": "lead time normalized by trajectory length.",
"Coverage@5": "fraction of trajectories for which any pre-t* prefix hits top-5.",
"ECE": "expected calibration error over top-1 confidence bins.",
"Brier": "mean squared error between predicted distribution and one-hot intent label.",
"NLL": "negative log likelihood of the gold final intent.",
"FCR@0.5": "False Commitment Rate: pre-t* wrong top-1 predictions whose confidence is at least 0.5."
}Model table
| Model | hit@5 | ndcg@5 | mrr@10 | pre_t_star_auc_ndcg@5 | leadtime@5 | ece | brier | nll | fcr@0.5 |
|---|---|---|---|---|---|---|---|---|---|
| Random | 0.0000 | 0.0000 | 0.0141 | 0.0000 | 0.0000 | 0.0200 | 0.0196 | 3.9120 | 0.0000 |
| Popularity | 0.0000 | 0.0000 | 0.0000 | 0.0000 | 0.0000 | 0.0940 | 0.0207 | 6.3902 | 0.0000 |
| BM25-TFIDF | 0.8380 | 0.8345 | 0.8333 | 0.4524 | 4.7500 | 0.7240 | 0.0164 | 2.6234 | 0.0000 |
| EA-Predictor | 0.8380 | 0.8345 | 0.8333 | 0.4524 | 4.7500 | 0.3373 | 0.0087 | 1.4807 | 0.0000 |
| EA-BiGRU-ablation | 0.0000 | 0.0000 | 0.0000 | 0.0000 | 0.0000 | 0.4928 | 0.0274 | 9.7477 | 0.5000 |
Interpretation
怎么解读当前结果
表格里的 ranking parity 是设计问题暴露,不是论文结论。
可信结论
- OPeRA → OPeRA-EA 的 schema、split、prefix、metrics pipeline 已经可复查。
- TF-IDF candidate scorer 是强 baseline,在 title/search heavy OPeRA 上 Hit@5 = 0.8380。
- 当前 EA-Predictor 的主要收益是校准:ECE/Brier/NLL 改善,而非排序改善。
不能声称的结论
- 不能说 EA 方法已经超过 BM25。
- 不能把 TF-IDF+scale 写成完整 Step Encoder + Noise Gate + Transformer。
- 不能用 LLM utility proxy 代替真实 frozen Planner 评测。
Redesign
EA-hard redesign:下一步怎样让你的方法和 BM25 真正拉开
下一版要让 benchmark 和模型同时支持“语义早感知”,而不是商品标题匹配。
数据侧
- 控制 t*/T:减少 0-20% easy bucket,提高 40-90% late exposure。
- 构造 pre-t* 语义线索:use-case、constraint、budget、compatibility、场景路径,而不是提前出现商品 title。
- 加入 hard negative drift:相似 intent 长时间干扰,测试 FCR。
- 平衡每个 intent 的 train/valid/test support,减少 long-tail ceiling。
- 增加 Synerise 主数据或合成 EA-hard 数据;OPeRA 只作为 case study。
模型侧
- 实现真正 Step Encoder(BGE/GTE/MiniLM)+ step-level Noise Gate。
- 用 GRU/Lightweight Transformer/Segment Aggregator 聚合时序证据。
- Candidate scorer 使用 prefix_emb 与 intent_emb 的 dot/bilinear,而不是直接 TF-IDF cosine。
- 加入 ambiguity soft target 与 calibration loss,降低早期错误高置信。
- 做 ablation:no gate、no sequence、BM25 lexical、embedding retrieval、SBR baseline。
LLM Utility
Top-k distribution + uncertainty 给 Planner 的收益 proxy
EA 不是 Agent;它只给冻结 Planner 提供结构化感知信号。当前 proxy 只能作为报告占位,最终必须用真实 Planner run 验证。
| Planner setting | success_rate | invalid_turns | turns_to_success | token_cost | premature_commitment_rate |
|---|---|---|---|---|---|
| LLM-only | 0.6034 | 3.4000 | 5.8000 | 1.0000 | 0.1800 |
| LLM + top-1 hint | 0.7320 | 2.7000 | 4.9000 | 0.9300 | 0.1000 |
| LLM + top-k distribution + uncertainty | 0.6872 | 2.1000 | 4.2000 | 0.8800 | 0.0000 |
| Oracle | 1.0000 | 0.8000 | 2.0000 | 0.7500 | 0.0000 |
| Wrong top-1 | 0.1500 | 5.2000 | 7.6000 | 1.2000 | 0.7500 |
Volc GPU reproducibility
Volc 任务状态:submitted / Queue
已按 VolcEngine skill 提交复现实验任务 t-20260520042445-qklsk;当前页面保持诚实状态:Volc 任务处于 Queue / no worker instance yet,本页指标来自已完成的 workspace-local artifacts。
{
"task_id": "t-20260520042445-qklsk",
"status_semantics": "volc_submitted_queue_no_worker_instance_yet",
"yaml": "/root/code/vepfs/hermes/gpu/opera_ea_train_eval_20260519.yaml"
}Intent examples
[
{
"intent_id": "op_g_000",
"intent_type": "product_title_cluster",
"name": "scott comfortplus toilet paper double rolls sheets",
"aliases": [],
"representative_asins": [
"B07BGLT25K",
"/promo/A3J5TZR6FTI151",
"/promo/A29SFZNGDLW6NN"
],
"representative_titles": [
"Scott ComfortPlus Toilet Paper, 12 Double Rolls, 231 Sheets per Roll, Septic-Safe, 1-Ply Toilet Tissue"
],
"support": {
"sessions": 10,
"purchase_clicks": 8,
"cart_delta": 0,
"last_engaged": 2
},
"neighbor_intents": [
"op_g_009",
"op_g_028"
],
"hard_negative_intents": []
},
{
"intent_id": "op_g_001",
"intent_type": "product_title_cluster",
"name": "tea tree oil foot soak epsom salt",
"aliases": [],
"representative_asins": [
"B0829DGWD5"
],
"representative_titles": [
"Tea Tree Oil Foot Soak with Epsom Salt - For Toenail Repair, Athletes Foot, Softens Calluses, Soothes Sore & Tired Feet, Nail Discoloration, odor Scent, Spa Pedicure Care - Made in USA 16 oz"
],
"support": {
"sessions": 4,
"purchase_clicks": 0,
"cart_delta": 0,
"last_engaged": 4
},
"neighbor_intents": [
"op_g_026",
"op_g_021",
"op_g_015"
],
"hard_negative_intents": []
},
{
"intent_id": "op_g_002",
"intent_type": "product_title_cluster",
"name": "cat spring toys packs colorful plastic spring",
"aliases": [],
"representative_asins": [
"B0DG25N8P6"
],
"representative_titles": [
"Cat Spring Toys 40 Packs Colorful Plastic Spring Coils Attract Cats to Swat, Bite, Cat Toys for Indoor Cats for All Breeds"
],
"support": {
"sessions": 4,
"purchase_clicks": 4,
"cart_delta": 0,
"last_engaged": 0
},
"neighbor_intents": [],
"hard_negative_intents": []
},
{
"intent_id": "op_g_003",
"intent_type": "product_title_cluster",
"name": "zeagoo sleeveless button down shirts blouses solid",
"aliases": [],
"representative_asins": [
"B0BZDKCQQ2",
"B07334PKW6"
],
"representative_titles": [
"Zeagoo Women's Sleeveless Button Down Shirts Blouses Solid Casual Loose V Neck Tank Tops for Work S-XXL"
],
"support": {
"sessions": 3,
"purchase_clicks": 3,
"cart_delta": 0,
"last_engaged": 0
},
"neighbor_intents": [
"op_g_023",
"op_g_044",
"op_g_007"
],
"hard_negative_intents": []
},
{
"intent_id": "op_g_004",
"intent_type": "product_title_cluster",
"name": "lodge cast iron pre seasoned skillet signature",
"aliases": [
"Lodge 9 Inch Cast Iron Pre-Seasoned Skillet – Signature Teardrop Handle - Use in the Oven, on the Stove, on the Grill, or Over a Campfire, Black"
],
"representative_asins": [
"B00006JSUA",
"B00063RWTS"
],
"representative_titles": [
"Lodge 10.25 Inch Cast Iron Pre-Seasoned Skillet – Signature Teardrop Handle - Use in the Oven, on the Stove, on the Grill, or Over a Campfire, Black",
"Lodge 9 Inch Cast Iron Pre-Seasoned Skillet – Signature Teardrop Handle - Use in the Oven, on the Stove, on the Grill, or Over a Campfire, Black"
],
"support": {
"sessions": 3,
"purchase_clicks": 2,
"cart_delta": 1,
"last_engaged": 0
},
"neighbor_intents": [],
"hard_negative_intents": []
},
{
"intent_id": "op_g_005",
"intent_type": "product_title_cluster",
"name": "kitchenaid hard anodized ceramic nonstick pots pans",
"aliases": [],
"representative_asins": [
"B0DM6ZLKF8"
],
"representative_titles": [
"KitchenAid Hard Anodized Ceramic Nonstick Pots and Pans Set with Saucepans, Frying Pans, Stockpot, and Lids, 10 Piece Non Stick Cookware Set with Stainless Steel Handles - Porcelain White"
],
"support": {
"sessions": 3,
"purchase_clicks": 2,
"cart_delta": 0,
"last_engaged": 1
},
"neighbor_intents": [],
"hard_negative_intents": []
},
{
"intent_id": "op_g_006",
"intent_type": "product_title_cluster",
"name": "instinct grain recipe variety natural wet canned",
"aliases": [],
"representative_asins": [
"B07NM328YZ",
"B01FV0F8H8"
],
"representative_titles": [
"Instinct Original Grain Free Recipe Variety Pack Natural Wet Canned Cat Food by Nature's Variety, 3 Ounce (Pack of 12)"
],
"support": {
"sessions": 3,
"purchase_clicks": 3,
"cart_delta": 0,
"last_engaged": 0
},
"neighbor_intents": [
"op_g_030",
"op_g_019"
],
"hard_negative_intents": []
},
{
"intent_id": "op_g_007",
"intent_type": "product_title_cluster",
"name": "comfneat lightweight shirts cotton crew neck regular",
"aliases": [],
"representative_asins": [
"B09NBP8811"
],
"representative_titles": [
"Comfneat Men's 3-Pack Lightweight T-Shirts Cotton Crew Neck Regular Fit Solid Tee"
],
"support": {
"sessions": 3,
"purchase_clicks": 3,
"cart_delta": 0,
"last_engaged": 0
},
"neighbor_intents": [
"op_g_044",
"op_g_023",
"op_g_009"
],
"hard_negative_intents": []
}
]EA output sample
[
{
"prefix_id": "op_s_000019_p001",
"traj_id": "op_s_000019",
"prefix_t": 1,
"t_star": 2,
"gold": {
"intent_id": "op_g_032",
"name": "oral io series electric toothbrush brush head"
},
"top_k_intents": [
{
"intent_id": "op_g_013",
"name": "all kindle paperwhite gb our fastest kindle",
"prob": 0.02286420576274395
},
{
"intent_id": "op_g_000",
"name": "scott comfortplus toilet paper double rolls sheets",
"prob": 0.019941547885537148
},
{
"intent_id": "op_g_002",
"name": "cat spring toys packs colorful plastic spring",
"prob": 0.019941547885537148
},
{
"intent_id": "op_g_001",
"name": "tea tree oil foot soak epsom salt",
"prob": 0.019941547885537148
},
{
"intent_id": "op_g_004",
"name": "lodge cast iron pre seasoned skillet signature",
"prob": 0.019941547885537148
}
],
"uncertainty": "high",
"suggested_policy": "ASK_DISAMBIGUATING_QUESTION",
"text_prefix_excerpt": "[STATE] 当前页面为 Amazon 购物交互页面。 [ACTION] 用户打开或切换到新的 Amazon 页面。 [TYPE] navigation"
}
]Bottom line
这版的价值是把 OPeRA-EA 的数据格式、评测口径、BM25 强 baseline 和校准收益说清楚;它也暴露了核心设计问题:当前模型排序上没有超越 BM25。下一步应该把报告中的 EA-hard redesign 落成数据和模型,再重新评测。