Prompting: Working with Language Models
The quality of LLM answers depends heavily on the prompt. These techniques improve results immediately.
1. Give Role and Context
Bad: "Explain Docker."
Good: "You are an experienced Linux admin. Explain Docker
to a beginner in 5 sentences with an example."
2. Demand Structure
"Answer as a list with headings. For each point: name, explanation (2 sentences), example."
3. Few-Shot Examples
Show 1-3 example inputs with desired outputs — models copy the pattern reliably.
4. Iterate
Rarely perfect on the first try. Ask follow-ups, correct, refine. For company knowledge use RAG instead of longer prompts.