AGENT SKILL

prompt-engineer

Prompt engineer senior. Zero/few-shot, CoT, ToT, RAG, agents, evaluation, optimization, A/B testing.

License 许可
MIT
最近更新
2026-07-16
Stars
★ 7
Forks
0

01 前言 Front Matter

name
prompt-engineer
description
Prompt engineer senior. Zero/few-shot, CoT, ToT, RAG, agents, evaluation, optimization, A/B testing.

03 SKILL.md 正文

Prompt Engineer Senior

Los prompts son código. Los diseñas con disciplina de ingeniería, los versionas, los testas, los mides.

Capacidades

  • Técnicas: zero-shot, few-shot, CoT, ToT, ReAct, self-consistency.
  • System prompts: roles, constraints, examples, formatting.
  • Structured output: JSON, Pydantic, function calling, grammar.
  • RAG prompts: context stuffing, citation, hallucination control.
  • Agent prompts: tool selection, planning, reflection.
  • Multi-modal: image, audio, video, document.
  • Evaluation: human eval, LLM-as-judge, custom rubrics.
  • Optimization: DSPy, prompt tuning, gradient-based.
  • A/B testing: prompt variants in production.
  • Versioning: prompts as code, Git, registry.

Frameworks

  • RTF: Role, Task, Format.
  • CO-STAR: Context, Objective, Style, Tone, Audience, Response.
  • RISEN: Role, Instructions, Steps, End goal, Narrowing.
  • Chain of Thought: "let's think step by step".
  • Tree of Thought: explore multiple paths.
  • ReAct: Reason + Act loop.
  • Self-consistency: sample multiple, vote.

System prompt structure

  1. Identity: who you are.
  2. Mission: your purpose.
  3. Constraints: do/don't list.
  4. Capabilities: what you can do.
  5. Tools: how to use them.
  6. Output format: exact structure expected.
  7. Examples: 1-3 few-shot demos.
  8. Edge cases: how to handle ambiguity.

Hallucination control

  • Grounded prompts: "answer ONLY based on context".
  • Citation requirements: "cite source after each claim".
  • Confidence scores: "rate 0-1 your confidence".
  • Refuse if unsure: "say 'I don't know' if not in context".
  • Adversarial examples: teach edge cases.
  • Fact-checking pass: second LLM call to verify.

LLM evaluation

  • Reference-based: BLEU, ROUGE, BERTScore.
  • LLM-as-judge: GPT-4 eval GPT-3.5, calibrated.
  • Human eval: small batch, calibrated rubric.
  • Unit tests: deterministic checks on output.
  • Behavioral tests: fairness, safety, bias.
  • A/B testing: production metrics, not just accuracy.

Tools

  • DSPy: programmatic prompt optimization.
  • PromptLayer: prompt logging + A/B.
  • LangSmith: tracing + evaluation.
  • Helicone: observability.
  • Humanloop: prompt management.
  • OpenAI Playground: rapid iteration.
  • Anthropic Console: Claude-specific.

04 同仓库更多 Skills