openskills.info
Course Preview

Prompt Engineering

Prompt engineering designs the instructions and context given to large language models to elicit accurate, useful responses. It covers prompting strategies like few-shot examples, chain-of-thought reasoning, system prompts, and the iterative testing that improves model output quality for specific tasks.

itArtificial intelligence and machine learning

Don't Panic — Prompt Engineering

Prompt engineering is the practical art of telling a language model what job it has, what material it may use, and what shape the answer must take. The model is not reading intent from the air, regrettably. It has the text in front of it, plus its training, and it makes the next token choice from there.

That makes the prompt less like a magic phrase and more like a specification with an unusually talkative implementation. A vague request leaves the implementation to fill in decisions you had already made somewhere behind your forehead. A clear task, constraints, context, and format move those decisions into the part of reality the model can inspect.

The first useful trick is structure. Put instructions apart from reference data, and label the pieces. The second is few-shot prompting, which means showing a few input-and-output examples when the desired pattern is easier to demonstrate than describe. The third is an eval: a repeatable test that checks whether the prompt meets stated success criteria. This is the bit that turns “that answer looked good” into evidence, which is less glamorous but survives Tuesday.

One surprise waits in the middle of all this: the same prompt is not permanently solved. A different model or model version can respond differently, and a prompt that behaves on one tidy example can fail on an unfamiliar input. Pin the model version when consistency matters, keep a varied test set, and change one thing at a time. Otherwise every revision becomes a small archaeological dig through your own decisions.

Prompt engineering also has borders. If the model needs information outside its training, use retrieval-augmented generation, which places relevant documents in the request. If output must feed software, specify a structured format and validate it. If the task is deterministic, ordinary code is often the more cooperative creature. If edge cases still fail after measured revisions, a new prompt may not be the remedy.

Read the Intro for the map of prompts, roles, context, and evaluation. Use the Slides to see the relationships at a glance. Keep the Cheatsheet nearby when shaping a task, and use the practice reference and exercise to build an evaluation loop rather than collecting impressive-looking prompts in a drawer. The reference links then lead into the model-specific rules, where the details inevitably change their hats.

Where this skill leads

Relevant careers

See how this topic contributes to broader role-level skill maps.

Sources

  • https://platform.openai.com/docs/guides/prompt-engineering
  • https://docs.anthropic.com/en/docs/build-with-claude/prompt-engineering/overview
  • https://ai.google.dev/gemini-api/docs/prompting-strategies
  • https://cookbook.openai.com/examples/gpt4-1_prompting_guide
  • https://arxiv.org/abs/2005.14165
  • https://arxiv.org/abs/2104.08691
  • https://openai.com/index/instruction-following/
  • https://arxiv.org/abs/2201.11903
  • https://openai.com/index/chatgpt/
  • https://openai.com/index/gpt-4-api-general-availability/
  • https://openai.com/index/function-calling-and-other-api-updates/
  • https://arxiv.org/abs/2305.10601
  • https://openai.com/index/introducing-structured-outputs-in-the-api/
  • https://www.langchain.com/langsmith/evaluation
  • https://humanloop.com/docs/getting-started/overview
  • https://www.promptlayer.com/
  • https://www.braintrust.dev/
  • https://www.vellum.ai/