{"id":14783,"date":"2025-10-22T16:10:19","date_gmt":"2025-10-22T21:10:19","guid":{"rendered":"https:\/\/www.mrc-productivity.com\/docs\/?post_type=ht_kb&#038;p=14783"},"modified":"2026-08-04T16:44:23","modified_gmt":"2026-08-04T21:44:23","slug":"ai-assistant-template","status":"publish","type":"ht_kb","link":"https:\/\/www.mrc-productivity.com\/docs\/knowledge-base\/ai-assistant-template","title":{"rendered":"AI Assistants"},"content":{"rendered":"\n<div class=\"wp-block-group\"><div class=\"wp-block-group__inner-container is-layout-constrained wp-block-group-is-layout-constrained\">\n<p class=\"wp-block-paragraph\">This documentation will showcase how to build and use AI Assistants in m-Power.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The AI Assistant is built within the AI Studio and is used to integrate dynamic AI features into your applications. While most visibly consumed as a chatbot, the AI Assistant can alternatively be invoked &#8220;behind-the-scenes&#8221; via the workflow designer of an m-Power maintainer application, allowing developers to utilize AI to assist with automated workflow processes.<\/p>\n\n\n\n<figure class=\"wp-block-embed is-type-video is-provider-youtube wp-block-embed-youtube wp-embed-aspect-16-9 wp-has-aspect-ratio\"><div class=\"wp-block-embed__wrapper\">\n<iframe loading=\"lazy\" title=\"m-Power Tutorial: AI Assistants and Agents\" width=\"643\" height=\"362\" src=\"https:\/\/www.youtube.com\/embed\/hP4lY08WSag?feature=oembed\" frameborder=\"0\" allow=\"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share\" referrerpolicy=\"strict-origin-when-cross-origin\" allowfullscreen><\/iframe>\n<\/div><\/figure>\n<\/div><\/div>\n\n\n\n<div class=\"wp-block-group\"><div class=\"wp-block-group__inner-container is-layout-constrained wp-block-group-is-layout-constrained\">\n<div class=\"wp-block-group\"><div class=\"wp-block-group__inner-container is-layout-constrained wp-block-group-is-layout-constrained\">\n<h2 class=\"wp-block-heading\">Why would I use the AI Assistant?<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">In the simplest of terms, the AI Assistant can be thought of\u2014and will often be referenced in this document\u2014as a &#8220;chatbot.&#8221; Many m-Power developers have likely already interacted with chatbots in some capacity, with notable examples being OpenAI\u2019s ChatGPT, Google\u2019s Gemini, or Microsoft\u2019s Copilot. These chatbots are powered by what are generally referred to as Large Language Models (LLMs).<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">However, the capability of AI extends far beyond just holding a conversation. With the m-Power AI Assistant, the developer is ultimately responsible for defining the purpose and functionality of the chatbot, providing strict instructions and guidelines for what it can (and cannot) do.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">In the same vein, developers can empower their AI Assistant to query live database information in real-time, process incoming parameters, and trigger workflow actions based on the chatbot&#8217;s response.<\/p>\n<\/div><\/div>\n<\/div><\/div>\n\n\n\n<h2 class=\"wp-block-heading\">Creating an AI Assistant<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">The AI Assistant is managed inside of the AI Studio. To create a new Assistant:<\/p>\n\n\n\n<ol start=\"1\" class=\"wp-block-list\">\n<li>Click the <strong>+ New Assistant<\/strong> button on the left-side panel.<\/li>\n\n\n\n<li>Select the Type:\n<ul class=\"wp-block-list\">\n<li><strong>General Purpose<\/strong> \u2014 Ideal for standard chatbots, workflow automation, and custom text-based interactions. The remainder of this document focuses entirely on General Purpose assistants.<\/li>\n\n\n\n<li><strong>Data Analytics<\/strong> \u2014 Specialized assistants that dynamically write their own SQL queries based on dictionary metadata provided by the developer, delivering precise data results to the user without relying on pre-built tools.<strong> <a href=\"\/docs\/knowledge-base\/m-power-data-analytics-with-ai\" data-type=\"link\" data-id=\"\/docs\/knowledge-base\/m-power-data-analytics-with-ai\" target=\"_blank\" rel=\"noreferrer noopener\">Learn more about Data Analytic assistants here.<\/a><\/strong><\/li>\n<\/ul>\n<\/li>\n\n\n\n<li>Give the assistant a name and an optional description.<\/li>\n<\/ol>\n\n\n\n<p class=\"wp-block-paragraph\">After creating, the developer will be shown the assistant diagram inside the AI Studio.<\/p>\n\n\n\n<figure data-wp-context=\"{&quot;imageId&quot;:&quot;6a8d87f123d38&quot;}\" data-wp-interactive=\"core\/image\" data-wp-key=\"6a8d87f123d38\" class=\"wp-block-image size-large wp-lightbox-container\"><img decoding=\"async\" data-wp-class--hide=\"state.isContentHidden\" data-wp-class--show=\"state.isContentVisible\" data-wp-init=\"callbacks.setButtonStyles\" data-wp-on--click=\"actions.showLightbox\" data-wp-on--load=\"callbacks.setButtonStyles\" data-wp-on--pointerdown=\"actions.preloadImage\" data-wp-on--pointerenter=\"actions.preloadImageWithDelay\" data-wp-on--pointerleave=\"actions.cancelPreload\" data-wp-on-window--resize=\"callbacks.setButtonStyles\" src=\"\/docs\/images\/ai\/New_Assistant.png\" alt=\"\"\/><button\n\t\t\tclass=\"lightbox-trigger\"\n\t\t\ttype=\"button\"\n\t\t\taria-haspopup=\"dialog\"\n\t\t\tdata-wp-bind--aria-label=\"state.thisImage.triggerButtonAriaLabel\"\n\t\t\tdata-wp-init=\"callbacks.initTriggerButton\"\n\t\t\tdata-wp-on--click=\"actions.showLightbox\"\n\t\t\tdata-wp-style--right=\"state.thisImage.buttonRight\"\n\t\t\tdata-wp-style--top=\"state.thisImage.buttonTop\"\n\t\t>\n\t\t\t<svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"12\" height=\"12\" fill=\"none\" viewBox=\"0 0 12 12\">\n\t\t\t\t<path fill=\"#fff\" d=\"M2 0a2 2 0 0 0-2 2v2h1.5V2a.5.5 0 0 1 .5-.5h2V0H2Zm2 10.5H2a.5.5 0 0 1-.5-.5V8H0v2a2 2 0 0 0 2 2h2v-1.5ZM8 12v-1.5h2a.5.5 0 0 0 .5-.5V8H12v2a2 2 0 0 1-2 2H8Zm2-12a2 2 0 0 1 2 2v2h-1.5V2a.5.5 0 0 0-.5-.5H8V0h2Z\" \/>\n\t\t\t<\/svg>\n\t\t<\/button><\/figure>\n\n\n\n<div class=\"wp-block-group\"><div class=\"wp-block-group__inner-container is-layout-constrained wp-block-group-is-layout-constrained\">\n<h2 class=\"wp-block-heading\">System Prompt<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">The System Prompt page defines the AI Assistant&#8217;s identity and instructions.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">By clicking into the System Prompt, a developer writes specific guidelines dictating the assistant&#8217;s purpose, how it should behave, and what format its output should take. To use an analogy, this is the &#8220;job description&#8221; for your chatbot.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" src=\"\/docs\/images\/ai\/New_System_Prompt.png\" alt=\"\"\/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">Developers can use the <strong><a href=\"#Fields\" data-type=\"internal\" data-id=\"#Fields\">Insert Fields<\/a><\/strong> dropdown to append fields\/parameters into the body of the system prompt to be used in conjunction with the prompt instructions.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">At runtime, these text-based instructions are automatically passed to the LLM behind the scenes whenever a user sends a message. The information here is largely static\u2014meaning the rules defined here dictate the boundaries of the entire interaction.<\/p>\n\n\n\n<p class=\"wp-block-ht-blocks-messages wp-block-hb-message wp-block-hb-message--withicon is-style-info\">Any new assistant will generate a default set of instructions, which you should modify to fit your specific business needs.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Any instructions given to an LLM are subject to natural variability, which impacts the accuracy of the chatbot\u2019s responses. To get off to a strong start, please see our guide on <a href=\"\/docs\/knowledge-base\/ai-system-prompt\" target=\"_blank\" rel=\"noreferrer noopener\"><strong>Writing a System Prompt for AI<\/strong><\/a><\/p>\n<\/div><\/div>\n\n\n\n<div class=\"wp-block-group\"><div class=\"wp-block-group__inner-container is-layout-constrained wp-block-group-is-layout-constrained\">\n<h2 class=\"wp-block-heading\">User Message Template<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">The User Message template defines the exact input (data) sent to the AI Assistant.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" src=\"\/docs\/images\/ai\/New_User_Message.png\" alt=\"\"\/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">In a standard chatbot, the default input is simply the text the user types into the chat interface. This entire message is encapsulated in the <code>${userMessage}<\/code> parameter.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">However, there are situations where the AI Assistant is not interacted with directly via a chat interface. Instead, it might be called &#8220;behind-the-scenes&#8221; by another m-Power application&#8217;s workflow. In those scenarios, you need to pass parameters from the workflow designer directly to the AI Assistant. The User Message Template can be customized to define these dynamic inputs:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>Customer Name: ${CNAME}\nZip Code: ${CZIP}<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">In the example above, each time the AI Assistant is called, the system automatically injects the dynamic customer name and zip code, providing immediate context to the LLM.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Tool Functions<\/h2>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" src=\"\/docs\/images\/ai\/New_Tool_Function.png\" alt=\"\"\/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">Tool Functions are supplemental abilities that the AI Assistant can utilize at runtime. Adding tools allows your assistant to query live data via an m-Power application, retrieve specialized information from a document repository (Knowledge Base), or trigger an External Object based on the conversation.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">For more information on using tool functions, please see:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong><a href=\"https:\/\/www.mrc-productivity.com\/docs\/knowledge-base\/knowledge-base\" target=\"_blank\" rel=\"noreferrer noopener\">Using a Knowledge Base Tool Function in Your AI Assistant<\/a><\/strong><\/li>\n\n\n\n<li><a href=\"\/docs\/knowledge-base\/using-application-tool-functions-in-the-ai-assistant\" target=\"_blank\" rel=\"noreferrer noopener\"><strong>Using Application Tool Functions in the AI Assistant<\/strong><\/a><\/li>\n\n\n\n<li>Using External Object Tool Functions in the AI Assistant<\/li>\n<\/ul>\n<\/div><\/div>\n\n\n\n<div class=\"wp-block-group\"><div class=\"wp-block-group__inner-container is-layout-constrained wp-block-group-is-layout-constrained\">\n<div class=\"wp-block-group\"><div class=\"wp-block-group__inner-container is-layout-constrained wp-block-group-is-layout-constrained\">\n<h2 class=\"wp-block-heading\">Large Language Model (LLM) Selection<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">This node is where you select the specific model that will power your AI Assistant. mrc does not recommend one particular model over another; the choice is entirely dependent on your organization&#8217;s needs and preferences.<\/p>\n\n\n\n<p class=\"wp-block-ht-blocks-messages wp-block-hb-message wp-block-hb-message--withicon is-style-alert\"><strong>Note: <\/strong>To utilize a specific vendor\u2019s LLM, additional configuration and an API key are required. Please visit the<a href=\"\/docs\/knowledge-base\/adding-ai-to-m-power#setup\" data-type=\"link\" data-id=\"https:\/\/www.mrc-productivity.com\/docs\/knowledge-base\/adding-ai-to-m-power\" target=\"_blank\" rel=\"noreferrer noopener\"> <strong>Adding AI to m-Power<\/strong><\/a> documentation for setup instructions.<\/p>\n<\/div><\/div>\n<\/div><\/div>\n\n\n\n<div class=\"wp-block-group\"><div class=\"wp-block-group__inner-container is-layout-constrained wp-block-group-is-layout-constrained\">\n<h2 class=\"wp-block-heading\">Assistant Configuration<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">The right-side Assistant Configuration panel contains various properties and settings associated with your AI Assistant.<\/p>\n\n\n\n<div class=\"wp-block-group\"><div class=\"wp-block-group__inner-container is-layout-constrained wp-block-group-is-layout-constrained\">\n<h3 class=\"wp-block-heading\">Fields<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">The default fields of the AI Assistant will contain just the <code>userMessage<\/code> and <code>assistantResponse<\/code>. This is normal and and represents the core input (the user&#8217;s message) and output (the AI&#8217;s reply).<\/p>\n\n\n\n<figure data-wp-context=\"{&quot;imageId&quot;:&quot;6a8d87f124ae6&quot;}\" data-wp-interactive=\"core\/image\" data-wp-key=\"6a8d87f124ae6\" class=\"wp-block-image size-large wp-lightbox-container\"><img decoding=\"async\" data-wp-class--hide=\"state.isContentHidden\" data-wp-class--show=\"state.isContentVisible\" data-wp-init=\"callbacks.setButtonStyles\" data-wp-on--click=\"actions.showLightbox\" data-wp-on--load=\"callbacks.setButtonStyles\" data-wp-on--pointerdown=\"actions.preloadImage\" data-wp-on--pointerenter=\"actions.preloadImageWithDelay\" data-wp-on--pointerleave=\"actions.cancelPreload\" data-wp-on-window--resize=\"callbacks.setButtonStyles\" src=\"\/docs\/images\/ai\/Assistant_Fields.png\" alt=\"\"\/><button\n\t\t\tclass=\"lightbox-trigger\"\n\t\t\ttype=\"button\"\n\t\t\taria-haspopup=\"dialog\"\n\t\t\tdata-wp-bind--aria-label=\"state.thisImage.triggerButtonAriaLabel\"\n\t\t\tdata-wp-init=\"callbacks.initTriggerButton\"\n\t\t\tdata-wp-on--click=\"actions.showLightbox\"\n\t\t\tdata-wp-style--right=\"state.thisImage.buttonRight\"\n\t\t\tdata-wp-style--top=\"state.thisImage.buttonTop\"\n\t\t>\n\t\t\t<svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"12\" height=\"12\" fill=\"none\" viewBox=\"0 0 12 12\">\n\t\t\t\t<path fill=\"#fff\" d=\"M2 0a2 2 0 0 0-2 2v2h1.5V2a.5.5 0 0 1 .5-.5h2V0H2Zm2 10.5H2a.5.5 0 0 1-.5-.5V8H0v2a2 2 0 0 0 2 2h2v-1.5ZM8 12v-1.5h2a.5.5 0 0 0 .5-.5V8H12v2a2 2 0 0 1-2 2H8Zm2-12a2 2 0 0 1 2 2v2h-1.5V2a.5.5 0 0 0-.5-.5H8V0h2Z\" \/>\n\t\t\t<\/svg>\n\t\t<\/button><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">You can optionally add additional Assistant Fields. These act as parameters, or placeholders, that the assistant can capture and feed values into at runtime. To add new field parameters, click the &#8220;Manage Fields&#8221; button and type in the field name, description, and type, then click <strong>+ Add<\/strong>.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">To add new field parameters that will capture information for the assistant, type in the field name and description, type, and then click &#8220;Add&#8221;.<\/p>\n\n\n\n<figure data-wp-context=\"{&quot;imageId&quot;:&quot;6a8d87f124cfe&quot;}\" data-wp-interactive=\"core\/image\" data-wp-key=\"6a8d87f124cfe\" class=\"wp-block-image size-large wp-lightbox-container\"><img decoding=\"async\" data-wp-class--hide=\"state.isContentHidden\" data-wp-class--show=\"state.isContentVisible\" data-wp-init=\"callbacks.setButtonStyles\" data-wp-on--click=\"actions.showLightbox\" data-wp-on--load=\"callbacks.setButtonStyles\" data-wp-on--pointerdown=\"actions.preloadImage\" data-wp-on--pointerenter=\"actions.preloadImageWithDelay\" data-wp-on--pointerleave=\"actions.cancelPreload\" data-wp-on-window--resize=\"callbacks.setButtonStyles\" src=\"\/docs\/images\/ai\/Assistant_New_Fields.png\" alt=\"\"\/><button\n\t\t\tclass=\"lightbox-trigger\"\n\t\t\ttype=\"button\"\n\t\t\taria-haspopup=\"dialog\"\n\t\t\tdata-wp-bind--aria-label=\"state.thisImage.triggerButtonAriaLabel\"\n\t\t\tdata-wp-init=\"callbacks.initTriggerButton\"\n\t\t\tdata-wp-on--click=\"actions.showLightbox\"\n\t\t\tdata-wp-style--right=\"state.thisImage.buttonRight\"\n\t\t\tdata-wp-style--top=\"state.thisImage.buttonTop\"\n\t\t>\n\t\t\t<svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"12\" height=\"12\" fill=\"none\" viewBox=\"0 0 12 12\">\n\t\t\t\t<path fill=\"#fff\" d=\"M2 0a2 2 0 0 0-2 2v2h1.5V2a.5.5 0 0 1 .5-.5h2V0H2Zm2 10.5H2a.5.5 0 0 1-.5-.5V8H0v2a2 2 0 0 0 2 2h2v-1.5ZM8 12v-1.5h2a.5.5 0 0 0 .5-.5V8H12v2a2 2 0 0 1-2 2H8Zm2-12a2 2 0 0 1 2 2v2h-1.5V2a.5.5 0 0 0-.5-.5H8V0h2Z\" \/>\n\t\t\t<\/svg>\n\t\t<\/button><\/figure>\n<\/div><\/div>\n\n\n\n<div class=\"wp-block-group\"><div class=\"wp-block-group__inner-container is-layout-constrained wp-block-group-is-layout-constrained\">\n<h3 class=\"wp-block-heading\">General Settings<\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Chat History:<\/strong> Controls whether the AI remembers the conversation only while the chatbot is open on the current page (clears on load) or retains it throughout the user&#8217;s entire session.<\/li>\n\n\n\n<li><strong>Hide JSON from Chat Responses:<\/strong> Useful if your AI is configured to return JSON responses for backend processing and you want them hidden from the end-user&#8217;s chat window. <\/li>\n\n\n\n<li><strong>Save Conversation History:<\/strong> Persists past conversations and displays a history button for the user to review past chats.<\/li>\n\n\n\n<li><strong>Summarize for History Title:<\/strong> Uses the LLM to generate a clean, summarized title for each historical conversation, rather than just grabbing the user&#8217;s first message.<\/li>\n<\/ul>\n<\/div><\/div>\n\n\n\n<div class=\"wp-block-group\"><div class=\"wp-block-group__inner-container is-layout-constrained wp-block-group-is-layout-constrained\">\n<div class=\"wp-block-group\"><div class=\"wp-block-group__inner-container is-layout-constrained wp-block-group-is-layout-constrained\">\n<h3 class=\"wp-block-heading\">Advanced Settings<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">As the name implies, these are advanced options for the selected model. Generally, these should not be altered without direction from mrc support.<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Max Chat History Messages:<\/strong> When chatting, previous messages are sent to the LLM to maintain conversational continuity. Lowering this value saves tokens but may cause the AI to forget older parts of the conversation. Raising it too high can confuse the AI.<\/li>\n\n\n\n<li><strong>Temperature:<\/strong> Controls the creativity of the responses. A lower value (0.1 \u2013 0.3) is best for strict, factual responses. A higher value (0.8+) is better for creative or conversational tasks.<\/li>\n\n\n\n<li><strong>Max Tokens:<\/strong> AI providers charge based on token usage (input and output). This limits the maximum length of the LLM&#8217;s response.<\/li>\n<\/ul>\n<\/div><\/div>\n\n\n\n<div class=\"wp-block-group\"><div class=\"wp-block-group__inner-container is-layout-constrained wp-block-group-is-layout-constrained\">\n<h4 class=\"wp-block-heading\">Content Retriever Settings<\/h4>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Content Retriever:<\/strong> Appends retrieved document content to the system prompt for context.<\/li>\n\n\n\n<li><strong>Max Results:<\/strong> Tells the AI how many document rows it should retrieve based on proximity to the user&#8217;s question. Lowering this might cause the AI to miss valid resources; raising it might overwhelm the AI with too much information. If your chatbot misses important context, try increasing this slightly.<\/li>\n\n\n\n<li><strong>Min Score:<\/strong> Determines how closely a piece of content must match the user\u2019s question before it is included. A higher score guarantees high relevance but fewer results. A lower score casts a wider net. If the bot includes off-topic info, raise the minimum score.<\/li>\n\n\n\n<li><strong>Embedding Store Name:<\/strong> Overrides the default embedding store file name.<\/li>\n<\/ul>\n<\/div><\/div>\n<\/div><\/div>\n<\/div><\/div>\n\n\n\n<h2 class=\"wp-block-heading\">AI Assistant at Runtime<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Clicking the <strong>Run as Application<\/strong> button in the top toolbar will open a live chat interface, allowing you to instantly test your assistant and send messages.<\/p>\n\n\n\n<figure data-wp-context=\"{&quot;imageId&quot;:&quot;6a8d87f125492&quot;}\" data-wp-interactive=\"core\/image\" data-wp-key=\"6a8d87f125492\" class=\"wp-block-image size-large wp-lightbox-container\"><img decoding=\"async\" data-wp-class--hide=\"state.isContentHidden\" data-wp-class--show=\"state.isContentVisible\" data-wp-init=\"callbacks.setButtonStyles\" data-wp-on--click=\"actions.showLightbox\" data-wp-on--load=\"callbacks.setButtonStyles\" data-wp-on--pointerdown=\"actions.preloadImage\" data-wp-on--pointerenter=\"actions.preloadImageWithDelay\" data-wp-on--pointerleave=\"actions.cancelPreload\" data-wp-on-window--resize=\"callbacks.setButtonStyles\" src=\"\/docs\/images\/ai\/AI_Assistant.png\" alt=\"\"\/><button\n\t\t\tclass=\"lightbox-trigger\"\n\t\t\ttype=\"button\"\n\t\t\taria-haspopup=\"dialog\"\n\t\t\tdata-wp-bind--aria-label=\"state.thisImage.triggerButtonAriaLabel\"\n\t\t\tdata-wp-init=\"callbacks.initTriggerButton\"\n\t\t\tdata-wp-on--click=\"actions.showLightbox\"\n\t\t\tdata-wp-style--right=\"state.thisImage.buttonRight\"\n\t\t\tdata-wp-style--top=\"state.thisImage.buttonTop\"\n\t\t>\n\t\t\t<svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"12\" height=\"12\" fill=\"none\" viewBox=\"0 0 12 12\">\n\t\t\t\t<path fill=\"#fff\" d=\"M2 0a2 2 0 0 0-2 2v2h1.5V2a.5.5 0 0 1 .5-.5h2V0H2Zm2 10.5H2a.5.5 0 0 1-.5-.5V8H0v2a2 2 0 0 0 2 2h2v-1.5ZM8 12v-1.5h2a.5.5 0 0 0 .5-.5V8H12v2a2 2 0 0 1-2 2H8Zm2-12a2 2 0 0 1 2 2v2h-1.5V2a.5.5 0 0 0-.5-.5H8V0h2Z\" \/>\n\t\t\t<\/svg>\n\t\t<\/button><\/figure>\n\n\n\n<div class=\"wp-block-group\"><div class=\"wp-block-group__inner-container is-layout-constrained wp-block-group-is-layout-constrained\">\n<h2 class=\"wp-block-heading\">How to Embed an AI Assistant in Another m-Power Application<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">While it is possible to use the assistant as a standalone application, you will often want to embed it into a separate m-Power app. For instance, if your AI Assistant is trained to answer questions about order statuses, you likely want to embed it directly on the application screen where users view their orders.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Using the m-Painter editor, an AI Assistant can be embedded into any m-Power application either via the graphical interface or directly in the HTML source.<\/p>\n\n\n\n<div class=\"wp-block-group\"><div class=\"wp-block-group__inner-container is-layout-constrained wp-block-group-is-layout-constrained\">\n<h3 class=\"wp-block-heading\">Via the m-Painter GUI<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">1. Open m-Painter for your main application and click inside the title bar.<\/p>\n\n\n\n<figure data-wp-context=\"{&quot;imageId&quot;:&quot;6a8d87f125737&quot;}\" data-wp-interactive=\"core\/image\" data-wp-key=\"6a8d87f125737\" class=\"wp-block-image size-large wp-lightbox-container\"><img decoding=\"async\" data-wp-class--hide=\"state.isContentHidden\" data-wp-class--show=\"state.isContentVisible\" data-wp-init=\"callbacks.setButtonStyles\" data-wp-on--click=\"actions.showLightbox\" data-wp-on--load=\"callbacks.setButtonStyles\" data-wp-on--pointerdown=\"actions.preloadImage\" data-wp-on--pointerenter=\"actions.preloadImageWithDelay\" data-wp-on--pointerleave=\"actions.cancelPreload\" data-wp-on-window--resize=\"callbacks.setButtonStyles\" src=\"\/docs\/vue-images\/ai_assistant_embed1.png\" alt=\"\"\/><button\n\t\t\tclass=\"lightbox-trigger\"\n\t\t\ttype=\"button\"\n\t\t\taria-haspopup=\"dialog\"\n\t\t\tdata-wp-bind--aria-label=\"state.thisImage.triggerButtonAriaLabel\"\n\t\t\tdata-wp-init=\"callbacks.initTriggerButton\"\n\t\t\tdata-wp-on--click=\"actions.showLightbox\"\n\t\t\tdata-wp-style--right=\"state.thisImage.buttonRight\"\n\t\t\tdata-wp-style--top=\"state.thisImage.buttonTop\"\n\t\t>\n\t\t\t<svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"12\" height=\"12\" fill=\"none\" viewBox=\"0 0 12 12\">\n\t\t\t\t<path fill=\"#fff\" d=\"M2 0a2 2 0 0 0-2 2v2h1.5V2a.5.5 0 0 1 .5-.5h2V0H2Zm2 10.5H2a.5.5 0 0 1-.5-.5V8H0v2a2 2 0 0 0 2 2h2v-1.5ZM8 12v-1.5h2a.5.5 0 0 0 .5-.5V8H12v2a2 2 0 0 1-2 2H8Zm2-12a2 2 0 0 1 2 2v2h-1.5V2a.5.5 0 0 0-.5-.5H8V0h2Z\" \/>\n\t\t\t<\/svg>\n\t\t<\/button><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">2. Select the <strong>AI Chatbot<\/strong> option from the <em>Featured Components<\/em> section.<\/p>\n\n\n\n<figure data-wp-context=\"{&quot;imageId&quot;:&quot;6a8d87f1258fc&quot;}\" data-wp-interactive=\"core\/image\" data-wp-key=\"6a8d87f1258fc\" class=\"wp-block-image size-large wp-lightbox-container\"><img decoding=\"async\" data-wp-class--hide=\"state.isContentHidden\" data-wp-class--show=\"state.isContentVisible\" data-wp-init=\"callbacks.setButtonStyles\" data-wp-on--click=\"actions.showLightbox\" data-wp-on--load=\"callbacks.setButtonStyles\" data-wp-on--pointerdown=\"actions.preloadImage\" data-wp-on--pointerenter=\"actions.preloadImageWithDelay\" data-wp-on--pointerleave=\"actions.cancelPreload\" data-wp-on-window--resize=\"callbacks.setButtonStyles\" src=\"\/docs\/vue-images\/ai_assistant_embed2.png\" alt=\"\"\/><button\n\t\t\tclass=\"lightbox-trigger\"\n\t\t\ttype=\"button\"\n\t\t\taria-haspopup=\"dialog\"\n\t\t\tdata-wp-bind--aria-label=\"state.thisImage.triggerButtonAriaLabel\"\n\t\t\tdata-wp-init=\"callbacks.initTriggerButton\"\n\t\t\tdata-wp-on--click=\"actions.showLightbox\"\n\t\t\tdata-wp-style--right=\"state.thisImage.buttonRight\"\n\t\t\tdata-wp-style--top=\"state.thisImage.buttonTop\"\n\t\t>\n\t\t\t<svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"12\" height=\"12\" fill=\"none\" viewBox=\"0 0 12 12\">\n\t\t\t\t<path fill=\"#fff\" d=\"M2 0a2 2 0 0 0-2 2v2h1.5V2a.5.5 0 0 1 .5-.5h2V0H2Zm2 10.5H2a.5.5 0 0 1-.5-.5V8H0v2a2 2 0 0 0 2 2h2v-1.5ZM8 12v-1.5h2a.5.5 0 0 0 .5-.5V8H12v2a2 2 0 0 1-2 2H8Zm2-12a2 2 0 0 1 2 2v2h-1.5V2a.5.5 0 0 0-.5-.5H8V0h2Z\" \/>\n\t\t\t<\/svg>\n\t\t<\/button><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">3. From the Insert\/Edit Chatbot popup, select the AI Assistant retrieval that you wish to embed.<\/p>\n\n\n\n<figure data-wp-context=\"{&quot;imageId&quot;:&quot;6a8d87f125ab3&quot;}\" data-wp-interactive=\"core\/image\" data-wp-key=\"6a8d87f125ab3\" class=\"wp-block-image size-large wp-lightbox-container\"><img decoding=\"async\" data-wp-class--hide=\"state.isContentHidden\" data-wp-class--show=\"state.isContentVisible\" data-wp-init=\"callbacks.setButtonStyles\" data-wp-on--click=\"actions.showLightbox\" data-wp-on--load=\"callbacks.setButtonStyles\" data-wp-on--pointerdown=\"actions.preloadImage\" data-wp-on--pointerenter=\"actions.preloadImageWithDelay\" data-wp-on--pointerleave=\"actions.cancelPreload\" data-wp-on-window--resize=\"callbacks.setButtonStyles\" src=\"\/docs\/vue-images\/ai_assistant_embed3.png\" alt=\"\"\/><button\n\t\t\tclass=\"lightbox-trigger\"\n\t\t\ttype=\"button\"\n\t\t\taria-haspopup=\"dialog\"\n\t\t\tdata-wp-bind--aria-label=\"state.thisImage.triggerButtonAriaLabel\"\n\t\t\tdata-wp-init=\"callbacks.initTriggerButton\"\n\t\t\tdata-wp-on--click=\"actions.showLightbox\"\n\t\t\tdata-wp-style--right=\"state.thisImage.buttonRight\"\n\t\t\tdata-wp-style--top=\"state.thisImage.buttonTop\"\n\t\t>\n\t\t\t<svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"12\" height=\"12\" fill=\"none\" viewBox=\"0 0 12 12\">\n\t\t\t\t<path fill=\"#fff\" d=\"M2 0a2 2 0 0 0-2 2v2h1.5V2a.5.5 0 0 1 .5-.5h2V0H2Zm2 10.5H2a.5.5 0 0 1-.5-.5V8H0v2a2 2 0 0 0 2 2h2v-1.5ZM8 12v-1.5h2a.5.5 0 0 0 .5-.5V8H12v2a2 2 0 0 1-2 2H8Zm2-12a2 2 0 0 1 2 2v2h-1.5V2a.5.5 0 0 0-.5-.5H8V0h2Z\" \/>\n\t\t\t<\/svg>\n\t\t<\/button><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">4. Save your changes. When running the application, the AI Assistant will now be accessible via a floating chat icon in the bottom-right corner of the screen.<\/p>\n\n\n\n<figure data-wp-context=\"{&quot;imageId&quot;:&quot;6a8d87f125cb3&quot;}\" data-wp-interactive=\"core\/image\" data-wp-key=\"6a8d87f125cb3\" class=\"wp-block-image size-large wp-lightbox-container\"><img decoding=\"async\" data-wp-class--hide=\"state.isContentHidden\" data-wp-class--show=\"state.isContentVisible\" data-wp-init=\"callbacks.setButtonStyles\" data-wp-on--click=\"actions.showLightbox\" data-wp-on--load=\"callbacks.setButtonStyles\" data-wp-on--pointerdown=\"actions.preloadImage\" data-wp-on--pointerenter=\"actions.preloadImageWithDelay\" data-wp-on--pointerleave=\"actions.cancelPreload\" data-wp-on-window--resize=\"callbacks.setButtonStyles\" src=\"\/docs\/vue-images\/ai_assistant_embed4.png\" alt=\"\"\/><button\n\t\t\tclass=\"lightbox-trigger\"\n\t\t\ttype=\"button\"\n\t\t\taria-haspopup=\"dialog\"\n\t\t\tdata-wp-bind--aria-label=\"state.thisImage.triggerButtonAriaLabel\"\n\t\t\tdata-wp-init=\"callbacks.initTriggerButton\"\n\t\t\tdata-wp-on--click=\"actions.showLightbox\"\n\t\t\tdata-wp-style--right=\"state.thisImage.buttonRight\"\n\t\t\tdata-wp-style--top=\"state.thisImage.buttonTop\"\n\t\t>\n\t\t\t<svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"12\" height=\"12\" fill=\"none\" viewBox=\"0 0 12 12\">\n\t\t\t\t<path fill=\"#fff\" d=\"M2 0a2 2 0 0 0-2 2v2h1.5V2a.5.5 0 0 1 .5-.5h2V0H2Zm2 10.5H2a.5.5 0 0 1-.5-.5V8H0v2a2 2 0 0 0 2 2h2v-1.5ZM8 12v-1.5h2a.5.5 0 0 0 .5-.5V8H12v2a2 2 0 0 1-2 2H8Zm2-12a2 2 0 0 1 2 2v2h-1.5V2a.5.5 0 0 0-.5-.5H8V0h2Z\" \/>\n\t\t\t<\/svg>\n\t\t<\/button><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">5. In the m-Painter editor, the embedded assistant call is displayed using Freemarker syntax. You can use the Quick Edit (pencil) button to modify it if necessary.<\/p>\n<\/div><\/div>\n\n\n\n<figure data-wp-context=\"{&quot;imageId&quot;:&quot;6a8d87f125f32&quot;}\" data-wp-interactive=\"core\/image\" data-wp-key=\"6a8d87f125f32\" class=\"wp-block-image size-large wp-lightbox-container\"><img decoding=\"async\" data-wp-class--hide=\"state.isContentHidden\" data-wp-class--show=\"state.isContentVisible\" data-wp-init=\"callbacks.setButtonStyles\" data-wp-on--click=\"actions.showLightbox\" data-wp-on--load=\"callbacks.setButtonStyles\" data-wp-on--pointerdown=\"actions.preloadImage\" data-wp-on--pointerenter=\"actions.preloadImageWithDelay\" data-wp-on--pointerleave=\"actions.cancelPreload\" data-wp-on-window--resize=\"callbacks.setButtonStyles\" src=\"\/docs\/vue-images\/ai_assistant_embed5.png\" alt=\"\"\/><button\n\t\t\tclass=\"lightbox-trigger\"\n\t\t\ttype=\"button\"\n\t\t\taria-haspopup=\"dialog\"\n\t\t\tdata-wp-bind--aria-label=\"state.thisImage.triggerButtonAriaLabel\"\n\t\t\tdata-wp-init=\"callbacks.initTriggerButton\"\n\t\t\tdata-wp-on--click=\"actions.showLightbox\"\n\t\t\tdata-wp-style--right=\"state.thisImage.buttonRight\"\n\t\t\tdata-wp-style--top=\"state.thisImage.buttonTop\"\n\t\t>\n\t\t\t<svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"12\" height=\"12\" fill=\"none\" viewBox=\"0 0 12 12\">\n\t\t\t\t<path fill=\"#fff\" d=\"M2 0a2 2 0 0 0-2 2v2h1.5V2a.5.5 0 0 1 .5-.5h2V0H2Zm2 10.5H2a.5.5 0 0 1-.5-.5V8H0v2a2 2 0 0 0 2 2h2v-1.5ZM8 12v-1.5h2a.5.5 0 0 0 .5-.5V8H12v2a2 2 0 0 1-2 2H8Zm2-12a2 2 0 0 1 2 2v2h-1.5V2a.5.5 0 0 0-.5-.5H8V0h2Z\" \/>\n\t\t\t<\/svg>\n\t\t<\/button><\/figure>\n\n\n\n<div class=\"wp-block-group\"><div class=\"wp-block-group__inner-container is-layout-constrained wp-block-group-is-layout-constrained\">\n<h3 class=\"wp-block-heading\">Via HTML Source<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">When working in the HTML source directly, the following syntax can be inserted to embed your AI Assistant using this import statement:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>${Import(\"DICTIONARY.I#####s\",\"assistant\",\"false\")}<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Replace with the following values as necessary:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><code>DICTIONARY.A#####s<\/code> &#8211; the dictionary name and application number of the AI Assistant you want to import\/embed.<\/li>\n\n\n\n<li><code>false<\/code> &#8211; if set to false, the assistant will be suppressed on page load. If set to true, then the assistant chat interface will automatically open on page load.<\/li>\n<\/ul>\n<\/div><\/div>\n<\/div><\/div>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n","protected":false},"excerpt":{"rendered":"<p>An in-depth documentation over the AI Assistant in m-Power, offering insight on how to build, customize, and implement an AI Assistant. <\/p>\n","protected":false},"author":2,"comment_status":"closed","ping_status":"closed","template":"","format":"standard","meta":{"footnotes":""},"ht-kb-category":[332],"ht-kb-tag":[],"class_list":["post-14783","ht_kb","type-ht_kb","status-publish","format-standard","hentry","ht_kb_category-end-user-ai"],"_links":{"self":[{"href":"https:\/\/www.mrc-productivity.com\/docs\/wp-json\/wp\/v2\/ht-kb\/14783","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.mrc-productivity.com\/docs\/wp-json\/wp\/v2\/ht-kb"}],"about":[{"href":"https:\/\/www.mrc-productivity.com\/docs\/wp-json\/wp\/v2\/types\/ht_kb"}],"author":[{"embeddable":true,"href":"https:\/\/www.mrc-productivity.com\/docs\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.mrc-productivity.com\/docs\/wp-json\/wp\/v2\/comments?post=14783"}],"version-history":[{"count":82,"href":"https:\/\/www.mrc-productivity.com\/docs\/wp-json\/wp\/v2\/ht-kb\/14783\/revisions"}],"predecessor-version":[{"id":15271,"href":"https:\/\/www.mrc-productivity.com\/docs\/wp-json\/wp\/v2\/ht-kb\/14783\/revisions\/15271"}],"wp:attachment":[{"href":"https:\/\/www.mrc-productivity.com\/docs\/wp-json\/wp\/v2\/media?parent=14783"}],"wp:term":[{"taxonomy":"ht_kb_category","embeddable":true,"href":"https:\/\/www.mrc-productivity.com\/docs\/wp-json\/wp\/v2\/ht-kb-category?post=14783"},{"taxonomy":"ht_kb_tag","embeddable":true,"href":"https:\/\/www.mrc-productivity.com\/docs\/wp-json\/wp\/v2\/ht-kb-tag?post=14783"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}