PM-301b · Module 2

Example Ordering

4 min read

Example order matters. Language models exhibit both primacy effects (strong influence from early context) and recency effects (strong influence from immediately preceding context). For few-shot prompts, this means the first example establishes the baseline expectation and the last example has the strongest direct influence on the next output.

  1. Position 1: Most Representative Example The first example sets the baseline. Use the example that best represents the typical case — not the hardest, not the simplest. The model will use this as the default template for what a correct output looks like.
  2. Middle Positions: Variety Coverage Middle positions are where you place examples that cover variations, edge cases, and format demonstrations for specific output elements. These build the model's understanding of the full output space without anchoring the baseline.
  3. Last Position: Most Important Example The final example has the strongest recency influence on the next generated output. Place your most important example last — the one whose format, tone, and approach you most want the model to match on the incoming request.
# Position 1: Representative case (sets baseline)
Input: Classify the sentiment of this customer message: "The onboarding was smooth and
the team was responsive. Happy with the purchase."
Output: POSITIVE | Confidence: High | Key signals: "smooth," "responsive," "happy"

# Position 2: Edge case (extends coverage)
Input: Classify the sentiment of this customer message: "The product is fine but the
billing process was confusing and took too long to resolve."
Output: MIXED | Confidence: Medium | Key signals: positive product reference,
negative billing/time reference

# Position 3: Most important / closest to expected production inputs (recency effect)
Input: Classify the sentiment of this customer message: "Three tickets, no resolution,
and no follow-up. I'm done."
Output: NEGATIVE | Confidence: High | Key signals: unresolved tickets, abandonment signal

Input: {{USER_INPUT}}
Output: