应用 · 编辑精选
生产级 AI 对话应用提示词
构建包含流式响应、工具调用、文件、引用、历史记录和完整错误状态的多模型助手。
编辑审核 · Vibe Coding ·
适用场景
适合需要真正可用、可控的 AI 助手,而不是聊天界面演示。
可复制的完整构建指令
为 [AUDIENCE] 构建 AI 对话应用,帮助其完成 [PRIMARY JOB],统一接入 [MODEL PROVIDERS]。先定义最小完整流程。 功能与实现要求: 1. 对话列表支持新建、重命名、搜索、置顶、归档和确认后删除。 2. 消息支持流式生成、停止、重试、编辑后重发、复制及从某条消息分支。 3. 输入区支持多行、文件、拖拽、模型选择和三个切合场景的开场提示。 4. 明确区分 Markdown、代码、表格、引用、附件、工具调用和可恢复错误。 5. 显示工具要接收的数据与执行状态;写入、购买、发布、发邮件或删除前必须取得明确批准。 6. 对话存储在本地或 [DATA LAYER],模型密钥仅在服务端,发送失败后保留草稿与附件。 7. 不编造模型性能数据;按 [VISUAL DIRECTION] 优化长文阅读和移动端输入。 模型切换器用通俗语言解释速度、能力与费用。工具请求显示传入数据、状态和结果,事实引文可打开并与模型解读区分;在相应操作旁解释隐私、保留和服务商边界。覆盖上传、限流、离线、上下文超限、工具失败和恢复。验证附件、引用、审批、停止与失败,以及屏幕阅读器、焦点、减少动效和窄屏。 使用前替换的项目资料: [AUDIENCE], [PRIMARY JOB], [MODEL PROVIDERS], [DATA LAYER], [VISUAL DIRECTION]. 优先适配移动端,使用语义化结构、清晰标签和可见的键盘焦点。使用真实内容,或明确标注演示数据。为关键流程提供加载、空数据、错误和成功状态。只有界面而没有真实后端时,不得声称集成已经完成。交付前列出尚需接入的服务,并亲自验证核心流程。 验收标准: - 事实引用可打开,且与模型解释区分。 - 敏感工具必须等待用户批准。 - 已验证停止生成、附件上传与失败恢复。
查看完整英文参考模板
Build a production-minded AI chat application for [AUDIENCE] that helps them [PRIMARY JOB]. Use [MODEL PROVIDERS] behind one clear product experience.
Start by defining the smallest useful end-to-end workflow, then implement it with realistic sample data and working interactions.
Core experience:
- A responsive thread list with new chat, rename, search, pin, archive, and delete-with-confirmation.
- A conversation view with token-by-token streaming, stop generation, regenerate, edit-and-resend, copy, and branch from a message.
- A composer with multiline input, file attachments, drag and drop, model selection, and three context-aware starter prompts.
- Distinct rendering for markdown, code, tables, citations, uploaded files, tool calls, and recoverable errors.
- A model switcher that explains speed, capability, and cost in plain language without inventing benchmarks.
Trust and control:
- Show when a tool is requested, what data it receives, its current state, and its result.
- Require explicit approval before any tool that writes, purchases, publishes, emails, or deletes.
- Separate cited facts from model interpretation and let users open every source.
- Make privacy, retention, and model-provider boundaries visible near the relevant action.
Product states:
- First use, empty history, uploading, streaming, stopped, rate limited, offline, tool failure, context limit, and successful recovery.
- Persist conversations locally or with [DATA LAYER], and never expose provider keys in client code.
- Preserve the draft and attachments after a failed send.
Visual direction: [VISUAL DIRECTION]. Optimize for long reading sessions, keyboard use, mobile composing, and clear hierarchy. Avoid decorative AI gradients, glowing orbs, and unexplained magic-sparkle icons.
Before finishing, test a normal answer, a cited answer, an attachment, a tool requiring approval, a stopped generation, and a failed request. Verify accessible names, focus order, reduced motion, and narrow-screen behavior.使用步骤
选择最接近的目标
按页面类型和用户流程选择模板。
替换变量
填入真实受众、产品目标、内容、视觉方向和技术限制。
发送前编辑
删去首版不需要的功能,解决要求之间的冲突。
测试并迭代
逐项验证移动端、无障碍、交互、数据一致性和异常状态。
预期成果
一个来源、权限与错误恢复透明的 AI 对话应用。
为什么这样设计
- 以实际聊天工作流组织需求
- 引文、工具审批和数据隔离是功能
- 定义断流、超时、重试和恢复
验收标准
- 事实引用可打开,且与模型解释区分。
- 敏感工具必须等待用户批准。
- 已验证停止生成、附件上传与失败恢复。
使用前替换的项目资料
[AUDIENCE]- 独立研究者
[PRIMARY JOB]- 将多份资料整理成带引文的简报
[MODEL PROVIDERS]- OpenAI、Anthropic 和 Google
[DATA LAYER]- 启用用户级访问控制的 Postgres
[VISUAL DIRECTION]- 高密度且易读的编辑工作区
资料来源与审核依据
下列资料用于核对方法和技术要求;提示词由本站独立编写。