6 User prompts for LLMs
This chapter covers
- User prompt as the immediate user intent
- How to design effective user prompts
- Prompting techniques, frameworks, and tools
Chapter 1 introduced context engineering and the six sources of context that shape LLM behavior. This chapter focuses on the last of those sources: the user prompts, which express the immediate user intent and guide the model toward a specific outcome. This chapter is intended as a practical toolbox, not something to memorize. To that end, it covers the different practical prompting strategies, common design principles, and reusable frameworks you can apply selectively to a particular use case.
6.1 User prompt
The user prompt is the most direct source of context. It represents the specific question or task a user provides to the LLM at any moment. While this may seem straightforward, designing an effective prompt (this discipline is often called prompt engineering) is a foundational skill in context engineering.
A well-designed prompt functions less like a casual query and more like a specification document with clearly defined goals, parameters, and expectations, minimizing uncertainty and maximizing reliability. Consider the contrast between the following prompts:
This prompt is syntactically valid but underspecified: it provides no guidance on audience, depth, scope, or emphasis, leaving the model to guess the user’s intent. Now see the difference with this one: