EasyDeepLearn

What are the pillars of good prompt engineering?

easy

Answer

  • Be explicit about role, task, format, and constraints.
  • Provide examples (few-shot) when the format is nontrivial.
  • Ask for step-by-step reasoning when useful (chain-of-thought).
  • Use structured output (JSON schema, tool schemas) when downstream code will parse.
  • Iterate on real inputs and add negative constraints ('do not X') for common failure modes.
Check yourself — multiple choice
  • Vague prompts always outperform detailed ones
  • Explicit role, task, format, and examples improve reliability
  • You should never specify output format
  • Chain-of-thought hurts performance on reasoning tasks

Explicit constraints and examples reduce variance and improve reliability.

#prompting

Practise LLMs & GenAI

214 interview questions in this topic.

Related questions