# Prompts

### Configuration

<figure><img src="https://4261467870-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F6iQTvxgRZRwPS1NgIGEb%2Fuploads%2FJqCqSdbyjg2Tu8S13rfY%2Fimage.png?alt=media&#x26;token=21a890d2-2bfa-4028-8457-77854f18bcad" alt="" width="375"><figcaption></figcaption></figure>

On-screen elements:

* **Details**:
  * **Name**: input field of the prompt
  * **Language**: drop-down field for processing the prompt
  * **Prompt state**: dropdown field for changing the state to one of these: "Enabled", "Disabled for all" (completely disabled), or "Disabled for rerun" (disabled only for any of the following reruns) states
  * **Multi-segment analysis (input longer than 110k tokens, ie >10 hours of speech or 40k words in an email)**: radio buttons for choosing which part of a long, multi-chunk record this prompt should read: use "Each" chunk (for sentiment analysis), only the "First" chunk (for greetings), or only the last chunk (for farewell).&#x20;

{% hint style="info" %}

#### Why the Multi-segment analysis setting exists

In the past, the LLM models used to have smaller "context" - ie the length of audio or text which we sent for analysis had to be broken into several chunks before processing, analysed in sequence and summarized.

However!

Nowadays models have no problem with long context. The chunking is only applied in these situations:

* recordings longer than cca 10 hours
* emails longer than 30-50k words (depends on the content, images, email structure)
* texts longer than 80k-90k words

In case you are using such long inputs, the Multi-segment analysis control gives you a say in how a prompt reacts to that split: it lets you decide whether the prompt should read every chunk, just the opening segment, or only the final one.<br>
{% endhint %}

* **Parameters**:
  * **Predefined parameter group**: input field for selecting already predefined hardcoded parameter groups. Once any of them is selected,  its predefined, hardcoded parameters are then listed in the "Parameters" field below.
  * **Parameters**: input field for selection of parameters (custom-made or predefined)

<details>

<summary>Predefined (hardcoded) parameters list and their description</summary>

<table data-header-hidden><thead><tr><th valign="top">Parameter</th><th valign="top">Definition</th><th valign="top">Constraint</th><th valign="top">Values</th><th valign="top">Output type</th><th valign="top">Fallback value</th><th valign="top">Multi Prompt Behaviour</th></tr></thead><tbody><tr><td valign="top">addressing</td><td valign="top">Value YES if the Agent used the Client’s first name or last name in the conversation. Value NO otherwise.</td><td valign="top"><br></td><td valign="top">YES, NO</td><td valign="top">string</td><td valign="top">NO</td><td valign="top">WEIGHTED_VALUE</td></tr><tr><td valign="top">benefit</td><td valign="top">Did the agent mention the product benefit?</td><td valign="top"><br></td><td valign="top">YES, NO</td><td valign="top">string</td><td valign="top">N/A</td><td valign="top">FIRST</td></tr><tr><td valign="top">call_script_summarization</td><td valign="top">Agent summarized Client's request to check if he understood correctly</td><td valign="top"><br></td><td valign="top">NO, YES</td><td valign="top">string</td><td valign="top">NOT_FOUND</td><td valign="top">WEIGHTED_VALUE</td></tr><tr><td valign="top">call_script_telco_offering_accepted</td><td valign="top">Client accepted mobile phone service, package or tariff that Agent offered to him</td><td valign="top"><br></td><td valign="top"><br></td><td valign="top">string</td><td valign="top">NOT_FOUND</td><td valign="top">WEIGHTED_VALUE</td></tr><tr><td valign="top">call_script_telco_offering_value</td><td valign="top">Name of the offering, service, package or tariff that Agent offered to Client to buy, add or activate</td><td valign="top"><br></td><td valign="top"><br></td><td valign="top">string</td><td valign="top">NOT_FOUND</td><td valign="top">LAST</td></tr><tr><td valign="top">category</td><td valign="top">Most dominant topic Client wants to discuss</td><td valign="top"><br></td><td valign="top"><br></td><td valign="top">string</td><td valign="top">NOT_FOUND</td><td valign="top">FREQUENT</td></tr><tr><td valign="top">category_product</td><td valign="top">categorize a product of selling</td><td valign="top"><br></td><td valign="top">insurance, savings, loans, investment, credit card</td><td valign="top">string</td><td valign="top">other</td><td valign="top">FIRST</td></tr><tr><td valign="top">client_behaviour_goodbye</td><td valign="top">Client's goodbye</td><td valign="top">Value YES if client said goodbye, else value NO</td><td valign="top">NO, YES</td><td valign="top">string</td><td valign="top">NOT_FOUND</td><td valign="top">LAST</td></tr><tr><td valign="top">client_behaviour_thanks</td><td valign="top">Client's client_behaviour_thanks</td><td valign="top">Value YES if client thanked for help, else value NO</td><td valign="top">NO, YES</td><td valign="top">string</td><td valign="top">NOT_FOUND</td><td valign="top">LAST</td></tr><tr><td valign="top">cross_sell</td><td valign="top">Value YES, if the Agent tried to sell more than just 1 product, or tried to cross sell, upsell another product. Value NO otherwise.</td><td valign="top"><br></td><td valign="top">YES, NO</td><td valign="top">string</td><td valign="top">NO</td><td valign="top">FIRST</td></tr><tr><td valign="top">empathetic</td><td valign="top">Value YES if the Advisor responds empathetically to the Clients concerns and questions. Value NO otherwise.</td><td valign="top"><br></td><td valign="top"><br></td><td valign="top">string</td><td valign="top"><br></td><td valign="top">FIRST</td></tr><tr><td valign="top">extract_client_customer_contract_number</td><td valign="top">Client's customer number or customer contract number</td><td valign="top"><br></td><td valign="top"><br></td><td valign="top">string</td><td valign="top">NOT_FOUND</td><td valign="top">FIRST</td></tr><tr><td valign="top">extract_client_email</td><td valign="top">Client's email</td><td valign="top"><br></td><td valign="top"><br></td><td valign="top">string</td><td valign="top">NOT_FOUND</td><td valign="top">FIRST</td></tr><tr><td valign="top">extract_client_first_name</td><td valign="top">Client's first name</td><td valign="top"><br></td><td valign="top"><br></td><td valign="top">string</td><td valign="top">NOT_FOUND</td><td valign="top">FIRST</td></tr><tr><td valign="top">extract_client_insurance_number</td><td valign="top">Client's insurance number</td><td valign="top"><br></td><td valign="top"><br></td><td valign="top">string</td><td valign="top">NOT_FOUND</td><td valign="top">FIRST</td></tr><tr><td valign="top">extract_client_last_name</td><td valign="top">Client's surname</td><td valign="top"><br></td><td valign="top"><br></td><td valign="top">string</td><td valign="top">NOT_FOUND</td><td valign="top">FIRST</td></tr><tr><td valign="top">extract_client_phone_number</td><td valign="top">Client's phone number</td><td valign="top"><br></td><td valign="top"><br></td><td valign="top">string</td><td valign="top">NOT_FOUND</td><td valign="top">FIRST</td></tr><tr><td valign="top">extract_client_service_number</td><td valign="top">Client's service number</td><td valign="top"><br></td><td valign="top"><br></td><td valign="top">string</td><td valign="top">NOT_FOUND</td><td valign="top">FIRST</td></tr><tr><td valign="top">farewell</td><td valign="top">Value YES if the Agent said goodbye or wished the Client a nice day. Value NO otherwise.</td><td valign="top"><br></td><td valign="top">YES, NO</td><td valign="top">string</td><td valign="top">NO</td><td valign="top">WEIGHTED_VALUE</td></tr><tr><td valign="top">future_interest</td><td valign="top">Value YES if the Client has expressed interest in a certain banking product in a certain time frame, such as another day, later, another time, sometimes in a few weeks, months, in half a year etc. Value NO if the Client has no interest in any banking product at all and when client does not mention interest then value No interest mentioned</td><td valign="top"><br></td><td valign="top">another day, later, another time, sometimes in a few weeks, months, in half a year, No interest</td><td valign="top">string</td><td valign="top">No interest mentioned</td><td valign="top">FIRST</td></tr><tr><td valign="top">future_interest_ii</td><td valign="top">Value YES if the Client has expressed interest in a certain banking product in a certain time frame, such as another day, later, another time, sometimes in a few weeks, months, in half a year etc. Value NO if the Client has no interest in any banking product at all and when client does not mention interest then value No interest mentioned</td><td valign="top"><br></td><td valign="top">YES, NO</td><td valign="top">string</td><td valign="top">NO</td><td valign="top">FIRST</td></tr><tr><td valign="top">gathered_category</td><td valign="top">Choose category that fit this conversation the most</td><td valign="top"><br></td><td valign="top"><br></td><td valign="top">string</td><td valign="top">NOT_FOUND</td><td valign="top">FIRST</td></tr><tr><td valign="top">greeted</td><td valign="top">The value YES, if the agent greeted, introduced himself, said the name of the company. The value NO otherwise.</td><td valign="top"><br></td><td valign="top">YES, NO</td><td valign="top">string</td><td valign="top">NO</td><td valign="top">FIRST</td></tr><tr><td valign="top">greeted_end_of_the_call</td><td valign="top">Yes , if agent greeted at the end of the call, otherwise NO</td><td valign="top"><br></td><td valign="top">YES, NO</td><td valign="top">string</td><td valign="top">NO</td><td valign="top">FIRST</td></tr><tr><td valign="top">handle_it</td><td valign="top">How well did the agent handle these objections? categorize it </td><td valign="top"><br></td><td valign="top"><br></td><td valign="top">string</td><td valign="top"><br></td><td valign="top">FIRST</td></tr><tr><td valign="top">handle_objections</td><td valign="top">Value YES if the Agent is able to handle Customers objections well. NO otherwise.</td><td valign="top"><br></td><td valign="top">YES, NO</td><td valign="top">string</td><td valign="top">NO</td><td valign="top">FIRST</td></tr><tr><td valign="top">identification</td><td valign="top">Value YES if the Client’s first name, last name and date of birth were mentioned in the conversation. Value NO otherwise.</td><td valign="top"><br></td><td valign="top">YES, NO</td><td valign="top">string</td><td valign="top">NO</td><td valign="top">WEIGHTED_VALUE</td></tr><tr><td valign="top">ideology_ukraine</td><td valign="top">True if message supports Ukraine or is againts Russia. False if message supports Russia or is againts Ukraine. Neutral if message is neutral about this topic.</td><td valign="top"><br></td><td valign="top">False, True, Neutral</td><td valign="top">string</td><td valign="top">Neutral</td><td valign="top">WEIGHTED_VALUE</td></tr><tr><td valign="top">interest</td><td valign="top">rate the clients interest about product and categorize it</td><td valign="top"><br></td><td valign="top">High, Moderate, Low</td><td valign="top">string</td><td valign="top">No interest</td><td valign="top">FIRST</td></tr><tr><td valign="top">interested_when</td><td valign="top">When will the Client be interested in the selected banking product? Return exactly one of the following options that is closest to what the Client said: Days, Week, 2 weeks, A few weeks, 3 weeks, Month, A few months, 2 months, 6 months, Year.</td><td valign="top"><br></td><td valign="top">Days, Week, 2 weeks, A few weeks, 3 weeks, Month, A few months, 2 months, 6 months, Year, Tomorrow</td><td valign="top">string</td><td valign="top">Not mentioned</td><td valign="top">FIRST</td></tr><tr><td valign="top">introduction</td><td valign="top">Value YES if the Agent introduced themselves with their first name, last name, and company name. Value NO otherwise.</td><td valign="top"><br></td><td valign="top">YES, NO</td><td valign="top">string</td><td valign="top">NO</td><td valign="top">FIRST</td></tr><tr><td valign="top">mifid_financial_products</td><td valign="top">Financial products that where mentioned or discussed in this Conversation by Agent of Client</td><td valign="top">string with values separated by comma</td><td valign="top"><br></td><td valign="top">string</td><td valign="top">NOT_FOUND</td><td valign="top">CONCATENATE</td></tr><tr><td valign="top">mifid_financial_products_explained</td><td valign="top">If Agent explained risks or details about discussed financial products</td><td valign="top"><br></td><td valign="top">False, True</td><td valign="top">string</td><td valign="top">FALSE</td><td valign="top">WEIGHTED_VALUE</td></tr><tr><td valign="top">mifid_relevant</td><td valign="top">True if conversation included any information that needs to be Mifid II regulated</td><td valign="top"><br></td><td valign="top">False, True</td><td valign="top">string</td><td valign="top">FALSE</td><td valign="top">WEIGHTED_VALUE</td></tr><tr><td valign="top">obscene</td><td valign="top">All profanity, obscene words that are in the transcript. NOT_FOUND if none occur.</td><td valign="top"><br></td><td valign="top"><br></td><td valign="top">string</td><td valign="top"><br></td><td valign="top">FIRST</td></tr><tr><td valign="top">other_help</td><td valign="top">Value YES if the Agent asked the Client whether they had any other requests or if there was any other way they could help. Value NO otherwise.</td><td valign="top"><br></td><td valign="top">YES, NO</td><td valign="top">string</td><td valign="top">NO</td><td valign="top">WEIGHTED_VALUE</td></tr><tr><td valign="top">personalizing_offer</td><td valign="top">Value YES if the Agent tried to personalizing the offer to Clients needs/situation, rather then just presenting product as on a leaflet. Value NO otherwise.</td><td valign="top"><br></td><td valign="top">NO, YES</td><td valign="top">string</td><td valign="top">NO</td><td valign="top">FIRST</td></tr><tr><td valign="top">react_to_offer</td><td valign="top">How did the customer react to the offer? categorize it</td><td valign="top"><br></td><td valign="top">Positive, Interest, Disinterested, Disappointed, Polite, Neutral</td><td valign="top">string</td><td valign="top">Not mentioned</td><td valign="top">FIRST</td></tr><tr><td valign="top">recapitulation</td><td valign="top">Value YES if the Agent summarized the conversation and verified the contact details with the customer. Value NO otherwise.</td><td valign="top"><br></td><td valign="top">YES, NO</td><td valign="top">string</td><td valign="top">NO</td><td valign="top">WEIGHTED_VALUE</td></tr><tr><td valign="top">rejection</td><td valign="top">List the main reason why the client does not want to purchase the product or service, why they are not interested.</td><td valign="top"><br></td><td valign="top">Price Objection, Lack of Need, Competitor Preference, Budget Constraints, Lack of Understanding, Not the right time</td><td valign="top">string</td><td valign="top">Not mentioned</td><td valign="top">FIRST</td></tr><tr><td valign="top">rejection_reason_description</td><td valign="top">Summarize the main reason why the client does not want to purchase the product or service, why they are not interested.</td><td valign="top"><br></td><td valign="top"><br></td><td valign="top">string</td><td valign="top"><br></td><td valign="top">FIRST</td></tr><tr><td valign="top">selling</td><td valign="top">Did the agents sell the product?</td><td valign="top"><br></td><td valign="top">YES, NO</td><td valign="top">string</td><td valign="top">N/A</td><td valign="top">FIRST</td></tr><tr><td valign="top">sentiment_agent</td><td valign="top">Agent's sentiment at start of conversation</td><td valign="top"><br></td><td valign="top">Helpful, Friendly, Unfriendly, Aggresive, Neutral, Other</td><td valign="top">string</td><td valign="top">Neutral</td><td valign="top">FREQUENT</td></tr><tr><td valign="top">sentiment_client_end</td><td valign="top">Client's sentiment at end of conversation</td><td valign="top"><br></td><td valign="top">Relief, Gratitude, Frustration, Confusion, Anger, Neutral, Other</td><td valign="top">string</td><td valign="top">Neutral</td><td valign="top">LAST</td></tr><tr><td valign="top">sentiment_client_start</td><td valign="top">Client's sentiment at start of conversation</td><td valign="top"><br></td><td valign="top">Relief, Gratitude, Frustration, Confusion, Anger, Neutral, Other</td><td valign="top">string</td><td valign="top">Neutral</td><td valign="top">FIRST</td></tr><tr><td valign="top">subcategory</td><td valign="top">Subcategory to the most dominant topic Client wants to discuss</td><td valign="top"><br></td><td valign="top"><br></td><td valign="top">string</td><td valign="top">NOT_FOUND</td><td valign="top">FREQUENT</td></tr><tr><td valign="top">subsubcategory</td><td valign="top">Subcategory to the most dominant topic Client wants to discuss</td><td valign="top"><br></td><td valign="top"><br></td><td valign="top">string</td><td valign="top">NOT_FOUND</td><td valign="top">FREQUENT</td></tr><tr><td valign="top">suggest_category</td><td valign="top">Most dominant topic Client wants to discuss</td><td valign="top"><br></td><td valign="top"><br></td><td valign="top">string</td><td valign="top">NOT_FOUND</td><td valign="top">FREQUENT</td></tr><tr><td valign="top">suggest_subcategory</td><td valign="top">Subcategory to the most dominant topic Client wants to discuss</td><td valign="top"><br></td><td valign="top"><br></td><td valign="top">string</td><td valign="top">NOT_FOUND</td><td valign="top">FREQUENT</td></tr><tr><td valign="top">summary</td><td valign="top">Summary of what was Conversation about</td><td valign="top">Maximum 20 words</td><td valign="top"><br></td><td valign="top">string</td><td valign="top">NOT_FOUND</td><td valign="top">CONCATENATE</td></tr><tr><td valign="top">summary_long</td><td valign="top">Summary of what was Conversation about</td><td valign="top">Maximum 40 words</td><td valign="top"><br></td><td valign="top">string</td><td valign="top">NOT_FOUND</td><td valign="top">CONCATENATE</td></tr><tr><td valign="top">summary_short</td><td valign="top">Summary of what was Conversation about</td><td valign="top">Maximum 10 words</td><td valign="top"><br></td><td valign="top">string</td><td valign="top">NOT_FOUND</td><td valign="top">CONCATENATE</td></tr><tr><td valign="top">topic_dominant</td><td valign="top">Most dominant topic this Conversation was about</td><td valign="top"><br></td><td valign="top"><br></td><td valign="top">string</td><td valign="top">NOT_FOUND</td><td valign="top">FREQUENT</td></tr><tr><td valign="top">topic_first</td><td valign="top">First topic Client wants to discuss</td><td valign="top"><br></td><td valign="top"><br></td><td valign="top">string</td><td valign="top">NOT_FOUND</td><td valign="top">FIRST</td></tr><tr><td valign="top">topic_nondominant</td><td valign="top">Second most dominant topic this Conversation was about</td><td valign="top"><br></td><td valign="top"><br></td><td valign="top">string</td><td valign="top">NOT_FOUND</td><td valign="top">FREQUENT</td></tr></tbody></table>

</details>

* **Previous parameter**: input field. If any parameter is selected, then its outcome is used as an input for this prompt. \
  \&#xNAN;*Example: summary of the audio record (prompt\_summary)*

{% hint style="info" %}
You can only select parameters that are used by other prompts. Thus, the naming convention is in this format: \<prompt>\_\<parameter>.
{% endhint %}

* **Instructions**: input field for additional prompt specifics. E.g., output file type, processing specifics, structure requirement, etc. It is mainly used in some specific cases to fine-tune the output.&#x20;
* **Conditions**: section for specifying cases, based on values of already processed parameters, on which the current prompt should be applied:
  * **Condition**: dropdown field for selection of logical operators "AND" and "OR".
  * **Add new condition**: link displays upon clicking the following fields below. You can add multiple conditions at once.&#x20;
    * **Parameter**: dropdown field for selection of parameters from other prompts in the format \<prompt>\_\<parameter>
    * **Value**: input field displaying values based on the selected parameter
* **Temperature**: input field for changing the creativity of the model output. \
  Lower values (closer to 0) make output more deterministic, focused, and consistent (sometimes called “stricter”).\
  Higher values (such as 0.7 or 1) increase creativity and diversity, making the model more exploratory in its responses.
* **⚙️ Provider**:&#x20;

  <figure><img src="https://4261467870-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F6iQTvxgRZRwPS1NgIGEb%2Fuploads%2FhcwIoBYzS9lfx0sJ6l1n%2Fimage.png?alt=media&#x26;token=1b91d87f-17bc-444c-9ecd-deeffb56a727" alt=""><figcaption></figcaption></figure>

  * **Create provider**: button for opening a form for the selection of LLMs that will be used for processing\
    ![](https://4261467870-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F6iQTvxgRZRwPS1NgIGEb%2Fuploads%2F1EXwEfMMcLNlr5omqab2%2Fimage.png?alt=media\&token=d22fd4f1-2dfc-46de-9371-a565738d2308)
    * **Provider:** dropdown menu with options representing LLM providers (Azure OpenAI, Anthropic, Gemini, Groq, or OpenAI)
    * **API Key**: input field
    * **Model name**: input field
    * **API base**: input field for entering URL
    * **API version**: inout field for&#x20;
  * **Remove**: button
* **Create**: button for creating the prompt with the latest configuration

{% hint style="info" %}
Tip: Use the predefined parameters for inspiration, but add little details for your individual use-case. (Ie exact call script for your agents to introduce to customers, like: The value YES, if the agent greeted, introduced himself and asked "How can I help you?". The value NO otherwise.

vs. the default:

The value YES, if the agent greeted, introduced himself, said the name of the company. The value NO otherwise.
{% endhint %}

### Management

* The order of prompts defines their running order.&#x20;

<figure><img src="https://4261467870-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F6iQTvxgRZRwPS1NgIGEb%2Fuploads%2FY7aLaEuJfiv3Wz9F0E1S%2Fimage.png?alt=media&#x26;token=1522980a-927c-4e3c-b455-64f2345bfd44" alt=""><figcaption></figcaption></figure>

On-screen elements:

* Upper part:
  * **Search prompts**: bar for searching parameters based on their name
  * **+ Create**: button for creating a new prompt
  * **Select**: button for selecting multiple parameters in their list at once, and then for the following actions:
    * **Prompt state**: dropdown field for changing the state to one of these: "Enabled", "Disabled for all" (completely disabled), or "Disabled for rerun" (disabled only for any of the following reruns) states
    * **Delete**: button for deleting the selected prompt(s)
* List of prompts:\
  \&#xNAN;*(Elements are listed from the left)*
  * **Name**: of the prompt
  * **Pencil**: icon button for editing the prompt
  * **Command line**: icon indicating the prompt state
  * **Language**: used for processing the prompt
  * **Prompt provider type**: displaying either "Default provider" or any other, as per the provider configuration
  * **Parameters preview**: displaying a preview of the parameters used by the prompt, upon hovering over them, their definition is displayed
* Floating buttons:
  * **Export**: for exporting all prompts in a JSON-formatted file
  * **Import**: for importing prompts in a JSON-formatted file
  * **Save**: for saving prompt changes
