Landmark 18 stops to get here · leads to 4

Prompt Engineering

The practice of designing and optimizing input prompts to get desired outputs from language models. A crucial skill for effectively using LLMs.

Your route here

18 stops · basics first
  1. Natural Language Processing ✓ understood

    The field of AI that lets computers read, interpret, translate and generate human language, from spam filters and search to chatbots.

  2. Token ✓ understood

    The basic unit of text that a language model processes, typically representing a word, subword, or character. Tokens are the fundamental building blocks for LLM input and output.

  3. Tokenization ✓ understood

    Splitting text into tokens, usually subword pieces, and mapping each to an integer ID so a language model can process it.

  4. Language Modeling ✓ understood

    Learning probability distributions over sequences of words to predict what comes next.

  5. Dataset ✓ understood

    A collection of data examples used for training, validating, or testing machine learning models.

  6. Training ✓ understood

    The process of fitting a model to data by repeatedly measuring how wrong its outputs are and adjusting its parameters to reduce that error.

  7. Machine Learning ✓ understood

    Building systems that learn patterns from data instead of following hand-written rules, getting better at a task as they see more examples.

  8. Unsupervised Learning ✓ understood

    Learning from unlabeled data to discover hidden patterns, structures, or relationships without explicit target outputs.

  9. Self-Supervised Learning ✓ understood

    Learning representations from unlabeled data by creating supervised tasks from the data itself (masked prediction, contrastive learning).

  10. Pre-training ✓ understood

    Training a model on a large dataset (often self-supervised) before fine-tuning on specific tasks, enabling transfer learning.

  11. Feature ✓ understood

    A single measurable property of an example, such as a house's floor area or how many links an email contains, used as an input to a model.

  12. Neural Network ✓ understood

    A computational model inspired by biological neural networks, consisting of interconnected nodes (neurons) organized in layers that process information through weighted connections.

  13. Deep Learning ✓ understood

    A subset of machine learning that uses neural networks with multiple layers (deep neural networks) to learn hierarchical representations of data.

  14. Representation Learning ✓ understood

    Learning useful features or representations of data automatically, rather than hand-crafting them.

  15. Embedding ✓ understood

    A list of numbers (a vector) that represents a word, sentence, image or other item, learned so that similar items end up close together.

  16. Attention Mechanism ✓ understood

    A technique that lets a neural network weigh every part of its input when producing each output, focusing on the parts most relevant at that step.

  17. Transformer ✓ understood

    A neural network architecture, introduced in 2017, built from stacked self-attention and feed-forward layers; the basis of nearly every modern large language model.

  18. Large Language Model ✓ understood

    A neural network, almost always a transformer, trained on vast amounts of text to predict the next token, which lets it write, answer, summarize and follow instructions.

  19. Prompt Engineering · you are here ✓ understood

Picture it

Write the promptRole, context, clear instructionsAdd examples + formatFew-shot examples, output…Run the modelEvaluate the outputTest against real and edge casesRefineTighten wording, add constraintsSame model, better input
  1. 01 Write the prompt Role, context, clear instructions
  2. 02 Add examples + format Few-shot examples, output structure
  3. 03 Run the model
  4. 04 Evaluate the output Test against real and edge cases
  5. 05 Refine Tighten wording, add constraints

↺ back to 01 · Same model, better input

Notice nothing about the model changes in this loop: each pass improves only the input, and that alone can change output quality.

Prompt engineering is the art and science of crafting effective instructions for language models. Well-designed prompts can dramatically improve output quality, accuracy, and relevance.

Key Techniques

  • Clear Instructions: Explicit, specific directions
  • Few-Shot Examples: Providing examples of desired behavior
  • Chain-of-Thought: Asking the model to explain its reasoning
  • Role Assignment: Defining the model’s persona or expertise
  • Format Specification: Requesting specific output structures

Best Practices

  • Be specific and detailed
  • Provide context and constraints
  • Use delimiters to separate sections
  • Iterate and refine based on results
  • Test edge cases

Prompt engineering has become a valuable skill in AI product development and research.

Where it sits

Prompt Engineering

Explore nearby

In the research

All papers →

A paper that builds on Prompt Engineering .