What is LLM prompt engineering?
Prompt engineering is the practice of designing the text input to a language model so the model produces the desired output reliably. A good prompt can outperform a poorly fine-tuned model and costs nothing extra at inference time.
Common techniques
System prompts that set role and constraints. Few-shot examples that demonstrate the desired format. Chain-of-thought instructions that ask the model to reason before answering. Output schemas (JSON, XML) that force structure. Citation requirements that ground the model in retrieved context.
The grounding prompt
For customer support, the most important prompt pattern is: "Answer only using the retrieved passages below. If the passages do not contain the answer, say so and escalate to a human." This single instruction does more for hallucination control than any other technique.
When to fine-tune instead
Prompts hit a ceiling. For very specific output formats, very consistent tone, or task-specific reasoning patterns that need to fire reliably, fine-tuning becomes worth the operational cost. See LLM fine-tuning.
See it working on message.com.
Unified inbox, grounded AI, flat pricing. 14 days free, no credit card.
Start free trial →