RAG应用中Prompt模板设计技巧

1.基础知识

2.Prompt模板标准结构

复制代码
# Role: {角色定义}

## Context
以下是检索到的相关资料:
{retrieved_documents}

## User Question
{user_question}

## Instructions
1. 只能基于上述资料回答,不要使用任何外部知识
2. 如果资料中找不到答案,回复"根据现有资料无法回答该问题"
3. 回答中需要标注引用来源

## Output Format
- 回答:
- 引用:

3.防止幻觉的技巧

4.不同业务场景下Prompt要有差异

5.工程化落地的坑

https://developers.openai.com/api/docs/guides/prompt-engineering?api-mode=responses

平台介绍 - 智谱AI开放文档

6.追问

相关推荐
Rocky Ding*2 小时前
GPT-6.1 Sol大模型深度解析
论文阅读·人工智能·深度学习·机器学习·aigc·ai-native·gpt-6.1 sol
c萱2 小时前
AI产品经理——01基础认知篇
设计模式·prompt·aigc·产品经理·ai编程·gitcode·ai-native
XUHUOJUN3 小时前
AI-Native Software Engineering:氛围编程的工程化与 Software Change Management
人工智能·ai-native
“AI国潮设计-小江”3 小时前
Python实战 | SDXL批量生成“潮汕英歌舞”国潮甜品IP,附核心Prompt与商用授权思路
开发语言·人工智能·python·prompt·aigc
“AI国潮设计-小江”3 小时前
Python实战 | SDXL批量生成“带炸英歌”国潮IP:从海报到门店落地(附核心Prompt与授权思路)
开发语言·人工智能·python·prompt·aigc
小小测试开发17 小时前
Prompt评估:加一句「请一步步思考」,结构化输出的解析失败率从 2% 涨到 17%
人工智能·prompt
utmhikari19 小时前
【AI原生】借助AI之力优化个人博客前端样式
前端·css·hexo·next·个人博客·ai-native·vibe coding
Blockbuater_drug20 小时前
智能原生(AI Native)与智能体原生(Agent Native):概念与体例
ai-native·智能原生·agent native·agent harness·智能体原生·agent enable
正经教主21 小时前
【FDE系列】阶段3:Day 58:Prompt 安全 — 注入、越狱与防护
网络·人工智能·安全·prompt·fde