How to Use userContext Sent via the Public API in Generative AI Prompts
When calling the Advanced Search API, you can pass user-specific information through the customData.userContext field. This context is available in the Query Rephrase feature, allowing the LLM to tailor how it interprets and rephrases user queries based on who is asking.
userContext is available in the Query Rephrase prompt only. It is not available in the Answer Generation prompt.
How It Works
User context can be passed in the API as a customData field. When userContext is included in the API request, Search AI makes it available in the prompt template as the {{customUserContext}} variable The entire object is passed as-is to the LLM, all keys and values in the object are visible to the model, allowing it to reason over them when rephrasing the query.For example, if you send:
The prompt receives this as: You can then reference this in your prompts using .
Prerequisites
Agentic RAG must be enabled in your Search AI application.
A custom prompt must be configured for the Query Rephrase Agent. Learn more.
Step 1: Pass userContext in the API Request
Include the userContext object inside customData in your Advanced Search API request:
{ "query": "what are my benefits?", "customData": { "userContext": { "userType": "active", "userName": "John" } }}
Step 2: Configure the Query Rephrase Prompt
In the prompt configuration for the Query Rephrase Agent, use {{customUserContext}} to reference the user context and instruct the LLM to apply rephrasing logic based on its contents.Example prompt configuration:
"messages": [ { "role": "system", "content": "You are an intelligent assistant that helps users rephrase their queries only when necessary based on userContext. If the userContext has userType as active, rephrase the query to focus on currently active employee benefits and entitlements." }, { "role": "user", "content": "Using the following userContext, rephrase the query if needed: {{query}}.\nContext: {{customUserContext}}." }]
In this example, the LLM receives the full userContext object and uses the userType field to decide how to rephrase the query. For a user with userType: active, the query “what are my benefits?” might be rephrased to “what benefits and entitlements are available to currently active employees?” before retrieval.
Notes
The {{customUserContext}} variable contains the entire userContext object as a stringified JSON. All keys in this object are visible to the LLM.
userContext is only accessible in the Query Rephrase prompt.
You can include both userContext and previousConversation in the same customData object — they are independent and do not conflict.
If userContext is passed but Agentic RAG is disabled, or no custom prompt referencing {{customUserContext}} is configured, the context is ignored.
{"docsConfig":{"theme":"mint","$schema":"https://mintlify.com/docs.json","name":"Kore.ai Docs","description":"Kore.ai Product Documentation","colors":{"primary":"#16A34A","light":"#07C983","dark":"#15803D"},"logo":{"light":"https://mintcdn.com/koreai/0qAbPzQhx-4ILs7Q/assets/koreailogo-black.svg?fit=max\u0026auto=format\u0026n=0qAbPzQhx-4ILs7Q\u0026q=85\u0026s=b04520c55b7651e03e614e156f879b46","dark":"https://mintcdn.com/koreai/0qAbPzQhx-4ILs7Q/assets/koreailogo-white.svg?fit=max\u0026auto=format\u0026n=0qAbPzQhx-4ILs7Q\u0026q=85\u0026s=d974708d45aa7d1aa5f779f1cd3654ad"},"favicon":{"light":"https://mintcdn.com/koreai/w9BAaj3uMfzLSSYf/assets/favicon-light.svg?fit=max\u0026auto=format\u0026n=w9BAaj3uMfzLSSYf\u0026q=85\u0026s=3ea0a3762b1a3c65d930d1a5fd7a2a22","dark":"https://mintcdn.com/koreai/hJYZlvgLmtQesNz0/assets/favicon-dark.png?fit=max\u0026auto=format\u0026n=hJYZlvgLmtQesNz0\u0026q=85\u0026s=9281e12ca658788af1c9278bae85c981"},"api":{"playground":{"display":"simple","proxy":false},"examples":{"languages":["curl"]}},"appearance":{"default":"system","strict":false},"navbar":{"links":[{"icon":"book-open","href":"https://academy.kore.ai/","label":"Academy"},{"icon":"message","href":"https://community.kore.ai/","label":"Community"},{"icon":"life-ring","href":"https://support.kore.ai/","label":"Support"}]},"footer":{"socials":{"github":"https://github.com/Koredotcom","linkedin":"https://www.linkedin.com/company/kore-inc","facebook":"https://www.facebook.com/KoreDotAI"},"links":[{"header":" ","items":[{"label":"Acceptable Use","href":"https://www.kore.ai/acceptable-use-policy"},{"label":"Terms of Service","href":"https://www.kore.ai/terms-of-service"}]},{"header":" ","items":[{"label":"Privacy Policy","href":"https://www.kore.ai/privacy-policy"},{"label":"Cookie Policy","href":"https://www.kore.ai/cookie-policy"}]}]},"seo":{"metatags":{"canonical":"https://docs.kore.ai"},"indexing":"all"},"icons":{"library":"fontawesome"},"styling":{"eyebrows":"breadcrumbs","latex":true},"integrations":{"clarity":{"projectId":"vja4or1wun"},"ga4":{"measurementId":"G-560BYJFH0P"},"heap":{"appId":"4257246426"},"logrocket":{"appId":"ehyoae/koreaidocs"}},"errors":{"404":{"redirect":false,"title":"Sorry, we couldn't find the page.","description":"Check the pages linked here or search."}},"contextual":{"options":["copy","view","claude","cursor","vscode"],"display":"header"},"variables":{"artemisurl":"see the list of [region-specific platform URLs](/agent-platform/getting-started#region-specific-urls-and-allowlist-of-ips)","support":"[contact Support](https://support.kore.ai/)","related":"**Related articles:**"},"navigation":{"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"koreai","hasAudioNarration":false,"actualSubdomain":"koreai","customDomains":[],"gitSource":{"type":"github","owner":"koredotcom","repo":"docs-v2","deployBranch":"main","contentDirectory":"","isPrivate":false,"mountPath":"","label":""},"feedback":{"thumbs":true,"edits":false,"issues":true},"entitlements":{"AI_CHAT":{"status":"ENABLED"},"WEB_MCP":{"status":"ENABLED"},"NARRATION":{"status":"ENABLED"}},"buildId":"6afc5bc69a75d401a4049626","clientVersion":"0.0.4167","searchFilterCounts":[{"language":"default","tag":"Guide","count":66},{"language":"default","tag":"Get started","count":20},{"language":"default","tag":"Build","count":19},{"language":"default","tag":"ABL","count":17},{"language":"default","tag":"ABL reference","count":15},{"language":"default","tag":"APIs and SDK","count":13},{"language":"default","tag":"Analyze","count":12},{"language":"default","tag":"Best practices","count":12},{"language":"default","tag":"Administration","count":10},{"language":"default","tag":"APIs","count":9}],"searchSettings":{"maxResults":12,"isFiltersEnabled":true}},"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":"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":"starter-pricing","enabled":true,"variant":{"name":"treatment","enabled":true,"payload":{"type":"string","value":"treatment"},"feature_enabled":true},"impressionData":false},{"name":"llms-txt-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"googleFontsInlined":false},"customCss":[{"filePath":"custom-css/style.css","content":"html[data-current-path^=\"/agent-platform\"] .nav-tabs>.nav-tabs-item:nth-child(9){display:none}html[data-current-path^=\"/home\"] .nav-tabs>.nav-tabs-item:nth-child(9){display:none}html[data-current-path^=\"/ai-for-work\"] .nav-tabs>.nav-tabs-item:nth-child(1),html[data-current-path^=\"/ai-for-work\"] .nav-tabs>.nav-tabs-item:nth-child(2),html[data-current-path^=\"/ai-for-work\"] .nav-tabs>.nav-tabs-item:nth-child(3),html[data-current-path^=\"/ai-for-work\"] .nav-tabs>.nav-tabs-item:nth-child(4),html[data-current-path^=\"/ai-for-work\"] .nav-tabs>.nav-tabs-item:nth-child(5),html[data-current-path^=\"/ai-for-work\"] .nav-tabs>.nav-tabs-item:nth-child(6),html[data-current-path^=\"/ai-for-work\"] .nav-tabs>.nav-tabs-item:nth-child(7),html[data-current-path^=\"/ai-for-work\"] .nav-tabs>.nav-tabs-item:nth-child(8){display:none}html[data-current-path^=\"/ai-for-process\"] .nav-tabs>.nav-tabs-item:nth-child(1),html[data-current-path^=\"/ai-for-process\"] .nav-tabs>.nav-tabs-item:nth-child(2),html[data-current-path^=\"/ai-for-process\"] .nav-tabs>.nav-tabs-item:nth-child(3),html[data-current-path^=\"/ai-for-process\"] .nav-tabs>.nav-tabs-item:nth-child(4),html[data-current-path^=\"/ai-for-process\"] .nav-tabs>.nav-tabs-item:nth-child(5),html[data-current-path^=\"/ai-for-process\"] .nav-tabs>.nav-tabs-item:nth-child(6),html[data-current-path^=\"/ai-for-process\"] .nav-tabs>.nav-tabs-item:nth-child(7),html[data-current-path^=\"/ai-for-process\"] .nav-tabs>.nav-tabs-item:nth-child(8){display:none}html[data-current-path^=\"/ai-for-service\"] .nav-tabs>.nav-tabs-item:nth-child(1),html[data-current-path^=\"/ai-for-service\"] .nav-tabs>.nav-tabs-item:nth-child(2),html[data-current-path^=\"/ai-for-service\"] .nav-tabs>.nav-tabs-item:nth-child(3),html[data-current-path^=\"/ai-for-service\"] .nav-tabs>.nav-tabs-item:nth-child(4),html[data-current-path^=\"/ai-for-service\"] .nav-tabs>.nav-tabs-item:nth-child(5),html[data-current-path^=\"/ai-for-service\"] .nav-tabs>.nav-tabs-item:nth-child(6),html[data-current-path^=\"/ai-for-service\"] .nav-tabs>.nav-tabs-item:nth-child(7),html[data-current-path^=\"/ai-for-service\"] .nav-tabs>.nav-tabs-item:nth-child(8){display:none}html[data-current-path^=\"/agent-platform/v1\"] .nav-tabs>.nav-tabs-item:nth-child(1),html[data-current-path^=\"/agent-platform/v1\"] .nav-tabs>.nav-tabs-item:nth-child(2),html[data-current-path^=\"/agent-platform/v1\"] .nav-tabs>.nav-tabs-item:nth-child(3),html[data-current-path^=\"/agent-platform/v1\"] .nav-tabs>.nav-tabs-item:nth-child(4),html[data-current-path^=\"/agent-platform/v1\"] .nav-tabs>.nav-tabs-item:nth-child(5),html[data-current-path^=\"/agent-platform/v1\"] .nav-tabs>.nav-tabs-item:nth-child(6),html[data-current-path^=\"/agent-platform/v1\"] .nav-tabs>.nav-tabs-item:nth-child(7),html[data-current-path^=\"/agent-platform/v1\"] .nav-tabs>.nav-tabs-item:nth-child(8){display:none}html[data-current-path^=\"/agent-platform\"] .mobile-nav-tabs-item:nth-child(9){display:none}html[data-current-path^=\"/home\"] .mobile-nav-tabs-item:nth-child(9){display:none}html[data-current-path^=\"/ai-for-work\"] .mobile-nav-tabs-item:nth-child(1),html[data-current-path^=\"/ai-for-work\"] .mobile-nav-tabs-item:nth-child(2),html[data-current-path^=\"/ai-for-work\"] .mobile-nav-tabs-item:nth-child(3),html[data-current-path^=\"/ai-for-work\"] .mobile-nav-tabs-item:nth-child(4),html[data-current-path^=\"/ai-for-work\"] .mobile-nav-tabs-item:nth-child(5),html[data-current-path^=\"/ai-for-work\"] .mobile-nav-tabs-item:nth-child(6),html[data-current-path^=\"/ai-for-work\"] .mobile-nav-tabs-item:nth-child(7),html[data-current-path^=\"/ai-for-work\"] .mobile-nav-tabs-item:nth-child(8){display:none}html[data-current-path^=\"/ai-for-process\"] .mobile-nav-tabs-item:nth-child(1),html[data-current-path^=\"/ai-for-process\"] .mobile-nav-tabs-item:nth-child(2),html[data-current-path^=\"/ai-for-process\"] .mobile-nav-tabs-item:nth-child(3),html[data-current-path^=\"/ai-for-process\"] .mobile-nav-tabs-item:nth-child(4),html[data-current-path^=\"/ai-for-process\"] .mobile-nav-tabs-item:nth-child(5),html[data-current-path^=\"/ai-for-process\"] .mobile-nav-tabs-item:nth-child(6),html[data-current-path^=\"/ai-for-process\"] .mobile-nav-tabs-item:nth-child(7),html[data-current-path^=\"/ai-for-process\"] .mobile-nav-tabs-item:nth-child(8){display:none}html[data-current-path^=\"/ai-for-service\"] .mobile-nav-tabs-item:nth-child(1),html[data-current-path^=\"/ai-for-service\"] .mobile-nav-tabs-item:nth-child(2),html[data-current-path^=\"/ai-for-service\"] .mobile-nav-tabs-item:nth-child(3),html[data-current-path^=\"/ai-for-service\"] .mobile-nav-tabs-item:nth-child(4),html[data-current-path^=\"/ai-for-service\"] .mobile-nav-tabs-item:nth-child(5),html[data-current-path^=\"/ai-for-service\"] .mobile-nav-tabs-item:nth-child(6),html[data-current-path^=\"/ai-for-service\"] .mobile-nav-tabs-item:nth-child(7),html[data-current-path^=\"/ai-for-service\"] .mobile-nav-tabs-item:nth-child(8){display:none}html[data-current-path^=\"/agent-platform/v1\"] .mobile-nav-tabs-item:nth-child(1),html[data-current-path^=\"/agent-platform/v1\"] .mobile-nav-tabs-item:nth-child(2),html[data-current-path^=\"/agent-platform/v1\"] .mobile-nav-tabs-item:nth-child(3),html[data-current-path^=\"/agent-platform/v1\"] .mobile-nav-tabs-item:nth-child(4),html[data-current-path^=\"/agent-platform/v1\"] .mobile-nav-tabs-item:nth-child(5),html[data-current-path^=\"/agent-platform/v1\"] .mobile-nav-tabs-item:nth-child(6),html[data-current-path^=\"/agent-platform/v1\"] .mobile-nav-tabs-item:nth-child(7),html[data-current-path^=\"/agent-platform/v1\"] .mobile-nav-tabs-item:nth-child(8){display:none}html[data-current-path^=\"/ai-for-\"] nav-tabs-item:has(a[href=\"/agent-platform\"]){display:none}html[data-current-path^=\"/agent-platform/v1\"] nav-tabs-item:not(:has(a[href=\"/ai-for-service/solutions-overview\"])),html[data-current-path^=\"/ai-for-work\"] nav-tabs-item:not(:has(a[href=\"/ai-for-service/solutions-overview\"])),html[data-current-path^=\"/ai-for-process\"] nav-tabs-item:not(:has(a[href=\"/ai-for-service/solutions-overview\"])),html[data-current-path^=\"/ai-for-service\"] nav-tabs-item:not(:has(a[href=\"/ai-for-service/solutions-overview\"])){display:none}html[data-current-path^=\"/agent-platform/\"] nav-tabs-item:has(a[href=\"/ai-for-service/solutions-overview\"]){display:none}html[data-current-path^=\"/agent-platform/v1\"] nav-tabs-item:has(a[href=\"/ai-for-service/solutions-overview\"]){display:revert}html[data-current-path^=\"/ai-for-work\"] #search-bar-entry,html[data-current-path^=\"/ai-for-work\"] #search-bar-entry-mobile{display:none}html[data-current-path^=\"/ai-for-service\"] #search-bar-entry,html[data-current-path^=\"/ai-for-service\"] #search-bar-entry-mobile{display:none}html[data-current-path^=\"/ai-for-process\"] #search-bar-entry,html[data-current-path^=\"/ai-for-process\"] #search-bar-entry-mobile{display:none}html[data-current-path^=\"/agent-platform/v1\"] #search-bar-entry,html[data-current-path^=\"/agent-platform/v1\"] #search-bar-entry-mobile{display:none}html[data-current-path^=\"/ai-for-work\"] #assistant-entry,html[data-current-path^=\"/ai-for-work\"] #assistant-entry-mobile{display:none}html[data-current-path^=\"/ai-for-process\"] #assistant-entry,html[data-current-path^=\"/ai-for-process\"] #assistant-entry-mobile{display:none}html[data-current-path^=\"/agent-platform/v1\"] #assistant-entry,html[data-current-path^=\"/agent-platform/v1\"] #assistant-entry-mobile{display:none}html[data-current-path^=\"/ai-for-service\"] #assistant-entry,html[data-current-path^=\"/ai-for-service\"] #assistant-entry-mobile{display:none}.ascii-art{font-family:monospace;white-space:pre;width:720px;overflow-x:auto;margin:auto;font-size:13px}img[data-path$=\".png\"],img[src*=\".png\"]{border:1px solid #E5E7EB;border-radius:0.75rem;transition:all 0.2s ease-in-out;display:block;max-width:100%;height:auto}img[data-path$=\".png\"]:hover,img[src*=\".png\"]:hover{border-color:#D1D5DB;transform:translateY(-2px);box-shadow:0 4px 12px rgba(0, 0, 0, 0.05)}.rn-heading{font-size:1.25rem;font-weight:500;line-height:1.4;margin-top:2.0rem;margin-bottom:1.25rem;color:inherit}.rn-title{font-size:1.025rem;font-weight:600;line-height:1.4;margin-top:1.5rem;margin-bottom:0.375rem;color:inherit}.rn-subtitle{font-size:0.9375rem;font-weight:600;line-height:1.0;margin-top:1.20rem;margin-bottom:-0.50rem;color:inherit}@media (prefers-color-scheme: dark){img[data-path$=\".png\"],img[src*=\".png\"]{border-color:#374151;background-color:transparent}}:root{--kore-card-title: 15px;--kore-card-desc: 13.5px;--kore-section-title: clamp(1.4rem, 2.2vw, 1.85rem);--kore-body-lh: 1.6;--kore-eyebrow-ls: 0.1em;--kore-card-pad: 22px;--kore-grid-gap: 16px;--kore-section-pad: 80px;--kore-ease: cubic-bezier(0.22, 0.6, 0.36, 1);--kore-duration: 0.2s;--kore-hover-y: -3px;--kore-hover-shadow: 0 8px 24px rgba(92,200,58,0.14);--kore-hover-border: #5CC83A;--kore-accent: #5CC83A;--kore-bg: #FEF8EE;--kore-surface: #ffffff;--kore-border: #CCCCCC;--kore-text: #000000;--kore-muted: #666666;--kore-faint: #999999}.dark{--kore-bg: #26282F;--kore-surface: #1d2820;--kore-border: #2d3a2e;--kore-text: #F1F5F9;--kore-muted: #999999;--kore-faint: #555555;--kore-accent: #5CC83A;--kore-hover-shadow: 0 8px 24px rgba(92,200,58,0.18)}@keyframes koreUp{from{opacity:0;transform:translateY(20px)}to{opacity:1;transform:translateY(0)}}.ka1{animation:koreUp 0.6s cubic-bezier(0.22,0.6,0.36,1) 0.05s both}.ka2{animation:koreUp 0.6s cubic-bezier(0.22,0.6,0.36,1) 0.15s both}.ka3{animation:koreUp 0.6s cubic-bezier(0.22,0.6,0.36,1) 0.25s both}.ka4{animation:koreUp 0.6s cubic-bezier(0.22,0.6,0.36,1) 0.35s both}.ka5{animation:koreUp 0.6s cubic-bezier(0.22,0.6,0.36,1) 0.45s both}.kore-page{background:#FEF8EE!important;min-height:100vh;margin-top:-3rem!important;opacity:0;transition:opacity 0.25s ease-out}.kore-loaded .kore-page{opacity:1}.kore-hero-canvas{opacity:0;transition:opacity 0.8s ease-out;will-change:opacity}.kore-hero-canvas.kore-canvas-ready{opacity:1}.kore-container{max-width:1376px!important;margin-left:auto!important;margin-right:auto!important;margin-top:-140px!important;padding:56px 24px 24px!important;box-sizing:border-box!important}.kore-hero{width:100vw!important;position:relative!important;left:50%!important;transform:translateX(-50%)!important;background-color:#FEF8EE!important;background-image:radial-gradient(ellipse 55% 65% at 85% 8%, rgba(35,69,49,0.22) 0%, rgba(92,200,58,0.08) 50%, transparent 70%),\n radial-gradient(circle, rgba(92,200,58,0.22) 1.5px, transparent 1.5px)!important;background-size:100% 100%, 22px 22px!important}.dark .kore-hero{background-color:#0a1209!important;background-image:radial-gradient(ellipse 55% 65% at 85% 8%, rgba(35,69,49,0.8) 0%, rgba(92,200,58,0.18) 50%, transparent 70%),\n radial-gradient(circle, rgba(92,200,58,0.2) 1.5px, transparent 1.5px)!important;background-size:100% 100%, 22px 22px!important}.kore-hero-title{background-image:linear-gradient(135deg, #000000 0%, #234531 55%, #5CC83A 100%)!important;background-color:transparent!important;-webkit-background-clip:text!important;-webkit-text-fill-color:transparent!important;background-clip:text!important}.dark .kore-hero-title{background-image:linear-gradient(135deg, #ffffff 0%, #c8f0b0 60%, #5CC83A 100%)!important}.dark .kore-hero .kore-h1{color:#ffffff!important}.dark .kore-hero .kore-subtext{color:rgba(255,255,255,0.62)!important}.kore-hero-badge{color:#234531;background:rgba(92,200,58,0.1);border-color:rgba(92,200,58,0.28)}.dark .kore-hero-badge{color:#5CC83A;background:rgba(92,200,58,0.15);border-color:rgba(92,200,58,0.38)}.kore-icon-chip{width:44px;height:44px;border-radius:10px;flex-shrink:0;background:linear-gradient(135deg, rgba(92,200,58,0.18) 0%, rgba(35,69,49,0.14) 100%);display:flex;align-items:center;justify-content:center;color:#5CC83A}.kore-section-eyebrow{font-size:11px;font-weight:600;text-transform:uppercase;letter-spacing:var(--kore-eyebrow-ls);color:var(--kore-accent);margin-bottom:10px}.kore-section-title{font-size:var(--kore-section-title);font-weight:700;color:var(--kore-text);line-height:1.25;margin:0 0 8px}.kore-section-sub{font-size:var(--kore-card-desc);color:var(--kore-muted);line-height:var(--kore-body-lh);max-width:420px;margin:0}.dark .kore-section-title{color:var(--kore-text)}.dark .kore-section-eyebrow{color:#5CC83A}.kore-card-work,.kore-card-service,.kore-card-process,.kore-ap-card,.kore-sol-card{border-top:2.5px solid #5CC83A!important}.kore-ap-bleed{width:100vw!important;position:relative!important;left:50%!important;transform:translateX(-50%)!important;background:transparent;padding:0 0 var(--kore-section-pad)}.kore-ap-inner{max-width:1376px;margin:0 auto;padding:0 24px}.kore-ap-header{display:flex;align-items:center;justify-content:space-between;text-decoration:none;margin-bottom:6px;color:inherit}.kore-ap-title{font-size:var(--kore-card-title);font-weight:600;color:var(--kore-text)}.kore-ap-eyebrow{font-size:11px;font-weight:600;text-transform:uppercase;letter-spacing:var(--kore-eyebrow-ls);color:#5CC83A;margin-bottom:10px}.kore-ap-desc{font-size:var(--kore-card-desc);color:var(--kore-muted);line-height:var(--kore-body-lh);margin:0 0 28px;max-width:560px}.kore-ap-divider{display:none}.dark .kore-ap-bleed{background:transparent}.dark .kore-ap-title{color:var(--kore-text)}.dark .kore-ap-eyebrow{color:#5CC83A}.dark .kore-ap-divider{display:none}.kore-ap-card{background:var(--kore-surface);border:1px solid var(--kore-border);border-radius:12px;padding:var(--kore-card-pad);text-decoration:none;display:flex;flex-direction:column;gap:12px;box-shadow:0 1px 4px rgba(0,0,0,0.04);transition:transform var(--kore-duration) var(--kore-ease), box-shadow var(--kore-duration) var(--kore-ease), border-color var(--kore-duration) var(--kore-ease)}.kore-ap-card:hover{transform:translateY(var(--kore-hover-y));box-shadow:var(--kore-hover-shadow);border-color:var(--kore-hover-border)}.kore-ap-card:hover .kore-ap-card-arrow{opacity:1!important;transform:translateX(3px)!important}.dark .kore-ap-card{box-shadow:0 1px 4px rgba(0,0,0,0.2)}.kore-cap-grid{display:grid;grid-template-columns:repeat(4, 1fr);gap:10px}.kore-cap-tile{display:flex;flex-direction:column;gap:8px;padding:14px 16px;border-radius:12px;background:#ffffff;border:1px solid var(--kore-border);box-shadow:0 1px 4px rgba(0,0,0,0.04);text-decoration:none;transition:transform var(--kore-duration) var(--kore-ease), box-shadow var(--kore-duration) var(--kore-ease), border-color var(--kore-duration) var(--kore-ease);position:relative}.kore-cap-tile:hover{transform:translateY(var(--kore-hover-y));box-shadow:var(--kore-hover-shadow);border-color:var(--kore-hover-border)}.kore-cap-tile:hover .kore-cap-tile-arrow{opacity:1!important;transform:translateX(3px)!important}.kore-cap-tile-header{display:flex;align-items:center;gap:10px}.kore-cap-tile .kore-icon-chip{width:28px;height:28px;border-radius:7px}.kore-cap-tile .kore-icon-chip svg{width:14px;height:14px}.kore-cap-tile-title{font-size:13.5px;font-weight:600;color:var(--kore-text);flex:1}.kore-cap-tile-arrow{opacity:0;color:var(--kore-accent);transition:opacity var(--kore-duration) var(--kore-ease), transform var(--kore-duration) var(--kore-ease);flex-shrink:0}.kore-cap-tile-desc{font-size:12.5px;color:var(--kore-muted);line-height:1.5;margin:0}.dark .kore-cap-tile{background:linear-gradient(135deg, #1a2416 0%, #151d12 100%);border-color:#253220}.dark .kore-cap-tile:hover{background:linear-gradient(135deg, #1e2a1a 0%, #192518 100%);border-color:#2e4028}.kore-sol-grid{display:grid;grid-template-columns:repeat(3, 1fr);gap:16px}.kore-sol-card{display:flex;flex-direction:column;gap:12px;padding:var(--kore-card-pad);border-radius:12px;background:var(--kore-surface);border:1px solid var(--kore-border);text-decoration:none;transition:transform var(--kore-duration) var(--kore-ease), box-shadow var(--kore-duration) var(--kore-ease), border-color var(--kore-duration) var(--kore-ease);position:relative;overflow:hidden}.kore-sol-card::after{content:'';position:absolute;inset:0;opacity:0;background:radial-gradient(circle at 50% 0%, rgba(92,200,58,0.06), transparent 70%);transition:opacity var(--kore-duration) var(--kore-ease)}.kore-sol-card:hover{transform:translateY(var(--kore-hover-y));box-shadow:var(--kore-hover-shadow);border-color:var(--kore-hover-border)}.kore-sol-card:hover .kore-sol-card-arrow{opacity:1!important;transform:translateX(3px)!important}.kore-sol-card:hover::after{opacity:1}.kore-sol-card .kore-icon-chip{width:40px;height:40px}.kore-sol-card-title{font-size:var(--kore-card-title);font-weight:600;color:var(--kore-text)}.kore-sol-card-desc{font-size:var(--kore-card-desc);color:var(--kore-muted);line-height:var(--kore-body-lh);margin:0}.kore-sol-group-label{font-size:11px;font-weight:600;text-transform:uppercase;letter-spacing:var(--kore-eyebrow-ls);color:var(--kore-faint);margin-bottom:12px}.dark .kore-sol-card{background:var(--kore-surface);border-color:var(--kore-border)}.dark .kore-sol-card:hover{box-shadow:var(--kore-hover-shadow)}.kore-resources-bleed{width:100vw!important;position:relative!important;left:50%!important;transform:translateX(-50%)!important;background:#1a1f1c;padding:var(--kore-section-pad) 0}.kore-resources-inner{max-width:1376px;margin:0 auto;padding:0 24px}.kore-resources-grid{display:grid;grid-template-columns:repeat(3, 1fr);gap:0}.kore-resource-item{display:flex;flex-direction:column;gap:12px;padding:24px 36px 24px 0;text-decoration:none;border-right:1px solid rgba(255,255,255,0.08)}.kore-resource-item:last-child{border-right:none;padding:24px 0 24px 36px}.kore-resource-item:nth-child(2){padding:24px 36px}.kore-resource-header{display:flex;align-items:center;gap:12px}.kore-resource-icon{width:44px;height:44px;border-radius:12px;background:rgba(92,200,58,0.15);display:flex;align-items:center;justify-content:center;color:#5CC83A;flex-shrink:0}.kore-resource-title{font-size:var(--kore-card-title);font-weight:600;color:#F1F5F9}.kore-resource-desc{font-size:var(--kore-card-desc);color:rgba(255,255,255,0.45);line-height:var(--kore-body-lh);margin:0}.kore-resource-link{font-size:13px;font-weight:500;color:#5CC83A;display:inline-flex;align-items:center;gap:5px;margin-top:auto;transition:gap var(--kore-duration) var(--kore-ease)}.kore-resource-item:hover .kore-resource-link{gap:10px}.dark .kore-resources-bleed{background:#0d1209}.kore-footer-bleed{width:100vw!important;position:relative!important;left:50%!important;transform:translateX(-50%)!important;background:#ffffff;border-top:1px solid #CCCCCC}.kore-footer-inner{max-width:1376px;margin:0 auto;padding:0 24px;padding-bottom:40px}.kore-footer-bleed .kore-footer{margin-top:0!important;border-top:none!important}.dark .kore-footer-bleed{background:#26282F;border-color:#2d3a2e}.kore-card{background:#ffffff!important;transition:transform var(--kore-duration) var(--kore-ease),\n box-shadow var(--kore-duration) var(--kore-ease),\n border-color var(--kore-duration) var(--kore-ease)!important}.kore-card:hover{transform:translateY(var(--kore-hover-y))!important;box-shadow:var(--kore-hover-shadow)!important;border-color:var(--kore-hover-border)!important}.kore-card:hover .kore-card-arrow{opacity:1!important;transform:translateX(3px)!important}.kore-grid{display:grid!important;gap:var(--kore-grid-gap)!important}.kore-grid-4{grid-template-columns:repeat(4, 1fr)!important}.kore-grid-3{grid-template-columns:repeat(3, 1fr)!important}.dark .kore-page{background:#26282F!important}.kore-hero-overlay{background:radial-gradient(ellipse 60% 70% at 50% 42%, rgba(254,248,238,0.9) 0%, rgba(254,248,238,0.82) 35%, rgba(254,248,238,0.38) 60%, transparent 80%)}.dark .kore-hero-overlay{background:radial-gradient(ellipse 70% 70% at 50% 45%, rgba(10,18,9,0.5) 0%, rgba(10,18,9,0.15) 55%, transparent 78%)}.kore-hero-bottom-fade{background:linear-gradient(to bottom, transparent, #FEF8EE)}.dark .kore-hero-bottom-fade{background:linear-gradient(to bottom, transparent, #26282F)!important}.dark .kore-card{background:#1d2820!important;border-color:#2d3a2e!important;box-shadow:0 1px 4px rgba(0,0,0,0.2)!important}.dark .kore-card:hover{border-color:var(--kore-hover-border)!important;box-shadow:var(--kore-hover-shadow)!important}.dark .kore-icon-chip{background:linear-gradient(135deg, rgba(92,200,58,0.15) 0%, rgba(35,69,49,0.1) 100%);color:#5CC83A}.dark .kore-section-divider{background:#2d3a2e!important}.dark .kore-h1{color:#F1F5F9!important}.dark .kore-subtext{color:#999999!important}.dark .kore-label{color:#555555!important}.dark .kore-card-title{color:#F1F5F9!important}.dark .kore-card-desc{color:#999999!important}.dark .kore-footer{border-color:#2d3a2e!important;color:#555555!important}.dark .kore-footer a{color:#555555!important}.kore-img-dark{display:none!important}.dark .kore-img-light{display:none!important}.dark .kore-img-dark{display:block!important}@media (max-width: 1024px){.kore-grid-4{grid-template-columns:repeat(2, 1fr)!important}.kore-cap-grid{grid-template-columns:repeat(2, 1fr)!important}.kore-sol-grid{grid-template-columns:repeat(2, 1fr)!important}}@media (max-width: 900px){.kore-cap-grid{grid-template-columns:repeat(2, 1fr)!important}}@media (max-width: 768px){.kore-container{padding:24px 16px 48px!important;max-width:100%!important}.kore-grid-4{grid-template-columns:repeat(2, 1fr)!important}.kore-grid-3{grid-template-columns:1fr!important}.kore-solutions-outer{grid-template-columns:1fr!important;gap:28px!important}.kore-cap-list{grid-template-columns:1fr!important}.kore-cap-item:nth-child(odd){border-right:none!important}.kore-cap-grid{grid-template-columns:1fr!important}.kore-sol-grid{grid-template-columns:1fr!important}.kore-resources-grid{grid-template-columns:1fr!important}.kore-resource-item,.kore-resource-item:last-child,.kore-resource-item:nth-child(2){padding:20px 0!important;border-right:none!important;border-bottom:1px solid rgba(255,255,255,0.08)!important}.kore-resource-item:last-child{border-bottom:none!important}}@media (max-width: 480px){.kore-grid-4{grid-template-columns:1fr!important}}"}],"page":{"pagePath":"ai-for-service/searchai/howto/use-usercontext","slug":"/ai-for-service/searchai/howto/use-usercontext","pageMetadata":{"title":"How to Use userContext Sent via the Public API in Generative AI Prompts","sidebarTitle":"Use userContext in Prompts","noindex":true,"description":null,"href":"/ai-for-service/searchai/howto/use-usercontext"},"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`,li:`li`,p:`p`,pre:`pre`,span:`span`,ul:`ul`,..._provideComponents(),...props.components},{CodeBlock,Heading,Note}=_components;if(!CodeBlock)_missingMdxReference(`CodeBlock`,true);if(!Heading)_missingMdxReference(`Heading`,true);if(!Note)_missingMdxReference(`Note`,true);return _jsxs(_Fragment,{children:[_jsxs(_components.p,{children:[`When calling the Advanced Search API, you can pass user-specific information through the `,_jsx(_components.code,{children:`customData.userContext`}),` field. This context is available in the Query Rephrase feature, allowing the LLM to tailor how it interprets and rephrases user queries based on who is asking.`]}),`\n`,_jsxs(Note,{children:[_jsx(_components.code,{children:`userContext`}),` is available in the Query Rephrase prompt only. It is not available in the Answer Generation prompt.`]}),`\n`,_jsx(Heading,{level:`2`,id:`how-it-works`,children:`How It Works`}),`\n`,_jsxs(_components.p,{children:[`User context can be passed in the API as a customData field. When `,_jsx(_components.code,{children:`userContext`}),` is included in the API request, Search AI makes it available in the prompt template as the `,_jsx(_components.code,{children:`{{customUserContext}}`}),` variable The entire object is passed as-is to the LLM, all keys and values in the object are visible to the model, allowing it to reason over them when rephrasing the query.`]}),`\n`,_jsx(_components.p,{children:`For example, if you send:`}),`\n`,_jsx(CodeBlock,{numberOfLines:`7`,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:`7`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`\"customData\": {`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:` \"userContext\": {`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:` \"userType\": \"premium\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:` \"userName\": \"Jane\"`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`}`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{})})]})})}),`\n`,_jsxs(_components.p,{children:[`The prompt receives this as: You can then reference this in your prompts using `,{customUserContext},`.`]}),`\n`,_jsx(Heading,{level:`2`,id:`prerequisites`,children:`Prerequisites`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsx(_components.li,{children:`Agentic RAG must be enabled in your Search AI application.`}),`\n`,_jsx(_components.li,{children:`A custom prompt must be configured for the Query Rephrase Agent. Learn more.`}),`\n`]}),`\n`,_jsx(Heading,{level:`3`,id:`step-1-pass-usercontext-in-the-api-request`,children:`Step 1: Pass userContext in the API Request`}),`\n`,_jsxs(_components.p,{children:[`Include the `,_jsx(_components.code,{children:`userContext`}),` object inside `,_jsx(_components.code,{children:`customData`}),` in your Advanced Search API request:`]}),`\n`,_jsx(CodeBlock,{numberOfLines:`10`,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:`10`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`{`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:` \"query\": \"what are my benefits?\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:` \"customData\": {`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:` \"userContext\": {`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:` \"userType\": \"active\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:` `})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:` \"userName\": \"John\"`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:` }}`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{})})]})})}),`\n`,_jsx(Heading,{level:`3`,id:`step-2-configure-the-query-rephrase-prompt`,children:`Step 2: Configure the Query Rephrase Prompt`}),`\n`,_jsxs(_components.p,{children:[`In the prompt configuration for the Query Rephrase Agent, use `,_jsx(_components.code,{children:`{{customUserContext}}`}),` to reference the user context and instruct the LLM to apply rephrasing logic based on its contents.`]}),`\n`,_jsx(_components.p,{children:`Example prompt configuration:`}),`\n`,_jsx(CodeBlock,{numberOfLines:`11`,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:`11`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`\"messages\": [`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:` {`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:` \"role\": \"system\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:` \"content\": \"You are an intelligent assistant that helps users rephrase their queries only when necessary based on userContext. If the userContext has userType as active, rephrase the query to focus on currently active employee benefits and entitlements.\"`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:` },`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:` {`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:` \"role\": \"user\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:` \"content\": \"Using the following userContext, rephrase the query if needed: {{query}}.\\\\nContext: {{customUserContext}}.\"`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`]`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{})})]})})}),`\n`,_jsxs(_components.p,{children:[`In this example, the LLM receives the full `,_jsx(_components.code,{children:`userContext`}),` object and uses the `,_jsx(_components.code,{children:`userType`}),` field to decide how to rephrase the query. For a user with `,_jsx(_components.code,{children:`userType: active`}),`, the query “what are my benefits?” might be rephrased to “what benefits and entitlements are available to currently active employees?” before retrieval.`]}),`\n`,_jsx(Heading,{level:`3`,id:`notes`,children:`Notes`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[`The `,_jsx(_components.code,{children:`{{customUserContext}}`}),` variable contains the entire `,_jsx(_components.code,{children:`userContext`}),` object as a stringified JSON. All keys in this object are visible to the LLM.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`userContext`}),` is only accessible in the Query Rephrase prompt.`]}),`\n`,_jsxs(_components.li,{children:[`You can include both `,_jsx(_components.code,{children:`userContext`}),` and `,_jsx(_components.code,{children:`previousConversation`}),` in the same `,_jsx(_components.code,{children:`customData`}),` object — they are independent and do not conflict.`]}),`\n`,_jsxs(_components.li,{children:[`If `,_jsx(_components.code,{children:`userContext`}),` is passed but Agentic RAG is disabled, or no custom prompt referencing `,_jsx(_components.code,{children:`{{customUserContext}}`}),` is configured, the context is ignored.`]}),`\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":"How to Use userContext Sent via the Public API in Generative AI Prompts","sidebarTitle":"Use userContext in Prompts","noindex":true,"description":null,"href":"/ai-for-service/searchai/howto/use-usercontext"}}},"mdxSourceWithNoJs":null,"noJsSplices":[[2829,2849,""]]},"mdxExtracts":{"tableOfContents":[{"title":"How It Works","slug":"how-it-works","depth":2,"children":[]},{"title":"Prerequisites","slug":"prerequisites","depth":2,"children":[{"title":"Step 1: Pass userContext in the API Request","slug":"step-1-pass-usercontext-in-the-api-request","depth":3,"children":[]},{"title":"Step 2: Configure the Query Rephrase Prompt","slug":"step-2-configure-the-query-rephrase-prompt","depth":3,"children":[]},{"title":"Notes","slug":"notes","depth":3,"children":[]}]}],"codeExamples":{}},"jsLinks":["/_mintlify/custom/koreai/29b6b962a304e7e8/search.js"],"subdomain":"koreai","siteName":"Kore.ai Docs","title":"How to Use userContext Sent via the Public API in Generative AI Prompts - Kore.ai Docs","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-11-11T20:30:51.377Z","originalFileLocation":"ai-for-service/searchai/howto/use-usercontext.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=\"application-name\" content=\"Kore.ai 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/koreai/76UiN88-8Y-QZO7w/_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/koreai/76UiN88-8Y-QZO7w/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/koreai/76UiN88-8Y-QZO7w/_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/koreai/76UiN88-8Y-QZO7w/_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/koreai/76UiN88-8Y-QZO7w/_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/koreai/76UiN88-8Y-QZO7w/_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/koreai/76UiN88-8Y-QZO7w/_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/koreai/76UiN88-8Y-QZO7w/_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/koreai/76UiN88-8Y-QZO7w/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"How to Use userContext Sent via the Public API in Generative AI Prompts - Kore.ai Docs\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"Kore.ai Docs\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://docs.kore.ai/ai-for-service/searchai/howto/use-usercontext\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://koreai.mintlify.site/_mintlify/api/og/v2?division=Documentation\u0026amp;title=How+to+Use+userContext+Sent+via+the+Public+API+in+Generative+AI+Prompts\u0026amp;theme=89ff994e79d5ad721d816780\u0026amp;signature=9821886837d6d3b6b37735f08bb94f47f1e39f31a92182fbe81617850b1b1266\">\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=\"How to Use userContext Sent via the Public API in Generative AI Prompts - Kore.ai Docs\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://koreai.mintlify.site/_mintlify/api/og/v2?division=Documentation\u0026amp;title=How+to+Use+userContext+Sent+via+the+Public+API+in+Generative+AI+Prompts\u0026amp;theme=89ff994e79d5ad721d816780\u0026amp;signature=9821886837d6d3b6b37735f08bb94f47f1e39f31a92182fbe81617850b1b1266\">\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/koreai/76UiN88-8Y-QZO7w/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"Kore.ai Docs\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#16A34A\">\u003clink data-mint-head rel=\"canonical\" href=\"https://docs.kore.ai/ai-for-service/searchai/howto/use-usercontext\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/ai-for-service/searchai/howto/use-usercontext.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"Kore.ai Docs\",\"publisher\":{\"@type\":\"Organization\",\"name\":\"Kore.ai Docs\"},\"provider\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","agentPointerHref":"/ai-for-service/searchai/howto/use-usercontext.md","siteName":"Kore.ai Docs","nav":{"global":null,"tabs":[{"tab":"Home","icon":"house","pages":[{"title":"Kore.ai Product Documentation","mode":"custom","href":"/home"}]},{"tab":"Guide","icon":"book","pages":[{"group":"Get started","pages":[{"title":"Agent Platform overview","sidebarTitle":"Platform overview","href":"/agent-platform"},{"title":"Quick start guide","sidebarTitle":"Quick start","href":"/agent-platform/getting-started"},{"group":"Core concepts","pages":[{"title":"Agent Blueprint Language (ABL)","sidebarTitle":"ABL","href":"/agent-platform/abl"},{"title":"Arch AI","sidebarTitle":"Arch AI","href":"/agent-platform/arch-ai"},{"title":"Dual-brain architecture","sidebarTitle":"Dual-brain architecture","href":"/agent-platform/dual-brain-architecture"},{"title":"Building blocks","sidebarTitle":"Building blocks","href":"/agent-platform/concepts"}]},{"group":"Best practices","pages":[{"title":"Best practices for building and operating agents","sidebarTitle":"Overview","href":"/agent-platform/best-practices/overview"},{"group":"Plan and design","pages":[{"title":"Plan an agent journey","sidebarTitle":"Plan an agent journey","href":"/agent-platform/best-practices/plan-agent-journey"},{"title":"Agent design guidelines","sidebarTitle":"Agent design guidelines","href":"/agent-platform/best-practices/agent-design-guidelines"},{"title":"Design context, memory, and handoffs","sidebarTitle":"Context, memory, and handoffs","href":"/agent-platform/best-practices/context-memory-handoffs"}]},{"group":"Work as a team","pages":[{"title":"Collaborate with Git","sidebarTitle":"Collaborate with Git","href":"/agent-platform/best-practices/collaborate-with-git"},{"title":"Work with a coding assistant","sidebarTitle":"Work with a coding assistant","href":"/agent-platform/best-practices/work-with-coding-assistant"}]},{"group":"Voice and languages","pages":[{"title":"Design voice conversations","sidebarTitle":"Design voice conversations","href":"/agent-platform/best-practices/design-voice-conversations"},{"title":"Test voice agents","sidebarTitle":"Test voice agents","href":"/agent-platform/best-practices/test-voice-agents"},{"title":"Build multilingual agents","sidebarTitle":"Build multilingual agents","href":"/agent-platform/best-practices/multilingual-agents"}]},{"group":"Test and release","pages":[{"title":"Diagnose and review a change","sidebarTitle":"Diagnose and review a change","href":"/agent-platform/best-practices/diagnose-and-review"},{"title":"Evaluate agents","sidebarTitle":"Evaluate agents","href":"/agent-platform/best-practices/evaluate-agents"},{"title":"Release agents to production","sidebarTitle":"Release agents to production","href":"/agent-platform/best-practices/release-to-production"}]}]}]},{"group":"Build","pages":[{"group":"Projects and agents","pages":[{"title":"Create and manage project","sidebarTitle":"Projects","href":"/agent-platform/projects"},{"title":"Create agents","sidebarTitle":"Agents","href":"/agent-platform/create-agents"},{"title":"Multi-agent orchestration","sidebarTitle":"Orchestration","href":"/agent-platform/orchestrate"},{"title":"Workflows","sidebarTitle":"Workflows","href":"/agent-platform/workflows"},{"title":"Gather data from users","sidebarTitle":"Gather data from users","href":"/agent-platform/gather-data"}]},{"group":"Tools","pages":[{"title":"Tools overview","sidebarTitle":"Tools overview","href":"/agent-platform/tools-overview"},{"title":"HTTP tools","sidebarTitle":"HTTP tools","href":"/agent-platform/tools/http"},{"title":"MCP tools","sidebarTitle":"MCP tools","href":"/agent-platform/tools/mcp"},{"title":"Actions","sidebarTitle":"Actions","href":"/agent-platform/tools/actions"},{"title":"WSDL repository","sidebarTitle":"WSDL repository","href":"/agent-platform/tools/wsdl-repo"},{"title":"Inbuilt tools","sidebarTitle":"Inbuilt tools","href":"/agent-platform/inbuilt-tools/index"},{"title":"Code tools","sidebarTitle":"Code tools","href":"/agent-platform/tools/code"}]},{"group":"Knowledge and data","pages":[{"title":"Knowledge bases and knowledge tools","sidebarTitle":"Knowledge bases","href":"/agent-platform/knowledge"},{"title":"Agent Tables","sidebarTitle":"Agent tables","href":"/agent-platform/agent-tables"}]},{"group":"Context and prompts","pages":[{"title":"Memory and state","sidebarTitle":"Memory and state","href":"/agent-platform/memory-and-state"},{"title":"How a turn is built","sidebarTitle":"Model context","href":"/agent-platform/context-and-prompts"},{"title":"Context size, compaction, and budgets","sidebarTitle":"Compaction and budgets","href":"/agent-platform/context-compaction"},{"title":"Prompts library","sidebarTitle":"Prompts library","href":"/agent-platform/prompts"}]},{"group":"Quality","pages":[{"title":"Create and manage feedback templates","sidebarTitle":"Feedback templates","href":"/agent-platform/feedback-template"}]}]},{"group":"Optimize","pages":[{"title":"Test agents","sidebarTitle":"Test","href":"/agent-platform/testing"},{"group":"Evaluate","pages":[{"title":"Evaluations","sidebarTitle":"Evals","href":"/agent-platform/evals"},{"title":"Autoloop","sidebarTitle":"Autoloop","href":"/agent-platform/autoloop"}]},{"title":"Optimize with Arch AI","sidebarTitle":"Optimize","href":"/agent-platform/optimize"},{"title":"Tuning for latency","sidebarTitle":"Latency","href":"/agent-platform/latency-and-speed"}]},{"group":"Deploy","pages":[{"group":"Govern","pages":[{"title":"Safety and guardrails","sidebarTitle":"Guardrails","href":"/agent-platform/safety-and-guardrails"},{"title":"PII protection","sidebarTitle":"PII protection","href":"/agent-platform/pii-protection"}]},{"group":"Publish and run","pages":[{"title":"Deploy agents","sidebarTitle":"Deploy agents","href":"/agent-platform/deployment"},{"title":"Agent runtime","sidebarTitle":"Agent runtime","href":"/agent-platform/runtime"},{"title":"Sessions","sidebarTitle":"Sessions","href":"/agent-platform/sessions"}]},{"group":"Handoff and connections","pages":[{"title":"Inbox","sidebarTitle":"Inbox","href":"/agent-platform/inbox"},{"title":"Transfer sessions","sidebarTitle":"Transfer sessions","href":"/agent-platform/transfer-sessions"},{"title":"External agent","sidebarTitle":"External agent","href":"/agent-platform/external-agent"}]}]},{"group":"Analyze","pages":[{"title":"Insights overview","sidebarTitle":"Insights overview","href":"/agent-platform/analytics-and-insights"},{"group":"Metrics","pages":[{"title":"Insights metrics","sidebarTitle":"Understanding metrics","href":"/agent-platform/analytics-insights/how-metrics-work"},{"title":"Insights metrics reference","sidebarTitle":"Metrics reference","href":"/agent-platform/analytics-insights/metrics-reference"}]},{"group":"Dashboards","pages":[{"title":"Usage insights","sidebarTitle":"Usage insights","href":"/agent-platform/analytics-insights/executive-dashboard-usage"},{"title":"Quality insights","sidebarTitle":"Quality insights","href":"/agent-platform/analytics-insights/performance-quality"},{"title":"Customer voice","sidebarTitle":"Customer voice","href":"/agent-platform/analytics-insights/customer-voice"},{"title":"Voice channel analytics","sidebarTitle":"Channel analytics","href":"/agent-platform/analytics-insights/voice-analytics"},{"title":"Agent transfer","sidebarTitle":"Agent transfer","href":"/agent-platform/analytics-insights/agent-transfer"}]},{"group":"Explore and build","pages":[{"title":"Analytics explorer","sidebarTitle":"Analytics explorer","href":"/agent-platform/analytics-insights/analytics-explorer"},{"title":"Custom dashboards","sidebarTitle":"Custom dashboards","href":"/agent-platform/analytics-insights/custom-dashboards"},{"title":"Analytics pipelines","sidebarTitle":"Analytics pipelines","href":"/agent-platform/analytics-insights/analytics-pipelines"},{"title":"Custom tags (trace metadata)","sidebarTitle":"Custom tags","href":"/agent-platform/analytics-insights/custom-tags"}]}]},{"group":"References","pages":[{"title":"Artemis how-to guides","sidebarTitle":"How-to guides","href":"/agent-platform/abl/how-to/overview"},{"title":"Frequently asked questions","sidebarTitle":"FAQs","href":"/agent-platform/faq"},{"title":"Glossary","sidebarTitle":"Glossary","href":"/agent-platform/glossary"},{"title":"Silent failures and key limits","sidebarTitle":"Silent failures and key limits","href":"/agent-platform/silent-failures-and-limits"}]}]},{"tab":"ABL","icon":"laptop-code","pages":[{"group":"Get started","pages":[{"title":"ABL overview","sidebarTitle":"ABL overview","href":"/agent-platform/abl/reference/language-overview"},{"title":"ABL programming and scripting constructs","sidebarTitle":"Scripting constructs","href":"/agent-platform/abl/reference/scripting-constructs"}]},{"group":"ABL reference","pages":[{"group":"Agent setup","pages":[{"title":"Agent declaration","sidebarTitle":"Agent declaration","href":"/agent-platform/abl/reference/agent-declaration"},{"title":"Behavior profiles","sidebarTitle":"Behavior profiles","href":"/agent-platform/abl/reference/behavior-profiles"},{"title":"Lifecycle and hooks","sidebarTitle":"Lifecycle and hooks","href":"/agent-platform/abl/reference/lifecycle-and-hooks"},{"title":"Multi-agent and supervisor","sidebarTitle":"Multi-agent and supervisor","href":"/agent-platform/abl/reference/multi-agent-and-supervisor"}]},{"group":"Flow and input","pages":[{"title":"FLOW (structured execution steps)","sidebarTitle":"Flow","href":"/agent-platform/abl/reference/flow"},{"title":"GATHER (information collection)","sidebarTitle":"Gather","href":"/agent-platform/abl/reference/gather"},{"title":"NLU (Natural Language Understanding)","sidebarTitle":"NLU","href":"/agent-platform/abl/reference/nlu"}]},{"group":"Data, rules, and safety","pages":[{"title":"Memory and constraints","sidebarTitle":"Memory and constraints","href":"/agent-platform/abl/reference/memory-and-constraints"},{"title":"Expressions and functions","sidebarTitle":"Expressions and functions","href":"/agent-platform/abl/reference/expressions-and-functions"},{"title":"Data types and utilities","sidebarTitle":"Data types","href":"/agent-platform/abl/reference/data-types-and-utilities"},{"title":"Guardrails","sidebarTitle":"Guardrails","href":"/agent-platform/abl/reference/guardrails"}]},{"group":"Tools and responses","pages":[{"title":"Tools","sidebarTitle":"Tools","href":"/agent-platform/abl/reference/tools"},{"title":"Rich content","sidebarTitle":"Rich content","href":"/agent-platform/abl/reference/rich-content"}]},{"title":"Voice in ABL","sidebarTitle":"Voice","href":"/agent-platform/abl/reference/voice"},{"title":"ABL errors and warnings","sidebarTitle":"Errors and warnings","href":"/agent-platform/abl/reference/errors-and-warnings"}]}]},{"tab":"CLI and MCP","icon":"terminal","pages":[{"group":"CLI","pages":[{"title":"Install the Artemis CLI","sidebarTitle":"Set up CLI","href":"/agent-platform/cli"},{"title":"Use the Artemis CLI","sidebarTitle":"Build using CLI","href":"/agent-platform/use-cli"}]},{"group":"MCP server","pages":[{"title":"Install and configure MCP server","sidebarTitle":"Set up MCP server","href":"/agent-platform/mcp-server"},{"title":"Build with Arch using MCP","sidebarTitle":"Build using MCP","href":"/agent-platform/use-mcp-server"},{"title":"Arch MCP tools and skills","sidebarTitle":"Arch MCP tools and skills","href":"/agent-platform/arch-mcp-reference"}]}]},{"tab":"APIs and SDK","icon":"puzzle-piece","pages":[{"group":"APIs","pages":[{"title":"Artemis API overview","sidebarTitle":"Overview","href":"/agent-platform/api-reference/overview"},{"title":"User management API overview","sidebarTitle":"User management APIs","href":"/agent-platform/api-reference/user-management-overview"},{"title":"Project deploy and promote API overview","sidebarTitle":"Project deployment APIs","href":"/agent-platform/api-reference/cicd-overview"},{"title":"Analytics API overview","sidebarTitle":"Analytics APIs","href":"/agent-platform/api-reference/analytics-overview"},{"title":"Project import and export API overview","sidebarTitle":"Project APIs","href":"/agent-platform/api-reference/project-import-export-overview"},{"title":"Feedback API overview","sidebarTitle":"Feedback APIs","href":"/agent-platform/api-reference/feedback-overview"},{"title":"Introduction to outbound dialing API","sidebarTitle":"Outbound dialing APIs","href":"/agent-platform/api-reference/outbound-calls-overview"},{"title":"Call recording API overview","sidebarTitle":"Call recording APIs","href":"/agent-platform/api-reference/recording-overview"},{"title":"Tool execution API overview","sidebarTitle":"Tools execution APIs","href":"/agent-platform/api-reference/tool-execution-overview"}]},{"group":"SDKs","pages":[{"title":"Artemis Software Developer Kits (SDKs)","sidebarTitle":"Overview","href":"/agent-platform/sdk/overview"},{"group":"Web SDK","pages":[{"title":"Artemis Web SDK overview","sidebarTitle":"Overview","href":"/agent-platform/sdk/web-sdk"},{"title":"Web SDK end-to-end auth setup guide","sidebarTitle":"Set up auth","href":"/agent-platform/sdk/web-sdk-end-to-end-auth-setup"}]},{"title":"Artemis mobile SDK overview","sidebarTitle":"Mobile SDK","href":"/agent-platform/sdk/mobile-sdk"}]}]},{"tab":"Integrations","icon":"plug","pages":[{"title":"Integrations overview","sidebarTitle":"Overview","href":"/agent-platform/integrations"},{"title":"Kore.ai CX modules","sidebarTitle":"Kore.ai CX modules","href":"/agent-platform/integrations/kore-cx-modules"},{"title":"Enterprise systems","sidebarTitle":"Enterprise systems","href":"/agent-platform/integrations/enterprise-systems"},{"title":"Knowledge sources","sidebarTitle":"Knowledge sources","href":"/agent-platform/integrations/knowledge-sources"},{"title":"Contact centers","sidebarTitle":"Contact centers","href":"/agent-platform/integrations/contact-centers"},{"title":"Channels","sidebarTitle":"Channels","href":"/agent-platform/channels"}]},{"tab":"Administration","icon":"gear","pages":[{"group":"Workspace settings","pages":[{"title":"Workspace and team settings","sidebarTitle":"Workspace and team","href":"/agent-platform/administration/workspace-and-team"},{"title":"AI configuration","sidebarTitle":"AI configuration","href":"/agent-platform/administration/ai-configuration"},{"title":"Workspace analytics","sidebarTitle":"Workspace analytics","href":"/agent-platform/administration/workspace-analytics"},{"title":"Workspace account","sidebarTitle":"Workspace account","href":"/agent-platform/administration/workspace-account"}]},{"group":"Project settings","pages":[{"title":"Project settings overview","sidebarTitle":"Overview","href":"/agent-platform/administration/project-settings-overview"},{"title":"General settings","sidebarTitle":"General","href":"/agent-platform/administration/general-settings"},{"title":"Integrations settings","sidebarTitle":"Integrations","href":"/agent-platform/administration/integrations-settings"},{"title":"Agent behavior settings","sidebarTitle":"Agent behavior","href":"/agent-platform/administration/agent-behavior-settings"},{"title":"Catalog settings","sidebarTitle":"Catalog","href":"/agent-platform/administration/catalog-settings"},{"title":"Advanced settings","sidebarTitle":"Advanced settings","href":"/agent-platform/administration/advanced-settings"}]}]},{"tab":"Changelog","icon":"rectangle-list","pages":[{"title":"Artemis release notes","mode":"center","href":"/agent-platform/release-notes/recent-updates"}]},{"tab":"Solutions","icon":"box-archive","pages":[{"group":"Business Solutions","pages":[{"title":"Business Solutions","sidebarTitle":"Overview","href":"/ai-for-service/solutions-overview"},{"group":"AI for Service","pages":[{"title":"AI for Service Overview","sidebarTitle":"Overview","href":"/ai-for-service/index"},{"title":"Get Started with AI for Service","sidebarTitle":"Get Started","href":"/ai-for-service/getting-started"},{"title":"Create and Manage Flows","sidebarTitle":"Flows and Routing","href":"/ai-for-service/flows/create-and-manage-flows"},{"title":"AI for Service Release Notes","sidebarTitle":"Release Notes","href":"/ai-for-service/release-notes"},{"title":"Upgrade XO10 to AI for Service (XO11)","sidebarTitle":"Upgrade Guides","href":"/ai-for-service/getting-started/upgrade-guide"},{"group":"Modules","pages":[{"group":"Automation AI","pages":[{"title":"Automation AI","sidebarTitle":"Overview","href":"/ai-for-service/automationai"},{"title":"DialogGPT","sidebarTitle":"DialogGPT","href":"/ai-for-service/automation/dialoggpt"},{"title":"Agent Flows","sidebarTitle":"Agent Flows","href":"/ai-for-service/automation/agent-flows"},{"group":"Nodes","pages":[{"title":"Node Types Overview","sidebarTitle":"Node Types","href":"/ai-for-service/automation/dialogs/node-types/overview"},{"title":"Node Connections","sidebarTitle":"Node Connections","href":"/ai-for-service/automation/dialogs/node-types/node-connections"},{"title":"User Prompts or Message","sidebarTitle":"User Prompts or Messages","href":"/ai-for-service/automation/dialogs/prompt-editor"}]},{"group":"Testing","pages":[{"title":"Playground","sidebarTitle":"Playground","href":"/ai-for-service/automation/testing/playground"},{"title":"Batch Testing - DialogGPT","sidebarTitle":"Batch Testing - DialogGPT","href":"/ai-for-service/automation/testing/batch-testing-dialoggpt"}]},{"group":"Conversation Settings","pages":[{"title":"Events","sidebarTitle":"Events","href":"/ai-for-service/automation/intelligence/events"},{"title":"Conversation Management","sidebarTitle":"Conversations","href":"/ai-for-service/automation/intelligence/conversation-management"},{"title":"Feedback Survey","sidebarTitle":"Feedback Survey","href":"/ai-for-service/manage-assistant/feedback-survey"}]},{"group":"Advanced Topics","pages":[{"title":"Dynamic Routing","sidebarTitle":"Dynamic Routing","href":"/ai-for-service/automation/dynamic-routing"},{"title":"Collaborative Development","sidebarTitle":"Collaborative Development","href":"/ai-for-service/automation/manage-assistant/collaborative-development"},{"title":"Traditional NLP Topics","sidebarTitle":"NLP Topics","href":"/ai-for-service/automation/natural-language/nlp-topics"}]},{"title":"Automation How-To Guides","sidebarTitle":"How-To Guides","href":"/ai-for-service/automation/how-tos/guide"}]},{"group":"Search AI","pages":[{"title":"Search AI","sidebarTitle":"Overview","href":"/ai-for-service/searchai"},{"title":"Ingest Data from Content Sources","sidebarTitle":"Content Sources","href":"/ai-for-service/searchai/content-sources"},{"title":"Index Configuration Guide","sidebarTitle":"Index Configuration","href":"/ai-for-service/searchai/index-configuration"},{"title":"Retrieval and Answer Configuration Guide","sidebarTitle":"Retrieval and Answer Configuration","href":"/ai-for-service/searchai/retrieval-answer-configuration"},{"title":"Agentic RAG and Business Rules Guide","sidebarTitle":"Agentic RAG and Business Rules","href":"/ai-for-service/searchai/agentic-rag-and-business-rules"},{"title":"Testing and Debugging Guide","sidebarTitle":"Testing and Debugging","href":"/ai-for-service/searchai/testing-and-debugging"},{"title":"Advance Configuration and Developer Toolkit","sidebarTitle":"Advance Configuration","href":"/ai-for-service/searchai/advance-config-and-dev-tools"},{"title":"Search AI Tips and FAQs","sidebarTitle":"Tips and FAQs","href":"/ai-for-service/searchai/tips-and-faqs"}]},{"group":"Contact Center AI","pages":[{"title":"Contact Center AI","sidebarTitle":"Overview","href":"/ai-for-service/contact-center"},{"group":"Flows and Routing","pages":[{"title":"Conditional Flows and Waiting Flows","sidebarTitle":"Flows","href":"/ai-for-service/contact-center/flows-and-routing/conditional-and-waiting-flows"},{"title":"Routing, Queues, and Skills","sidebarTitle":"Routing","href":"/ai-for-service/contact-center/routing-queues-skills"}]},{"group":"Configurations","pages":[{"title":"Configurations","sidebarTitle":"Operational Configurations","href":"/ai-for-service/contact-center/configurations/operational-configurations"},{"title":"System and Advanced Settings","sidebarTitle":"Settings","href":"/ai-for-service/contact-center/configurations/settings/configuration-settings"},{"title":"SLAs \u0026 Alerts","sidebarTitle":"SLAs \u0026 Alerts","href":"/ai-for-service/contact-center/performance-management/slas-and-alerts"}]},{"title":"Agent Console","sidebarTitle":"Agent Console","href":"/ai-for-service/contact-center/agent-console"},{"title":"Supervisor Tools","sidebarTitle":"Supervisor Tools","href":"/ai-for-service/contact-center/supervisor"},{"title":"Campaigns","sidebarTitle":"Campaigns","href":"/ai-for-service/contact-center/campaigns"}]},{"group":"Agent AI","pages":[{"title":"Agent AI","sidebarTitle":"Overview","href":"/ai-for-service/agent-ai"},{"title":"Agent Experience","sidebarTitle":"Agent Experience","href":"/ai-for-service/agentai/agent-experience"},{"title":"Real-time Agent Coaching","sidebarTitle":"Coaching","href":"/ai-for-service/agentai/agent-experience/agent-realtime-coaching"},{"title":"Agent AI Playbook","sidebarTitle":"Playbook","href":"/ai-for-service/agentai/agent-experience/playbook"},{"title":"Agent AI Configurations","sidebarTitle":"Configurations","href":"/ai-for-service/agentai/configurations"},{"title":"Agent AI Integrations","sidebarTitle":"Integrations","href":"/ai-for-service/agentai/integrations"}]},{"group":"Quality AI","pages":[{"title":"Quality AI","sidebarTitle":"Overview","href":"/ai-for-service/quality"},{"title":"Configurations Overview","sidebarTitle":"Configurations","href":"/ai-for-service/quality-ai/configurations"},{"title":"Dashboards, Analytics, and Audit","sidebarTitle":"AutoQA","href":"/ai-for-service/quality-ai/analyze"},{"title":"Coaching Assignments and Monitor","sidebarTitle":"Coaching","href":"/ai-for-service/quality-ai/coaching"}]}]},{"group":"Platform Services","pages":[{"group":"GenAI Tools","pages":[{"title":"Generative AI Tools","sidebarTitle":"Overview","href":"/ai-for-service/generative-ai-tools/overview"},{"group":"Models Library","pages":[{"title":"LLM Integration","sidebarTitle":"LLM Integration","href":"/ai-for-service/generative-ai-tools/llm-integration"},{"title":"Kore.ai XO GPT Module","href":"/ai-for-service/generative-ai-tools/xo-gpt-module"}]},{"title":"Prompts Library Overview","sidebarTitle":"Prompts Library","href":"/ai-for-service/generative-ai-tools/prompts-library"},{"title":"Generative AI Features","sidebarTitle":"GenAI Features","href":"/ai-for-service/generative-ai-tools/genai-features"},{"title":"Model Context Protocol","sidebarTitle":"Model Context Protocol","href":"/ai-for-service/generative-ai-tools/model-context-protocol"},{"group":"Safeguards","pages":[{"title":"Data Anonymization","sidebarTitle":"Data Anonymization","href":"/ai-for-service/generative-ai-tools/data-anonymization"},{"title":"Guardrails","sidebarTitle":"Guardrails","href":"/ai-for-service/generative-ai-tools/guardrails"}]}]},{"group":"Integrations","pages":[{"title":"Automation AI Integrations","sidebarTitle":"Automation AI","href":"/ai-for-service/integrations/overview"},{"title":"Contact Center Integrations","sidebarTitle":"Contact Center","href":"/ai-for-service/contact-center/integrations/overview"}]},{"title":"Digital and Voice Channels","sidebarTitle":"Channels","href":"/ai-for-service/channels"},{"title":"App Versioning, Publishing, and Export/Import","sidebarTitle":"Deployment","href":"/ai-for-service/deployment/overview"},{"title":"Analytics Overview","sidebarTitle":"Analytics","href":"/ai-for-service/analytics/overview"}]},{"group":"Administration","pages":[{"title":"Account or Workspace","sidebarTitle":"Account or Workspace","href":"/ai-for-service/manage-assistant/plan-and-usage/accounts-or-workspace-overview"},{"title":"Users and Role Management","sidebarTitle":"Users and Roles","href":"/ai-for-service/user-management/users-and-role"},{"title":"App Settings","sidebarTitle":"App Settings","href":"/ai-for-service/app-settings"},{"title":"Billing and Payments","sidebarTitle":"Billing and Payments","href":"/ai-for-service/manage-assistant/plan-and-usage/billing-and-payments"},{"title":"Admin Console Overview","sidebarTitle":"Admin Console","href":"/ai-for-service/administration/overview"}]},{"group":"References","pages":[{"group":"APIs","pages":[{"title":"Using AI for Service Platform APIs","sidebarTitle":"Overview","href":"/ai-for-service/apis/automation/api-introduction"},{"title":"API Rate Limits","sidebarTitle":"Rate Limits","href":"/ai-for-service/apis/rate-limit"},{"title":"AI for Service API List","sidebarTitle":"API List","href":"/ai-for-service/apis/api-list"}]},{"group":"SDKs","pages":[{"title":"Bot SDKs Overview","sidebarTitle":"Overview","href":"/ai-for-service/sdk/bot-sdk-introduction"},{"title":"Web SDK Overview","sidebarTitle":"Web SDK","href":"/ai-for-service/sdk/web-sdk"},{"title":"BotKit SDK Overview","sidebarTitle":"BotKit SDK","href":"/ai-for-service/sdk/botkit-sdk"}]},{"title":"koreUtil Libraries","sidebarTitle":"koreUtil Libraries","href":"/ai-for-service/apis/automation/koreutil-libraries"}]}]},{"group":"AI for Work","pages":[{"title":"AI for Work Overview","sidebarTitle":"Overview","href":"/ai-for-work/index"},{"title":"Get Started with AI for Work","sidebarTitle":"Get Started","href":"/ai-for-work/getting-started"},{"title":"Features","sidebarTitle":"Features","href":"/ai-for-work/getting-started/how-to-use"},{"title":"AI for Work Release Notes","sidebarTitle":"Release Notes","href":"/ai-for-work/release-notes/release-updates"},{"group":"Agents","pages":[{"title":"Enterprise Knowledge","sidebarTitle":"Enterprise Knowledge","href":"/ai-for-work/custom-agents/enterprise-knowledge"},{"title":"Pre-built Agents","sidebarTitle":"Pre-built Agents","href":"/ai-for-work/pre-built-agents"},{"title":"Custom Agents","sidebarTitle":"Custom Agents","href":"/ai-for-work/custom-agents"},{"title":"Agent Management","sidebarTitle":"Agent Management","href":"/ai-for-work/custom-agents/agent-management"},{"title":"AI for Work in Marketplace","sidebarTitle":"Marketplace","href":"/ai-for-work/getting-started/marketplace"}]},{"group":"Platform Services","pages":[{"title":"Assistant Configurations","sidebarTitle":"Assistant Configuration","href":"/ai-for-work/assistant-configurations"},{"title":"LLM Configuration","sidebarTitle":"LLM Configuration","href":"/ai-for-work/llm-configuration"},{"title":"Channels","sidebarTitle":"Channels","href":"/ai-for-work/channels"},{"title":"Analytics","sidebarTitle":"Analytics","href":"/ai-for-work/analytics"}]},{"group":"Administration","pages":[{"title":"Account and Workspace","sidebarTitle":"Account and Workspace","href":"/ai-for-work/administration/account-and-workspace"},{"title":"User Management","sidebarTitle":"User Management","href":"/ai-for-work/administration/user-management"},{"title":"Security and Control","sidebarTitle":"Security and Control","href":"/ai-for-work/administration/security-and-control"},{"title":"Audit Log","sidebarTitle":"Audit Log","href":"/ai-for-work/administration/audit-log"},{"title":"APIs","sidebarTitle":"APIs","href":"/ai-for-work/administration/apis"},{"title":"Amazon Q Integration with AI for Work","sidebarTitle":"Amazon Q Integration","href":"/ai-for-work/integration/amazon-q"}]}]},{"group":"AI for Process","pages":[{"title":"AI for Process Overview","sidebarTitle":"Overview","href":"/ai-for-process/index"},{"title":"Get Started with AI for Process","sidebarTitle":"Get Started","href":"/ai-for-process/getting-started"},{"title":"AI for Process Release Notes","sidebarTitle":"Release Notes","href":"/ai-for-process/release-notes/recent-updates"},{"group":"Building Workflows","pages":[{"group":"Workflows","pages":[{"title":"Workflow Overview","sidebarTitle":"Overview","href":"/ai-for-process/workflows/overview"},{"title":"Workflow Builder","sidebarTitle":"Workflow Builder","href":"/ai-for-process/workflows/workflow-builder"},{"title":"Workflow Triggers","sidebarTitle":"Workflow Triggers","href":"/ai-for-process/workflows/triggers-and-access"},{"title":"Workflow Management","sidebarTitle":"Workflow Management","href":"/ai-for-process/workflows/workflow-management"},{"title":"Context Object Reference","sidebarTitle":"Context Management","href":"/ai-for-process/workflows/context-object"},{"title":"Debug and Troubleshoot Workflows","sidebarTitle":"Debug and Troubleshoot","href":"/ai-for-process/workflows/monitor-and-debug"}]},{"title":"Workflow Nodes","sidebarTitle":"Workflow Nodes","href":"/ai-for-process/nodes"},{"title":"Inbox: Review Human-in-the-Loop Requests","sidebarTitle":"Inbox","href":"/ai-for-process/inbox"}]},{"group":"Platform Services","pages":[{"title":"Prompt Studio","sidebarTitle":"Prompts","href":"/ai-for-process/prompts"},{"group":"Models","pages":[{"title":"Model Overview","sidebarTitle":"Overview","href":"/ai-for-process/models"},{"title":"External Models","sidebarTitle":"External Models","href":"/ai-for-process/models/external-models"},{"title":"Fine-Tuned Models","sidebarTitle":"Fine-Tuned Models","href":"/ai-for-process/models/fine-tuned-model"},{"title":"Open-Source Models","sidebarTitle":"Open-Source Models","href":"/ai-for-process/models/open-source-models"},{"title":"Supported AI Models","sidebarTitle":"Supported AI Models","href":"/ai-for-process/models/supported-models"}]},{"title":"Guardrails","sidebarTitle":"Guardrails","href":"/ai-for-process/guardrails"}]},{"group":"Administration","pages":[{"title":"Account and Workspace","sidebarTitle":"Account and Workspace","href":"/ai-for-process/admin-settings"},{"group":"User and Role Management","pages":[{"title":"Invite and Manage Account Users","sidebarTitle":"User Management","href":"/ai-for-process/settings/user-management"},{"title":"Manage Roles, Permissions, and Access Levels","sidebarTitle":"Role Management","href":"/ai-for-process/settings/role-management"}]},{"title":"Monitoring","sidebarTitle":"Monitoring and Analytics","href":"/ai-for-process/settings/monitoring-overview"},{"group":"Browser Automation","pages":[{"title":"Browser Automation Deployment","sidebarTitle":"Deployment","href":"/ai-for-process/settings/deployment"},{"title":"Playground: Design, Simulate, and Test Experiments","sidebarTitle":"Playground","href":"/ai-for-process/settings/playground"}]},{"title":"Security and Control","sidebarTitle":"Security and Control","href":"/ai-for-process/settings/security-control"},{"title":"Manage Billing and Usage","sidebarTitle":"Billing and Usage","href":"/ai-for-process/settings/billing-and-usage"}]},{"group":"References","pages":[{"title":"Manage Data","href":"/ai-for-process/settings/manage-dataset"},{"title":"Integrations","href":"/ai-for-process/settings/integrations"},{"title":"API Reference","sidebarTitle":"APIs","href":"/ai-for-process/apis/apis"}]}]},{"group":"Agent Platform v1","pages":[{"title":"Agent Platform Overview","sidebarTitle":"Overview","href":"/agent-platform/v1/overview"},{"title":"Core Concepts","sidebarTitle":"Concepts","href":"/agent-platform/v1/concepts"},{"title":"Get Started with Agent Platform","sidebarTitle":"Get Started","href":"/agent-platform/v1/getting-started"},{"title":"Agent Platform Release Notes","sidebarTitle":"Release Notes","href":"/agent-platform/v1/release-notes/recent-updates"},{"group":"Building Agents","pages":[{"title":"Create an Agentic App","sidebarTitle":"Create an App","href":"/agent-platform/v1/agents/agentic-apps/create-an-app"},{"group":"Agents","pages":[{"title":"AI Agents Overview","sidebarTitle":"Overview","href":"/agent-platform/v1/agents"},{"title":"Create an Agent","sidebarTitle":"Create an Agent","href":"/agent-platform/v1/agents/create-an-agent"},{"title":"Agent Management","sidebarTitle":"Agent Management","href":"/agent-platform/v1/agents/agent-management"}]},{"group":"Orchestration","pages":[{"title":"Orchestration Overview","sidebarTitle":"Overview","href":"/agent-platform/v1/orchestrate"},{"title":"Single Agent Pattern","sidebarTitle":"Single Agent","href":"/agent-platform/v1/orchestration/single-agent"},{"title":"Supervisor Pattern","sidebarTitle":"Supervisor","href":"/agent-platform/v1/orchestration/supervisor"},{"title":"Adaptive Network Pattern","sidebarTitle":"Adaptive Network","href":"/agent-platform/v1/orchestration/adaptive-network"}]},{"group":"Tools","pages":[{"title":"Tools Overview","sidebarTitle":"Overview","href":"/agent-platform/v1/tools"},{"title":"Workflow Tools","sidebarTitle":"Workflow","href":"/agent-platform/v1/tools/workflow"},{"title":"Workflow Nodes","sidebarTitle":"Workflow Nodes","href":"/agent-platform/v1/tools/nodes"},{"title":"Code Tools","sidebarTitle":"Code","href":"/agent-platform/v1/tools/code"},{"title":"MCP Tools","sidebarTitle":"MCP","href":"/agent-platform/v1/tools/mcp"},{"title":"Tool Calling","sidebarTitle":"Calling","href":"/agent-platform/v1/tools/calling"},{"title":"Manage Context via Context Object","sidebarTitle":"Context","href":"/agent-platform/v1/tools/context-object"}]},{"title":"Empower Agents with Knowledge","sidebarTitle":"Knowledge","href":"/agent-platform/v1/knowledge"},{"title":"Memory Stores","sidebarTitle":"Memory","href":"/agent-platform/v1/memory"},{"title":"App Settings","sidebarTitle":"App Settings","href":"/agent-platform/v1/agents/agentic-apps/settings"},{"title":"App Diagnostics","sidebarTitle":"App Diagnostics","href":"/agent-platform/v1/deploy/diagnostics"},{"title":"App Simulation and Testing","sidebarTitle":"Simulation and Testing","href":"/agent-platform/v1/agents/agentic-apps/simulation-and-testing"},{"group":"Deployment","pages":[{"title":"App Deployment","sidebarTitle":"App Deployment","href":"/agent-platform/v1/deploy-apps"},{"title":"App Import \u0026 Export","sidebarTitle":"App Import Export","href":"/agent-platform/v1/deploy/import-export"}]}]},{"group":"Platform Services","pages":[{"group":"Models","pages":[{"title":"Models Overview","sidebarTitle":"Overview","href":"/agent-platform/v1/models"},{"title":"External Models","sidebarTitle":"External Models","href":"/agent-platform/v1/models/external-models"},{"title":"Open-Source Models","sidebarTitle":"Open-Source Models","href":"/agent-platform/v1/models/open-source-models"},{"title":"Fine-Tuned Models","sidebarTitle":"Fine-Tuned Models","href":"/agent-platform/v1/models/fine-tuned-models"},{"title":"Supported AI Models","sidebarTitle":"Supported Models","href":"/agent-platform/v1/models/supported-models"}]},{"group":"Prompts","pages":[{"title":"Prompt Studio","sidebarTitle":"Overview","href":"/agent-platform/v1/prompts"},{"title":"Prompt Studio Guide","sidebarTitle":"Using Prompt Studio","href":"/agent-platform/v1/prompts/using-prompt-studio"},{"title":"Advanced Features","sidebarTitle":"Advanced Features","href":"/agent-platform/v1/prompts/advanced-features"}]},{"group":"Evaluation","pages":[{"title":"Evaluation Studio","sidebarTitle":"Overview","href":"/agent-platform/v1/evaluation"},{"title":"Model Evaluation","sidebarTitle":"Model Evaluation","href":"/agent-platform/v1/evaluation/model-evaluation"},{"title":"Agentic Evaluation","sidebarTitle":"Agentic Evaluation","href":"/agent-platform/v1/evaluation/agentic-evaluation"}]},{"title":"Guardrails","sidebarTitle":"Guardrails","href":"/agent-platform/v1/guardrails"},{"title":"Usage Analytics","sidebarTitle":"Analytics","href":"/agent-platform/v1/analytics"}]},{"group":"Administration","pages":[{"title":"Account and Workspace","sidebarTitle":"Account and Workspace","href":"/agent-platform/v1/administration/overview"},{"group":"User and Role Management","pages":[{"title":"User Management","sidebarTitle":"User Management","href":"/agent-platform/v1/administration/user-management"},{"title":"Role Management","sidebarTitle":"Role Management","href":"/agent-platform/v1/administration/role-management"}]},{"title":"Monitoring","sidebarTitle":"Monitoring and Analytics","href":"/agent-platform/v1/administration/monitoring"},{"title":"Manage Custom Scripts","sidebarTitle":"Custom Scripts Management","href":"/agent-platform/v1/administration/manage-custom-scripts"},{"title":"Security and Control","sidebarTitle":"Security and Control","href":"/agent-platform/v1/administration/security-and-control"},{"title":"Billing and Usage","sidebarTitle":"Billing and Usage","href":"/agent-platform/v1/administration/billing-and-usage"}]},{"group":"References","pages":[{"group":"Business Solutions","pages":[{"title":"AI for Service with Agent Platform","sidebarTitle":"AI for Service","href":"/agent-platform/v1/agents/ai-for-service"},{"title":"AI for Work with Agent Platform","sidebarTitle":"AI for Work","href":"/agent-platform/v1/agents/ai-for-work"}]},{"title":"Marketplace","sidebarTitle":"Marketplace","href":"/agent-platform/v1/agents/agentic-apps/marketplace"},{"title":"Manage Data","sidebarTitle":"Manage Data","href":"/agent-platform/v1/administration/manage-datasets"},{"title":"Integrations","sidebarTitle":"Integrations","href":"/agent-platform/v1/administration/integrations"},{"title":"API Reference","sidebarTitle":"APIs","href":"/agent-platform/v1/apis"},{"title":"Get Started with AgenticAI Core SDK","sidebarTitle":"SDK","href":"/agent-platform/v1/sdk-overview"},{"title":"How-To Guides","sidebarTitle":"How-To Guides","href":"/agent-platform/v1/how-to-guides"}]}]}]}]}]},"basePath":"","title":"How to Use userContext Sent via the Public API in Generative AI Prompts - Kore.ai Docs","buildId":"dpl_9RFrWkXdFTJCytfx6jAofvAaEXr6","deploymentId":"dpl_9RFrWkXdFTJCytfx6jAofvAaEXr6","dynamics":[],"chunks":[]}