[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"glossary-user-prompt::en":3,"gloss-cluster-user-prompt::en":20,"gloss-next-user-prompt::en":9},{"slug":4,"category":5,"name":6,"definition":7,"meta_desc":8,"faq":9,"schema_markup":9,"related":10},"user-prompt","prompt-eng","User Prompt","The user prompt is the message role in an LLM API call that represents input from the end user (or, in an automated pipeline, from the calling application on the user's behalf), as distinct from the system prompt (which sets persistent behavior) and the assistant\u002Fmodel's own responses. In a typical chat completion API call, the message array alternates system → user → assistant → user → assistant, and each \"user\" entry is a user prompt. Understanding this distinction matters for SaaS builders because the two prompt types have different trust levels and different design goals: the system prompt is authored and controlled by the developer and should contain the stable rules of the product; the user prompt is often partially or fully derived from untrusted external input (a customer's message, a scraped webpage, an uploaded document) and should be treated with more caution, especially around prompt injection risk. In multi-turn conversations, the full history of user and assistant prompts (the \"context\") is typically resent with every new call, since most LLM APIs are stateless between requests — the application is responsible for maintaining and truncating the conversation history within the context window. Well-designed products often construct the user prompt programmatically rather than taking raw user input verbatim, wrapping it with delimiters or light instructions (e.g., \"The user asked: \u003C\u003C{{raw_input}}>>. Answer using only the FAQ context above.\") to keep the model anchored to its task even when the underlying human input is messy, off-topic, or adversarial. Concrete worked example: a documentation chatbot receives the raw user question \"how do i cancel my sub???\" — the application wraps this before sending: system prompt defines the assistant's scope and tone; user prompt becomes \"Answer the following user question using only the provided documentation context. If the answer isn't in the context, say you don't know.\\n\\nContext: {{retrieved_docs}}\\n\\nUser question: how do i cancel my sub???\" The raw, informally-phrased user input is embedded as data within a structured user prompt, which is a common RAG (retrieval-augmented generation) pattern. This wrapping also matters for logging and analytics: because the user prompt actually sent to the model differs from the raw text the human typed, mature AI products log both — the raw human input for UX and support analysis, and the fully constructed user prompt for debugging model behavior and reproducing issues — since a confusing model response is often traceable to how the wrapping template wrestled that day's particular slice of context and instructions around otherwise identical user input.","The user prompt is the specific input — a question, command, or content — a person or application sends to the model within a conversation turn.",null,[11,14,17],{"slug":12,"name":13},"context-window","Context Window",{"slug":15,"name":16},"delimiter","Delimiter",{"slug":18,"name":19},"system-prompt","System Prompt",[21,25,28,31,35,38,41,44,47,48,51,54],{"slug":22,"category":5,"name":23,"updated_at":24},"analogical-prompting","Analogical Prompting","2026-08-24T02:46:37+00:00",{"slug":26,"category":5,"name":27,"updated_at":24},"automatic-prompt-optimization","Automatic Prompt Optimization",{"slug":29,"category":5,"name":30,"updated_at":24},"chain-of-density","Chain of Density (CoD)",{"slug":32,"category":5,"name":33,"updated_at":34},"chain-of-thought-prompting","Chain-of-Thought Prompting","2026-08-24T02:46:36+00:00",{"slug":36,"category":5,"name":37,"updated_at":24},"chain-of-verification","Chain-of-Verification",{"slug":39,"category":5,"name":40,"updated_at":34},"chunking","Chunking",{"slug":42,"category":5,"name":43,"updated_at":34},"constrained-decoding","Constrained Decoding",{"slug":45,"category":5,"name":46,"updated_at":34},"context-stuffing","Context Stuffing",{"slug":15,"category":5,"name":16,"updated_at":34},{"slug":49,"category":5,"name":50,"updated_at":24},"directional-stimulus-prompting","Directional Stimulus Prompting",{"slug":52,"category":5,"name":53,"updated_at":24},"emotion-prompting","Emotion Prompting",{"slug":55,"category":5,"name":56,"updated_at":34},"few-shot-prompting","Few-Shot Prompting"]