code-review-context
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseCodex maintains a context (history of messages) that is sent to the model in inference requests.
- No history rewrite - the context must be built up incrementally.
- Avoid frequent changes to context that cause cache misses.
- No unbounded items - everything injected in the model context must have a bounded size and a hard cap.
- No items larger than 10K tokens.
- Highlight new individual items that can cross >1k tokens as P0. These need an additional manual review.
- All injected fragments must be defined as structs in and implement ContextualUserFragment trait
core/context
Codex 维护一个上下文(消息历史记录),在推理请求中发送给模型。
- 不重写历史记录 - 上下文必须逐步构建。
- 避免频繁修改上下文导致缓存未命中。
- 无无界项 - 注入模型上下文的所有内容必须有固定大小和硬上限。
- 没有超过10K tokens的项。
- 将超过1k tokens的新单个项标记为P0优先级。这些需要额外的人工审核。
- 所有注入的片段必须在中定义为structs,并实现ContextualUserFragment trait
core/context