prompt-eng

Multi-Turn Prompting

Multi-turn prompting refers to the design considerations specific to prompts that exist within an ongoing, multi-exchange conversation — as opposed to single-turn prompting, where one prompt produces one final answer with no expectation of follow-up — where each new user message is interpreted in light of the accumulated conversation history, and the application must manage how that history is constructed, maintained, and eventually trimmed as the conversation grows. Because most LLM APIs are stateless (the model has no persistent memory between API calls), every multi-turn conversation requires the application to resend the relevant conversation history — the full or partial sequence of prior user and assistant messages — with each new request, and prompt-engineering decisions specific to multi-turn design include how much history to retain (full history preserves maximum context but grows token cost and risks context-stuffing and persona-drift issues on long sessions), whether and how to summarize or compress older turns, how to handle a user who contradicts or corrects earlier statements in the conversation, and how to keep the original system-prompt instructions from being effectively "outweighed" by a long accumulated history (a real risk related to persona consistency). Multi-turn prompting also introduces state-management concerns beyond single-shot prompting: tracking whether the user has changed topics (and whether older, now-irrelevant context should be dropped), managing multi-step workflows where the AI needs to remember information the user provided several turns ago (an intake form completed conversationally over 5 exchanges, for instance), and handling ambiguous follow-up references ("what about the second one?") that only make sense with the prior turn's context available. For SaaS builders, most conversational AI features — support chatbots, AI assistants, onboarding flows — are inherently multi-turn, making these history-management decisions a core, not peripheral, part of the prompt engineering work, distinct from and additional to designing any single turn's prompt in isolation. Concrete worked example: an AI onboarding assistant for a project-management SaaS collects setup information conversationally across multiple turns — team size, primary use case, integration needs — rather than a single form. By turn 6, the conversation history contains the user's team size (12) and use case (client project tracking) from turns 1-2. When the user's turn-6 message is simply "yeah, and we also use Slack a lot," the model must resolve this as "add Slack to the integrations list for this same onboarding flow," which is only interpretable correctly because the full multi-turn context — not just this isolated message — is included in the prompt sent to the model at turn 6.

Related terms

More Prompt Engineering terms