--- title: "Indexing" type: concept tags: [RAG, 索引, 数据处理] --- ## Definition Indexing是将外部文档切分并建立索引的过程,是RAG的第一阶段。 ## Core Mechanism 1. 文档加载(Load) 2. 文档切分(Split):按段落、句子或Token切分 3. 向量化(Embed):通过Embedding Model转为向量 4. 存储(Store):存入Vector Store ## Key Properties - 切分策略影响检索质量 - 受Context Window限制 - 需要平衡粒度 ## Connections - [[RAG]] ← 阶段1 ← [[Indexing]] - [[Retrieval]] ← 下游 ← [[Indexing]] - [[Embedding Vector]] ← 输出 ← [[Indexing]] - [[Vector Store]] ← 目标 ← [[Indexing]]