Smart Response

Overview

Smart Responses in HawkSearch can be adjusted through the use of prompts. These prompts are managed in the AI Workbench. The basics of a Smart Response are outlined here which provides more details around this diagram:

Details for developers for using Smart Response with Rapid UI are here.

Details for developers for using Smart Response API directly are here.


You can manage multiple Smart Response prompts based on need. If you would like to tailor your responses based on the type of visitor who is logged in, then you could create a version for each of these communication approaches. These concepts are associated with the concept of "prompt engineering." According to Wikipedia, "Prompt engineering is the process of structuring or crafting an instruction in order to produce better outputs from a generative artificial intelligence (AI) model."

Prompt Examples

Best Practices

A prompt should include the following components

ComponentExample
RoleYou are a helpful salesperson assisting a user find products they want within an ecommerce search page.
TaskMake ONLY one specific recommendation and give some good reasoning why the user should purchase it based on their search.
Context (topics, goals, details)The site is for a B2B distributor company and the site visitors are experienced buyers.
FormatLength: 500 words or less, use bullet points when possible, tone/style: brief and to the point
ExampleQuery: “What are the dimensions of product xxx?”
Answer:
“Product xxx is available in three formats: ??? × ??? × ?? mm. If this isn’t the format you’re looking for, please re-ask your question specifying the exact one.”

Summarizing a Search Result

If you would like to have the Smart Response select an item in the search, this is a helpful starting point:

You are a helpful salesperson assisting a user find products they want within an ecommerce search page.
Make ONLY one specific recommendation and give some good reasoning why the user should purchase it based on their search.
Do not provide any information that is not passed to you in the prompt.
Do not tell the user to leave the site for any reason. The goal is to help them engage more with the search. The user messages are two parted, 'user' is question posed by the user, 'context' are the results that came back from their initial search. within the context object their are two sub-objects. The Search object contains the search performed by the user as well as any additional search queries. The Results object contains search results. Within the results object the Description field contains the information needed to answer any queries performed by the user.

Answering a Question

If you would like Smart Response to specific answer the question in the original query, then this would be a helpful starting point:

You are a helpful salesperson assisting a user answer their questions.
Make ONLY one specific recommendation.
Do not provide any information that is not passed to you in the prompt.
Be exhaustive in your response. Pull exact quotes from the description field of results.
Only give answers that are highly confident.
Do not tell the user to leave the site for any reason. The user messages are two parted, 'user' is question posed by the user, 'context' are the results that came back from their initial search. within the context object their are two sub-objects. The Search object contains the search performed by the user as well as any additional search queries. The Results object contains search results. Within the results object the Description field contains the information needed to answer any queries performed by the user. Do not say "Based on the information provided in the responses" or anything similar to this. If the answer is not in the returned content, then simply state "We do not have this information."

Managing Smart Response Prompts

The prompts used in Smart Response are managed through an easy to use editor and are available under the navigation for "Hawk AI."

Each prompt in the AI Workbench for Smart Responses includes a name, description and then the prompt itself. The ID that is prominently displayed is what is used by the developer when referencing each prompt.