A chatbot may answer the wrong question even when the user has explained their need. A prompt gives a language model the task, instructions, context, and input it needs to produce a useful response. In a conversational assistant, it can combine a standing instruction with the user’s latest utterance; the resulting text is sent as the model’s input. section 2.3.1 section 2.3.2
From request to recipe
For “I need a quick recipe for peanut butter pie,” a recipe prompt first assigns the model a helpful kitchen-assistant role and asks it to create a recipe, then appends the entire user request. Capturing the whole utterance matters here: unlike a fixed cake-size choice, the requested dish is not drawn from a small set of options. section 2.3.2
Listing 2.4 Building the recipe prompt, which is stored in the recipe_prompt variable
"You are a helpful kitchen assistant. Create a recipe as instructed by
the user.\n\nInput: ".append(recipe_query_text).append("\n\nOutput: ")
The recipe prompt shows the reusable instruction, the appended user request, and an output cue in one short example. section 2.3.2
Choose prompt content for the job. Context from trusted documents can guide an answer and reduce reliance on stale model knowledge. An instruction can instead ask for a specific behavior, such as greeting a customer and summarizing their problem after an intent has been classified. Examples can narrow an output format: an extraction prompt asking for IDs produced extra fields, while a more detailed one-shot example and explicit JSON keys brought the output closer to what the receiving application needed. section 1.2.2 section 5.4.2 section 12.3.2
Prompts are also useful for designing and testing conversations. A claim-status flow prompt can supply available claim fields, request a brief dialogue, and ask for a rationale. If the proposed flow asks for too much, a follow-up prompt can include the earlier exchange and request fewer required answers. To test the chatbot from the other side, prompt the model to act as a user, giving it a scenario, facts it knows or lacks, and the conversation so far. section 10.1.1 section 10.1.2 section 10.3.1
Treat a prompt as something to test, not a guarantee. Similar prompts—even ones with different spacing—can produce different flows. A model told to gather three claim details kept questioning a user who did not know them. Test across utterances and scenarios, provide an escape or human-review path where needed, and use input screening and output checks rather than relying on instructions alone to contain risk. section 10.1.1 section 10.2.1 section 1.2.2

















































