# 警告：使用来自版本1.0.0的缓存嵌入，但当前模型为版本2.0.0。嵌入可能已过时。

- **ID:** `llm/llm-caching-stale-embedding`
- **领域:** llm
- **类别:** runtime_error
- **验证级别:** ai_generated
- **修复率:** 85%

## 根因

模型更新后，来自旧版本的嵌入缓存被重用，导致维度或语义漂移。

## 版本兼容性

| 版本 | 状态 | 引入 | 弃用 |
|------|------|------|------|
| langchain 0.1.10 | active | — | — |
| langchain 0.1.11 | active | — | — |
| chromadb 0.4.22 | active | — | — |

## 解决方案

1. ```
   Clear embedding cache and re-index: chroma_collection.delete(where={}); then re-embed all documents with new model version
   ```
2. ```
   Pin embedding model version in config: EMBEDDING_MODEL = 'text-embedding-3-small@v1' (if version pinning is supported)
   ```

## 无效尝试

- **Ignoring warning and continuing to use cache** — Stale embeddings cause retrieval failures or inaccurate results, leading to silent data issues. (95% 失败率)
- **Disabling caching entirely** — Increases latency and API costs without solving root cause of version mismatch. (70% 失败率)
