跳转至

Perplexity 发布 pplx-embed-v2-context-9b-preview:兼顾直接答案与支撑证据的上下文向量检索模型

Perplexity Releases pplx-embed-v2-context-9b-preview: A Contextual Embedding Model That Retrieves Answers and Their Supporting Evidence

文章背景与核心概要

在传统的检索增强生成 (Retrieval-Augmented Generation, RAG) 系统中,长文档通常被粗暴地切分成孤立的文本块,检索模型往往只能押注单一的“黄金段落”,极易丢失周围至关重要的上下文信息。针对这一行业痛点,Perplexity 携手 turbopuffer 正式发布了开源上下文向量模型 pplx-embed-v2-context-9b-preview。该模型采用创新的“查询感知上下文压缩教师”训练机制,打破了非黑即白的单段落标注限制,使模型在单次向量检索中就能同时捕获直接答案与支撑证据。在全新基准测试 context-bench 与 ConTEB 上,该模型表现刷新行业上限,不仅在证据召回率上显著超越同类顶尖商业模型,还原生支持 int8 量化与 Matryoshka 灵活降维,在大幅缩减向量存储成本的同时保持极致性能。


核心概要

Summary

Perplexity 研究团队联合 turbopuffer 正式发布了 pplx-embed-v2-context-9b-preview,这是一款专为检索增强生成 (Retrieval-Augmented Generation, RAG) 流程量身定制的先进上下文向量模型。与传统模型依赖割裂孤立的文本块或死守单一“黄金段落 (Gold Passage) ”不同,该模型能够结合整篇文档的全局语境来精准评估每个文本块。通过在训练阶段引入创新的“查询感知上下文压缩教师模型”,它学会了在一次检索中同时找回直接答案以及不可或缺的支撑证据。目前该模型已通过 Hugging Face 以开源 MIT 许可证发布,不仅在多项上下文检索基准测试中斩获顶尖成绩,还原生支持 int8 量化与 Matryoshka 降维技术,在性能突破的同时大幅降低了向量存储开销。

Perplexity Research, in collaboration with turbopuffer, has released pplx-embed-v2-context-9b-preview, an advanced contextual embedding model designed specifically for Retrieval-Augmented Generation (RAG) pipelines. Unlike traditional models that rely on isolated chunks or a single "gold passage," this model evaluates chunks in the full context of the document. Utilizing a novel query-aware context compression teacher during training, the model learns to retrieve both the direct answer and the necessary supporting evidence simultaneously. Released under an open-source MIT license via Hugging Face, it achieves state-of-the-art performance on context retrieval benchmarks while optimizing storage with native int8 quantization and Matryoshka dimensions.


部署方式与获取渠道

Deployment and Availability

  • 获取方式: 采用自托管预览形式,模型权重已按 MIT 开源许可证在 Hugging Face 正式开放。
  • 环境要求: 加载运行需要安装 transformers>=5.4.0,并开启 trust_remote_code=True。
  • API 状态: 暂未上线 Perplexity 官方 API。
  • 特别说明: 官方模型卡片提示,后续模型权重与接口可能会在不保证向后兼容的前提下进行更新调整。
  • Access Type: Self-hosted preview with open weights available on Hugging Face under the MIT license.
  • Requirements: Loading requires transformers>=5.4.0 with trust_remote_code=True.
  • API Status: Not yet available on the Perplexity API.
  • Note: The model card warns that weights and interfaces may change without backward compatibility.

为什么传统的“黄金段落”方案难以满足需求

Why the Traditional "Gold Passage" Approach Falls Short

常规的 RAG 系统在处理长文档时,习惯将长文粗暴地切分成互不相干的独立分块。然而在实际阅读中,单个分块往往严重依赖文档其他位置出现的外部上下文——例如某个人名实体、所属章节标题或关键术语定义。为了化解这一困境,上下文感知模型引入了晚期分块 (late chunking) 技术:先将整篇完整文档进行单次编码,随后再针对每个文本块执行池化处理。

Standard RAG systems split long documents into independent chunks. However, individual chunks frequently rely on external context—such as an entity, heading, or definition—stated elsewhere in the document. Contextual models combat this using late chunking, where the entire document is encoded in a single pass before being pooled per chunk.

然而,传统的训练范式通常存在以下几大硬伤:

Traditional training paradigms typically suffer from several limitations:

  1. 非黑即白的二元局限: 现有数据集针对每个查询通常仅标注唯一的“黄金文本块”,其他所有文本块 (即便包含至关重要的上下文背景句) 都会被武断地视为负样本。
  2. 标注成本居高不下: 依赖大语言模型 (Large Language Model, LLM) 进行数据标注的成本随数据集规模呈线性增长。
  3. 分块策略僵化死板: 标签往往与某种单一且预先固定的分块切分规则强绑定,缺乏泛化适应能力。
  1. Binary Limitations: Datasets usually mark only one "gold chunk" per query, treating all other chunks (including vital contextual sentences) as negatives.
  2. Annotation Costs: LLM annotation costs scale linearly with dataset size.
  3. Rigid Labels: Labels are strictly tied to a single, predetermined chunking strategy.

训练机制深度剖析

How the Training Works

该模型的训练架构摒弃了生硬的二元标签,转而采用一个查询感知上下文压缩模型充当教师模型 (Teacher) 。该教师模型会对用户的查询与整篇文档进行联合分析,并为其中的每一个 Token 进行打分:

The training architecture replaces hard binary labels with a query-aware context compression model acting as a teacher. The teacher analyzes the query and document jointly to score every token:

  • 文本块相关性: 通过计算每个文本块内得分排名前 \(n\) (top-\(n\)) 的 Token 平均分来确定相关度。
  • 软目标概率分布: 在正样本相关文档内的所有文本块上,应用带温度调节的 Softmax 概率分布 (同时对完全无关文档中的文本块直接赋零分) 。
  • 蒸馏损失: 通过计算教师模型与学生模型分布之间的前向 KL 散度 (Forward KL Divergence) 进行匹配拟合。
  • 文档级损失: 借鉴了 ColBERT 的 MaxSim 机制,引入 InfoNCE 损失函数,以文档中表现最佳的文本块得分作为整个文档的代表分。
  • Chunk Relevance: Determined by calculating the mean of the top-\(n\) token scores inside each chunk.
  • Soft Target: Uses a temperature-scaled softmax distribution over chunks within the positive document (while assigning zero to chunks in irrelevant documents).
  • Distillation Loss: Calculated using forward KL divergence matching between the teacher and student distributions.
  • Document Loss: Inspired by ColBERT’s MaxSim, utilizing an InfoNCE loss where a document's score is represented by its best-performing chunk.

在训练过程中,批次会动态随机采样多样化的分块切分策略。不同的文本块通过一个专门学习得到的 <|chunk_sep|> 特殊 Token 进行分隔,随后执行均值池化 (Mean-Pooling) 。由于教师模型仅在训练阶段发挥作用,因此在实际部署推理时完全不会带来额外的延迟或存储开销。

During training, batches dynamically sample random chunking strategies. Chunks are separated by a learned <|chunk_sep|> token and mean-pooled. Because the teacher is only active during training, inference incurs zero added latency or storage overhead.

该模型的底层架构脱胎于团队自研的 9B 参数规模 ColBERT 检索模型,并通过线性投影层输出 2048 维向量表示;结合套娃表征学习 (Matryoshka Training) ,模型原生支持截断至 1024 维并搭配 int8 原生量化。最终发布的模型则是一份精心调配的模型融合套件 (Model Soup) ,集成了基于 50 多种语言、约 430 个数据集训练得出的多个检查点 (Checkpoints) 。

The architecture originates from an in-house 9B ColBERT retrieval model using a linear projection to output 2048 dimensions, with Matryoshka training supporting 1024-dimensional truncation and native int8 quantization. The final release is a model soup combining multiple checkpoints trained across roughly 430 datasets in over 50 languages.


全新评估基准:context-bench

context-bench: A New Evaluation Benchmark

为了严防评测数据受到污染,turbopuffer 专门闭门打造并持有私有基准测试集 context-bench。该基准覆盖 21 个垂直领域,包含 38,894 篇长文档以及 2,099 个真实评测查询:

Developed and held privately by turbopuffer to prevent data contamination, context-bench evaluates models across 2,099 queries spanning 38,894 documents across 21 domains.

  • 按照句子级别分块后,共切分衍生出 2,458,072 个独立文本块。
  • 目标文档的长度中位数约为 6,100 个 Token。
  • 测试查询严谨考察了 12 种截然不同的上下文理解能力,从代词指代消歧一路涵盖到复杂的表格结构解析。
  • Sentence chunking generates 2,458,072 individual chunks.
  • The median target document length is roughly 6,100 tokens.
  • Queries rigorously test 12 distinct contextual capabilities, ranging from pronoun resolution to complex table structures.

评测指标包含 Document@K、Answer@K、Evidence Recall@K 以及 All-Evidence@K,测试过程独立于特定的索引配置,直接针对全部文本块进行穷举评估。

Metrics include Document@K, Answer@K, Evidence Recall@K, and All-Evidence@K, evaluated exhaustively against all chunks independently of index configurations.


评测战报与核心性能亮点

Results & Performance Highlights

  • context-bench 在 \(K = 10\) 下的表现: 答案召回率达到 45.5%,证据召回率达到 40.6%,全证据召回率达到 31.1%。
  • 文档级召回率: 在 \(K = 1\) 时为 15.2%,在 \(K = 10\) 时高达 61.6%。
  • 竞品正面对决: 在 \(K = 10\) 的测试中,答案召回率超越 voyage-context-4 达 14.4 个百分点,证据召回率领先 5.0 个百分点。
  • ConTEB 基准表现: 在所有参评模型中斩获最高的平均 nDCG@10 评分。
  • 极致存储效率: 1024 维 int8 配置 (单个向量仅占 1 KB 存储) 的性能表现甚至微弱超越了占用 2048 维 float32 (单向量 8 KB) 的 voyage-context-4。
  • 对分块大小的鲁棒性: 当切分文本块的大小从 64 个 Token 扩展到 512 个 Token 时,模型的平均得分仅从 81.0% 轻微波动至 79.9%,表现出极高的稳定性。
  • context-bench at \(K = 10\): 45.5% answer recall, 40.6% evidence recall, and 31.1% all-evidence recall.
  • Document Recall: 15.2% at \(K = 1\) and 61.6% at \(K = 10\).
  • Versus Competitors: Outperforms voyage-context-4 by 14.4 points on answer recall and 5.0 points on evidence recall at \(K = 10\).
  • ConTEB: Achieves the highest average nDCG@10 among evaluated models.
  • Storage Efficiency: A 1024-dim int8 configuration (1 KB per vector) slightly outperforms voyage-context-4 at 2048-dim float32 (8 KB).
  • Chunk Size Robustness: Average scores shift mildly from 81.0% to 79.9% as chunk sizes range from 64 to 512 tokens.

主流竞品横向技术对比

Comparison with Closest Competitors

特性对比 pplx-embed-v2-context-9b-preview voyage-context-4 pplx-embed-context-v1-4B Nemotron-3-Embed-8B
分块向量表征 上下文感知 (Contextual) 上下文感知 (Contextual) 上下文感知 (Contextual) 单独切块编码 (Independent)
获取方式 开源权重,遵循 MIT 许可证 托管 API (Voyage, MongoDB Atlas) 开源权重,MIT 许可证;Perplexity API 开源权重,遵循 OpenMDW-1.1 协议
参数量 官方博文标注为 9B (Hugging Face 标注为 8B) 未公开 (MoE 混合专家架构底座) 4B 约 8B
向量维度 2048, 1024 2048, 1024, 512, 256 2560 (支持 Matryoshka 降维) 4096 (支持切片)
量化输出 原生 int8 int8, uint8, binary, ubinary int8, binary Float (浮点)
上下文窗口 评测最高支持至 32,768 个 Token 单次请求 32K;搭配自动切块可达 120K 32K 32,768
自动分块 (Auto-chunking) 否 是 否 否
价格资费 自托管 (免费开源) 每百万 Token 收费 $0.12 (前 2 亿 Token 免费) 自托管或通过 API 调用 自托管 (免费开源)

(数据来源:Voyage 官方文档,以及截至 2026 年 9 月 30 日上述各模型卡片信息)。

(Sources: Voyage docs, linked model cards as of September 30, 2026).


核心技术要点总结

Key Takeaways

  • Token 级教师机制的革新: 成功摆脱了传统单一“黄金文本块”强标签的僵化约束。
  • 答案与证据兼收并蓄: 模型能够在统一的分块索引空间内,高效同步检索出直接答案与不可或缺的支撑证据。
  • 基准测试性能卓越: 在 context-bench 的 Answer@10 评测中达到 45.5% 的高召回率,相比同类竞品 voyage-context-4 大幅领先 14.4 个百分点。
  • 开源可用与生态进展: 基于 MIT 许可证的开源模型权重现已全量开放下载,Perplexity 官方 API 接口集成则将在后续推出。
  • A token-level teacher mechanism successfully replaces restrictive single gold-chunk labels.
  • The model efficiently retrieves direct answers alongside necessary supporting evidence inside a unified chunk index.
  • context-bench Answer@10 reaches 45.5%, outperforming voyage-context-4 by 14.4 points.
  • Open MIT weights are available immediately, while official Perplexity API integration remains pending.

欢迎深入阅读官方技术博客长文探索完整技术实现细节,并前往获取开源模型权重。

Explore the complete technical details and access the model weights.