{"id":14725,"date":"2025-10-22T15:40:04","date_gmt":"2025-10-22T20:40:04","guid":{"rendered":"https:\/\/www.mrc-productivity.com\/docs\/?post_type=ht_kb&#038;p=14725"},"modified":"2026-08-06T16:47:18","modified_gmt":"2026-08-06T21:47:18","slug":"using-application-tool-functions-in-the-ai-assistant","status":"publish","type":"ht_kb","link":"https:\/\/www.mrc-productivity.com\/docs\/knowledge-base\/using-application-tool-functions-in-the-ai-assistant","title":{"rendered":"Using Application Tool Functions in the AI Assistant"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">A tool function is an optional feature that can be utilized within an <strong><a href=\"https:\/\/www.mrc-productivity.com\/docs\/knowledge-base\/ai-assistant-template\" target=\"_blank\" rel=\"noreferrer noopener\">AI Assistant<\/a><\/strong> in m-Power.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The purpose of the tool function is to provide the AI Assistant real-time information which can be utilized within the chat interactions, or even in behind-the-scenes workflow that the assistant is invoked from. Tool functions allows the developer to configure their AI Assistant application to interact with external data via any of the following options:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Query live data on the licensed database via an m-Power application (this document)<\/li>\n\n\n\n<li>Run external business logic via External Objects<\/li>\n\n\n\n<li><strong><a href=\"https:\/\/www.mrc-productivity.com\/docs\/knowledge-base\/knowledge-base\" target=\"_blank\" rel=\"noreferrer noopener\">Query information from an AI Knowledge Base<\/a><\/strong><\/li>\n<\/ul>\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: Using Tool Functions with the AI Studio\" width=\"643\" height=\"362\" src=\"https:\/\/www.youtube.com\/embed\/XuDUtYqLUrc?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\n\n\n<h1 class=\"wp-block-heading\">How to use a Tool Function? <\/h1>\n\n\n\n<p class=\"wp-block-paragraph\">To access the tool functions within your AI Assistant, navigate to the AI Studio and select your AI Assistant. Click &#8220;Add Tool&#8221; on the Assistant and select &#8220;Application&#8221;.<\/p>\n\n\n\n<figure data-wp-context=\"{&quot;imageId&quot;:&quot;6a8e0e3741423&quot;}\" data-wp-interactive=\"core\/image\" data-wp-key=\"6a8e0e3741423\" 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_Studio.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<h2 class=\"wp-block-heading\"><strong>Why use a Tool Function?<\/strong><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">As is often the case with AI tools, there is no one-way to utilize AI. The use case will depend entirely on your chatbot&#8217;s purpose. Here are a few examples that can help explain where tool functions come into play:<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Example 1:<\/strong> An AI Assistant acts as a shopping chatbot, allowing end-users to add items to their cart. Before adding an item, the assistant must verify the current inventory in real-time. By providing the AI with a Multiple Row retrieval built over your product tables, it can accurately check live stock levels and ensure a product is actually available before updating the user&#8217;s cart.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Example 2:<\/strong> A helpdesk ticketing system uses an AI Assistant to automatically assign new tickets to the representative with the lightest workload. When a ticket is submitted, the AI triggers a Multiple Row retrieval to evaluate the current open ticket counts for each staff member. Once it identifies the individual with the fewest open tickets, the AI passes that decision back to the workflow to assign the ticket and update the database.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Example 3: <\/strong>Within an application displaying recent orders, a user can ask the embedded AI chatbot about a specific customer. The assistant then uses a Single Row retrieval to fetch and display the relevant customer details.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>Walkthrough<\/strong><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">In this documentation, we&#8217;ll follow Example 3 from the above section.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">To understand why tool functions are so powerful, consider what happens when a user asks a chatbot for details about a specific customer. Even with a perfectly written system prompt, the AI inherently lacks access to your live database; it simply has no way of knowing your customer data. However, by providing a tool function, we bridge that gap. We give the AI the ability to securely query your database in real-time, instantly making it &#8220;smarter&#8221; and capable of delivering accurate, data-driven answers.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">For this walkthrough, I have created an AI Assistant called &#8220;Orders.&#8221; Its purpose is to provide end-users with a chatbot that can tap into live data to answer questions about placed orders, customer information, and product inventory. I have embedded this chatbot into a multiple-row retrieval that displays all customer orders on the screen.<\/p>\n\n\n\n<figure data-wp-context=\"{&quot;imageId&quot;:&quot;6a8e0e3741881&quot;}\" data-wp-interactive=\"core\/image\" data-wp-key=\"6a8e0e3741881\" 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_tool_functions2.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><figcaption class=\"wp-element-caption\">Figure 2. A basic multiple row retrieval (Order Search), with an AI Assistant chatbot.<\/figcaption><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">To give the AI the access it needs, a Single Row retrieval called <strong>Customer Details<\/strong> has been built over the customer master table. By assigning this application as a tool function, the chatbot can now actively query real-time customer information and provide meaningful details the moment a user asks about them.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">1. Configuration<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">To add my tool function, I&#8217;ll select the &#8216;Add Tool&#8217; option below:<\/p>\n\n\n\n<figure data-wp-context=\"{&quot;imageId&quot;:&quot;6a8e0e3741aef&quot;}\" data-wp-interactive=\"core\/image\" data-wp-key=\"6a8e0e3741aef\" 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_Tool.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\">The following modal to configure the tool function will appear, where I will select <strong>Application<\/strong> as the tool type, as shown in Figure 4.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">When using &#8220;Application&#8221; as the tool type, either a Retrieval or Maintainer application can can be utilized. In this example, my single row retrieval, Customer Details, will be selected and configured.<\/p>\n\n\n\n<figure data-wp-context=\"{&quot;imageId&quot;:&quot;6a8e0e3741d2d&quot;}\" data-wp-interactive=\"core\/image\" data-wp-key=\"6a8e0e3741d2d\" 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_Tool_Cust.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\">The <strong>Tool Name<\/strong> is what is referenced in the System Prompt. The <strong>Display Name<\/strong> is friendly name shown in the chat activity bubble while this tool is running.<\/p>\n\n\n\n<p class=\"wp-block-ht-blocks-messages wp-block-hb-message wp-block-hb-message--withicon is-style-info\">The information here will be passed to the LLM at runtime when the chat bot is utilized, and is responsible for providing the appropriate context as to what this function tool is used for. <br><br>Therefore, for best results, be sure to include an articulate an accurate <strong>Description<\/strong>.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">As will often be the case, a tool function will need information passed in at runtime from the AI Assistant in order to query the right information at runtime.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Selecting the &#8220;Add Parameter&#8221; button will expand the Tool Parameters sections, where the necessary parameters can be defined, allowing the AI Assistant to pass values from the inputted message to the retrieval application I&#8217;ve selected. <br><\/p>\n\n\n\n<figure data-wp-context=\"{&quot;imageId&quot;:&quot;6a8e0e3742799&quot;}\" data-wp-interactive=\"core\/image\" data-wp-key=\"6a8e0e3742799\" 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_tool_functions6.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><figcaption class=\"wp-element-caption\">Figure 5. Mapping parameters to the application tool function call.<\/figcaption><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">When selecting a retrieval to be the source of the tool function, utilize the pulldown shown in Figure 5 to select the field from retrieval&#8217;s data model that the AI Assistant will pass a value directly into. <\/p>\n\n\n\n<p class=\"wp-block-paragraph\">In this situation, the customer details retrieval will need to be passed a customer number to know which customer to search for, meaning that parameter must be mapped accordingly.<\/p>\n\n\n\n<p class=\"wp-block-ht-blocks-messages wp-block-hb-message wp-block-hb-message--withicon is-style-info\">The parameter defined in <em>Parameter Name<\/em> is specific to the AI Assistant application, whereas the parameter name in the <em>Map to Application Field<\/em> needs to match up with the field in the looked up application (Customer Details), in order for the filtering to work correctly.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Take note of the &#8220;Exact Match&#8221; option as well. In this case, choosing <strong>exact<\/strong> will mean the parameter value is looked for exactly as-entered. In other situations where a character parameter is being defined, the other option of <strong>search<\/strong> will mean the parameter value is looked up via a contains relationship. <\/p>\n\n\n\n<p class=\"wp-block-paragraph\">After saving the tool function, a new tool block will be branched off from the AI Assistant. <\/p>\n\n\n\n<figure data-wp-context=\"{&quot;imageId&quot;:&quot;6a8e0e3742cb2&quot;}\" data-wp-interactive=\"core\/image\" data-wp-key=\"6a8e0e3742cb2\" 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_Tool_Cust2.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<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\">2. Introduce Tool to System Prompt<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">In the system prompt of my AI Assistant, the following guidelines have been provided, which as seen below provides additional context about the Customer_Details tool function.<\/p>\n<\/div><\/div>\n\n\n\n<pre class=\"wp-block-code\"><code>#NOTES\n\n1. The user can ask about a specific customer details by supply the customer number, in a numeric format of ######. For example, a customer number is 100001, 100002, 100003, etc. Use the \"Customer_Details\" tool function and pass the customer number to it.  \n\nThe user MUST supply a customer number prior to you returning information from the \"Customer_Details\" tool function. Return the information in a bullet point list. <\/code><\/pre>\n<\/div><\/div>\n\n\n\n<p class=\"wp-block-paragraph\">Adding this information to the system prompt should be considered <strong>supplemental <\/strong>information &#8211; as recall the description provided when configuring the tool function earlier will be passed to the LLM and provide the most immediate instruction as to what the tool function is utilized for. <strong><a href=\"https:\/\/www.mrc-productivity.com\/docs\/knowledge-base\/ai-system-prompt\" target=\"_blank\" rel=\"noreferrer noopener\">Learn more about writing a System Prompt here. <\/a><\/strong><\/p>\n\n\n\n<h3 class=\"wp-block-heading\">3. Runtime<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">At runtime, I can interact with the AI Assistant chat bot and test out my tool function call to the customer details retrieval.<\/p>\n\n\n\n<div class=\"wp-block-columns is-layout-flex wp-container-core-columns-is-layout-8f761849 wp-block-columns-is-layout-flex\">\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\">\n<figure data-wp-context=\"{&quot;imageId&quot;:&quot;6a8e0e37434c7&quot;}\" data-wp-interactive=\"core\/image\" data-wp-key=\"6a8e0e37434c7\" 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\/Cust_Tool_Chatbot.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><figcaption class=\"wp-element-caption\">Figure 7. AI Assistant returning results from the tool function in the chat window.<\/figcaption><\/figure>\n<\/div>\n\n\n\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\">\n<p class=\"wp-block-paragraph\">Notice a customer number has been indicated in the tool function configuration and the system prompt as required, so the AI Assistant will appropriately ensure that this information is passed before any information is returned.<\/p>\n<\/div>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>This document will show how to configure an application Tool Function, which will allow your AI Assistant to query live data from your licensed database. <\/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-14725","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\/14725","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=14725"}],"version-history":[{"count":58,"href":"https:\/\/www.mrc-productivity.com\/docs\/wp-json\/wp\/v2\/ht-kb\/14725\/revisions"}],"predecessor-version":[{"id":15287,"href":"https:\/\/www.mrc-productivity.com\/docs\/wp-json\/wp\/v2\/ht-kb\/14725\/revisions\/15287"}],"wp:attachment":[{"href":"https:\/\/www.mrc-productivity.com\/docs\/wp-json\/wp\/v2\/media?parent=14725"}],"wp:term":[{"taxonomy":"ht_kb_category","embeddable":true,"href":"https:\/\/www.mrc-productivity.com\/docs\/wp-json\/wp\/v2\/ht-kb-category?post=14725"},{"taxonomy":"ht_kb_tag","embeddable":true,"href":"https:\/\/www.mrc-productivity.com\/docs\/wp-json\/wp\/v2\/ht-kb-tag?post=14725"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}