Architecture Anti-Patterns(架构反模式)
知识库位置:
FDE Knowledge Base/04 Architecture/04-Architecture-Anti-Patterns.md术语不确定时,请查阅 Glossary(中英文术语表)。
Anti-Pattern(反模式):看起来合理、在实践中反复导致失败的做法。
Anti-pattern 1:LLM Everywhere(到处都是 LLM)
Section titled “Anti-pattern 1:LLM Everywhere(到处都是 LLM)”把所有问题都交给模型。
错误:
Business Rule(业务规则)→ LLM
Permission(权限)→ LLM
Exact Calculation(精确计算)→ LLM更合理:
Rules → Code(规则 → 代码)Permission → Policy(权限 → 策略层)Calculation → Deterministic Logic(计算 → 确定性逻辑)Language / Ambiguity → LLM(语言 / 模糊性 → LLM)Anti-pattern 2:Agent for Everything(一切都用智能体)
Section titled “Anti-pattern 2:Agent for Everything(一切都用智能体)”所有 Workflow(工作流)都改成 Agent(智能体)。
风险:
- 不稳定
- 难测试
- 成本高
- 难审计
Anti-pattern 3:RAG as Database(把 RAG 当数据库)
Section titled “Anti-pattern 3:RAG as Database(把 RAG 当数据库)”将结构化实时数据全部做 Embedding(向量化)。
风险:
- 数据过期
- 查询不精确
- 难保证一致性
Anti-pattern 4:No Human Escalation(没有转人工机制)
Section titled “Anti-pattern 4:No Human Escalation(没有转人工机制)”系统无法处理时没有清晰 Fallback(降级备选)。
Anti-pattern 5:Security After Prototype(安全放在原型之后)
Section titled “Anti-pattern 5:Security After Prototype(安全放在原型之后)”等到上线前才考虑:
- Auth(Authentication,身份认证)
- Permission(授权)
- Audit(审计)
通常会导致架构返工。
Anti-pattern 6:Architecture for Hypothetical Scale(为假想规模设计架构)
Section titled “Anti-pattern 6:Architecture for Hypothetical Scale(为假想规模设计架构)”当前 100 个用户,却按照未来 1 亿用户做复杂分布式架构。
原则:
Design for expected scale, preserve an evolution path.
(按预期规模设计,保留演进路径。)