N
NexusDigitalLabs
← Back to Academy

Phase 2 — Working with LLMs · Lesson 24 · 20 XP

Prompting as engineering

Good prompts are specific: clear instructions, a defined output format, and — often more effective than another paragraph of instructions — one or two concrete examples (few-shot). An example shows the model exactly what "good" looks like instead of describing it abstractly.

Common failure modes: ambiguous instructions the model has to guess at, a system prompt that quietly contradicts a later user instruction, and stuffing in unrelated context that dilutes what actually matters. Treat prompts like source code — version them, diff changes, and know what changed when behavior changes.

Exercise

Take a vague prompt and identify exactly what's ambiguous about it. Rewrite it three ways — more specific instructions, one added example, and a constrained output format — and compare the three outputs against the original.

Check yourself

1. Why does adding one good example to a prompt often help more than three extra sentences of instructions?

2. What does "prompt versioning" mean, and why treat prompts like source code instead of throwaway text?

← Previous lesson

Tool use (function calling)

Answer the check-yourself questions to unlock this