Learn how to write effective prompts that your AI agent can follow reliably.
Creating a Prompt Within Your Agent
The single prompt approach allows you to define your agent’s behavior with one comprehensive prompt.
It’s straightforward and great for simple use cases.Good prompt writing is the most important part of building your agent—it can make your agent work great or not so much.
This guide shows you what we’ve learned about writing prompts that agents can follow better and more consistently.
This guide is updated regularly as we learn new things. If you have ideas or feedback, please share them with us.
To see examples of good prompts, check out the templates in your Dashboard by creating a new agent and selecting a template.
Breaking Prompts into Sections
When writing prompts, it’s best to break them into smaller sections.
This makes them easier for you to edit and easier for the LLM to understand.
## IdentityYou are a friendly AI assistant for UponAI. ....## Style GuardrailsBe concise: ...Be conversational: ......## Response GuidelineReturn dates in their spoken forms: ...Ask up to one question at a time: ......## Task1. Greet the user...
Write Tasks as Steps
When writing your prompt, write your tasks in numbered order like steps. This helps the agent space things out and not ask everything in one long question.
## Task1. Ask for user's name.2. Ask if user needs a refund, a replacement, or is just retrieving information. - if user needs a refund, transition to refund state. - if user needs a replacement, transition to replacement state.3. If user is just retrieving information, ask for the order number.
If your agent doesn’t pause and asks all steps as one large question, spell out exactly what you want:
## Task1. Inform user why you are calling.2. Ask user's name.Wait for user response3. Ask if user needs a refund, a replacement, or is just retrieving information.Wait for user response - if user needs a refund, transition to refund state. - if user needs a replacement, transition to replacement state.4. Ask for the order number.Wait for user response
Prompting More In-depth
It’s recommended to spell things out clearly for the agent to get the best results. The more explicit your instructions, the more consistent your agent’s behavior.Example — Appointment or Demo Booking:
If a customer requests to book an appointment or demo, follow these steps:1. Ask for full name.2. Ask for preferred date and time.3. Invoke check_available_appointments and return available slots.4. Ask for company name.5. Ask for full email address: - If spelled out: n-a-m-e-@-dot-com → interpret as name@domain.com - "name at" → interpret as name@ - "dot com" → interpret as .com6. Ask for purpose of the appointment.7. Ask for best phone number: - Accepted formats: 4158923245, (415) 892-3245, 415-892-3245 - Pronounce as: "four one five - eight nine two - three two four five" - Important: Keep spaces around the dash when speaking8. Reconfirm preferred date and time if needed.9. Confirm all details (name, purpose, date, time, email, phone) with the caller.10. Invoke book_appointment function.
If the agent says a phrase or phone number too quickly, instruct it to repeat slowly.
{"docsConfig":{"theme":"mint","$schema":"https://mintlify.com/docs.json","name":"UponAI","colors":{"primary":"#16A34A","light":"#07C983","dark":"#15803D"},"logo":{"light":"https://mintcdn.com/uponai/Z_4kJsgPYLQAiuNH/images/favicon.webp?fit=max\u0026auto=format\u0026n=Z_4kJsgPYLQAiuNH\u0026q=85\u0026s=22fd99ea2484bdf64edc52775ef82144","dark":"https://mintcdn.com/uponai/Z_4kJsgPYLQAiuNH/images/favicon.webp?fit=max\u0026auto=format\u0026n=Z_4kJsgPYLQAiuNH\u0026q=85\u0026s=22fd99ea2484bdf64edc52775ef82144"},"favicon":"https://mintlify.s3.us-west-1.amazonaws.com/uponai/favicon.svg","navbar":{"links":[{"href":"mailto:support@uponai.com","label":"Support"}],"primary":{"type":"button","label":"Dashboard","href":"https://dashboard.mintlify.com"}},"footer":{"socials":{"facebook":"https://www.facebook.com/profile.php?id=61573890866561","instagram":"https://www.instagram.com/_uponai_","linkedin":"https://www.linkedin.com/company/uponai?viewAsMember=true","x-twitter":"https://x.com/_UponAI_"}},"contextual":{"options":["copy","view","chatgpt","claude"],"display":"header"},"styling":{"latex":false},"navigation":{"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"uponai","hasAudioNarration":false,"actualSubdomain":"uponai","customDomains":["documentation.uponai.com"],"gitSource":{"type":"github","owner":"uponai8192","repo":"docs","deployBranch":"main","contentDirectory":"","isPrivate":false,"mountPath":"","label":""},"entitlements":{},"buildId":"6ae92a31f2a30ac762f68141:success","clientVersion":"0.0.4143","searchFilterCounts":[{"language":"default","tag":"Documentation","count":154},{"language":"default","tag":"Build","count":64},{"language":"default","tag":"API Documentation","count":59},{"language":"default","tag":"Deploy","count":27},{"language":"default","tag":"Setup conversation flow agent","count":22},{"language":"default","tag":"Setup single / multi prompt agent","count":16},{"language":"default","tag":"Accounts and Workspace","count":14},{"language":"default","tag":"Step 2: Add nodes","count":14},{"language":"default","tag":"Reliability \u0026 Debugging","count":12},{"language":"default","tag":"Step 3: Add function calling","count":12}]},"assistantConfig":{},"basePath":"","hasChatPermissions":false,"hasWebMcpPermissions":false,"toggles":[{"name":"kill-isr","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-rbac-roles","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-mintlify-slack","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-integrations-settings","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"rbac-expansion","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-pr-grouping","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-prefix","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"analytics-v7","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"user-flows-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"no-publish-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-onboarding","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving-live","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"stripTemperatureMiddleware","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"support-platform-pylon-zendesk","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"instant-rollback","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications-server","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-fable","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fixed-ai-action-pricing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automation-resolve-merge-conflict","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"scoped-publishing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"mintql","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"page-level-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-version-history-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-page-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"full-page-search","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workspace-projects","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"assistant-v5","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fork-pr-previews","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"revalidation-jwt","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-sso-scim","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"hobby-abuse-scan","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"dashboard-inbox","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-signup","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-dual-write","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-enabled","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"approve-review-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-metadata","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"sso-setup-deadline-banner","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-serve","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"live-agents","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"llms-txt-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"googleFontsInlined":false},"customCss":[],"page":{"pagePath":"build/write-single-prompt","slug":"/build/write-single-prompt","pageMetadata":{"title":"Write a Single Prompt","description":"Learn how to write effective prompts that your AI agent can follow reliably.","href":"/build/write-single-prompt"},"description":{"compiledSource":"\"use strict\";\nconst {jsx: _jsx} = arguments[0];\nconst {useMDXComponents: _provideComponents} = arguments[0];\nfunction _createMdxContent(props) {\n const _components = {\n p: \"p\",\n ..._provideComponents(),\n ...props.components\n };\n return _jsx(_components.p, {\n children: \"Learn how to write effective prompts that your AI agent can follow reliably.\"\n });\n}\nfunction MDXContent(props = {}) {\n const {wrapper: MDXLayout} = {\n ..._provideComponents(),\n ...props.components\n };\n return MDXLayout ? _jsx(MDXLayout, {\n ...props,\n children: _jsx(_createMdxContent, {\n ...props\n })\n }) : _createMdxContent(props);\n}\nreturn {\n default: MDXContent\n};\n","frontmatter":{},"scope":{}},"pageType":"default","mdx":{"mdxSource":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx,jsxs:_jsxs}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){const _components={code:`code`,hr:`hr`,p:`p`,pre:`pre`,span:`span`,strong:`strong`,..._provideComponents(),...props.components},{CodeBlock,Heading,Note,Tip}=_components;if(!CodeBlock)_missingMdxReference(`CodeBlock`,true);if(!Heading)_missingMdxReference(`Heading`,true);if(!Note)_missingMdxReference(`Note`,true);if(!Tip)_missingMdxReference(`Tip`,true);return _jsxs(_Fragment,{children:[_jsx(Heading,{level:`2`,id:`creating-a-prompt-within-your-agent`,children:`Creating a Prompt Within Your Agent`}),`\n`,_jsxs(_components.p,{children:[`The `,_jsx(_components.strong,{children:`single prompt`}),` approach allows you to define your agent’s behavior with one comprehensive prompt.\nIt’s straightforward and great for simple use cases.`]}),`\n`,_jsx(_components.p,{children:`Good prompt writing is the most important part of building your agent—it can make your agent work great or not so much.\nThis guide shows you what we’ve learned about writing prompts that agents can follow better and more consistently.`}),`\n`,_jsx(Note,{children:_jsx(_components.p,{children:`This guide is updated regularly as we learn new things. If you have ideas or feedback, please share them with us.`})}),`\n`,_jsxs(_components.p,{children:[`To see examples of good prompts, check out the `,_jsx(_components.strong,{children:`templates in your Dashboard`}),` by creating a new agent and selecting a template.`]}),`\n`,_jsx(_components.hr,{}),`\n`,_jsx(Heading,{level:`2`,id:`breaking-prompts-into-sections`,children:`Breaking Prompts into Sections`}),`\n`,_jsxs(_components.p,{children:[`When writing prompts, it’s best to `,_jsx(_components.strong,{children:`break them into smaller sections`}),`.\nThis makes them easier for you to edit and easier for the LLM to understand.`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`23`,language:`text`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`text`,children:_jsxs(_components.code,{language:`text`,numberOfLines:`23`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`## Identity`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`You are a friendly AI assistant for UponAI. ....`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`## Style Guardrails`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`Be concise: ...`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`Be conversational: ...`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`...`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`## Response Guideline`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`Return dates in their spoken forms: ...`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`Ask up to one question at a time: ...`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`...`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`## Task`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`1. Greet the user`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`...`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{})})]})})}),`\n`,_jsx(_components.hr,{}),`\n`,_jsx(Heading,{level:`2`,id:`write-tasks-as-steps`,children:`Write Tasks as Steps`}),`\n`,_jsx(_components.p,{children:`When writing your prompt, write your tasks in numbered order like steps. This helps the agent space things out and not ask everything in one long question.`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`8`,language:`text`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`text`,children:_jsxs(_components.code,{language:`text`,numberOfLines:`8`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`## Task`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`1. Ask for user's name.`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`2. Ask if user needs a refund, a replacement, or is just retrieving information.`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:` - if user needs a refund, transition to refund state.`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:` - if user needs a replacement, transition to replacement state.`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`3. If user is just retrieving information, ask for the order number.`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{})})]})})}),`\n`,_jsx(_components.p,{children:`If your agent doesn’t pause and asks all steps as one large question, spell out exactly what you want:`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`17`,language:`text`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`text`,children:_jsxs(_components.code,{language:`text`,numberOfLines:`17`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`## Task`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`1. Inform user why you are calling.`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`2. Ask user's name.`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`Wait for user response`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`3. Ask if user needs a refund, a replacement, or is just retrieving information.`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`Wait for user response`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:` - if user needs a refund, transition to refund state.`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:` - if user needs a replacement, transition to replacement state.`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`4. Ask for the order number.`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`Wait for user response`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{})})]})})}),`\n`,_jsx(_components.hr,{}),`\n`,_jsx(Heading,{level:`2`,id:`prompting-more-in-depth`,children:`Prompting More In-depth`}),`\n`,_jsx(_components.p,{children:`It’s recommended to spell things out clearly for the agent to get the best results. The more explicit your instructions, the more consistent your agent’s behavior.`}),`\n`,_jsx(_components.p,{children:_jsx(_components.strong,{children:`Example — Appointment or Demo Booking:`})}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`19`,language:`text`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`text`,children:_jsxs(_components.code,{language:`text`,numberOfLines:`19`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`If a customer requests to book an appointment or demo, follow these steps:`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`1. Ask for full name.`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`2. Ask for preferred date and time.`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`3. Invoke check_available_appointments and return available slots.`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`4. Ask for company name.`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`5. Ask for full email address:`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:` - If spelled out: n-a-m-e-@-dot-com → interpret as name@domain.com`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:` - \"name at\" → interpret as name@`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:` - \"dot com\" → interpret as .com`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`6. Ask for purpose of the appointment.`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`7. Ask for best phone number:`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:` - Accepted formats: 4158923245, (415) 892-3245, 415-892-3245`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:` - Pronounce as: \"four one five - eight nine two - three two four five\"`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:` - Important: Keep spaces around the dash when speaking`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`8. Reconfirm preferred date and time if needed.`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`9. Confirm all details (name, purpose, date, time, email, phone) with the caller.`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`10. Invoke book_appointment function.`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{})})]})})}),`\n`,_jsx(Tip,{children:_jsxs(_components.p,{children:[`If the agent says a phrase or phone number too quickly, instruct it to `,_jsx(_components.strong,{children:`repeat slowly`}),`.`]})})]})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent};function _missingMdxReference(id,component){throw new Error(`Expected `+(component?`component`:`object`)+\" `\"+id+\"` to be defined: you likely forgot to import, pass, or provide it.\")}","frontmatter":{},"scope":{"config":{},"pageMetadata":{"title":"Write a Single Prompt","description":"Learn how to write effective prompts that your AI agent can follow reliably.","href":"/build/write-single-prompt"}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[{"title":"Creating a Prompt Within Your Agent","slug":"creating-a-prompt-within-your-agent","depth":2,"children":[]},{"title":"Breaking Prompts into Sections","slug":"breaking-prompts-into-sections","depth":2,"children":[]},{"title":"Write Tasks as Steps","slug":"write-tasks-as-steps","depth":2,"children":[]},{"title":"Prompting More In-depth","slug":"prompting-more-in-depth","depth":2,"children":[]}],"codeExamples":{}},"jsLinks":[],"subdomain":"uponai","siteName":"UponAI","title":"Write a Single Prompt - UponAI","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-05-18T15:07:11.055Z","originalFileLocation":"build/write-single-prompt.mdx"},"headHtml":"\u003cscript data-mint-head>(function(){var d=document.documentElement,p=null;if(!p){try{p=localStorage.getItem(\"isDarkMode\")}catch(e){}if(p==='true')p='dark';else if(p==='false')p='light';if(p!=='light'\u0026\u0026p!=='dark'\u0026\u0026p!=='system')p=\"system\"}var r=p==='system'?(matchMedia(\"(prefers-color-scheme: dark)\").matches?'dark':'light'):p;d.classList.remove(r==='dark'?'light':'dark');d.classList.add(r);d.setAttribute(\"data-theme-preference\",p)})();\u003c/script>\u003cmeta data-mint-head name=\"description\" content=\"Learn how to write effective prompts that your AI agent can follow reliably.\">\u003cmeta data-mint-head name=\"application-name\" content=\"UponAI\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"apple-touch-icon\" type=\"image/svg+xml\" sizes=\"180x180\" href=\"https://mintlify.s3.us-west-1.amazonaws.com/uponai/favicon.svg\">\u003clink data-mint-head rel=\"icon\" type=\"image/svg+xml\" sizes=\"32x32\" href=\"https://mintlify.s3.us-west-1.amazonaws.com/uponai/favicon.svg\">\u003clink data-mint-head rel=\"icon\" type=\"image/svg+xml\" sizes=\"16x16\" href=\"https://mintlify.s3.us-west-1.amazonaws.com/uponai/favicon.svg\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/svg+xml\" href=\"https://mintlify.s3.us-west-1.amazonaws.com/uponai/favicon.svg\">\u003cmeta data-mint-head property=\"og:title\" content=\"Write a Single Prompt - UponAI\">\u003cmeta data-mint-head property=\"og:description\" content=\"Learn how to write effective prompts that your AI agent can follow reliably.\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"UponAI\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://documentation.uponai.com/build/write-single-prompt\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://uponai.mintlify.site/_mintlify/api/og/v2?division=Step+1%3A+Write+the+prompt\u0026amp;title=Write+a+Single+Prompt\u0026amp;description=Learn+how+to+write+effective+prompts+that+your+AI+agent+can+follow+reliably.\u0026amp;theme=339d93954e751f350341c522\u0026amp;signature=fe3db66d5a01abc1487570b0896803fc136cd12b3ceceb9a0db5bce5f1f28f61\">\u003cmeta data-mint-head property=\"og:image:width\" content=\"1200\">\u003cmeta data-mint-head property=\"og:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"twitter:card\" content=\"summary_large_image\">\u003cmeta data-mint-head name=\"twitter:title\" content=\"Write a Single Prompt - UponAI\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Learn how to write effective prompts that your AI agent can follow reliably.\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://uponai.mintlify.site/_mintlify/api/og/v2?division=Step+1%3A+Write+the+prompt\u0026amp;title=Write+a+Single+Prompt\u0026amp;description=Learn+how+to+write+effective+prompts+that+your+AI+agent+can+follow+reliably.\u0026amp;theme=339d93954e751f350341c522\u0026amp;signature=fe3db66d5a01abc1487570b0896803fc136cd12b3ceceb9a0db5bce5f1f28f61\">\u003cmeta data-mint-head name=\"twitter:image:width\" content=\"1200\">\u003cmeta data-mint-head name=\"twitter:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"msapplication-config\" content=\"https://mintlify.s3.us-west-1.amazonaws.com/uponai/_generated/favicon/browserconfig.xml?v=3\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"UponAI\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#16A34A\">\u003clink data-mint-head rel=\"canonical\" href=\"https://documentation.uponai.com/build/write-single-prompt\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/build/write-single-prompt.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://documentation.uponai.com/#organization\",\"name\":\"UponAI\",\"url\":\"https://documentation.uponai.com\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/uponai/Z_4kJsgPYLQAiuNH/images/favicon.webp?fit=max\u0026auto=format\u0026n=Z_4kJsgPYLQAiuNH\u0026q=85\u0026s=22fd99ea2484bdf64edc52775ef82144\"}},{\"@type\":\"WebSite\",\"@id\":\"https://documentation.uponai.com#website\",\"name\":\"UponAI\",\"url\":\"https://documentation.uponai.com\",\"publisher\":{\"@id\":\"https://documentation.uponai.com/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://documentation.uponai.com/build/write-single-prompt#webpage\",\"url\":\"https://documentation.uponai.com/build/write-single-prompt\",\"name\":\"Write a Single Prompt\",\"description\":\"Learn how to write effective prompts that your AI agent can follow reliably.\",\"dateModified\":\"2026-05-18T15:07:11.055Z\",\"isPartOf\":{\"@id\":\"https://documentation.uponai.com#website\"},\"breadcrumb\":{\"@id\":\"https://documentation.uponai.com/build/write-single-prompt#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://documentation.uponai.com/build/write-single-prompt#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Build\",\"item\":\"https://documentation.uponai.com/build/prompt-overview\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Setup single / multi prompt agent\",\"item\":\"https://documentation.uponai.com/build/prompt-overview\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Step 1: Write the prompt\",\"item\":\"https://documentation.uponai.com/build/prompt-overview\"},{\"@type\":\"ListItem\",\"position\":4,\"name\":\"Write a Single Prompt\",\"item\":\"https://documentation.uponai.com/build/write-single-prompt\"}]},{\"@type\":[\"Article\",\"TechArticle\"],\"@id\":\"https://documentation.uponai.com/build/write-single-prompt#article\",\"headline\":\"Write a Single Prompt\",\"name\":\"Write a Single Prompt\",\"description\":\"Learn how to write effective prompts that your AI agent can follow reliably.\",\"url\":\"https://documentation.uponai.com/build/write-single-prompt\",\"mainEntityOfPage\":{\"@id\":\"https://documentation.uponai.com/build/write-single-prompt#webpage\"},\"dateModified\":\"2026-05-18T15:07:11.055Z\",\"publisher\":{\"@id\":\"https://documentation.uponai.com/#organization\"},\"isPartOf\":{\"@id\":\"https://documentation.uponai.com#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"UponAI\",\"publisher\":{\"@type\":\"Organization\",\"name\":\"UponAI\"},\"provider\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","agentPointerHref":"/build/write-single-prompt.md","siteName":"UponAI","nav":{"global":null,"tabs":[{"tab":"Documentation","groups":[{"group":"Begin Your AI Journey","pages":[{"title":"Introduction","href":"/getting-started"},{"title":"Build Your First Phone Agent in 5 Minutes","href":"/getting-started/quick-start"},{"title":"SDKs","href":"/getting-started/sdk"},{"title":"MCP Server","href":"/getting-started/mcp-server"}]},{"group":"Build","pages":[{"group":"Setup single / multi prompt agent","pages":[{"group":"Step 1: Write the prompt","pages":[{"title":"Single/Multi Prompt Agent Overview","description":"Choose between single or multi-prompt structures to build AI agents with the right balance of simplicity and control.","href":"/build/prompt-overview"},{"title":"Write a Single Prompt","href":"/build/write-single-prompt"},{"title":"Build a Multi-Prompt Agent","description":"Structure complex agents using multiple states, each with its own focused prompt and behavior.","href":"/build/build-multi-prompt"}]},{"title":"Step 2: Configure the Basic Settings","href":"/build/configure-basic-settings"},{"group":"Step 3: Add function calling","pages":[{"title":"Function Calling Overview","href":"/build/function-calling-overview"},{"title":"End Call","href":"/build/end-call"},{"title":"Transfer Call","href":"/build/transfer-call"},{"title":"Send SMS","href":"/build/send-sms"},{"title":"Check Calendar Availability","href":"/build/check-calendar-availability"},{"title":"Book Calendar","href":"/build/book-calendar"},{"title":"Press Digit (IVR Navigation)","href":"/build/press-digit"},{"title":"Integrate Any System with Custom Functions","href":"/build/custom-function"},{"title":"Code Tool","href":"/build/code-tool"},{"title":"Extract Dynamic Variables","href":"/build/extract-dynamic-variables"},{"title":"Agent Transfer","href":"/build/agent-transfer"},{"title":"MCP","href":"/build/mcp"}]}]},{"group":"Setup conversation flow agent","pages":[{"title":"Conversation Flow Overview","href":"/build/conversation-flow/overview"},{"title":"Step 1: Configure Global Settings","href":"/build/conversation-flow/global-setting"},{"group":"Step 2: Add nodes","pages":[{"title":"Step 2: Add Nodes","href":"/build/conversation-flow/node"},{"title":"Conversation Node","href":"/build/conversation-flow/conversation-node"},{"title":"End Node","href":"/build/conversation-flow/end-node"},{"title":"Call Transfer Node","href":"/build/conversation-flow/call-transfer-node"},{"title":"Extract Dynamic Variable Node","href":"/build/conversation-flow/extract-dv-node"},{"title":"Function Node","href":"/build/conversation-flow/function-node"},{"title":"Code Node","href":"/build/conversation-flow/code-node"},{"title":"Press Digit Node","href":"/build/conversation-flow/press-digit-node"},{"title":"SMS Node","href":"/build/conversation-flow/sms-node"},{"title":"Logic Split Node","href":"/build/conversation-flow/logic-split-node"},{"title":"Subagent Node","href":"/build/conversation-flow/subagent-node"},{"title":"MCP Node","href":"/build/conversation-flow/mcp-node"},{"title":"Agent Transfer Node","href":"/build/conversation-flow/transfer-agent-node"},{"title":"Global Node","href":"/build/conversation-flow/global-node"}]},{"title":"Step 3: Add Transition Conditions","href":"/build/conversation-flow/transition-condition"},{"title":"Components","href":"/build/conversation-flow/components"},{"title":"Flex Mode","href":"/build/conversation-flow/flex-mode"},{"group":"Advanced features","pages":[{"title":"Fine-tune Examples","href":"/build/conversation-flow/finetune-examples"},{"title":"Custom Functions","href":"/build/conversation-flow/custom-function"}]},{"title":"Debug Guide","href":"/build/conversation-flow/debug-guide"}]},{"group":"Language \u0026 Chat","pages":[{"title":"Set Language for Your Agent","href":"/build/set-language"},{"title":"Configure a Multilingual Agent","href":"/build/configure-multilingual"},{"title":"Create Chat Agent","href":"/build/create-chat-agent"}]},{"group":"Understand User Speech","pages":[{"title":"Speech Recognition Provider Comparison","href":"/build/asr-provider-comparison"},{"title":"Balance Transcription Accuracy and Latency","href":"/build/transcription-mode"},{"title":"Handle Background Speech and Noise","href":"/build/handle-background-noise"}]},{"group":"Generate Better Responses from LLM","pages":[{"title":"Agent Handbook","href":"/build/agent-handbook"},{"title":"Prompt Engineering Guide","href":"/build/prompt-engineering-guide"},{"title":"Prompt Guide and Examples for Specific Situations","href":"/build/prompt-situation-guide"},{"title":"Configure LLM Options","href":"/build/llm-options"}]},{"group":"Customize the Synthesized Speech","pages":[{"title":"Choose a Custom Voice","href":"/build/choose-custom-voice"},{"title":"Platform Voices","href":"/build/platform-voices"},{"title":"TTS Provider Comparison","href":"/build/tts-provider-comparison"},{"title":"Add Custom Pronunciation","href":"/build/add-pronunciation"},{"title":"Add Backchannel","href":"/build/add-backchannel"},{"title":"Make Agent Hold and Respond Nothing","href":"/build/no-response"},{"title":"Add Pause or Read Slowly","href":"/build/add-pause"},{"title":"Setup TTS Fallback","href":"/build/tts-fallback"}]},{"group":"Integrate Telephony Features","pages":[{"title":"Handle Voicemail and IVR","href":"/build/handle-voicemail"},{"title":"Capture DTMF Input from User","href":"/build/user-dtmf"},{"title":"Set and Parse Custom SIP Headers","href":"/build/sip-headers"}]},{"group":"Provide Context to the Agent","pages":[{"title":"Knowledge Base","href":"/build/knowledge-base"},{"title":"Dynamic Variables","href":"/build/dynamic-variables"}]},{"title":"Guardrails","href":"/build/guardrails"},{"title":"AI Agent Settings","href":"/build/advanced-customization"},{"title":"Understanding Functions","href":"/build/functions"}]},{"group":"Test","pages":[{"title":"Testing Overview","href":"/Test/test-overview"},{"group":"LLM Playground","pages":[{"title":"LLM Playground","href":"/Test/llm-playground"},{"title":"Debug Agent Responses","href":"/Test/llm-playground-debug"}]},{"group":"LLM Simulation Testing","pages":[{"title":"LLM Simulation Testing","href":"/Test/llm-simulation-testing"},{"title":"Batch Test Simulation","href":"/Test/batch-test-simulation"}]},{"group":"Audio Testing","pages":[{"title":"Phone Call Testing","href":"/Test/test-phone"},{"title":"Web Call Testing","href":"/Test/test-web"}]}]},{"group":"Deploy","pages":[{"title":"Purchase Phone Number","href":"/Deploy/purchase-number"},{"title":"A/B Testing","href":"/Deploy/ab-testing"},{"group":"Connect to custom telephony via SIP","pages":[{"title":"Custom Telephony","href":"/Deploy/custom-telephony"},{"title":"Connect Twilio via SIP Trunking","href":"/Deploy/twilio"},{"title":"Connect Telnyx via SIP Trunking","href":"/Deploy/telnyx"},{"title":"Connect Vonage via SIP Trunking","href":"/Deploy/vonage"},{"title":"Connect Amazon Connect","href":"/Deploy/amazon-connect"},{"title":"Connect Avaya via SIP Trunking","href":"/Deploy/avaya"},{"title":"Connect Five9","href":"/Deploy/five9"},{"title":"Connect Genesys via SIP Trunking","href":"/Deploy/genesys"}]},{"group":"Make \u0026 receive phone calls","pages":[{"title":"Receive Calls","href":"/Deploy/inbound-call"},{"title":"Outbound Calls","href":"/Deploy/outbound-call"}]},{"title":"International Calling and Fees","href":"/Deploy/international-call"},{"title":"Create Chat Completion","href":"/Deploy/create-chat-completion"},{"title":"Website Widget","href":"/Deploy/chat-widget"},{"title":"Send \u0026 Receive SMS","href":"/Deploy/enable-sms"},{"title":"Create Batch Calls","href":"/Deploy/make-batch-call"},{"title":"Setup Versioning for Agents","href":"/Deploy/agent-versioning"},{"title":"Compare Agent Versions","href":"/Deploy/version-comparison"},{"group":"Increase call pickup rate","pages":[{"title":"Spam Likely Overview","href":"/Deploy/call-pickup-rate/spam-likely"},{"title":"Add a Business Profile","href":"/Deploy/call-pickup-rate/business-profile"},{"title":"Apply for Verified Phone Number","href":"/Deploy/call-pickup-rate/verified-phone"},{"title":"Apply for Branded Call","href":"/Deploy/call-pickup-rate/branded-call"},{"title":"Handle Application Rejection","href":"/Deploy/call-pickup-rate/handle-rejection"},{"title":"Stop the Service","href":"/Deploy/call-pickup-rate/stop-service"}]},{"title":"Connect to Web Call","href":"/Deploy/web-call"},{"title":"Understand Concurrency \u0026 Limits","href":"/Deploy/concurrency"}]},{"group":"Monitor","pages":[{"title":"Monitor Sessions via Dashboard","href":"/Monitor/session-history"},{"title":"Get Analytics Insight","href":"/Monitor/analytics-dashboard"},{"title":"Alerting","href":"/Monitor/alerting"},{"group":"Webhooks","pages":[{"title":"Webhook Overview","href":"/Monitor/webhook-overview"},{"title":"Register \u0026 Handle Webhooks","href":"/Monitor/register-webhook"},{"title":"Secure the Webhook","href":"/Monitor/secure-webhook"},{"title":"Inbound Call Webhook","href":"/Monitor/inbound-webhook"}]},{"group":"Post Call Analysis","pages":[{"title":"Post Call Analysis Overview","href":"/Monitor/post-call-analysis/overview"},{"title":"Define the Information You Want to Extract","href":"/Monitor/post-call-analysis/define-fields"},{"title":"Consume the Analysis Data","href":"/Monitor/post-call-analysis/consume-data"},{"title":"Rerun Post-Call/Chat Analysis","href":"/Monitor/post-call-analysis/rerun-analysis"}]}]},{"group":"Reliability \u0026 Debugging","pages":[{"title":"Reliability Overview","href":"/Reliability/reliability-overview"},{"group":"Latency","pages":[{"title":"Check Actual Latency","href":"/Reliability/latency/check-actual-latency"},{"title":"Check Estimated Latency","href":"/Reliability/latency/check-estimated-latency"},{"title":"Troubleshoot High Latency","href":"/Reliability/latency/troubleshoot-latency"}]},{"group":"Fix Agent Behaviors","pages":[{"title":"Debug Wrong Response","href":"/Reliability/fix-behaviors/wrong-response"},{"title":"Increase Transcription Accuracy","href":"/Reliability/fix-behaviors/wrong-transcript"}]},{"group":"Debug","pages":[{"title":"Debug Call Disconnection","href":"/Reliability/debug/debug-call-disconnect"},{"title":"Debug Call Transfer Failure","href":"/Reliability/debug/debug-call-transfer"},{"title":"Debug Outbound Connection Issues","href":"/Reliability/debug/debug-outbound-call"},{"title":"Debug SIP Calls Using PCAP","href":"/Reliability/debug/debug-calls-pcap"}]},{"title":"Prevent Abuse","href":"/Reliability/prevent-abuse"},{"title":"Fraud Protection","href":"/Reliability/fraud-protection"}]},{"group":"Accounts and Workspace","pages":[{"title":"Workspace","href":"/Accounts/workspace"},{"title":"Account","href":"/Accounts/account"},{"title":"Access Control","href":"/Accounts/access-control"},{"title":"KYC Verification","href":"/Accounts/kyc"},{"group":"Billing","pages":[{"title":"Billing Overview","href":"/Accounts/billing/billing-overview"},{"title":"Billing Exceptions","href":"/Accounts/billing/billing-exceptions"},{"title":"Add Payment Method","href":"/Accounts/billing/add-payment"},{"title":"Handle Failed Payments","href":"/Accounts/billing/fail-payment"}]},{"group":"Keys","pages":[{"title":"API Key Overview","href":"/Accounts/keys/api-keys-overview"},{"title":"Manage API Keys","href":"/Accounts/keys/manage-api-keys"},{"title":"Public Keys","href":"/Accounts/keys/public-keys"}]},{"group":"Privacy","pages":[{"title":"Data Storage Settings","href":"/Accounts/privacy/data-storage"},{"title":"Data Retention Policy","href":"/Accounts/privacy/data-retention"},{"title":"Secure URLs","href":"/Accounts/privacy/signed-secure-url"}]}]},{"group":"Other Topics","pages":[{"group":"Custom LLM","pages":[{"title":"Custom LLM Overview","href":"/custom-llm/overview"},{"title":"Setup WebSocket Server","href":"/custom-llm/setup-websocket-server"},{"title":"Integrate LLM","href":"/custom-llm/integrate-llm"},{"title":"Integrate Function Calling","href":"/custom-llm/integrate-function-calling"},{"title":"Troubleshooting Guide","href":"/custom-llm/troubleshooting"},{"title":"Custom LLM Best Practices","href":"/custom-llm/llm-best-practices"}]},{"title":"Audio Basics","href":"/audio-basics"}]},{"group":"Integrations","pages":[{"title":"HubSpot Integration","href":"/Integrations/hubspot"}]},{"group":"AI Quality Assurance","pages":[{"title":"AI Quality Assurance","href":"/ai-qa/overview"},{"group":"Create QA","pages":[{"title":"Get Started","href":"/ai-qa/get-started"},{"title":"Define QA Cohort","href":"/ai-qa/create-cohort"},{"title":"Define Resolution Criteria","href":"/ai-qa/define-resolution-criteria"}]},{"title":"View QA Results","href":"/ai-qa/view-qa-results"},{"title":"AI QA Metrics","href":"/ai-qa/ai-qa-metrics"},{"title":"Address Metric Issues","href":"/ai-qa/address-metric-issues"}]}]},{"tab":"API Documentation","pages":[{"title":"API Documentation","href":"/api-reference/calls/create-phone-call"}]}]},"basePath":"","title":"Write a Single Prompt - UponAI","buildId":"dpl_Fyv1NbzwP68g2bEH2Roy98uY1zmE","deploymentId":"dpl_Fyv1NbzwP68g2bEH2Roy98uY1zmE","dynamics":[],"chunks":[]}