{{ theme.skipToContentLabel || 'Skip to content' }}

prompt-atlas

A curated, versioned, searchable library of production-grade prompts for LLM trainers, AI product managers, prompt engineers, RLHF / SFT data teams, model evaluation teams, and AI application builders.

一个精选、带版本、可检索的生产级 Prompt 库,面向 LLM trainer、AI 产品 经理、Prompt 工程师、RLHF / SFT 数据团队、模型评估团队、AI 应用开发者。

🌐 Live site / 在线站点: huck012428-lab.github.io/prompt-atlas — searchable, sidebar navigation, copy-button on every prompt block. 网页版含全站搜索、侧边栏导航、prompt 一键复制。

This is not a "awesome prompts" snippet collection. Every entry is a Prompt Card: a reusable work asset with metadata, variables, examples, documented failure modes, and tuning notes.

不是 awesome-prompts 式的素材合集。每一个条目都是一张 Prompt Card:带元数据、变量、示例、失败模式、调优笔记的可复用工作资产。

Why this exists / 为什么做这个

Production prompt work has the same problems as any other engineering discipline: people rewrite the same prompts from scratch, lose track of what works on which model, and discover failure modes the third time they ship them. Treating prompts as cards — with schema, examples, and documented failure modes — makes them reusable across teams and over time.

生产环境的 Prompt 工作和任何工程学科一样会踩同样的坑:每次都从零写、 记不清哪条 prompt 在哪个模型上稳、上线第三次才发现固定的失败模式。把 prompt 当作"卡片"——有 schema、有示例、有失败模式记录——它们才能在 团队之间和时间线上被真正复用。

What's inside / 库里有什么

Cards are organised by direction:

卡片按技术方向组织:

Direction / 方向Examples / 内容举例
RAGRetrieval scoring, multi-hop eval synthesis, query rewriting, HyDE, citation faithfulness, answer grounding
检索打分、多跳评测题合成、query 改写、HyDE、citation 忠实度、答案扎根性
AgentReAct planners with strict tool-call schemas
带严格 tool-call schema 的 ReAct planner
RLHFPairwise preference labelers across HHH dimensions
HHH 三维度的 pairwise 偏好标注器
SFTInstruction-set augmentation from seed examples
从种子样本扩展 SFT 指令集
MultimodalVLM caption verification against actual images
VLM caption 与图像内容核对
CoTStructured reasoning with rationale summaries
结构化推理 + rationale 摘要
EvalLLM-as-judge rubrics for open-ended outputs
开放式输出的 LLM-as-judge rubric
CodeCode review checklist, test generation, code explanation, refactor suggestions, code-eval judge
结构化 code review、测试生成、代码解释、重构建议、代码评估

The complete catalog lives in INDEX.md (auto-generated).

完整目录见 INDEX.md(自动生成)。

I want to... / 我想做...

Maps a goal to the card to use. New here? See docs/QUICKSTART.md for a 5-minute walkthrough.

第一次用?看 docs/QUICKSTART.md — 5 分钟从零到能用一张卡。

Evaluate / score AI outputs · 评估和打分

Goal · 我想做Card · 用这张卡
Score one AI output on factuality / coherence / completeness · 给单个 AI 输出按多维度打分eval/llm-judge-rubric-open-ended
Compare a model output against a gold answer · 用 gold 答案对照打分eval/reference-based-judge
Decompose an output into atomic claims and fact-check each · 把答案拆成原子事实逐条核查eval/per-claim-factuality-judge
Score one output on custom dimensions with confidence · 自定义维度打分 + 置信度eval/pointwise-quality-scorer
Classify an AI output for safety harms · 输出安全分类(allow/review/block)eval/safety-output-classifier
Pick the best of N AI responses · 从 N 个回答里选最好的rlhf/best-of-n-selector
Label A vs B preference (HHH) · 给 A/B 两个回答打偏好标签rlhf/pairwise-preference-labeler
Pairwise judge with position-bias detection (two-call protocol) · 带位置偏置检测的 pairwise judge(双向调用)eval/pairwise-judge-with-position-bias-probe
Judge a multi-turn dialogue (per-turn + conversation-level) · 多轮对话评估eval/multi-turn-dialogue-judge
Generate a domain-specific rubric with level anchors · 给具体任务自动生成定制化评分 rubriceval/rubric-generator
Compare baseline vs candidate outputs and detect regressions · 检测候选版本是否退步eval/regression-detector
Diagnose LLM judge biases (length / position / format) · 诊断 LLM judge 自身偏见eval/judge-bias-probe
Check confidence calibration (predicted vs actual accuracy) · 检查置信度是否校准eval/calibration-checker
Bootstrap a small human eval study (rubric + calibration + analysis) · 设计小规模 human eval 研究eval/human-eval-bootstrap
Build a multi-benchmark leaderboard with weighting · 多 benchmark 加权 leaderboardeval/leaderboard-builder
Diagnose refusal calibration (over / under / correct) · 诊断模型拒绝是否校准rlhf/refusal-calibration-probe
Generate iterative DPO pairs targeting a specific principle · 按原则生成 DPO 偏好对rlhf/iterative-dpo-pair-generator
Score whether a response matches a defined persona / brand voice · 评估回答是否符合人设rlhf/persona-consistency-judge
Detect over-cautious vs unsafe-helpful (HHH tradeoff scoring) · 诊断 helpful 和 harmless 之间的失衡rlhf/helpfulness-vs-harmlessness-tradeoff
Pairwise preference for long-form (long input + long output) · 长输入长输出的 pairwise 偏好rlhf/long-context-preference-labeler
Analyze SFT dataset coverage by topic / skill · 分析 SFT 数据集覆盖度,找 gapsft/data-coverage-analyzer
Classify instruction difficulty for a target model class · 按目标模型类别给指令打难度sft/instruction-difficulty-classifier
Generate response in a defined persona with strictness control · 按人设生成回答(带严格度控制)sft/persona-controlled-response
Rewrite text in a target style (formal / casual / specific voice) · 文本改写为目标风格sft/style-transfer

RAG · 检索增强

Goal · 我想做Card · 用这张卡
Score whether a retrieved passage is relevant to a query · 评估 passage 与 query 的相关性rag/retrieval-relevance-evaluator
Build multi-hop QA eval questions · 合成多跳评测题rag/multihop-eval-synthesizer
Decompose / rewrite a query for retrieval · query 改写或拆解rag/query-rewriting-decomposition
Generate hypothetical answer for HyDE retrieval · HyDE 假答生成rag/hyde-hypothetical-answer-generator
Audit whether a citation actually supports a claim · 审计 citation 是否真的支持 claimrag/citation-faithfulness-scorer
Detect hallucinations in a RAG answer · 检测 RAG 答案的幻觉rag/answer-grounding-checker
Summarize a long document chunk for retrieval indexing · 给长文档块产 search-friendly summaryrag/chunk-summarizer-for-retrieval
Compress retrieved passages into a smaller question-tailored context · 把检索结果压缩成针对问题的小上下文rag/context-compression
Resolve a chat follow-up into a standalone retrieval query · 多轮 RAG 的代词消解器rag/conversational-query-resolver
Synthesize an answer from multiple sources, surfacing conflicts · 多源综合答案 + 冲突识别rag/multi-source-aggregator
Build structured output (table / list / record) from RAG sources · RAG 结构化输出(表/列表/字段记录)rag/structured-rag-output-builder
Fuse multiple sub-query retrieval results into one ranked set · 多子查询检索结果融合rag/query-fusion
Resolve time-relative phrases into concrete time bounds · 时间相对短语解析为具体时间范围rag/time-aware-retrieval-rewriter

Build / debug an agent · 搭建和调试 Agent

Goal · 我想做Card · 用这张卡
Run a ReAct loop with strict tool calls · 跑 ReAct loop,严格 tool callagent/react-planner-with-tool-schema
Produce a complete plan upfront · 一次性给出完整计划agent/plan-and-execute-planner
Fix a malformed tool call from a validation error · 修复格式错误的 tool callagent/tool-call-repair
Reflect on whether the trajectory is on track · 反思 agent 是否在正轨agent/self-critique-reflection
Compress a long agent trajectory into memory · 把长 trajectory 压缩成 memoryagent/long-context-memory-summarizer
Split a complex task across multiple specialized workers · 把复杂任务派给多个专精 agentagent/sub-task-delegator
Decide whether a goal needs clarification, ask one good question · 判断是否要问澄清问题,问一个好问题agent/clarification-asker
Convert OpenAPI / Swagger spec into agent tool catalog · OpenAPI 自动转 tool catalogagent/api-spec-to-tool-catalog
Decide retry / abort / escalate on operation failure · 操作失败时决定重试/放弃/升级agent/error-recovery-strategy
Plan agent execution within token / dollar budget · 在预算约束下规划 agent 执行agent/budget-aware-planner
Compress verbose tool output before adding to context · 把 tool 输出压缩后再进 contextagent/tool-output-summarizer
Reconcile conflicting outputs from multiple sub-agents · 多 agent 冲突调解agent/multi-agent-conflict-resolver
Translate raw API response into a user-readable answer · API 响应翻译给用户agent/api-result-translator

Generate / filter training data · 训练数据生成与过滤

Goal · 我想做Card · 用这张卡
Rewrite ONE instruction into N variants · 把 1 条指令改写成 N 个变体sft/instruction-variant-expander
Generate NEW instructions from seed examples · 从种子生成新指令sft/self-instruct-from-seed
Generate a high-quality response for an instruction · 给指令生成回答sft/response-generator
Filter SFT pairs by quality (keep / review / drop) · 按质量过滤 SFT 数据sft/data-quality-filter
Produce scalar reward for one response · 给单回答打 reward 分rlhf/pointwise-reward-scorer
Critique a response against a constitution and revise · 按 constitution 批评 + 重写rlhf/constitutional-critique-revise
Generate adversarial probes for safety evaluation (defensive) · 生成防御性安全评估探针rlhf/red-team-prompt-generator
Generate multi-turn conversation SFT data · 生成多轮对话 SFT 数据sft/conversation-sft-pair-generator
Pick best K few-shot demonstrations from a candidate pool · 从样本池为目标 query 选最好的 K 个示例sft/few-shot-example-selector
Detect reward hacking patterns in RLHF responses · 检测 RLHF 训练后 reward gaming 失败模式rlhf/reward-hacking-detector
Audit whether a preference label's rationale justifies the pick · 审计偏好标签的理由是否站得住rlhf/preference-rationalization-judge
Generate code-specific SFT pairs · 生成 code SFT 训练对sft/code-sft-pair-generator
Find semantic near-duplicates in instruction set · 找语义相似指令做去重sft/instruction-deduplicator

Work with images · 处理图像

Goal · 我想做Card · 用这张卡
Generate a structured caption for an image · 给图片生成结构化 captionmultimodal/structured-caption-generator
Verify a caption against the actual image · 核对 caption 与图像multimodal/vlm-image-description-verifier
Answer a question about an image · 视觉问答 + grounding + 置信度multimodal/vqa-with-confidence
Extract typed fields from a document image · 从文档图片抽取结构化字段multimodal/ocr-structured-extraction
Extract data from a chart / plot / table image · 从图表或表格图片抽数据multimodal/chart-table-extractor
Analyze a document page's layout (title / body / tables / figures) · 分析文档页面版式结构multimodal/document-layout-analyzer
Extract graph structure from a diagram / flowchart / architecture · 流程图/架构图转结构化数据multimodal/diagram-to-structured-data
Convert a UI screenshot into a component spec · UI 截图转组件树 specmultimodal/screenshot-to-spec
Classify image into custom user-defined categories · 自定义类别图像分类multimodal/image-classification
Transcribe handwriting with per-word confidence · 手写文字转录 + 字级置信度multimodal/handwriting-transcriber
Reverse-engineer edit instruction from before/after pair · 前后图反推编辑指令multimodal/image-edit-instruction-generator
Compare two images and explain similarities / differences · 双图对比解释multimodal/image-comparison-explainer

Improve reasoning quality · 提升推理质量

Goal · 我想做Card · 用这张卡
Single-pass structured reasoning with rationale · 单次结构化推理 + rationalecot/structured-reasoning-with-rationale-summary
Decompose a complex problem into easier sub-problems · 把复杂问题拆成更简单的子问题cot/least-to-most-decomposition
Aggregate N sampled paths into a consensus answer · 把 N 条采样路径聚合成共识答案cot/self-consistency-aggregator
Draft + verify before committing to a final answer · 先 draft 再 verify 再交答案cot/verify-then-finalize
Explore multiple branches in parallel and prune (tree-of-thoughts) · 多分支并行探索 + 剪枝cot/tree-of-thoughts
Abstract the question into a principle first, then apply (step-back) · 先抽象到原理再代入具体题cot/step-back-prompting
Critique and revise a candidate plan before execution · 执行前对推理 plan critique + 修订cot/plan-critique-and-revise
Reasoning with explicit per-step uncertainty · 明示每步不确定度的推理cot/uncertainty-quantification
Citation-grounded reasoning (every claim must cite source) · 每条事实必须引用 source 的推理cot/citation-grounded-reasoning
Contrast against intentionally-wrong reasoning · 对照错误推理路径的反向自洽cot/contrastive-self-consistency
Process external criticism (accept / correct / reject) · 处理外部批评的 self-correction 协议cot/self-correction-protocol
Generate a meta-prompt for a class of tasks · 给一类任务生成可复用的 meta-promptcot/meta-prompt-generator

Work with code · 处理代码

Goal · 我想做Card · 用这张卡
Structured code review with per-dimension findings · 按维度做结构化 code reviewcode/code-review-checklist
Generate test cases for a function · 给函数生成测试用例code/test-case-generator
Explain code at a specific audience level · 按受众层级解释代码code/code-explanation-generator
Judge whether candidate code fulfills a task · 评估候选代码是否完成任务code/code-eval-judge
Suggest concrete refactors with rationale · 提结构化重构建议code/refactor-suggestion
Translate code from one language to another · 跨语言代码翻译(含 idiom 控制)code/code-translation
Focused security review with CWE-style findings · 按 threat model 做代码安全评审code/security-review
Summarize git diff into structured PR description · git diff 转结构化 PR descriptioncode/code-summary-for-pr
Plan major version migration grounded in actual code · 大版本迁移阶段化规划code/migration-plan-generator
Analyze impact of changing a function / API signature · 评估函数 / API 签名改动的影响范围code/dependency-impact-analyzer
Explain a stack trace / error to a target audience · 按受众解释错误信息code/error-message-explainer
Generate a commit message from a git diff · 从 diff 生成 commit messagecode/commit-message-generator
Review API design (REST / GraphQL / gRPC) for ergonomics · API 设计评审code/api-design-reviewer

As a GitHub repository / 作为 GitHub 仓库

  1. Browse INDEX.md or prompts/<direction>/.
  2. Open the card you want; copy the Prompt section.
  3. Read the Failure Modes and Tuning Notes sections — that is where the experience lives.
  4. Substitute {{variable}} placeholders with your inputs.

中文流程:

  1. 浏览 INDEX.mdprompts/<方向>/ 目录。
  2. 打开目标卡片,复制 ## Prompt 段落。
  3. 务必读 ## Failure Modes## Tuning Notes 两段——那是真正的 经验所在。
  4. 用你自己的输入替换 {{variable}} 占位符。

As a Claude Code skill / 作为 Claude Code Skill

Install this repository as a skill so Claude Code can route user intents to the right card directly:

把本仓库当作 skill 安装,Claude Code 就能根据用户描述自动定位到对应 卡片:

bash
git clone https://github.com/huck012428-lab/prompt-atlas ~/.claude/skills/prompt-atlas

Then in Claude Code:

之后在 Claude Code 中:

You: I need a prompt to score whether a retrieved passage is relevant.
Claude: [reads SKILL.md routing tree, picks rag/retrieval-relevance-evaluator,
         and adapts it to your inputs]
你: 帮我写个判断 retrieved passage 相关性的 prompt。
Claude:[读取 SKILL.md 的路由树,选中 rag/retrieval-relevance-evaluator,
         按你的输入做适配]

The skill entry is SKILL.md.

Skill 入口在 SKILL.md

Anatomy of a Prompt Card / 一张卡片的结构

prompts/rag/retrieval-relevance-evaluator.md
├── frontmatter / 元信息块
│   ├── id, title, version, status         (identity / 身份)
│   ├── direction, tags, audience, models  (discovery / 发现)
│   ├── language, input/output_schema      (integration / 集成)
│   └── variables                          (slots / 变量槽)
└── body / 正文
    ├── ## Purpose         适用场景与目标
    ├── ## Prompt          带 {{variable}} 占位符的 prompt 主体
    ├── ## Example         具体的输入 → 期望输出
    ├── ## Failure Modes   常见失败模式与检测方法
    ├── ## Tuning Notes    模型差异、温度、相邻用法的调优笔记
    └── ## Changelog       版本历史

Full schema and controlled vocabulary: docs/SCHEMA.md.

完整 schema 与受控词汇表:docs/SCHEMA.md

Safety / 安全立场

This repository does not accept jailbreaks, safety-bypass prompts, hidden chain-of-thought extraction techniques, harm-enabling content, or proprietary leaks. See docs/SAFETY.md. Defensive and evaluation-oriented prompts (red-team rubrics, harmlessness labelers, factuality judges) are explicitly welcome.

本仓库拒收 jailbreak、绕过安全的 prompt、套取闭源模型隐藏推理链 的 prompt、有害内容生成 prompt、私有/泄露 prompt。详见 docs/SAFETY.md明确欢迎评估类、防御类 prompt ——红队评分、有害性标注、事实性判官等。

Contributing / 贡献流程

See CONTRIBUTING.md. Short version:

详见 CONTRIBUTING.md。简要流程:

  1. Copy templates/prompt-card.md into prompts/<direction>/<your-slug>.md.
    复制 templates/prompt-card.mdprompts/<方向>/<你的-slug>.md
  2. Run python scripts/validate.py until it returns OK.
    python scripts/validate.py 直到输出 OK
  3. Run python scripts/build_index.py to refresh INDEX.md.
    python scripts/build_index.py 刷新 INDEX.md
  4. Open a PR using the prompt-card issue template.
    用 prompt-card issue 模板开 PR。

CI runs the same validation; PRs that don't pass won't be merged.

CI 跑同一套校验;不通过的 PR 不会被合入。

License / 许可证

Dual-licensed. See LICENSE.

双许可证。详见 LICENSE

  • Code (scripts/, CI configs): MIT

  • Prompt content (prompts/, templates/, docs/): CC-BY-4.0

  • 代码scripts/、CI 配置):MIT

  • Prompt 内容prompts/templates/docs/):CC-BY-4.0

Each Prompt Card carries license: CC-BY-4.0 in its frontmatter for clarity.

每张 Prompt Card 的 frontmatter 中都标注 license: CC-BY-4.0,避免混淆。

Status / 当前状态

v0.1.0 — first public release with 32 Prompt Cards. Library has since grown to 100 Prompt Cards across all 7 directions (post-v0.1 additions tracked in CHANGELOG.md). See ROADMAP.md for what's planned next. Pull requests welcome.

v0.1.0 —— 首个公开版本,32 张 Prompt Card。后续已扩到 100 张,覆盖 8 个方向(v0.1 之后的新卡见 CHANGELOG.md)。后续计划见 ROADMAP.md,欢迎 PR。

Code MIT · Prompt content CC-BY-4.0. See LICENSE.