Update nexus: fix conflicts and sync local changes
This commit is contained in:
@@ -1,32 +1,32 @@
|
||||
---
|
||||
title: "Context Window"
|
||||
type: concept
|
||||
tags: [llm, context-window, token, embedding, rag]
|
||||
last_updated: 2025-01-16
|
||||
---
|
||||
|
||||
## Definition
|
||||
Context Window(上下文窗口)是 LLM 或 Embedding Model 一次性处理的最大 token 数量。超过该限制的内容无法被模型感知,必须切分或截断。
|
||||
|
||||
## Key Numbers
|
||||
- **Embedding Model**:通常 512~8192 token(如 BAAI/bge 系列)
|
||||
- **LLM**:差异极大,从 4K(GPT-3.5)到 200K+(Claude 3)不等
|
||||
|
||||
## Practical Impact
|
||||
### 对 Embedding Model
|
||||
- 决定单次可 Embedding 的最大文本长度
|
||||
- 超过则需 Split(切分文档)
|
||||
|
||||
### 对 LLM(Generation 阶段)
|
||||
- 决定用户问题 + 检索上下文 + 系统 Prompt 的总 token 预算
|
||||
- 超过则需截断(可能丢失关键信息)
|
||||
|
||||
## Token Estimation
|
||||
- **英文**:1 token ≈ 3~4 个字母
|
||||
- **中文**:1 token ≈ 1 个汉字
|
||||
|
||||
## Related Concepts
|
||||
- [[Split]] — 文档需要切分以满足 Context Window 约束
|
||||
- [[Embedding]] — Embedding Model 的 Context Window 限制
|
||||
- [[Token]] — Context Window 的计量单位
|
||||
- [[Generation]] — LLM 的 Context Window 决定最终可输入的上下文量
|
||||
---
|
||||
title: "Context Window"
|
||||
type: concept
|
||||
tags: [llm, context-window, token, embedding, rag]
|
||||
last_updated: 2025-01-16
|
||||
---
|
||||
|
||||
## Definition
|
||||
Context Window(上下文窗口)是 LLM 或 Embedding Model 一次性处理的最大 token 数量。超过该限制的内容无法被模型感知,必须切分或截断。
|
||||
|
||||
## Key Numbers
|
||||
- **Embedding Model**:通常 512~8192 token(如 BAAI/bge 系列)
|
||||
- **LLM**:差异极大,从 4K(GPT-3.5)到 200K+(Claude 3)不等
|
||||
|
||||
## Practical Impact
|
||||
### 对 Embedding Model
|
||||
- 决定单次可 Embedding 的最大文本长度
|
||||
- 超过则需 Split(切分文档)
|
||||
|
||||
### 对 LLM(Generation 阶段)
|
||||
- 决定用户问题 + 检索上下文 + 系统 Prompt 的总 token 预算
|
||||
- 超过则需截断(可能丢失关键信息)
|
||||
|
||||
## Token Estimation
|
||||
- **英文**:1 token ≈ 3~4 个字母
|
||||
- **中文**:1 token ≈ 1 个汉字
|
||||
|
||||
## Related Concepts
|
||||
- [[Split]] — 文档需要切分以满足 Context Window 约束
|
||||
- [[Embedding]] — Embedding Model 的 Context Window 限制
|
||||
- [[Token]] — Context Window 的计量单位
|
||||
- [[Generation]] — LLM 的 Context Window 决定最终可输入的上下文量
|
||||
|
||||
Reference in New Issue
Block a user