一个持久化、持续累积的知识库,专注于大语言模型在推荐系统的应用 (LLM4Rec),基于 karpathy/llm-wiki.md 模式构建,由Qwen Code调用qwen3.6-plus实现,使用阿里百炼Code Plan.
本项目实现了一个由 LLM 维护的领域知识库,聚焦于大语言模型在推荐系统的应用 (LLM4Rec)。与传统的 RAG(每次查询都重新推导知识)不同,该 wiki 逐步构建并维护一个结构化的、相互链接的知识库,随着时间推移不断累积。
- 总页面数:180
- 类别分布:
- 信息源(sources):65 篇(占比最高,约 36%)
- 模型(models):31 篇
- 方法(methods):29 篇
- 概念(concepts):29 篇
- 实体(entities):16 篇
- 总结(summary):7 篇
- 综合分析(synthesis):3 篇
知识库以论文源文献摘要为主要驱动,模型、方法与概念三足鼎立,形成了"源文献→模型→方法→概念"的清晰知识链路。
-
生成式推荐范式(Generative Recommendation):知识库的核心主线,涵盖从 TIGER、OneRec、PLUM 到 OneRec-V2/Think 等模型,记录了从"双塔检索 + 排序"到"自回归生成 Token"的范式转变。
-
Semantic ID 与离散标识符建模:包括 FORGE、R3-VAE、ActionPiece、GRID 等工作,覆盖码本构建、码本崩溃缓解、SID 评估指标设计与冲突感知评估等关键议题。
-
长序列建模与 Scaling Law:以 HSTU、ULTRA-HSTU、LONGER、Wukong、Kunlun、GRAB 为代表,系统记录了推荐系统中算力-性能幂律关系的实证研究与硬件协同优化。
-
多模态对齐与 LLM 用户理解:包括 QARM V1/V2、LEMUR、LLM-Based User Personas 等,关注多模态特征与业务目标的定量对齐及 LLM 在线服务化路径。
-
统一架构与工业部署:OneTrans、OnePiece、HyFormer、RankMixer 等工作探索召回-排序-重排的统一骨干网络与工业级延迟约束下的可扩展架构设计。
-
TIGER(Google, NeurIPS 2023):首个基于 Semantic ID 的生成式检索模型,开创了"自回归生成物品标识符"范式。
-
OneRec 系列(快手):业界最早将检索与排序统一为端到端生成式模型;V2 版本引入惰性纯解码器,计算量降低 94%;OneRec-Think 进一步引入显式文内推理。
-
HSTU / ULTRA-HSTU(Meta):分层序列转换单元,采用相对位置偏置与线性化注意力,将复杂度从
$O(L^2)$ 降至接近$O(L)$ ,支撑万亿参数推荐模型。 -
PLUM(Google/YouTube):Semantic ID 标记化 + 领域持续预训练 + 任务特定微调,将预训练 LLM 适配到工业级生成式推荐。
-
FORGE(淘宝):基于 140 亿交互、2.5 亿商品的大规模 SID 构建框架,提出免训练代理评估指标。
-
RankMixer + LONGER(字节跳动):硬件感知可扩展排序模型与长序列优化 Transformer,体现"主干可扩展化"的工业落地路径。
-
MBGR(美团):通过业务感知语义 ID(BID)、多业务预测结构(MBP)与标签动态路由(LDR)解决"超级 App"多业务跷板效应。
-
Wukong(Meta):纯 FM 堆叠架构 + 协同扩展策略,验证了无需复杂交叉网络也能实现推荐 Scaling Law。
知识库覆盖了主流工业实体的完整实践图谱:
- 快手:OneRec 系列、QARM V1/V2、UA-SID 广告生成式推荐,在线 A/B 实测 App 停留时长提升 0.467%~0.741%
- 字节跳动/抖音:LONGER、RankMixer、LEMUR 抖音搜索/广告全量部署
- Google/YouTube:TIGER、PLUM、LLM-Based User Personas 服务数十亿用户
- 阿里淘宝:FORGE(交易额 +0.35%)、RecGPT/RecGPT-V2(CTR +2.98%, 新客探索率 +11.46%)
- 美团:MBGR 外卖平台全量部署
- 腾讯:HiGR(观看时长提升、推理速度 5 倍)、TAAC 算法挑战赛
- Pinterest:PinnerFormer 大规模生成式检索
- Shopee:OnePiece 核心搜索场景全量部署
- 百度:GRAB 广告系统全量部署,广告总收入 +3.05%
- 京东:OCP 正交约束投影,UCXR +12.97%、GMV +8.9%
-
生成式推荐的泛化性争议:论文 26031980 指出 GR 模型的物品级泛化能力在 Token 层面常退化为"模式记忆",GR 与传统 ID 模型的互补性是新兴研究方向。
-
SID 评估的可靠性危机:论文 26052533 揭示 SID 冲突在 4 数据集 5 分词器上比例高达 30.5%,Hit@10 被高估高达 103%,动摇了当前评估共识。
-
显式推理与可控生成:OneRec-Think、OxygenREC 的"快慢思考"双轨架构等工作正在探索将 CoT 推理引入推荐,但推理与延迟的平衡仍未解。
-
稀疏-稠密协同扩展:OCP、HyFormer 等工作开始关注嵌入层奇异值谱与稠密网络的协同扩展,但理论基础尚不完善。
-
多业务/多目标统一建模:MBGR 揭示的"跷板效应"与"表征混淆"在超级 App 场景仍是开放挑战,业务感知与统一表征的权衡有待深化。
-
强化学习与偏好对齐在生成式推荐中的应用:当前知识库对 DPO、RSPO、Constrained RL 等方法记录较为零散,建议系统补充 RLHF/DPO 在 OneRec、RecGPT 等模型中的对比研究及奖励建模理论。
-
冷启动与长尾泛化的系统性研究:尽管 FORGE、R3-VAE 等涉及码本均衡,但针对 LLM4Rec 的冷启动专项方法(如检索增强生成 RAG-Rec、零样本提示工程)仍稀缺,建议补充。
-
可解释性与对话式推荐:InstructRec、P5 等早期工作已收录,但近期对话式推荐、Agent-based 推荐(如 RecAgent、智能体裁判)的最新进展覆盖不足。
-
推荐系统的隐私、公平性与安全性:当前知识库几乎完全聚焦性能与效率,缺乏对生成式推荐中数据隐私、推荐偏见、对抗鲁棒性等社会技术议题的覆盖。
-
基础设施与训练系统优化:FlashAttention 已收录,但 LLM4Rec 专用的分布式训练框架、KV 缓存复用、推理加速(如投机解码在生成式检索中的应用)仍是知识空白,建议优先补充工业级 Infra 论文。
-
跨域与跨平台迁移学习:现有工作多聚焦单一平台,但 LLM 的跨域迁移能力是其核心优势之一,建议补充跨域推荐基准(如 Amazon 多类目、跨 App 行为迁移)的最新研究。
python -m venv venv_llm4rec_wiki
source venv_llm4rec_wiki/bin/activatepip install -r requirements.txt# 获取你的密钥:https://bailian.console.aliyun.com/
export DASHSCOPE_API_KEY="sk-your-api-key-here or code-plan-api-key"# 从 URL 抓取网页(Arxiv论文)并自动分析(推荐)
python tools/llm_wiki.py fetch "https://arxiv.org/abs/2307.06435"
# 导入新的源文档, 可以把网络上的碎片文档复制过来
python tools/llm_wiki.py ingest raw/sources/my_source.md
# 仅保存网页内容,不自动分析
python tools/llm_wiki.py fetch "https://example.com/article" --no-ingest
# 基于知识库,查询 wiki
python tools/llm_wiki.py query "生成式推荐和判别式推荐的本质区别?"
# 健康检查 wiki
python tools/llm_wiki.py lint
# 汇总当前 wiki 状态,并利用LLM生成Summary,并更新到README.md的Summary模块
python tools/llm_wiki.py summarizeLLM4REC_wiki/
├── AGENTS.md # Schema:规范与工作流
├── wiki/
│ ├── README.md # Wiki 概览
│ ├── index.md # 内容目录
│ ├── log.md # 操作日志
│ ├── concepts/ # 核心理论
│ ├── methods/ # 算法
│ ├── models/ # 模型架构
│ ├── entities/ # 人物、数据集、平台
│ ├── synthesis/ # 跨主题分析
│ └── sources/ # 每个来源的摘要
├── raw/
│ ├── sources/ # 不可变的源文档
│ └── assets/ # 本地图片、图表
├── tools/
│ └── llm_wiki.py # 集成百炼的 CLI 工具
├── scripts/ # 实用脚本
└── requirements.txt # Python 依赖
该 wiki 目前包含 173 个页面,涵盖:
- concepts/model_flops_utilization_mfu.md
- concepts/slate_recommendation.md
- concepts/all_modality_gr.md
- concepts/hierarchical_planning_rec.md
- concepts/context_engineering_rec.md
- concepts/llm4rec_overview.md
- concepts/scaling_laws_recsys.md
- concepts/continued_pretraining.md
- concepts/session_wise_generation.md
- concepts/representation_alignment.md
- concepts/generative_retrieval.md
- concepts/evaluation_llm4rec.md
- concepts/llm_alignment_and_optimization.md
- concepts/prompt_engineering_rec.md
- concepts/multimodal_recommendation.md
- concepts/heterogeneous_feature_interaction.md
- concepts/unified_transformer_backbone.md
- concepts/collaborative_filtering.md
- concepts/gsu_esu_paradigm.md
- concepts/semantic_id.md
- concepts/sequential_recommendation.md
- concepts/intent_driven_recommendation.md
- concepts/knowledge_enhanced_rec.md
- concepts/memorization_vs_generalization.md
- concepts/hybrid_generative_recommendation.md
- concepts/recif_bench.md
- concepts/explicit_reasoning_rec.md
- concepts/end_to_end_multimodal_training.md
- concepts/llm_user_persona.md
- methods/orthogonal_constrained_projection.md
- methods/quantitative_alignment.md
- methods/representation_alignment.md
- methods/synergistic_upscaling.md
- methods/ua_sid.md
- methods/adaptive_fusion_gr_id.md
- methods/multi_objective_alignment.md
- methods/asynchronous_llm_inference.md
- methods/item_level_scoring_in_gr.md
- methods/iterative_preference_alignment.md
- methods/llm_distillation_for_rec.md
- methods/rspo.md
- methods/weighted_evaluation.md
- methods/reward_modeling_rec.md
- methods/two_stage_training_rec.md
- methods/rag_for_recsys.md
- methods/prompt_finetuning.md
- methods/multi_epoch_learning.md
- methods/llm_as_generator.md
- methods/collision_aware_evaluation.md
- methods/memory_bank_sequential_rep.md
- methods/human_llm_collaborative_evaluation.md
- methods/actionpiece_tokenization.md
- methods/lazy_ar.md
- methods/hybrid_generative_recommendation.md
- methods/sparse_attention_seq_rec.md
- methods/cama_attention.md
- methods/llm_as_ranker.md
- methods/long_context_efficiency.md
- models/2509_paper_25092090_FORGE_Forming_Semantic_Identifiers_for_Generative_Retrieval.md
- models/LEMUR.md
- models/OneRec.md
- models/RecGPT.md
- models/LLMRank.md
- models/RankMixer.md
- models/P5.md
- models/TIGER.md
- models/InstructRec.md
- models/ULTRA_HSTU.md
- models/SASRec.md
- models/DHEN.md
- models/LONGER.md
- models/TALLRec.md
- models/HiGR.md
- models/OneRec-Think.md
- models/Wukong.md
- models/Hiformer.md
- models/PLUM.md
- models/OnePiece.md
- models/qwen_series.md
- models/GRID.md
- models/Gryphon.md
- models/LLM_User_Personas.md
- models/HSTU.md
- models/OneRec-V2.md
- models/ULTRA-HSTU.md
- models/MBGR.md
- models/GR4AD.md
- models/test_generative_rec_model.md
- models/QARM.md
- entities/movielens.md
- entities/tencent.md
- entities/baidu.md
- entities/guorui_zhou.md
- entities/shopee.md
- entities/google_youtube.md
- entities/jd.md
- entities/amazon_reviews.md
- entities/pinterest.md
- entities/taac.md
- entities/kuaishou.md
- entities/taobao.md
- entities/meta.md
- entities/meituan.md
- entities/bytedance.md
- entities/tencentgr_dataset.md
- sources/2603_paper_26031980_How_Well_Does_Generative_Recommendation_Generalize.md
- sources/2606_paper_26060860_Gryphon_A_Unified_Architecture_for_Semantic-ID_Generation_a.md
- sources/2510_paper_25102610_OneTrans_Unified_Feature_Interaction_and_Sequence_Modeling.md
- sources/2507_paper_25072222_Generative_Recommendation_with_Semantic_IDs_A_Practitioner'.md
- sources/2509_paper_25092090_FORGE_Forming_Semantic_Identifiers_for_Generative_Retrieval.md
- sources/2604_paper_26041144_R3-VAE_Reference_Vector-Guided_Rating_Residual_Quantization.md
- sources/paper_4ddaf2_Recommender_Systems_with_Generative_Retrieval.md
- sources/2403_paper_24030254_Wukong_Towards_a_Scaling_Law_for_Large-Scale_Recommendation.md
- sources/paper_c4a451_FORGE_Forming_Semantic_Identifiers_for_Generative_Retrieval.md
- sources/2601_paper_26011268_HyFormer_Revisiting_the_Roles_of_Sequence_Modeling_and_Feat.md
- sources/2411_paper_24111173_QARM_Quantitative_Alignment_Multi-Modal_Recommendation_at_K.md
- sources/2603_paper_26031869_OCP_Orthogonal_Constrained_Projection_for_Sparse_Scaling_in.md
- sources/2407_paper_24072148_Breaking_the_Hourglass_Phenomenon_of_Residual_Quantization.md
- sources/2307_paper_23070643_A_Comprehensive_Overview_of_Large_Language_Models.md
- sources/paper_QARM_V2_Quantitative_Alignment_Multi-Modal_Recommendation.md
- sources/2508_paper_25082090_OneRec-V2_Technical_Report.md
- sources/2604_paper_26040268_MBGR_Multi-Business_Prediction_for_Generative_Recommendatio.md
- sources/paper_ad0dff_QARM_Quantitative_Alignment_Multi-Modal_Recommendation_at_K.md
- sources/2602_paper_26022273_Generative_Recommendation_for_Large-Scale_Advertising.md
- sources/2512_paper_25122238_OxygenREC_An_Instruction-Following_Generative_Framework_for.md
- sources/2606_paper_26061219_LLM-Based_User_Personas_for_Recommendations_at_Scale.md
- sources/2511_paper_25111096_LEMUR_Large_scale_End-to-end_MUltimodal_Recommendation.md
- sources/2512_paper_25121450_RecGPT-V2_Technical_Report.md
- sources/2605_paper_26052533_How_Reliable_Are_Semantic-ID_Tokenizer_Comparisons_in_Genera.md
- sources/2502_paper_25021896_OneRec_Unifying_Retrieve_and_Rank_with_Generative_Recommend.md
- sources/2509_paper_25091809_OnePiece_Bringing_Context_Engineering_and_Reasoning_to_Indu.md
- sources/2205_paper_22050450_PinnerFormer_Sequence_Modeling_for_User_Representation_at_P.md
- sources/2510_paper_25101163_OneRec-Think_In-Text_Reasoning_for_Generative_Recommendatio.md
- sources/2512_paper_25122476_OpenOneRec_Technical_Report.md
- sources/2507_paper_25072287_RecGPT_Technical_Report.md
- sources/2206_paper_22060735_Rethinking_Reinforcement_Learning_for_Recommendation_A_Prom.md
- sources/2408_paper_24080458_FORGE_Force-Guided_Exploration_for_Robust_Contact-Rich_Mani.md
- sources/2311_paper_23110588_Hiformer_Heterogeneous_Feature_Interactions_Learning_with_T.md
- sources/2602_paper_26021001_Kunlun_Establishing_Scaling_Laws_for_Massive-Scale_Recommen.md
- sources/2305_paper_23051953_Multi-Epoch_Learning_for_Deep_Click-Through_Rate_Prediction.md
- sources/paper_8edbf8_HiGR_Efficient_Generative_Slate_Recommendation_via_Hierarch.md
- sources/2602_paper_26020186_GRAB_An_LLM-Inspired_Sequence-First_Click-Through_Rate_Pred.md
- sources/2604_paper_26040497_Tencent_Advertising_Algorithm_Challenge_2025_All-Modality_G.md
- sources/test_generative_rec.md
- sources/2502_paper_25021358_ActionPiece_Contextually_Tokenizing_Action_Sequences_for_Ge.md
- sources/2402_paper_24021715_Actions_Speak_Louder_than_Words_Trillion-Parameter_Sequenti.md
- sources/2203_paper_22031101_DHEN_A_Deep_and_Hierarchical_Ensemble_Network_for_Large-Sca.md
- sources/2510_paper_25102715_A_Survey_on_Generative_Recommendation_Data,_Model,_and_Task.md
- sources/1808_paper_18080978_Self-Attentive_Sequential_Recommendation.md
- sources/2205_paper_22051413_FlashAttention_Fast_and_Memory-Efficient_Exact_Attention_wi.md
- sources/paper_1b102d_QARM_V2_Quantitative_Alignment_Multi-Modal_Recommendation_f.md
- sources/2306_paper_23060812_Better_Generalization_with_Semantic_IDs_A_Case_Study_in_Ran.md
- sources/2510_paper_25102127_Pctx_Tokenizing_Personalized_Context_for_Generative_Recomme.md
- sources/rankmixer_to_oneranker.md
- sources/2006_paper_20060577_Self-Supervised_Reinforcement_Learning_for_Recommender_Syste.md
- sources/2602_paper_26020656_TokenMixer-Large_Scaling_Up_Large_Ranking_Models_in_Industr.md
- sources/2511_paper_25110607_Make_It_Long,_Keep_It_Fast_End-to-End_10k-Sequence_Modeling.md
- sources/2602_paper_26021698_Bending_the_Scaling_Law_Curve_in_Large-Scale_Recommendation.md
- sources/2411_paper_24111881_Unifying_Generative_and_Dense_Retrieval_for_Sequential_Recom.md
- sources/paper_81ec38_PLUM_Adapting_Pre-trained_Language_Models_for_Industrial-sc.md
- sources/2404_paper_24040057_A_Review_of_Modern_Recommender_Systems_Using_Generative_Mode.md
- sources/2511_paper_25111013_GPR_Towards_a_Generative_Pre-trained_One-Model_Paradigm_for.md
- sources/2502_paper_25021647_Unified_Semantic_and_ID_Representation_Learning_for_Deep_Rec.md
- sources/2505_paper_25050442_LONGER_Scaling_Up_Long_Sequence_Modeling_in_Industrial_Reco.md
- sources/2604_paper_26041373_TokenFormer_Unify_the_Multi-Field_and_Sequential_Recommenda.md
- sources/2507_paper_25071555_RankMixer_Scaling_Up_Ranking_Models_in_Industrial_Recommend.md
- sources/paper_2305_05065_Generative_Retrieval_RecSys.md
- sources/2602_paper_26020855_QARM_V2_Quantitative_Alignment_Multi-Modal_Recommendation_f.md
- sources/paper_c33d89_Farewell_to_Item_IDs_Unlocking_the_Scaling_Potential_of_Lar.md
- sources/2504_paper_25041050_PinRec_Outcome-Conditioned,_Multi-Token_Generative_Retrieva.md
"Wiki 是一个持久化、持续累积的产物。交叉引用已经存在。矛盾之处已经被标记。综合内容已经反映了你阅读过的所有内容。"
- 源文档(Raw Sources) — 不可变的输入文档
- Wiki — LLM 生成的、相互链接的 Markdown 文件
- Schema — 给 LLM 的指令(AGENTS.md)
- Ingest(导入) — 添加源文档 → LLM 更新 wiki
- Query(查询) — 提出问题 → LLM 从 wiki 中综合生成答案
- Lint(检查) — 健康检查 → LLM 发现矛盾、空白和孤立页面
- 平台:阿里云百炼(Alibaba Cloud Bailian)
- API 类型:OpenAI 兼容 SDK(同时支持标准密钥和 Coding Plan 密钥)
- Coding Plan 密钥(
sk-sp-*):qwen3.5-plus(默认)、qwen3-coder-plus、kimi-k2.5、glm-5 - 标准密钥(
sk-*):qwen-max(默认)、qwen-plus、qwen-turbo - 自动检测:CLI 会自动检测你的密钥类型并配置正确的端点
# 自动:抓取 → 保存 → 分析 → 更新知识库
python tools/llm_wiki.py fetch "https://arxiv.org/abs/2307.06435"
# 仅保存源文件,不自动分析
python tools/llm_wiki.py fetch "https://example.com/article" --no-ingest- 将源文件放置于
raw/sources/ - 运行:
python tools/llm_wiki.py ingest raw/sources/your_file.md - 审查建议的 wiki 变更
- 确认应用变更
| 变量 | 说明 | 默认值 |
|---|---|---|
DASHSCOPE_API_KEY |
你的百炼 API 密钥 | (必填) |
BAILIAN_MODEL |
主模型名称 | qwen-max |
WIKI_AUTO_CONFIRM |
自动应用 wiki 变更 | false |
本知识库用于研究和教育目的。
- Karpathy 提出的 LLM Wiki 模式
- 阿里云百炼提供的 LLM 基础设施
- LLM4Rec 研究社区