> For the complete documentation index, see [llms.txt](https://help.pickyassist.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://help.pickyassist.com/setting-up-guide/smart-reply-v2/ai-assistant-integration.md).

# AI Assistant Integration

Seamless Integration of AI Assistant into Smart Replies

#### &#x20;Introduction&#x20;

This feature allows you to integrate AI assistants such as ChatGPT and Gemini with Picky Assist Smart Replies. Please connect and configure the respective AI assistant before using it with Smart Replies.

### &#x20;How AI Assistants Differ from Picky Assist Smart Replies&#x20;

Picky Assist Smart Replies is a proprietary solution developed by Picky Assist that is both easy to configure and cost-effective. It operates based on a semantic indexing method, which uses the confidence score of the given text. In other words, businesses provide all possible combinations of questions and answers to Picky Assist. Then, based on the confidence score match, the system selects the best answer and sends it back to the customer. To maintain the context of the conversation, we use Intent keywords.

**ChatGPT and Gemini**, on the other hand, are generative AI assistants powered by large language models. They can interpret customer messages in natural language and generate relevant responses based on the instructions, context, and information provided to them.

Unlike traditional Smart Replies, AI assistants generally do not require businesses to configure every possible question and answer in advance. Instead, businesses can provide instructions, define the assistant's role, and supply relevant business information or conversational context. The selected AI assistant then generates a suitable response based on the customer's query and the context available to it.

### How it Works

Picky Assist's AI Assistant integration supports category-based routing through Smart Replies. You can enable or disable ChatGPT or Gemini for individual categories, giving you greater control over when customer queries are routed to an AI assistant.

For each category, you can add potential keywords or questions that a user is likely to ask. You can then configure the selected AI assistant using **System Data** (instructions that define the assistant's role and behaviour) and **Assistant Data.**

For instance, if you've added keywords like 'pricing', 'price', 'rates', 'rate', 'discounts', 'charges', 'charge', 'billing', 'bills', and 'cost' as questions in your Smart Replies against a category,the system can route the conversation to the configured AI assistant, provided that the relevant category and routing settings are enabled.

To handle follow-up questions effectively where the keywords may not be found - for example, "What is the price of the iPhone 14 Pro Max?" followed by "Do you have any discounts?" - you need to use Picky Assist's Intent feature. It's also necessary to enable "Passing Message History" to ChatGPT/Gemini for better response construction.

### Getting Started

Go to Smart Replies Train page where you can see the "AI Assistant" button against each category as shown below.

<figure><img src="https://3382165395-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LlJChpzcxtwOYGcBd1q%2Fuploads%2FdBePu4BC4tfZAwWPGC2y%2Fimage.png?alt=media&amp;token=1f886524-fc38-4c75-bbbb-b19a8380a47a" alt=""><figcaption></figcaption></figure>

A popup will appear on the screen as shown below where you can configure the AI Assistant for the respective category.

You can see the following options to configure.

<figure><img src="https://3382165395-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LlJChpzcxtwOYGcBd1q%2Fuploads%2FhDtu3cD4vlcr7v6RtUno%2Fimage.png?alt=media&amp;token=c6fd4439-be26-40fd-80f0-500508cfa000" alt=""><figcaption></figcaption></figure>

### System (Set Behaviour)&#x20;

System behavior guides AI Assistant on how it should interpret and respond to the training data. For example, you need to carefully set this as AI Assistant will consider these instructions as inputs to generate the output. Here are a few examples of system data:

> **You are a chatbot providing assistance for the Tours & Travel Industry. Limit the response only to the Tours & Travel Industry in the USA and generate output in a maximum of 200 characters always.**

In the above instruction, we are directing AI Assistant to do the following:

1. Operate as a chatbot within the Tours & Travel Industry.
2. Limit responses to inquiries related to the tours and travel industry and restrict responses to the context of the USA.
3. Generate output that does not exceed 200 characters.

> **You are a chatbot specializing in providing pricing information for a retail electronics store. Only provide answers that relate to the price and availability of electronic products within the store. Please use polite and professional language**

> **You are a chatbot for an online bookstore. Your primary function is to assist users in providing pricing and discount details for books in the store. Ensure your responses are accurate, up-to-date, and concise.**

> **You are a chatbot for a health insurance company. Your role is to provide information about various insurance plans, pricing, and policy details. Keep responses concise, factual, and always remind users that final decisions should be made after consulting with a qualified insurance advisor**

Remember, these instructions help ChatGPT create the most relevant and helpful responses for your specific use case.

### Assistant (Training Data)&#x20;

**This is where you are giving training data to AI Assistant to generate an output based on your business data, see a few sample training data examples**&#x20;

Using the **"Attribute"** feature its possible to pass the data that are saved in the Contact CRM.&#x20;

#### Example 1 - Pricing&#x20;

Picky Assist provides 4 plans 1) Basic plan which costs $14 per month including 2000 contacts, 10000 interactions, and no access to API  2) Pro plan which costs $29 per month and includes 10000 contacts and 500000 interactions, API access. 3) Ultimate plan costs $49 per month and included 20000 contacts, and 1000000 (1 million) interactions  4) API Only plan costs $34 per month and is suitable only for developers, the API only plan doesn’t give access to any of Picky Assist product and services just able to send and receive WhatsApp messages through API & Webhook. Apart from API-only plan all plans support all features however Ultimate plan only supports connecting Multiple WhatsApp accounts and each additional channel costs $19 per month. The ultimate plan includes add-ons like Zoho CRM, WhatsMail, Facebook Lead Ad form, and Zapier, and in the Pro plan add-ons are offered as paid and the Basic plan doesn’t have access to any of the add-ons, WhatsApp Web Automation plan is not included in any of the plans and is offered as paid adon, WhatsApp Cloud API is included in all plans for free. For any doubts about the pricing send an email to <support@pickyassist.com> or compare all plans <https://pickyassist.com/en/compare-plans>

#### Example 2 - Selecting A Banquet Hall&#x20;

Our hotel proudly offers five unique banquet halls to cater to different events and varying guest numbers.

1 The Sapphire Hall: Our largest hall, Sapphire can comfortably accommodate up to 800 guests in a theater-style seating arrangement or 500 guests for a banquet dinner. Ideal for large gatherings, weddings, and corporate events.

2 The Emerald Hall: A mid-sized option, the Emerald Hall can host up to 500 guests theater-style or 300 guests for a banquet dinner. Perfect for medium-sized events and functions.

3 The Ruby Hall: The Ruby Hall is designed for smaller, intimate events, accommodating up to 200 guests theater-style or 150 guests for a banquet dinner.

4 The Pearl Hall: Pearl is perfect for small gatherings or business meetings, with a maximum capacity of 100 guests theater-style or 75 guests for a banquet dinner.

5 The Opal Boardroom: Designed for corporate meetings, workshops, or small private gatherings, the Opal Boardroom can comfortably accommodate up to 50 guests in a theater-style arrangement or 30 guests for a round-table discussion.

Each banquet hall comes with state-of-the-art AV equipment, Wi-Fi connectivity, and offers various seating arrangements as per your event requirements. Catering options are available with customized menus to suit your taste and budget. Please email our event coordinators at <events@ourhotel.com> for booking and pricing details. You can also check out our banquet halls and their amenities on our website at <https://ourhotel.com/banquet-halls>.

{% hint style="info" %}
Always provide contextual, precise information in the training data. Avoid including all the processes here; instead, create different categories and save the relevant information for each one. Adding too much training data will increase the usage of ChatGPT tokens, leading to a higher cost for data completion.
{% endhint %}

### Message History&#x20;

This feature allows you to pass the message history to AI Assistant for more contextual information. This way, the chatbot can respond more naturally and accurately by referencing previous messages. By default, our system only passes System Data, Training Data, and User Questions to ChatGPT. This may be sufficient and relevant in many cases; however, if businesses aim for more accurate and natural answers, we recommend passing the last 10 messages to ChatGPT. We offer options to pass the last 'X' number of messages or messages from the last 24 hours, as shown below.&#x20;

<figure><img src="https://3382165395-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LlJChpzcxtwOYGcBd1q%2Fuploads%2F81dUGkl2f8IIaQmlLtbM%2Fimage.png?alt=media&amp;token=c4846cb7-ec60-4643-ad70-579e756193fc" alt=""><figcaption></figcaption></figure>

{% hint style="info" %}
Please note that enabling this feature may increase your costs as it consumes more input tokens.
{% endhint %}

### Route Request To

This feature allows you to route requests to the Picky Assist Connector, ChatGPT, or Gemini based on your automation and response requirements. You can direct requests to the **Connector** to perform advanced automation, such as sending a reply only when a user matches a specific tag or dataset configured in your Picky Assist CRM. Alternatively, route requests to **ChatGPT** or **Gemini** to process the request using the selected AI model and generate an appropriate response for the user.

<figure><img src="https://3382165395-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LlJChpzcxtwOYGcBd1q%2Fuploads%2Fl24XnN5YnSaeR18GZUqV%2Fimage.png?alt=media&amp;token=aa397df4-d198-46a3-b3fe-d600a17b292d" alt=""><figcaption></figcaption></figure>

### Temperature&#x20;

Temperature is a parameter that instructs AI assistant on what sampling temperature to use, within a range of 0 to 2. Higher values, like 0.8, will make the output more random, while lower values, like 0.2, will make the output more focused and deterministic. See the below example for a better understanding.

<figure><img src="https://3382165395-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LlJChpzcxtwOYGcBd1q%2Fuploads%2FaENZMCL6O3fU8aSF4KUo%2Fimage.png?alt=media&amp;token=1f8899e6-0e25-41ad-ab69-f44778067c52" alt=""><figcaption></figcaption></figure>

> **User: "What are your pricing plans?"**

If the bot uses a low-temperature setting of 0.2 (more focused and deterministic), the response might be quite straightforward and stick to the core facts:

> **Bot: "We offer three plans: Basic at $20 per month, Premium at $50 per month, and Enterprise at $100 per month. All plans have different feature sets."**

On the other hand, with a higher temperature setting of 0.8 (more creative and diverse), the bot might provide a more varied response:

> **Bot: "Our pricing plans are like a treasure trove, designed to suit everyone's needs. The Basic Plan, which is like the golden key, is available at just $20 per month. Our Premium Plan, the sparkling diamond, can be yours for $50 per month. If you're looking for the full royal treatment, our Enterprise Plan at $100 per month is the crown jewel. Each of these plans comes with its unique set of features!"**

### Recommended Temperature&#x20;

For a Messaging chatbot that needs to reply within a 250-character maximum, it might be best to use a lower temperature value such as 0.2 or 0.3.

The reason is twofold:

1. **Deterministic and Focused**: A lower temperature value makes the generated responses more deterministic and focused, ensuring that the bot sticks to providing concise and relevant information, fitting within the character limit.
2. **Avoid Unnecessary Creativity**: Higher temperature values tend to make the AI more creative and produce more varied outputs, which might cause responses to exceed the 250-character limit.

{% hint style="info" %}
Remember, temperature settings might require a bit of tweaking and testing to optimize for your particular use case. It's a good practice to experiment and observe the responses to find the ideal setting.
{% endhint %}

## Enable / DIsable AI Assistant for a Category

If you prefer the request to be processed by Picky Assist's built-in AI, you have the option to disable AI Assistant for each category. This can be done by simply turning the status off as shown below.

<figure><img src="https://3382165395-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LlJChpzcxtwOYGcBd1q%2Fuploads%2FvawgT28bNsVLQbtxNfbx%2Fimage.png?alt=media&amp;token=16db5706-5769-4a26-9aa7-dc3c954c0900" alt=""><figcaption></figcaption></figure>

{% hint style="danger" %}
**Please note that when an AI Assistant (ChatGPT or Gemini) is enabled, the answers configured for each question in Smart Replies will not be sent to the user. Instead, the system will wait for a response from the selected AI Assistant to generate and send a reply to the user.**
{% endhint %}

{% hint style="success" %}

## Picky Assist offers custom, deep enterprise integration of ChatGPT and turnkey solutions for enterprise clients. [Read More](https://pickyassist.com/blog/why-chatgpt-is-not-suitable-for-growing-businesses/)&#x20;

{% endhint %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://help.pickyassist.com/setting-up-guide/smart-reply-v2/ai-assistant-integration.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
