const result = await RunAnywhere.llm.generate('How do I reverse a string?', { systemPrompt: 'You are a TypeScript expert. Answer with code, then one sentence.',})
Through a message
A system message becomes options.systemPrompt automatically:
const result = await RunAnywhere.llm.generate([ { role: 'system', content: 'You are a TypeScript expert.' }, { role: 'user', content: 'How do I reverse a string?' },])
Equivalent. When both are present, the explicit options.systemPrompt wins.
Writing one that works
Even with desktop headroom, the models here are small. Short, concrete instructions land; long
personas do not.
// Works'You are a terse assistant. Answer in one sentence. No preamble.'// Works less well on a 0.6B model'You are an extremely helpful, knowledgeable, and friendly AI assistant who always strives to provide the most comprehensive and detailed responses possible…'
Naming the exact output shape usually holds:
await RunAnywhere.llm.generate(review, { systemPrompt: 'You are a classifier. Reply with exactly one word: positive, negative, or neutral.', temperature: 0.1,})
For a guaranteed shape rather than a requested one, use
structured output.
Reuse
import type { LlmOptions } from '@runanywhere/electron'export const prompts = { summarizer: { systemPrompt: 'Summarize in three bullet points. No introduction.', maxOutputTokens: 150, temperature: 0.3, }, coder: { systemPrompt: 'You are a TypeScript expert. Answer with code first.', temperature: 0.2, },} satisfies Record<string, LlmOptions>
Keeping these in the main process rather than the renderer means a settings change does not
need a window reload.
{"docsConfig":{"theme":"mint","$schema":"https://mintlify.com/docs.json","name":"RunAnywhere Docs","description":"Docs for Wally, frontier-scale open models behind an OpenAI-compatible API, and the open-source RunAnywhere on-device SDKs.","colors":{"primary":"#fd7014","light":"#fd7014","dark":"#fd7014"},"logo":{"light":"https://mintcdn.com/runanywhere/suKXeVfMdD9DOb-9/logo/mark.svg?fit=max\u0026auto=format\u0026n=suKXeVfMdD9DOb-9\u0026q=85\u0026s=0d71d113ea75918af951b07510e75dd1","dark":"https://mintcdn.com/runanywhere/suKXeVfMdD9DOb-9/logo/mark.svg?fit=max\u0026auto=format\u0026n=suKXeVfMdD9DOb-9\u0026q=85\u0026s=0d71d113ea75918af951b07510e75dd1"},"favicon":"https://mintcdn.com/runanywhere/suKXeVfMdD9DOb-9/favicon.svg?fit=max\u0026auto=format\u0026n=suKXeVfMdD9DOb-9\u0026q=85\u0026s=e2f5189928dfba3c0e4b5dcc45e29618","appearance":{"default":"dark","strict":true},"background":{"color":{"light":"#0d0c0b","dark":"#0d0c0b"}},"navbar":{"links":[{"href":"https://console.runanywhere.ai","label":"Console"},{"href":"https://calendly.com/sanchitmonga22/30min","label":"Talk to us"},{"href":"https://github.com/RunanywhereAI/runanywhere-sdks","type":"github"}],"primary":{"type":"button","label":"Get started","href":"https://console.runanywhere.ai"}},"footer":{"socials":{"website":"https://runanywhere.ai","github":"https://github.com/RunanywhereAI/runanywhere-sdks","x":"https://x.com/runanywhereai","linkedin":"https://www.linkedin.com/company/runanywhere","discord":"https://discord.gg/Qh3pkkDJWj"}},"seo":{"metatags":{"og:site_name":"RunAnywhere Docs","og:image":"https://runanywhere.ai/share/docs.png","og:image:type":"image/png","og:image:width":"1200","og:image:height":"630","og:image:alt":"The word Docs in a field of orange glyphs, beside the line: one CLI and one API key for frontier open models.","og:video":"https://runanywhere.ai/share/docs.mp4","og:video:secure_url":"https://runanywhere.ai/share/docs.mp4","og:video:type":"video/mp4","og:video:width":"1200","og:video:height":"630","twitter:card":"summary_large_image","twitter:image":"https://runanywhere.ai/share/docs.png"}},"fonts":{"heading":{"family":"Source Serif 4 Variable","weight":360,"source":"fonts/source-serif-4-latin.woff2","format":"woff2"},"body":{"family":"Host Grotesk Variable","weight":450,"source":"fonts/host-grotesk-latin.woff2","format":"woff2"}},"icons":{"library":"fontawesome"},"styling":{"eyebrows":"breadcrumbs","codeblocks":{"theme":"css-variables"},"latex":false},"contextual":{"options":["copy","view","chatgpt","claude"],"display":"header"},"navigation":{"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"runanywhere","hasAudioNarration":false,"actualSubdomain":"runanywhere","customDomains":["docs.runanywhere.ai"],"gitSource":{"type":"github","owner":"runanywhereai","repo":"runanywhere-marketing","deployBranch":"main","contentDirectory":"mintlify_docs","isPrivate":true,"mountPath":"","label":""},"entitlements":{"AI_CHAT":{"status":"ENABLED"},"WEB_MCP":{"status":"ENABLED"},"NARRATION":{"status":"ENABLED"}},"buildId":"6b0b4d695ebf995bebc8f7e7","clientVersion":"0.0.4416","searchFilterCounts":[{"language":"default","tag":"On-device SDKs","count":172},{"language":"default","tag":"Speech","count":54},{"language":"default","tag":"Text","count":36},{"language":"default","tag":"Get started","count":29},{"language":"default","tag":"Electron","count":28},{"language":"default","tag":"Flutter","count":28},{"language":"default","tag":"Kotlin","count":28},{"language":"default","tag":"React Native","count":28},{"language":"default","tag":"Swift","count":28},{"language":"default","tag":"Web","count":28}]},"assistantConfig":{"enableAskAiButton":false,"enableStarterQuestions":false,"enableAskAiSearchBar":true},"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":"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":"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":"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":"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":"turbopuffer-dual-write","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":"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":"starter-pricing","enabled":true,"variant":{"name":"control","enabled":true,"payload":{"type":"string","value":"control"},"feature_enabled":true},"impressionData":false},{"name":"llms-txt-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"starterQuestions":[],"googleFontsInlined":false},"customCss":[{"filePath":"style.css","href":"/_mintlify/custom/runanywhere/479d09cce8335c45/style.css"}]}
{"page":{"pagePath":"electron/llm/system-prompts","slug":"/electron/llm/system-prompts","pageMetadata":{"title":"System Prompts","description":"Control model behaviour with a system prompt","icon":"user-gear","href":"/electron/llm/system-prompts"},"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: \"Control model behaviour with a system prompt\"\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={a:`a`,code:`code`,p:`p`,pre:`pre`,span:`span`,..._provideComponents(),...props.components},{CodeBlock,Heading}=_components;if(!CodeBlock)_missingMdxReference(`CodeBlock`,true);if(!Heading)_missingMdxReference(`Heading`,true);return _jsxs(_Fragment,{children:[_jsx(Heading,{level:`2`,id:`through-options`,children:`Through options`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`3`,language:`typescript`,children:_jsx(_components.pre,{className:`shiki shiki-themes css-variables css-variables`,style:{backgroundColor:`var(--mint-background)`,\"--shiki-dark-bg\":`var(--mint-background)`,color:`var(--mint-foreground)`,\"--shiki-dark\":`var(--mint-foreground)`},language:`typescript`,children:_jsxs(_components.code,{language:`typescript`,numberOfLines:`3`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`var(--mint-token-keyword, #bd2864)`,\"--shiki-dark\":`var(--mint-token-keyword, #bd2864)`},children:`const`}),_jsx(_components.span,{style:{color:`var(--mint-token-constant, #171717)`,\"--shiki-dark\":`var(--mint-token-constant, #171717)`},children:` result`}),_jsx(_components.span,{style:{color:`var(--mint-token-keyword, #bd2864)`,\"--shiki-dark\":`var(--mint-token-keyword, #bd2864)`},children:` =`}),_jsx(_components.span,{style:{color:`var(--mint-token-keyword, #bd2864)`,\"--shiki-dark\":`var(--mint-token-keyword, #bd2864)`},children:` await`}),_jsx(_components.span,{style:{color:`var(--mint-token-constant, #171717)`,\"--shiki-dark\":`var(--mint-token-constant, #171717)`},children:` RunAnywhere`}),_jsx(_components.span,{style:{color:`var(--mint-token-function, #0068d6)`,\"--shiki-dark\":`var(--mint-token-function, #0068d6)`},children:`.`}),_jsx(_components.span,{style:{color:`var(--mint-token-constant, #171717)`,\"--shiki-dark\":`var(--mint-token-constant, #171717)`},children:`llm`}),_jsx(_components.span,{style:{color:`var(--mint-token-function, #0068d6)`,\"--shiki-dark\":`var(--mint-token-function, #0068d6)`},children:`.generate`}),_jsx(_components.span,{style:{color:`var(--mint-foreground)`,\"--shiki-dark\":`var(--mint-foreground)`},children:`(`}),_jsx(_components.span,{style:{color:`var(--mint-token-string-expression, #297a3a)`,\"--shiki-dark\":`var(--mint-token-string-expression, #297a3a)`},children:`'How do I reverse a string?'`}),_jsx(_components.span,{style:{color:`var(--mint-token-punctuation, #171717)`,\"--shiki-dark\":`var(--mint-token-punctuation, #171717)`},children:`,`}),_jsx(_components.span,{style:{color:`var(--mint-foreground)`,\"--shiki-dark\":`var(--mint-foreground)`},children:` {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`var(--mint-foreground)`,\"--shiki-dark\":`var(--mint-foreground)`},children:` systemPrompt`}),_jsx(_components.span,{style:{color:`var(--mint-token-keyword, #bd2864)`,\"--shiki-dark\":`var(--mint-token-keyword, #bd2864)`},children:`:`}),_jsx(_components.span,{style:{color:`var(--mint-token-string-expression, #297a3a)`,\"--shiki-dark\":`var(--mint-token-string-expression, #297a3a)`},children:` 'You are a TypeScript expert. Answer with code, then one sentence.'`}),_jsx(_components.span,{style:{color:`var(--mint-token-punctuation, #171717)`,\"--shiki-dark\":`var(--mint-token-punctuation, #171717)`},children:`,`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`var(--mint-foreground)`,\"--shiki-dark\":`var(--mint-foreground)`},children:`})`})}),`\n`]})})}),`\n`,_jsx(Heading,{level:`2`,id:`through-a-message`,children:`Through a message`}),`\n`,_jsxs(_components.p,{children:[`A `,_jsx(_components.code,{children:`system`}),` message becomes `,_jsx(_components.code,{children:`options.systemPrompt`}),` automatically:`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`4`,language:`typescript`,children:_jsx(_components.pre,{className:`shiki shiki-themes css-variables css-variables`,style:{backgroundColor:`var(--mint-background)`,\"--shiki-dark-bg\":`var(--mint-background)`,color:`var(--mint-foreground)`,\"--shiki-dark\":`var(--mint-foreground)`},language:`typescript`,children:_jsxs(_components.code,{language:`typescript`,numberOfLines:`4`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`var(--mint-token-keyword, #bd2864)`,\"--shiki-dark\":`var(--mint-token-keyword, #bd2864)`},children:`const`}),_jsx(_components.span,{style:{color:`var(--mint-token-constant, #171717)`,\"--shiki-dark\":`var(--mint-token-constant, #171717)`},children:` result`}),_jsx(_components.span,{style:{color:`var(--mint-token-keyword, #bd2864)`,\"--shiki-dark\":`var(--mint-token-keyword, #bd2864)`},children:` =`}),_jsx(_components.span,{style:{color:`var(--mint-token-keyword, #bd2864)`,\"--shiki-dark\":`var(--mint-token-keyword, #bd2864)`},children:` await`}),_jsx(_components.span,{style:{color:`var(--mint-token-constant, #171717)`,\"--shiki-dark\":`var(--mint-token-constant, #171717)`},children:` RunAnywhere`}),_jsx(_components.span,{style:{color:`var(--mint-token-function, #0068d6)`,\"--shiki-dark\":`var(--mint-token-function, #0068d6)`},children:`.`}),_jsx(_components.span,{style:{color:`var(--mint-token-constant, #171717)`,\"--shiki-dark\":`var(--mint-token-constant, #171717)`},children:`llm`}),_jsx(_components.span,{style:{color:`var(--mint-token-function, #0068d6)`,\"--shiki-dark\":`var(--mint-token-function, #0068d6)`},children:`.generate`}),_jsx(_components.span,{style:{color:`var(--mint-foreground)`,\"--shiki-dark\":`var(--mint-foreground)`},children:`([`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`var(--mint-foreground)`,\"--shiki-dark\":`var(--mint-foreground)`},children:` { role`}),_jsx(_components.span,{style:{color:`var(--mint-token-keyword, #bd2864)`,\"--shiki-dark\":`var(--mint-token-keyword, #bd2864)`},children:`:`}),_jsx(_components.span,{style:{color:`var(--mint-token-string-expression, #297a3a)`,\"--shiki-dark\":`var(--mint-token-string-expression, #297a3a)`},children:` 'system'`}),_jsx(_components.span,{style:{color:`var(--mint-token-punctuation, #171717)`,\"--shiki-dark\":`var(--mint-token-punctuation, #171717)`},children:`,`}),_jsx(_components.span,{style:{color:`var(--mint-foreground)`,\"--shiki-dark\":`var(--mint-foreground)`},children:` content`}),_jsx(_components.span,{style:{color:`var(--mint-token-keyword, #bd2864)`,\"--shiki-dark\":`var(--mint-token-keyword, #bd2864)`},children:`:`}),_jsx(_components.span,{style:{color:`var(--mint-token-string-expression, #297a3a)`,\"--shiki-dark\":`var(--mint-token-string-expression, #297a3a)`},children:` 'You are a TypeScript expert.'`}),_jsx(_components.span,{style:{color:`var(--mint-foreground)`,\"--shiki-dark\":`var(--mint-foreground)`},children:` }`}),_jsx(_components.span,{style:{color:`var(--mint-token-punctuation, #171717)`,\"--shiki-dark\":`var(--mint-token-punctuation, #171717)`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`var(--mint-foreground)`,\"--shiki-dark\":`var(--mint-foreground)`},children:` { role`}),_jsx(_components.span,{style:{color:`var(--mint-token-keyword, #bd2864)`,\"--shiki-dark\":`var(--mint-token-keyword, #bd2864)`},children:`:`}),_jsx(_components.span,{style:{color:`var(--mint-token-string-expression, #297a3a)`,\"--shiki-dark\":`var(--mint-token-string-expression, #297a3a)`},children:` 'user'`}),_jsx(_components.span,{style:{color:`var(--mint-token-punctuation, #171717)`,\"--shiki-dark\":`var(--mint-token-punctuation, #171717)`},children:`,`}),_jsx(_components.span,{style:{color:`var(--mint-foreground)`,\"--shiki-dark\":`var(--mint-foreground)`},children:` content`}),_jsx(_components.span,{style:{color:`var(--mint-token-keyword, #bd2864)`,\"--shiki-dark\":`var(--mint-token-keyword, #bd2864)`},children:`:`}),_jsx(_components.span,{style:{color:`var(--mint-token-string-expression, #297a3a)`,\"--shiki-dark\":`var(--mint-token-string-expression, #297a3a)`},children:` 'How do I reverse a string?'`}),_jsx(_components.span,{style:{color:`var(--mint-foreground)`,\"--shiki-dark\":`var(--mint-foreground)`},children:` }`}),_jsx(_components.span,{style:{color:`var(--mint-token-punctuation, #171717)`,\"--shiki-dark\":`var(--mint-token-punctuation, #171717)`},children:`,`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`var(--mint-foreground)`,\"--shiki-dark\":`var(--mint-foreground)`},children:`])`})}),`\n`]})})}),`\n`,_jsxs(_components.p,{children:[`Equivalent. When both are present, the explicit `,_jsx(_components.code,{children:`options.systemPrompt`}),` wins.`]}),`\n`,_jsx(Heading,{level:`2`,id:`writing-one-that-works`,children:`Writing one that works`}),`\n`,_jsx(_components.p,{children:`Even with desktop headroom, the models here are small. Short, concrete instructions land; long\npersonas do not.`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`5`,language:`typescript`,children:_jsx(_components.pre,{className:`shiki shiki-themes css-variables css-variables`,style:{backgroundColor:`var(--mint-background)`,\"--shiki-dark-bg\":`var(--mint-background)`,color:`var(--mint-foreground)`,\"--shiki-dark\":`var(--mint-foreground)`},language:`typescript`,children:_jsxs(_components.code,{language:`typescript`,numberOfLines:`5`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`var(--mint-token-comment, #666666)`,\"--shiki-dark\":`var(--mint-token-comment, #666666)`},children:`// Works`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`var(--mint-token-string-expression, #297a3a)`,\"--shiki-dark\":`var(--mint-token-string-expression, #297a3a)`},children:`'You are a terse assistant. Answer in one sentence. No preamble.'`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`var(--mint-token-comment, #666666)`,\"--shiki-dark\":`var(--mint-token-comment, #666666)`},children:`// Works less well on a 0.6B model`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`var(--mint-token-string-expression, #297a3a)`,\"--shiki-dark\":`var(--mint-token-string-expression, #297a3a)`},children:`'You are an extremely helpful, knowledgeable, and friendly AI assistant who always strives to provide the most comprehensive and detailed responses possible…'`})}),`\n`]})})}),`\n`,_jsx(_components.p,{children:`Naming the exact output shape usually holds:`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`5`,language:`typescript`,children:_jsx(_components.pre,{className:`shiki shiki-themes css-variables css-variables`,style:{backgroundColor:`var(--mint-background)`,\"--shiki-dark-bg\":`var(--mint-background)`,color:`var(--mint-foreground)`,\"--shiki-dark\":`var(--mint-foreground)`},language:`typescript`,children:_jsxs(_components.code,{language:`typescript`,numberOfLines:`5`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`var(--mint-token-keyword, #bd2864)`,\"--shiki-dark\":`var(--mint-token-keyword, #bd2864)`},children:`await`}),_jsx(_components.span,{style:{color:`var(--mint-token-constant, #171717)`,\"--shiki-dark\":`var(--mint-token-constant, #171717)`},children:` RunAnywhere`}),_jsx(_components.span,{style:{color:`var(--mint-token-function, #0068d6)`,\"--shiki-dark\":`var(--mint-token-function, #0068d6)`},children:`.`}),_jsx(_components.span,{style:{color:`var(--mint-token-constant, #171717)`,\"--shiki-dark\":`var(--mint-token-constant, #171717)`},children:`llm`}),_jsx(_components.span,{style:{color:`var(--mint-token-function, #0068d6)`,\"--shiki-dark\":`var(--mint-token-function, #0068d6)`},children:`.generate`}),_jsx(_components.span,{style:{color:`var(--mint-foreground)`,\"--shiki-dark\":`var(--mint-foreground)`},children:`(review`}),_jsx(_components.span,{style:{color:`var(--mint-token-punctuation, #171717)`,\"--shiki-dark\":`var(--mint-token-punctuation, #171717)`},children:`,`}),_jsx(_components.span,{style:{color:`var(--mint-foreground)`,\"--shiki-dark\":`var(--mint-foreground)`},children:` {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`var(--mint-foreground)`,\"--shiki-dark\":`var(--mint-foreground)`},children:` systemPrompt`}),_jsx(_components.span,{style:{color:`var(--mint-token-keyword, #bd2864)`,\"--shiki-dark\":`var(--mint-token-keyword, #bd2864)`},children:`:`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`var(--mint-token-string-expression, #297a3a)`,\"--shiki-dark\":`var(--mint-token-string-expression, #297a3a)`},children:` 'You are a classifier. Reply with exactly one word: positive, negative, or neutral.'`}),_jsx(_components.span,{style:{color:`var(--mint-token-punctuation, #171717)`,\"--shiki-dark\":`var(--mint-token-punctuation, #171717)`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`var(--mint-foreground)`,\"--shiki-dark\":`var(--mint-foreground)`},children:` temperature`}),_jsx(_components.span,{style:{color:`var(--mint-token-keyword, #bd2864)`,\"--shiki-dark\":`var(--mint-token-keyword, #bd2864)`},children:`:`}),_jsx(_components.span,{style:{color:`var(--mint-token-constant, #171717)`,\"--shiki-dark\":`var(--mint-token-constant, #171717)`},children:` 0.1`}),_jsx(_components.span,{style:{color:`var(--mint-token-punctuation, #171717)`,\"--shiki-dark\":`var(--mint-token-punctuation, #171717)`},children:`,`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`var(--mint-foreground)`,\"--shiki-dark\":`var(--mint-foreground)`},children:`})`})}),`\n`]})})}),`\n`,_jsxs(_components.p,{children:[`For a guaranteed shape rather than a requested one, use\n`,_jsx(_components.a,{href:`/electron/structured-output`,children:`structured output`}),`.`]}),`\n`,_jsx(Heading,{level:`2`,id:`reuse`,children:`Reuse`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`13`,language:`typescript`,children:_jsx(_components.pre,{className:`shiki shiki-themes css-variables css-variables`,style:{backgroundColor:`var(--mint-background)`,\"--shiki-dark-bg\":`var(--mint-background)`,color:`var(--mint-foreground)`,\"--shiki-dark\":`var(--mint-foreground)`},language:`typescript`,children:_jsxs(_components.code,{language:`typescript`,numberOfLines:`13`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`var(--mint-token-keyword, #bd2864)`,\"--shiki-dark\":`var(--mint-token-keyword, #bd2864)`},children:`import`}),_jsx(_components.span,{style:{color:`var(--mint-token-keyword, #bd2864)`,\"--shiki-dark\":`var(--mint-token-keyword, #bd2864)`},children:` type`}),_jsx(_components.span,{style:{color:`var(--mint-foreground)`,\"--shiki-dark\":`var(--mint-foreground)`},children:` { LlmOptions } `}),_jsx(_components.span,{style:{color:`var(--mint-token-keyword, #bd2864)`,\"--shiki-dark\":`var(--mint-token-keyword, #bd2864)`},children:`from`}),_jsx(_components.span,{style:{color:`var(--mint-token-string-expression, #297a3a)`,\"--shiki-dark\":`var(--mint-token-string-expression, #297a3a)`},children:` '@runanywhere/electron'`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`var(--mint-token-keyword, #bd2864)`,\"--shiki-dark\":`var(--mint-token-keyword, #bd2864)`},children:`export`}),_jsx(_components.span,{style:{color:`var(--mint-token-keyword, #bd2864)`,\"--shiki-dark\":`var(--mint-token-keyword, #bd2864)`},children:` const`}),_jsx(_components.span,{style:{color:`var(--mint-token-constant, #171717)`,\"--shiki-dark\":`var(--mint-token-constant, #171717)`},children:` prompts`}),_jsx(_components.span,{style:{color:`var(--mint-token-keyword, #bd2864)`,\"--shiki-dark\":`var(--mint-token-keyword, #bd2864)`},children:` =`}),_jsx(_components.span,{style:{color:`var(--mint-foreground)`,\"--shiki-dark\":`var(--mint-foreground)`},children:` {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`var(--mint-foreground)`,\"--shiki-dark\":`var(--mint-foreground)`},children:` summarizer`}),_jsx(_components.span,{style:{color:`var(--mint-token-keyword, #bd2864)`,\"--shiki-dark\":`var(--mint-token-keyword, #bd2864)`},children:`:`}),_jsx(_components.span,{style:{color:`var(--mint-foreground)`,\"--shiki-dark\":`var(--mint-foreground)`},children:` {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`var(--mint-foreground)`,\"--shiki-dark\":`var(--mint-foreground)`},children:` systemPrompt`}),_jsx(_components.span,{style:{color:`var(--mint-token-keyword, #bd2864)`,\"--shiki-dark\":`var(--mint-token-keyword, #bd2864)`},children:`:`}),_jsx(_components.span,{style:{color:`var(--mint-token-string-expression, #297a3a)`,\"--shiki-dark\":`var(--mint-token-string-expression, #297a3a)`},children:` 'Summarize in three bullet points. No introduction.'`}),_jsx(_components.span,{style:{color:`var(--mint-token-punctuation, #171717)`,\"--shiki-dark\":`var(--mint-token-punctuation, #171717)`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`var(--mint-foreground)`,\"--shiki-dark\":`var(--mint-foreground)`},children:` maxOutputTokens`}),_jsx(_components.span,{style:{color:`var(--mint-token-keyword, #bd2864)`,\"--shiki-dark\":`var(--mint-token-keyword, #bd2864)`},children:`:`}),_jsx(_components.span,{style:{color:`var(--mint-token-constant, #171717)`,\"--shiki-dark\":`var(--mint-token-constant, #171717)`},children:` 150`}),_jsx(_components.span,{style:{color:`var(--mint-token-punctuation, #171717)`,\"--shiki-dark\":`var(--mint-token-punctuation, #171717)`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`var(--mint-foreground)`,\"--shiki-dark\":`var(--mint-foreground)`},children:` temperature`}),_jsx(_components.span,{style:{color:`var(--mint-token-keyword, #bd2864)`,\"--shiki-dark\":`var(--mint-token-keyword, #bd2864)`},children:`:`}),_jsx(_components.span,{style:{color:`var(--mint-token-constant, #171717)`,\"--shiki-dark\":`var(--mint-token-constant, #171717)`},children:` 0.3`}),_jsx(_components.span,{style:{color:`var(--mint-token-punctuation, #171717)`,\"--shiki-dark\":`var(--mint-token-punctuation, #171717)`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`var(--mint-foreground)`,\"--shiki-dark\":`var(--mint-foreground)`},children:` }`}),_jsx(_components.span,{style:{color:`var(--mint-token-punctuation, #171717)`,\"--shiki-dark\":`var(--mint-token-punctuation, #171717)`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`var(--mint-foreground)`,\"--shiki-dark\":`var(--mint-foreground)`},children:` coder`}),_jsx(_components.span,{style:{color:`var(--mint-token-keyword, #bd2864)`,\"--shiki-dark\":`var(--mint-token-keyword, #bd2864)`},children:`:`}),_jsx(_components.span,{style:{color:`var(--mint-foreground)`,\"--shiki-dark\":`var(--mint-foreground)`},children:` {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`var(--mint-foreground)`,\"--shiki-dark\":`var(--mint-foreground)`},children:` systemPrompt`}),_jsx(_components.span,{style:{color:`var(--mint-token-keyword, #bd2864)`,\"--shiki-dark\":`var(--mint-token-keyword, #bd2864)`},children:`:`}),_jsx(_components.span,{style:{color:`var(--mint-token-string-expression, #297a3a)`,\"--shiki-dark\":`var(--mint-token-string-expression, #297a3a)`},children:` 'You are a TypeScript expert. Answer with code first.'`}),_jsx(_components.span,{style:{color:`var(--mint-token-punctuation, #171717)`,\"--shiki-dark\":`var(--mint-token-punctuation, #171717)`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`var(--mint-foreground)`,\"--shiki-dark\":`var(--mint-foreground)`},children:` temperature`}),_jsx(_components.span,{style:{color:`var(--mint-token-keyword, #bd2864)`,\"--shiki-dark\":`var(--mint-token-keyword, #bd2864)`},children:`:`}),_jsx(_components.span,{style:{color:`var(--mint-token-constant, #171717)`,\"--shiki-dark\":`var(--mint-token-constant, #171717)`},children:` 0.2`}),_jsx(_components.span,{style:{color:`var(--mint-token-punctuation, #171717)`,\"--shiki-dark\":`var(--mint-token-punctuation, #171717)`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`var(--mint-foreground)`,\"--shiki-dark\":`var(--mint-foreground)`},children:` }`}),_jsx(_components.span,{style:{color:`var(--mint-token-punctuation, #171717)`,\"--shiki-dark\":`var(--mint-token-punctuation, #171717)`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`var(--mint-foreground)`,\"--shiki-dark\":`var(--mint-foreground)`},children:`} `}),_jsx(_components.span,{style:{color:`var(--mint-token-keyword, #bd2864)`,\"--shiki-dark\":`var(--mint-token-keyword, #bd2864)`},children:`satisfies`}),_jsx(_components.span,{style:{color:`var(--mint-token-function, #0068d6)`,\"--shiki-dark\":`var(--mint-token-function, #0068d6)`},children:` Record`}),_jsx(_components.span,{style:{color:`var(--mint-foreground)`,\"--shiki-dark\":`var(--mint-foreground)`},children:`\u003c`}),_jsx(_components.span,{style:{color:`var(--mint-token-constant, #171717)`,\"--shiki-dark\":`var(--mint-token-constant, #171717)`},children:`string`}),_jsx(_components.span,{style:{color:`var(--mint-token-punctuation, #171717)`,\"--shiki-dark\":`var(--mint-token-punctuation, #171717)`},children:`,`}),_jsx(_components.span,{style:{color:`var(--mint-token-function, #0068d6)`,\"--shiki-dark\":`var(--mint-token-function, #0068d6)`},children:` LlmOptions`}),_jsx(_components.span,{style:{color:`var(--mint-foreground)`,\"--shiki-dark\":`var(--mint-foreground)`},children:`>`})]}),`\n`]})})}),`\n`,_jsx(_components.p,{children:`Keeping these in the main process rather than the renderer means a settings change does not\nneed a window reload.`})]})}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":{"codeStyling":{"theme":"css-variables"},"config":{},"pageMetadata":{"title":"System Prompts","description":"Control model behaviour with a system prompt","icon":"user-gear","href":"/electron/llm/system-prompts"}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[{"title":"Through options","slug":"through-options","depth":2,"children":[]},{"title":"Through a message","slug":"through-a-message","depth":2,"children":[]},{"title":"Writing one that works","slug":"writing-one-that-works","depth":2,"children":[]},{"title":"Reuse","slug":"reuse","depth":2,"children":[]}],"codeExamples":{}},"jsLinks":[],"subdomain":"runanywhere","siteName":"RunAnywhere Docs","title":"System Prompts - RunAnywhere Docs","contextualStarterQuestions":[],"navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-10-25T07:26:29.743Z","originalFileLocation":"electron/llm/system-prompts.mdx"},"headHtml":"\u003cscript data-mint-head>(function(){var d=document.documentElement,p=\"dark\";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=\"dark\"}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=\"Control model behaviour with a system prompt\">\u003cmeta data-mint-head name=\"application-name\" content=\"RunAnywhere Docs\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/runanywhere/NJ67QXmGzo8K5fRq/_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/runanywhere/NJ67QXmGzo8K5fRq/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/runanywhere/NJ67QXmGzo8K5fRq/_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/runanywhere/NJ67QXmGzo8K5fRq/_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/runanywhere/NJ67QXmGzo8K5fRq/_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/runanywhere/NJ67QXmGzo8K5fRq/_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/runanywhere/NJ67QXmGzo8K5fRq/_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/runanywhere/NJ67QXmGzo8K5fRq/_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/runanywhere/NJ67QXmGzo8K5fRq/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"System Prompts - RunAnywhere Docs\">\u003cmeta data-mint-head property=\"og:description\" content=\"Control model behaviour with a system prompt\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"RunAnywhere Docs\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://docs.runanywhere.ai/electron/llm/system-prompts\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://runanywhere.ai/share/docs.png\">\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=\"System Prompts - RunAnywhere Docs\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Control model behaviour with a system prompt\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://runanywhere.ai/share/docs.png\">\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/runanywhere/NJ67QXmGzo8K5fRq/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"RunAnywhere Docs\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#fd7014\">\u003cmeta data-mint-head name=\"og:image:type\" content=\"image/png\">\u003cmeta data-mint-head name=\"og:image:alt\" content=\"The word Docs in a field of orange glyphs, beside the line: one CLI and one API key for frontier open models.\">\u003cmeta data-mint-head name=\"og:video\" content=\"https://runanywhere.ai/share/docs.mp4\">\u003cmeta data-mint-head name=\"og:video:secure_url\" content=\"https://runanywhere.ai/share/docs.mp4\">\u003cmeta data-mint-head name=\"og:video:type\" content=\"video/mp4\">\u003cmeta data-mint-head name=\"og:video:width\" content=\"1200\">\u003cmeta data-mint-head name=\"og:video:height\" content=\"630\">\u003clink data-mint-head rel=\"canonical\" href=\"https://docs.runanywhere.ai/electron/llm/system-prompts\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/electron/llm/system-prompts.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://docs.runanywhere.ai/#organization\",\"name\":\"RunAnywhere Docs\",\"url\":\"https://docs.runanywhere.ai\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/runanywhere/suKXeVfMdD9DOb-9/logo/mark.svg?fit=max\u0026auto=format\u0026n=suKXeVfMdD9DOb-9\u0026q=85\u0026s=0d71d113ea75918af951b07510e75dd1\"}},{\"@type\":\"WebSite\",\"@id\":\"https://docs.runanywhere.ai#website\",\"name\":\"RunAnywhere Docs\",\"url\":\"https://docs.runanywhere.ai\",\"publisher\":{\"@id\":\"https://docs.runanywhere.ai/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://docs.runanywhere.ai/electron/llm/system-prompts#webpage\",\"url\":\"https://docs.runanywhere.ai/electron/llm/system-prompts\",\"name\":\"System Prompts\",\"description\":\"Control model behaviour with a system prompt\",\"dateModified\":\"2026-10-25T07:26:29.743Z\",\"isPartOf\":{\"@id\":\"https://docs.runanywhere.ai#website\"},\"breadcrumb\":{\"@id\":\"https://docs.runanywhere.ai/electron/llm/system-prompts#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://docs.runanywhere.ai/electron/llm/system-prompts#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Text\",\"item\":\"https://docs.runanywhere.ai/electron/llm/chat\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"System Prompts\",\"item\":\"https://docs.runanywhere.ai/electron/llm/system-prompts\"}]},{\"@type\":[\"Article\",\"TechArticle\"],\"@id\":\"https://docs.runanywhere.ai/electron/llm/system-prompts#article\",\"headline\":\"System Prompts\",\"name\":\"System Prompts\",\"description\":\"Control model behaviour with a system prompt\",\"url\":\"https://docs.runanywhere.ai/electron/llm/system-prompts\",\"mainEntityOfPage\":{\"@id\":\"https://docs.runanywhere.ai/electron/llm/system-prompts#webpage\"},\"image\":\"https://runanywhere.ai/share/docs.png\",\"dateModified\":\"2026-10-25T07:26:29.743Z\",\"publisher\":{\"@id\":\"https://docs.runanywhere.ai/#organization\"},\"isPartOf\":{\"@id\":\"https://docs.runanywhere.ai#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"RunAnywhere Docs\",\"publisher\":{\"@type\":\"Organization\",\"name\":\"RunAnywhere Docs\"},\"provider\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","agentPointerHref":"/electron/llm/system-prompts.md","siteName":"RunAnywhere Docs","nav":{"global":null,"tabs":[{"tab":"Wally","pages":[{"title":"Wally","href":""}]},{"tab":"API reference","pages":[{"title":"API reference","href":"/api-reference/create-a-chat-completion"}]},{"tab":"On-device SDKs","dropdowns":[{"dropdown":"All platforms","icon":"mobile-screen","description":"Overview and quickstart","groups":[{"group":"Get started","pages":[{"sidebarTitle":"Overview","title":"On-device SDK","icon":"mobile-screen","href":"/sdks"},{"title":"On-device quickstart","sidebarTitle":"Quickstart","icon":"rocket","href":"/quickstart"}]},{"group":"Guides","pages":[{"sidebarTitle":"Porting","title":"Porting between platforms","icon":"arrow-right-arrow-left","href":"/porting"},{"title":"Expo Integration Guide","icon":"wand-magic-sparkles","href":"/vibe-coding/expo-integration"}]}]},{"dropdown":"Swift","icon":"swift","description":"iOS, macOS","groups":[{"group":"Get started","pages":[{"title":"Introduction","icon":"swift","href":"/swift/introduction"},{"title":"Installation","icon":"download","href":"/swift/installation"},{"title":"Quick Start","icon":"rocket","href":"/swift/quick-start"},{"title":"Models","icon":"cube","href":"/swift/models"}]},{"group":"Text","pages":[{"title":"Chat","icon":"message","href":"/swift/llm/chat"},{"title":"generate()","icon":"chart-line","href":"/swift/llm/generate"},{"title":"generateStream()","icon":"water","href":"/swift/llm/stream"},{"title":"System Prompts","icon":"user-gear","href":"/swift/llm/system-prompts"},{"title":"Structured Output","icon":"brackets-curly","href":"/swift/structured-output"},{"title":"Tool Calling","icon":"wrench","href":"/swift/tool-calling"}]},{"group":"Speech","pages":[{"title":"transcribe()","icon":"microphone","href":"/swift/stt/transcribe"},{"title":"Streaming STT","icon":"wave-sine","href":"/swift/stt/stream"},{"title":"STT Options","icon":"sliders","href":"/swift/stt/options"},{"title":"synthesize()","icon":"volume-high","href":"/swift/tts/synthesize"},{"title":"Streaming TTS","icon":"water","href":"/swift/tts/stream"},{"title":"Voices","icon":"user","href":"/swift/tts/voices"},{"title":"Voice Activity Detection","icon":"waveform","href":"/swift/vad"},{"title":"Voice Agent","icon":"robot","href":"/swift/voice-agent"},{"title":"Diarization","icon":"users","href":"/swift/diarization"}]},{"group":"Vision","pages":[{"title":"Vision Language Models","icon":"eye","href":"/swift/vlm"},{"title":"Image Generation","icon":"image","href":"/swift/images"},{"title":"Segmentation","icon":"object-group","href":"/swift/segmentation"}]},{"group":"Retrieval","pages":[{"title":"RAG, Embeddings, and Reranking","icon":"database","href":"/swift/rag"},{"title":"Embeddings \u0026 Reranking","icon":"vector-square","href":"/swift/embeddings"}]},{"group":"Advanced","pages":[{"title":"LoRA Adapters","icon":"layer-group","href":"/swift/lora"},{"title":"Configuration","icon":"gear","href":"/swift/configuration"},{"title":"Error Handling","icon":"triangle-exclamation","href":"/swift/error-handling"},{"title":"Best Practices","icon":"lightbulb","href":"/swift/best-practices"}]}]},{"dropdown":"Kotlin","icon":"android","description":"Android","groups":[{"group":"Get started","pages":[{"title":"Introduction","icon":"android","href":"/kotlin/introduction"},{"title":"Installation","icon":"download","href":"/kotlin/installation"},{"title":"Quick Start","icon":"rocket","href":"/kotlin/quick-start"},{"title":"Models","icon":"cube","href":"/kotlin/models"}]},{"group":"Text","pages":[{"title":"Chat","icon":"message","href":"/kotlin/llm/chat"},{"title":"generate()","icon":"chart-line","href":"/kotlin/llm/generate"},{"title":"generateStream()","icon":"water","href":"/kotlin/llm/stream"},{"title":"System Prompts","icon":"user-gear","href":"/kotlin/llm/system-prompts"},{"title":"Structured Output","icon":"brackets-curly","href":"/kotlin/structured-output"},{"title":"Tool Calling","icon":"wrench","href":"/kotlin/tool-calling"}]},{"group":"Speech","pages":[{"title":"transcribe()","icon":"microphone","href":"/kotlin/stt/transcribe"},{"title":"Streaming STT","icon":"wave-sine","href":"/kotlin/stt/stream"},{"title":"STT Options","icon":"sliders","href":"/kotlin/stt/options"},{"title":"synthesize()","icon":"volume-high","href":"/kotlin/tts/synthesize"},{"title":"Streaming TTS","icon":"water","href":"/kotlin/tts/stream"},{"title":"Voices","icon":"user","href":"/kotlin/tts/voices"},{"title":"Voice Activity Detection","icon":"waveform","href":"/kotlin/vad"},{"title":"Voice Agent","icon":"robot","href":"/kotlin/voice-agent"},{"title":"Diarization","icon":"users","href":"/kotlin/diarization"}]},{"group":"Vision","pages":[{"title":"Vision Language Models","icon":"eye","href":"/kotlin/vlm"},{"title":"Image Generation","icon":"image","href":"/kotlin/images"},{"title":"Segmentation","icon":"object-group","href":"/kotlin/segmentation"}]},{"group":"Retrieval","pages":[{"title":"RAG","icon":"book","href":"/kotlin/rag"},{"title":"Embeddings \u0026 Reranking","icon":"vector-square","href":"/kotlin/embeddings"}]},{"group":"Advanced","pages":[{"title":"LoRA Adapters","icon":"layer-group","href":"/kotlin/lora"},{"title":"Configuration","icon":"gear","href":"/kotlin/configuration"},{"title":"Error Handling","icon":"triangle-exclamation","href":"/kotlin/error-handling"},{"title":"Best Practices","icon":"lightbulb","href":"/kotlin/best-practices"}]}]},{"dropdown":"React Native","icon":"react","description":"iOS, Android","groups":[{"group":"Get started","pages":[{"title":"Introduction","icon":"react","href":"/react-native/introduction"},{"title":"Installation","icon":"download","href":"/react-native/installation"},{"title":"Quick Start","icon":"rocket","href":"/react-native/quick-start"},{"title":"Models","icon":"cube","href":"/react-native/models"}]},{"group":"Text","pages":[{"title":"Chat","icon":"message","href":"/react-native/llm/chat"},{"title":"generate()","icon":"chart-line","href":"/react-native/llm/generate"},{"title":"generateStream()","icon":"water","href":"/react-native/llm/stream"},{"title":"System Prompts","icon":"user-gear","href":"/react-native/llm/system-prompts"},{"title":"Structured Output","icon":"brackets-curly","href":"/react-native/structured-output"},{"title":"Tool Calling","icon":"wrench","href":"/react-native/tool-calling"}]},{"group":"Speech","pages":[{"title":"transcribe()","icon":"microphone","href":"/react-native/stt/transcribe"},{"title":"Streaming STT","icon":"wave-sine","href":"/react-native/stt/stream"},{"title":"STT Options","icon":"sliders","href":"/react-native/stt/options"},{"title":"synthesize()","icon":"volume-high","href":"/react-native/tts/synthesize"},{"title":"Streaming TTS","icon":"water","href":"/react-native/tts/stream"},{"title":"Voices","icon":"user","href":"/react-native/tts/voices"},{"title":"Voice Activity Detection","icon":"waveform","href":"/react-native/vad"},{"title":"Voice Agent","icon":"robot","href":"/react-native/voice-agent"},{"title":"Diarization","icon":"users","href":"/react-native/diarization"}]},{"group":"Vision","pages":[{"title":"Vision Language Models","icon":"eye","href":"/react-native/vlm"},{"title":"Image Generation","icon":"image","href":"/react-native/images"},{"title":"Segmentation","icon":"object-group","href":"/react-native/segmentation"}]},{"group":"Retrieval","pages":[{"title":"RAG","icon":"database","href":"/react-native/rag"},{"title":"Embeddings \u0026 Reranking","icon":"vector-square","href":"/react-native/embeddings"}]},{"group":"Advanced","pages":[{"title":"LoRA Adapters","icon":"layer-group","href":"/react-native/lora"},{"title":"Configuration","icon":"gear","href":"/react-native/configuration"},{"title":"Error Handling","icon":"triangle-exclamation","href":"/react-native/error-handling"},{"title":"Best Practices","icon":"lightbulb","href":"/react-native/best-practices"}]}]},{"dropdown":"Flutter","icon":"flutter","description":"iOS, Android","groups":[{"group":"Get started","pages":[{"title":"Introduction","icon":"flutter","href":"/flutter/introduction"},{"title":"Installation","icon":"download","href":"/flutter/installation"},{"title":"Quick Start","icon":"rocket","href":"/flutter/quick-start"},{"title":"Models","icon":"cube","href":"/flutter/models"}]},{"group":"Text","pages":[{"title":"Chat","icon":"message","href":"/flutter/llm/chat"},{"title":"generate()","icon":"chart-line","href":"/flutter/llm/generate"},{"title":"generateStream()","icon":"water","href":"/flutter/llm/stream"},{"title":"System Prompts","icon":"user-gear","href":"/flutter/llm/system-prompts"},{"title":"Structured Output","icon":"brackets-curly","href":"/flutter/structured-output"},{"title":"Tool Calling","icon":"wrench","href":"/flutter/tool-calling"}]},{"group":"Speech","pages":[{"title":"transcribe()","icon":"microphone","href":"/flutter/stt/transcribe"},{"title":"Streaming STT","icon":"wave-sine","href":"/flutter/stt/stream"},{"title":"STT Options","icon":"sliders","href":"/flutter/stt/options"},{"title":"synthesize()","icon":"volume-high","href":"/flutter/tts/synthesize"},{"title":"Streaming TTS","icon":"water","href":"/flutter/tts/stream"},{"title":"Voices","icon":"user","href":"/flutter/tts/voices"},{"title":"Voice Activity Detection","icon":"waveform","href":"/flutter/vad"},{"title":"Voice Agent","icon":"robot","href":"/flutter/voice-agent"},{"title":"Diarization","icon":"users","href":"/flutter/diarization"}]},{"group":"Vision","pages":[{"title":"Vision Language","icon":"image","href":"/flutter/vlm"},{"title":"Image Generation","icon":"wand-magic-sparkles","href":"/flutter/images"},{"title":"Segmentation","icon":"object-group","href":"/flutter/segmentation"}]},{"group":"Retrieval","pages":[{"title":"RAG","icon":"database","href":"/flutter/rag"},{"title":"Embeddings and Rerank","icon":"vector-square","href":"/flutter/embeddings"}]},{"group":"Advanced","pages":[{"title":"LoRA Adapters","icon":"layer-group","href":"/flutter/lora"},{"title":"Configuration","icon":"gear","href":"/flutter/configuration"},{"title":"Error Handling","icon":"triangle-exclamation","href":"/flutter/error-handling"},{"title":"Best Practices","icon":"lightbulb","href":"/flutter/best-practices"}]}]},{"dropdown":"Web","icon":"globe","description":"Browser","groups":[{"group":"Get started","pages":[{"title":"Introduction","icon":"globe","sidebarTitle":"Introduction","href":"/web/introduction"},{"title":"Installation","icon":"download","href":"/web/installation"},{"title":"Quick Start","icon":"rocket","href":"/web/quick-start"},{"title":"Models","icon":"cube","href":"/web/models"}]},{"group":"Text","pages":[{"title":"Chat","icon":"message","href":"/web/llm/chat"},{"title":"generate()","icon":"chart-line","href":"/web/llm/generate"},{"title":"generateStream()","icon":"water","href":"/web/llm/stream"},{"title":"System Prompts","icon":"user-gear","href":"/web/llm/system-prompts"},{"title":"Structured Output","icon":"brackets-curly","href":"/web/structured-output"},{"title":"Tool Calling","icon":"wrench","href":"/web/tool-calling"}]},{"group":"Speech","pages":[{"title":"transcribe()","icon":"microphone","href":"/web/stt/transcribe"},{"title":"Streaming STT","icon":"wave-sine","href":"/web/stt/stream"},{"title":"STT Options","icon":"sliders","href":"/web/stt/options"},{"title":"synthesize()","icon":"volume-high","href":"/web/tts/synthesize"},{"title":"Streaming TTS","icon":"water","href":"/web/tts/stream"},{"title":"Voices","icon":"user","href":"/web/tts/voices"},{"title":"Voice Activity Detection","icon":"waveform","href":"/web/vad"},{"title":"Voice Agent","icon":"robot","href":"/web/voice-agent"},{"title":"Diarization","icon":"users","href":"/web/diarization"}]},{"group":"Vision","pages":[{"title":"Vision Language Models","icon":"eye","href":"/web/vlm"},{"title":"Image Generation","icon":"image","href":"/web/images"},{"title":"Segmentation","icon":"object-group","href":"/web/segmentation"}]},{"group":"Retrieval","pages":[{"title":"RAG","icon":"book","href":"/web/rag"},{"title":"Embeddings \u0026 Reranking","icon":"vector-square","href":"/web/embeddings"}]},{"group":"Advanced","pages":[{"title":"LoRA Adapters","icon":"layer-group","href":"/web/lora"},{"title":"Configuration","icon":"gear","href":"/web/configuration"},{"title":"Error Handling","icon":"triangle-exclamation","href":"/web/error-handling"},{"title":"Best Practices","icon":"lightbulb","href":"/web/best-practices"}]}]},{"dropdown":"Electron","icon":"box","description":"Desktop","groups":[{"group":"Get started","pages":[{"title":"Introduction","icon":"desktop","href":"/electron/introduction"},{"title":"Installation","icon":"download","href":"/electron/installation"},{"title":"Quick Start","icon":"rocket","href":"/electron/quick-start"},{"title":"Models","icon":"cube","href":"/electron/models"}]},{"group":"Text","pages":[{"title":"Chat","icon":"message","href":"/electron/llm/chat"},{"title":"generate()","icon":"chart-line","href":"/electron/llm/generate"},{"title":"generateStream()","description":"Stream tokens as they are produced","icon":"water","href":"/electron/llm/stream"},{"title":"System Prompts","icon":"user-gear","href":"/electron/llm/system-prompts"},{"title":"Structured Output","description":"Get JSON back instead of prose","icon":"brackets-curly","href":"/electron/structured-output"},{"title":"Tool Calling","icon":"wrench","href":"/electron/tool-calling"}]},{"group":"Speech","pages":[{"title":"transcribe()","icon":"microphone","href":"/electron/stt/transcribe"},{"title":"Streaming STT","icon":"wave-sine","href":"/electron/stt/stream"},{"title":"STT Options","icon":"sliders","href":"/electron/stt/options"},{"title":"synthesize()","icon":"volume-high","href":"/electron/tts/synthesize"},{"title":"Streaming TTS","icon":"water","href":"/electron/tts/stream"},{"title":"Voices","icon":"user","href":"/electron/tts/voices"},{"title":"Voice Activity Detection","icon":"waveform","href":"/electron/vad"},{"title":"Voice Agent","icon":"robot","href":"/electron/voice-agent"},{"title":"Diarization","icon":"users","href":"/electron/diarization"}]},{"group":"Vision","pages":[{"title":"Vision Language Models","icon":"eye","href":"/electron/vlm"},{"title":"Image Generation","icon":"image","href":"/electron/images"},{"title":"Segmentation","icon":"object-group","href":"/electron/segmentation"}]},{"group":"Retrieval","pages":[{"title":"RAG","icon":"book","href":"/electron/rag"},{"title":"Embeddings \u0026 Reranking","icon":"vector-square","href":"/electron/embeddings"}]},{"group":"Advanced","pages":[{"title":"LoRA Adapters","icon":"layer-group","href":"/electron/lora"},{"title":"Configuration","icon":"gear","href":"/electron/configuration"},{"title":"Error Handling","icon":"triangle-exclamation","href":"/electron/error-handling"},{"title":"Best Practices","icon":"lightbulb","href":"/electron/best-practices"}]}]}]}]},"basePath":"","title":"System Prompts - RunAnywhere Docs","deploymentId":"dpl_Bzhd2vEuuXmvNaTmqBBYbeBj3epG","buildId":"dpl_Bzhd2vEuuXmvNaTmqBBYbeBj3epG","dynamics":[],"chunks":[]}