20260514:增加新内容

This commit is contained in:
2026-05-14 13:54:52 +08:00
parent 56c4d3ef7c
commit b116710e4c
294 changed files with 10682 additions and 255 deletions

View File

@@ -0,0 +1,34 @@
---
title: "Ramsey Context Cache拉姆齐上下文缓存"
created: 2026-05-11
updated: 2026-05-11
type: concept
tags: [agent-architecture, caching, context-design]
sources: [[ramsey-context-construction]]
---
# Ramsey Context Cache拉姆齐上下文缓存
## 定义
拉姆齐上下文缓存是基于 [[ramsey-context-graph|拉姆齐上下文图]] 的三层缓存架构,利用 [[ramsey-theory|拉姆齐理论]] 的存在性保证实现 O(1) 上下文命中。
## 三层机制
| 层级 | 职责 | 触发条件 |
|------|------|----------|
| **缓存池维护** | 动态计算节点间的红/蓝边 | 节点增删事件 |
| **必然团监控器** | 追踪最大蓝色团大小,确保 ≥ t_target | 周期性 / 团大小跌破阈值 |
| **上下文命中** | 从预计算蓝色团直接输出上下文骨架 | 每次请求 |
## 安全边界
- R(3,3) = 6维持 6 个原子 → 保证存在可用 3-节点团
- R(4,4) = 18维持 18 个原子 → 保证存在可用 4-节点团
- 缓存大小维持在略大于 R(t_target, m_max) 的水平
## 相关概念
- [[ramsey-context-graph|拉姆齐上下文图]]
- [[context-blue-clique|上下文蓝色团]]
- [[prompt-caching|Prompt Caching]]