PromptL enables you to craft a controlled interaction history so that the model can be conditioned on arbitrary prior outputs. In advanced usage, there are two principle mechanisms of interest:
Mocking Roles
Pretend that the assistant has already replied with specified content.
Mocking Tool Calls
Emulate a tool invocation and its response so that PromptL sees it as if a real tool were executed.
Mocking a role means inserting an assistant response directly into the prompt. The model will behave as though this response actually occurred. This is useful when you want to:
Seed the conversation with example assistant behavior
Use few-shot prompting techniques
Test how the model continues from a predetermined reply
Mocking a tool call allows you to simulate both the invocation of an external function and its response—as if the model had called a real tool and received structured output. This gives you fine-grained control over how the model interprets prior tool usage and is especially useful in logic-heavy prompt flows that rely on external data.
A <tool-call /> element inside an <assistant> block, which mimics the model making a function call.
A corresponding <tool> block with the same id and name, which contains the tool’s response.
<assistant> <tool-call id="123" name="get-weather" arguments={{ { location: "Barcelona" } }} /></assistant><tool id="123" name="get_weather"> It's 17 °C in Barcelona.</tool>
Was this page helpful?
{"docsConfig":{"theme":"mint","$schema":"https://mintlify.com/docs.json","name":"Latitude Docs","colors":{"primary":"#0080ff","light":"#0080ff","dark":"#0080ff"},"logo":{"light":"https://mintcdn.com/latitudellms/Ssq9dzRdSVyjHEcj/logo/light.svg?fit=max\u0026auto=format\u0026n=Ssq9dzRdSVyjHEcj\u0026q=85\u0026s=0f5a2f28c08aa15169274fb611bb7cb4","dark":"https://mintcdn.com/latitudellms/Ssq9dzRdSVyjHEcj/logo/dark.svg?fit=max\u0026auto=format\u0026n=Ssq9dzRdSVyjHEcj\u0026q=85\u0026s=1865443ef1242937e62677890c184176"},"favicon":"https://mintcdn.com/latitudellms/Ssq9dzRdSVyjHEcj/favicon.svg?fit=max\u0026auto=format\u0026n=Ssq9dzRdSVyjHEcj\u0026q=85\u0026s=82111b5b93980b0770d626f2ae5d1c63","navbar":{"primary":{"type":"button","label":"Get started","href":"https://app.latitude.so/"}},"footer":{"socials":{"twitter":"https://twitter.com/trylatitude","github":"https://github.com/latitude-dev/latitude-llm","linkedin":"https://www.linkedin.com/company/trylatitude"}},"seo":{"metatags":{"robots":"noindex"}},"contextual":{"options":["copy","view","chatgpt","claude"],"display":"header"},"styling":{"latex":false},"navigation":{"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"latitudellms","hasAudioNarration":false,"actualSubdomain":"latitudellms","customDomains":["docs-v1.latitude.so"],"gitSource":{"type":"github","owner":"latitude-dev","repo":"latitude-llm","deployBranch":"latitude-v1","contentDirectory":"docs","isPrivate":false,"mountPath":"","label":""},"chroma":{"liveDeploymentHistoryId":"6a98bdaf1a3978f98e37244e","collectionId":"67766419-42b4-45ee-b0c0-17e625e4564c","schemaVersion":"v3","latestBuiltDeploymentHistoryId":"6a98bdaf1a3978f98e37244e"},"feedback":{"thumbs":true},"entitlements":{"AI_CHAT":{"status":"ENABLED"},"WEB_MCP":{"status":"ENABLED"},"NARRATION":{"status":"ENABLED"}},"buildId":"6a98bdaf1a3978f98e37244e","clientVersion":"0.0.3990","searchFilterCounts":[{"language":"default","tag":"Examples","count":36},{"language":"default","tag":"Latitude","count":35},{"language":"default","tag":"Developers","count":26},{"language":"default","tag":"Providers","count":18},{"language":"default","tag":"PromptL","count":14},{"language":"default","tag":"Overview","count":10},{"language":"default","tag":"SDK examples","count":10},{"language":"default","tag":"Prompting Techniques","count":10},{"language":"default","tag":"Use cases","count":8},{"language":"default","tag":"Deployment","count":8}]},"assistantConfig":{},"basePath":"","hasChatPermissions":true,"hasWebMcpPermissions":true,"toggles":[{"name":"kill-isr","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":"editor-v7-file-tree","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":"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":"llms-txt-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"pause-universal-search-reconcile","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":"per-site-search-delta","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":"editor-private-page-search","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":"editor-nav-generations","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":"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":"byok-sep-25","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":"vite-origin","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-agent-model-picker","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-updated-9-15","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":"workos-enabled","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"isAtlas":false,"googleFontsInlined":false},"customCss":[],"page":{"pagePath":"promptl/advanced/mocking","slug":"/promptl/advanced/mocking","pageMetadata":{"title":"Mocking","description":"Simulate assistant and tool responses in PromptL for testing and advanced development","href":"/promptl/advanced/mocking"},"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: \"Simulate assistant and tool responses in PromptL for testing and advanced development\"\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={br:`br`,code:`code`,em:`em`,hr:`hr`,li:`li`,ol:`ol`,p:`p`,pre:`pre`,span:`span`,strong:`strong`,ul:`ul`,..._provideComponents(),...props.components},{CodeBlock,Heading,Warning}=_components;if(!CodeBlock)_missingMdxReference(`CodeBlock`,true);if(!Heading)_missingMdxReference(`Heading`,true);if(!Warning)_missingMdxReference(`Warning`,true);return _jsxs(_Fragment,{children:[_jsx(Heading,{level:`2`,id:`overview`,children:`Overview`}),`\n`,_jsx(_components.p,{children:`PromptL enables you to craft a controlled interaction history so that the model can be conditioned on arbitrary prior outputs. In advanced usage, there are two principle mechanisms of interest:`}),`\n`,_jsxs(_components.ol,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Mocking Roles`}),_jsx(_components.br,{}),`\n`,`Pretend that the assistant has already replied with specified content.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Mocking Tool Calls`}),_jsx(_components.br,{}),`\n`,`Emulate a tool invocation and its response so that PromptL sees it as if a real tool were executed.`]}),`\n`]}),`\n`,_jsx(_components.hr,{}),`\n`,_jsx(Heading,{level:`2`,id:`1-mocking-roles`,children:`1. Mocking Roles`}),`\n`,_jsx(_components.p,{children:`Mocking a role means inserting an assistant response directly into the prompt. The model will behave as though this response actually occurred. This is useful when you want to:`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsx(_components.li,{children:`Seed the conversation with example assistant behavior`}),`\n`,_jsx(_components.li,{children:`Use few-shot prompting techniques`}),`\n`,_jsx(_components.li,{children:`Test how the model continues from a predetermined reply`}),`\n`]}),`\n`,_jsx(Heading,{level:`3`,id:`syntax`,children:`Syntax`}),`\n`,_jsxs(_components.p,{children:[`Wrap the desired assistant reply between `,_jsx(_components.code,{children:`\u003cassistant>`}),` tags:`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`7`,language:`xml`,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:`xml`,children:_jsxs(_components.code,{language:`xml`,numberOfLines:`7`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#808080`},children:`\u003c`}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:`user`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#808080`},children:`>`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`Good morning!`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#808080`},children:`\u003c/`}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:`user`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#808080`},children:`>`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#808080`},children:`\u003c`}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:`assistant`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#808080`},children:`>`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`Hello, I’m your weather assistant. How can I help you today?`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#808080`},children:`\u003c/`}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:`assistant`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#808080`},children:`>`})]}),`\n`]})})}),`\n`,_jsx(Warning,{children:_jsx(_components.p,{children:`Some models do not allow assistant messages as the last item.`})}),`\n`,_jsx(Heading,{level:`2`,id:`2-mocking-tool-calls`,children:`2. Mocking Tool Calls`}),`\n`,_jsxs(_components.p,{children:[`Mocking a tool call allows you to simulate both the `,_jsx(_components.em,{children:`invocation`}),` of an external function and its `,_jsx(_components.em,{children:`response`}),`—as if the model had called a real tool and received structured output. This gives you fine-grained control over how the model interprets prior tool usage and is especially useful in logic-heavy prompt flows that rely on external data.`]}),`\n`,_jsx(Heading,{level:`3`,id:`when-to-use`,children:`When to Use`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Testing prompt branches`}),` that depend on tool results`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Simulating APIs`}),` without triggering real network requests`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Validating error-handling logic`}),` by crafting edge-case tool responses`]}),`\n`]}),`\n`,_jsx(Heading,{level:`3`,id:`syntax-2`,children:`Syntax`}),`\n`,_jsx(_components.p,{children:`A mocked tool call consists of two components:`}),`\n`,_jsxs(_components.ol,{children:[`\n`,_jsxs(_components.li,{children:[`A `,_jsx(_components.code,{children:`\u003ctool-call />`}),` element inside an `,_jsx(_components.code,{children:`\u003cassistant>`}),` block, which mimics the model making a function call.`]}),`\n`,_jsxs(_components.li,{children:[`A corresponding `,_jsx(_components.code,{children:`\u003ctool>`}),` block with the same `,_jsx(_components.code,{children:`id`}),` and `,_jsx(_components.code,{children:`name`}),`, which contains the tool’s response.`]}),`\n`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`7`,language:`xml`,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:`xml`,children:_jsxs(_components.code,{language:`xml`,numberOfLines:`7`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#808080`},children:`\u003c`}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:`assistant`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#808080`},children:`>`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#808080`},children:` \u003c`}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:`tool-call`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#9CDCFE`},children:` id`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"123\"`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#9CDCFE`},children:` name`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"get-weather\"`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#9CDCFE`},children:` arguments`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`={{ { location: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Barcelona\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` } }} `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#808080`},children:`/>`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#808080`},children:`\u003c/`}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:`assistant`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#808080`},children:`>`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#808080`},children:`\u003c`}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:`tool`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#9CDCFE`},children:` id`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"123\"`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#9CDCFE`},children:` name`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"get_weather\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#808080`},children:`>`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` It's 17 °C in Barcelona.`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#808080`},children:`\u003c/`}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:`tool`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#808080`},children:`>`})]}),`\n`]})})})]})}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":"Mocking","description":"Simulate assistant and tool responses in PromptL for testing and advanced development","href":"/promptl/advanced/mocking"}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[{"title":"Overview","slug":"overview","depth":2,"children":[]},{"title":"1. Mocking Roles","slug":"1-mocking-roles","depth":2,"children":[{"title":"Syntax","slug":"syntax","depth":3,"children":[]}]},{"title":"2. Mocking Tool Calls","slug":"2-mocking-tool-calls","depth":2,"children":[{"title":"When to Use","slug":"when-to-use","depth":3,"children":[]},{"title":"Syntax","slug":"syntax-2","depth":3,"children":[]}]}],"codeExamples":{}},"jsLinks":["/_mintlify/custom/latitudellms/98203f04b0eae836/script.js"],"subdomain":"latitudellms","siteName":"Latitude Docs","title":"Mocking - Latitude Docs","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-01-26T17:21:36.332Z","originalFileLocation":"promptl/advanced/mocking.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=\"Simulate assistant and tool responses in PromptL for testing and advanced development\">\u003cmeta data-mint-head name=\"application-name\" content=\"Latitude Docs\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003cmeta data-mint-head name=\"robots\" content=\"noindex\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/latitudellms/nd8UhULMfcLSBoZ-/_generated/favicon/android-chrome-192x192.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"apple-touch-icon\" type=\"image/png\" sizes=\"180x180\" href=\"/mintlify-assets/_mintlify/favicons/latitudellms/nd8UhULMfcLSBoZ-/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/latitudellms/nd8UhULMfcLSBoZ-/_generated/favicon/favicon-16x16.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/latitudellms/nd8UhULMfcLSBoZ-/_generated/favicon/favicon-32x32.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/latitudellms/nd8UhULMfcLSBoZ-/_generated/favicon/favicon.ico\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/latitudellms/nd8UhULMfcLSBoZ-/_generated/favicon-dark/android-chrome-192x192.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/latitudellms/nd8UhULMfcLSBoZ-/_generated/favicon-dark/favicon-16x16.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/latitudellms/nd8UhULMfcLSBoZ-/_generated/favicon-dark/favicon-32x32.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/latitudellms/nd8UhULMfcLSBoZ-/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Mocking - Latitude Docs\">\u003cmeta data-mint-head property=\"og:description\" content=\"Simulate assistant and tool responses in PromptL for testing and advanced development\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"Latitude Docs\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://docs-v1.latitude.so/promptl/advanced/mocking\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://latitudellms.mintlify.app/_mintlify/api/og/v2?division=Advanced\u0026amp;title=Mocking\u0026amp;description=Simulate+assistant+and+tool+responses+in+PromptL+for+testing+and+advanced+development\u0026amp;theme=ab9bfabc69091edb5dcaeb95\u0026amp;signature=09240602d72098030fb90c8862813d4bfa7f1d4e78b75dcb9543affe7bf33705\">\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=\"Mocking - Latitude Docs\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Simulate assistant and tool responses in PromptL for testing and advanced development\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://latitudellms.mintlify.app/_mintlify/api/og/v2?division=Advanced\u0026amp;title=Mocking\u0026amp;description=Simulate+assistant+and+tool+responses+in+PromptL+for+testing+and+advanced+development\u0026amp;theme=ab9bfabc69091edb5dcaeb95\u0026amp;signature=09240602d72098030fb90c8862813d4bfa7f1d4e78b75dcb9543affe7bf33705\">\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=\"/mintlify-assets/_mintlify/favicons/latitudellms/nd8UhULMfcLSBoZ-/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"Latitude Docs\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#0080ff\">\u003clink data-mint-head rel=\"canonical\" href=\"https://docs-v1.latitude.so/promptl/advanced/mocking\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/promptl/advanced/mocking.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://docs-v1.latitude.so/#organization\",\"name\":\"Latitude Docs\",\"url\":\"https://docs-v1.latitude.so\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/latitudellms/Ssq9dzRdSVyjHEcj/logo/light.svg?fit=max\u0026auto=format\u0026n=Ssq9dzRdSVyjHEcj\u0026q=85\u0026s=0f5a2f28c08aa15169274fb611bb7cb4\"}},{\"@type\":\"WebSite\",\"@id\":\"https://docs-v1.latitude.so#website\",\"name\":\"Latitude Docs\",\"url\":\"https://docs-v1.latitude.so\",\"publisher\":{\"@id\":\"https://docs-v1.latitude.so/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://docs-v1.latitude.so/promptl/advanced/mocking#webpage\",\"url\":\"https://docs-v1.latitude.so/promptl/advanced/mocking\",\"name\":\"Mocking\",\"description\":\"Simulate assistant and tool responses in PromptL for testing and advanced development\",\"dateModified\":\"2026-01-26T17:21:36.332Z\",\"isPartOf\":{\"@id\":\"https://docs-v1.latitude.so#website\"},\"breadcrumb\":{\"@id\":\"https://docs-v1.latitude.so/promptl/advanced/mocking#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://docs-v1.latitude.so/promptl/advanced/mocking#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Advanced\",\"item\":\"https://docs-v1.latitude.so/promptl/advanced/chains\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Mocking\",\"item\":\"https://docs-v1.latitude.so/promptl/advanced/mocking\"}]},{\"@type\":[\"Article\",\"TechArticle\"],\"@id\":\"https://docs-v1.latitude.so/promptl/advanced/mocking#article\",\"headline\":\"Mocking\",\"name\":\"Mocking\",\"description\":\"Simulate assistant and tool responses in PromptL for testing and advanced development\",\"url\":\"https://docs-v1.latitude.so/promptl/advanced/mocking\",\"mainEntityOfPage\":{\"@id\":\"https://docs-v1.latitude.so/promptl/advanced/mocking#webpage\"},\"dateModified\":\"2026-01-26T17:21:36.332Z\",\"publisher\":{\"@id\":\"https://docs-v1.latitude.so/#organization\"},\"isPartOf\":{\"@id\":\"https://docs-v1.latitude.so#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"Latitude Docs\",\"creator\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","siteName":"Latitude Docs","nav":{"global":null,"tabs":[{"tab":"Latitude","pages":[{"title":"Latitude","href":"/guides/getting-started/introduction"}]},{"tab":"PromptL","groups":[{"group":"Getting Started","pages":[{"title":"Introduction","href":"/promptl/getting-started/introduction"}]},{"group":"Syntax","pages":[{"title":"Structure","href":"/promptl/syntax/structure"},{"title":"Configuration","href":"/promptl/syntax/configuration"},{"title":"Messages","href":"/promptl/syntax/messages"},{"title":"Variables","href":"/promptl/syntax/variables"},{"title":"Conditional Statements","href":"/promptl/syntax/conditionals"},{"title":"Loops and Iteration","href":"/promptl/syntax/loops"}]},{"group":"Usage","pages":[{"title":"Quick Start","href":"/promptl/usage/quick-start"},{"group":"Adapters","pages":[{"title":"Use PromptL with your Provider","href":"/promptl/usage/adapters/overview"},{"title":"OpenAI","href":"/promptl/usage/adapters/openai"},{"title":"Anthropic","href":"/promptl/usage/adapters/anthropic"}]}]},{"group":"Advanced","pages":[{"title":"Chains and Steps","href":"/promptl/advanced/chains"},{"title":"Prompt References","description":"Learn how to reference other prompts in PromptL","href":"/promptl/advanced/snippets"},{"title":"Mocking","href":"/promptl/advanced/mocking"}]}]},{"tab":"Developers","pages":[{"title":"Developers","href":"/developers/overview"}]},{"tab":"Examples","pages":[{"title":"Examples","href":"/examples/overview"}]}]},"title":"Mocking - Latitude Docs","buildId":"dpl_2oYXwqkEXirXBPk8wV1FtM5USFWi","deploymentId":"dpl_2oYXwqkEXirXBPk8wV1FtM5USFWi","dynamics":[],"chunks":[]}