llm-app-patterns
它能做什么
这份指南可以帮你规划和构建使用人工智能(AI)的应用,比如聊天机器人或虚拟助手。它会告诉你如何将 AI 与其他工具和数据连接起来,并确保一切安全、正确地运行。
适用场景
- ✓在规划 AI 应用的工作方式时。
- ✓当你希望 AI 借助外部信息来回答问题时。
- ✓当你要构建一个能使用工具(比如计算器或网页搜索)的 AI 助手时。
技能链接
https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/llm-app-patterns/SKILL.md复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。
使用方法
最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。
可直接粘贴的消息
适用于 Claude Code、Codex 或 Cursor:在项目文件夹中运行,即可安装该技能。
下载 SKILL.md,放进智能体的技能文件夹。
可以这样问 AI
“我该如何组织 AI 应用的各个部分,让它能够安全地使用外部数据和工具?”
每周 5 个新技能,1 分钟读完。
工作原理
它会提供路线图和示例,帮你连接 AI 应用的各个组成部分。你需要定义 AI 可以使用哪些数据和工具,以及它应当如何表现,以确保安全和准确。
技术内容(原始 SKILL.md)
作者在 GitHub 上的英文原文。
🤖 LLM Application Patterns
Architecture and integration sketches for LLM applications, with explicit retrieval, tool, privacy and verification boundaries.
Detailed Guide
Read the detailed guide before executing this skill. It retains the complete procedure and reference material. Treat its safety, prerequisites, and validation requirements as mandatory. For focused work, load the relevant sections; for end-to-end work, read the guide completely.
When to Use This Skill
Use this skill when:
- Designing LLM-powered applications
- Implementing RAG (Retrieval-Augmented Generation)
- Building AI agents with tools
- Setting up LLMOps monitoring
- Choosing between agent architectures
Inputs, worked example and verification
Record provider/SDK versions, authorized data and tools, request/response schemas, latency/cost budgets and the expected task outcome. All code above is an integration sketch: llm, database, parser and provider-response adapters are project-owned and must be implemented explicitly. Never execute model-provided Python, expressions or fuzzy tool names; dispatch only exact registered tools after schema and authorization checks. Enforce per-call deadlines as well as loop limits.
Example: a planner first queues steps A and B, then after A replaces the remaining work with C. The executor must run A then C, never stale B. A parser step must apply the parser to the actual prior output. Two tenants with the same prompt must produce different cache keys, and cache reads/writes require an explicit reuse policy. These are concrete regression assertions; successful mocks still do not prove live provider behavior.
The limiter sketch is single-threaded and process-local. A distributed deployment needs a shared atomic limit and deadlines. Retry only retry-safe operations, honoring provider retry guidance; a timeout after a side effect is not evidence that nothing happened. See Tenacity retry predicates.
Limitations
- A retrieved source list does not prove each answer claim is supported; verify claim-to-source evidence and abstention behavior.
- Prompt text and JSON-shaped output are not authorization boundaries. Enforce permissions in the application.
- Provider failover can change output quality, tool schemas, cost and data residency; only use pre-approved compatible fallbacks.
- Caching must respect tenant access, data/prompt revisions and deletion policy; temperature zero does not make output deterministic.
- Model/SDK examples are not a complete service, benchmark or production-readiness certificate.
常见问题
什么是 RAG?
RAG(检索增强生成)是一种让 AI 利用外部信息(比如文档或数据库)给出更准确、更新的回答的技术。
什么是“带工具的智能体”?
这是一类可以调用外部工具(比如进行计算、搜索网页等)来完成更复杂任务的 AI 系统。
为什么要关注安全和边界?
为 AI 可以访问和执行的内容设定清晰的边界非常重要。这样可以防止它获取不当信息或执行不需要的操作,从而确保数据和工具的安全使用。
详情
作者的原始描述
Architecture and integration sketches for LLM applications, with explicit retrieval, tool, privacy and verification boundaries.
热度
- GitHub 星标
- 48k
- 排名
- #5076
- 许可证
- MIT
- 更新时间
- 2026/10/15
评论
- …
同一仓库的更多技能
00-andruia-consultant
48k帮你的智能体启动或改进 AI 项目。它可以分析代码、推荐工具,并用西班牙语制定行动计划。
007
48k让你的智能体执行安全审计和威胁建模。它有助于保护项目免受攻击和漏洞的威胁。
10-andruia-skill-smith
48k帮你的智能体创建或改进 AI 工具。它可以定义工具的工作方式、编写文档,并验证其结构。
20-andruia-niche-intelligence
48k让你的智能体创建某个特定行业的摘要。它有助于借助可靠的信息来源,了解项目的背景、规则、使用模式和风险。