Resources

Prompt engineering tracks models and APIs. Prefer vendor docs. This course keeps the stable contract habits (role / task / constraints / format, delimiters, examples, schema, eval).

OpenAI now treats production prompts as application code: git, review with the feature, eval as a gate. Hosted reusable prompt objects are in a deprecation window (see their deprecations page). Own your gold questions and a runner; do not assume a hosted eval dashboard will last forever.


Official


Follow-on courses on this site (suggested order)

GoalCourse
Turn the contract into editor rules / SkillsCursor
Terminal agent + CLAUDE.mdClaude Code
system_prompt + tool loop in codeLangChain
Agent / workflow prompts on a canvasDify
Tool schemas and safe defaultsMCP · MCP security
Stop stuffing a corpus into the promptRAG · LangChain RAG

Read this primer once, then pick one product course. Do not collect five copies of the same four blocks in five UIs.


What to keep in the repo

ArtifactTypical pathRole
Durable policyAGENTS.md, .cursor/rules, CLAUDE.mdSystem contract
Task templatesprompts/*.md or prompts/*.tsBuild user messages with typed holes
Gold questionsevals/gold.jsonlRegression
SchemasPydantic / JSON Schema next to the promptOutput contract

If a sentence cannot show up as a gold-question expectation, it probably does not belong in the prompt.

Vendor vocabulary (so doc searches line up):

This courseOpenAI often saysAnthropic often says
System contractinstructions / system messagesystem prompt
Four blocksRole in system; task and examples in userBe clear and direct; XML sections
Structured outputStructured Outputs / schemaTools or JSON mode (check current docs)
EvaluationPrompts as code + your own evalsIterate on real tasks, not empty boilerplate

Tutorial index

  1. Prompt Engineering tutorial
  2. Introduction
  3. Four building blocks
  4. Structure and delimiters
  5. Few-shot examples
  6. Structured output
  7. Tools and agents
  8. Evaluation
  9. Pitfalls
  10. Practical examples

Contribute

Part of Kenhuang Academy. When vendor docs change, open an issue or PR and update docs/zh/prompt-engineering/ and docs/en/prompt-engineering/ together. Do not add jailbreaks, injection exploits, or social-engineering material.

If an outside article conflicts with this course (for example by teaching attack steps), follow this course’s boundary and the vendor’s safety docs.

Next: Introduction · Four building blocks · Practical examples

评论