> ## Documentation Index
> Fetch the complete documentation index at: https://koreai.mintlify.app/llms.txt
> Use this file to discover all available pages before exploring further.

# By Value Metric

The By Value metric validates agent adherence to customer-specific information — such as interest rates, account balances, and service values — by extracting spoken or written values using LLM-powered entity recognition and comparing them against trusted backend systems via API.

It combines advanced extraction logic with configurable business rules to verify the accuracy of financial and service-related information mentioned during agent-customer interactions.

## Why Use This Metric

* Automates manual QA by verifying agent-mentioned customer data without reviewing transcripts.
* Validates agent statements against CRM or trusted systems in real-time.
* Detects compliance violations across all interactions with instant alerts.
* Supports complex business rules including tolerance ranges, negotiation clauses, and multi-language.
* Provides full transparency with audit logs of API calls, extraction confidence, and rule evaluations.
* Enables real-time agent feedback through GenAI and co-pilot integration.

## Use Cases

* Interest Rate Adherence
* Balance Verification
* Fee Disclosure

## Prerequisites

The By Value metric requires the following GenAI features to be enabled and published via **Manage** > **Generative AI** > **GenAI Features**:

* **By Value Adherence Validation for Quality AI**
* **By Value Metric Extraction for Quality AI**

!\[By Value GenAI Features]\(/ai-for-service/quality-ai/configure/evaluation-criteria/metrics-measurement-types/images/by-value-genAI features.png)

<Note>The By Value measurement type only appears in the metric creation dropdown when these GenAI features are enabled. All languages used in the metric must be valid and properly configured.</Note>

***

## Configure By Value Metric

1. Navigate to **Quality AI** > **Configure** > **Evaluation Forms** > **Evaluation Metrics**.

2. Select **+ New Evaluation Metric**.

3. From the **Evaluation Metrics Measurement Type** dropdown, select **By Value**.

   <img src="https://mintcdn.com/koreai/7ED-MzuzwUbgCHyq/ai-for-service/quality-ai/configure/evaluation-criteria/metrics-measurement-types/images/by-value-dropdown.png?fit=max&auto=format&n=7ED-MzuzwUbgCHyq&q=85&s=b7a3f81c1ebfd1eccc8cea8a4138fa7d" alt="By Value Dropdown" width="1364" height="625" data-path="ai-for-service/quality-ai/configure/evaluation-criteria/metrics-measurement-types/images/by-value-dropdown.png" />

4. Enter a descriptive **Name** (for example, "Discount Rate Verification" or "Interest Rate Adherence Check").

5. Enter an evaluation **Question** for manual evaluation reference.

6. Select the required **Languages**.

   <Note>You can select multiple languages. The system applies an AND condition — if a metric does not support all selected languages, it does not appear in the dropdown.</Note>

### Adherence Type

7. Select an **Adherence Type**:

   | Type        | When it evaluates                          |
   | ----------- | ------------------------------------------ |
   | **Static**  | Every conversation, regardless of triggers |
   | **Dynamic** | Only when a configured trigger is detected |

   For **Dynamic**, the metric scores only when the trigger is detected. If no trigger appears, the metric is marked **Not Applicable (NA)**.

   <img src="https://mintcdn.com/koreai/7ED-MzuzwUbgCHyq/ai-for-service/quality-ai/configure/evaluation-criteria/metrics-measurement-types/images/by-value-adherence-type.png?fit=max&auto=format&n=7ED-MzuzwUbgCHyq&q=85&s=40c256cf529dec97701aa82f0f3300c1" alt="Adherence Type" width="730" height="871" data-path="ai-for-service/quality-ai/configure/evaluation-criteria/metrics-measurement-types/images/by-value-adherence-type.png" />

### Trigger Configuration (Dynamic Adherence Only)

8. Choose the **Trigger Utterance** source:

   | Source                 | Use when                                                                             |
   | ---------------------- | ------------------------------------------------------------------------------------ |
   | **Customer Utterance** | Customer action triggers the check (for example, customer asks about interest rates) |
   | **Agent Utterance**    | Agent action triggers the check (for example, agent proposes a credit card plan)     |

### Trigger Detection Method

9. Choose the detection method:

   | Method            | Description                                                                                                                        |
   | ----------------- | ---------------------------------------------------------------------------------------------------------------------------------- |
   | **Gen AI-Based**  | Uses LLMs to detect trigger intent contextually. No training required (zero-shot). Enter a text Description of the trigger intent. |
   | **Deterministic** | Uses exact pattern matching. Provide specific utterance examples. Best for compliance keywords or exact terminology.               |

***

## API Request Parameter Configuration

The API setup enables calls to your backend systems (CRM, databases) to retrieve ground-truth data for validating agent-mentioned values.

Choose how the request parameter is sourced:

### Context Variable

Use when a customer identifier (phone number, customer ID, email) is mentioned in the conversation.

10. Select **Context Variable**.

    <img src="https://mintcdn.com/koreai/7ED-MzuzwUbgCHyq/ai-for-service/quality-ai/configure/evaluation-criteria/metrics-measurement-types/images/context-variable-setup.png?fit=max&auto=format&n=7ED-MzuzwUbgCHyq&q=85&s=3658dd850d8dbc2ba08b2d64d24106b6" alt="Context Variable Setup" width="804" height="838" data-path="ai-for-service/quality-ai/configure/evaluation-criteria/metrics-measurement-types/images/context-variable-setup.png" />

11. Choose who provides the identifier-**Customer** or **Agent**.

12. Configure the **Entity Type**:
    * **Entity Name**-descriptive name for the data type (for example, "Customer ID").
    * **Entity Type**-**String** (text/alphanumeric) or **Number** (numeric identifiers).
    * **Description**-instructions for the AI to identify and extract this entity from the conversation.

13. Configure **Service Request Authorization**-authentication profiles that secure API calls to backend systems.

14. Select **+ Define Request** and configure:

    | Field            | Description                                   |
    | ---------------- | --------------------------------------------- |
    | **Request Name** | Unique descriptive identifier                 |
    | **HTTP Method**  | GET or POST                                   |
    | **Auth**         | Authorization profile from Dev Tools          |
    | **Headers**      | Custom HTTP headers (if required)             |
    | **Response**     | API response parameter as JSON object or path |

    For POST: define the **Body** using the context variable (for example, `{"userId": "{{context.user_id}}"}`).

    Optionally add a **Post Process Script** to extract or transform the response.

    <Note>**Test Request** is enabled for Context Variable configurations. For Conversation ID-based configurations, it is disabled.</Note>

15. Select **Save**.

### Conversation ID

Use when customer identifiers are missing and SFTP integration is in place. The custom conversation ID from CSV metadata triggers sequential API calls.

<Note>The Conversation ID option is only available when a connector is configured for Quality AI Express. System-generated and CCAI system-generated conversation IDs are not supported. Use only conversation IDs sourced from metadata delivered via SFTP.</Note>

16. Map the custom **Conversation ID** from the CSV upload metadata.

17. Configure **Script Definition**:
    * Select an **Auth** profile (must be consistent across all APIs in the function).
    * Set request-specific **Headers**.
    * Map the API **Response** (JSON object or path).
    * For POST: define the Body using the conversation ID (for example, `{"conversationId": "abc123-xyz"}`).
    * Optionally configure a **Post Process Script** for nested or chained API calls.

18. Select **Save**.

    <img src="https://mintcdn.com/koreai/7ED-MzuzwUbgCHyq/ai-for-service/quality-ai/configure/evaluation-criteria/metrics-measurement-types/images/post-process-script.png?fit=max&auto=format&n=7ED-MzuzwUbgCHyq&q=85&s=cd5bfc154af544fc5dc24dfcb3b02fc8" alt="Post Process Script" width="813" height="844" data-path="ai-for-service/quality-ai/configure/evaluation-criteria/metrics-measurement-types/images/post-process-script.png" />

***

## Agent Answer Configuration

Defines how the system identifies and extracts values mentioned by the agent during the conversation (for example, an interest rate percentage), then compares them against backend references.

| Field           | Description                                                                                                                                                                                                        |
| --------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| **Entity Name** | Descriptive label for the extracted value (for example, "Interest Rate")                                                                                                                                           |
| **Entity Type** | **String** (alphanumeric) or **Number** (numeric values)                                                                                                                                                           |
| **Description** | Instructions for the AI to identify the agent-mentioned value (for example, "Extract the interest rate percentage mentioned by the agent when discussing loan terms, formatted as a decimal such as 4.5 for 4.5%") |

<img src="https://mintcdn.com/koreai/bPimY2iX8wmlOa2o/ai-for-service/quality-ai/configure/evaluation-criteria/metrics-measurement-types/images/agent-answer.png?fit=max&auto=format&n=bPimY2iX8wmlOa2o&q=85&s=49f20bde4dc9c5e9f8adc7c4145e4289" alt="Agent Answer" width="781" height="499" data-path="ai-for-service/quality-ai/configure/evaluation-criteria/metrics-measurement-types/images/agent-answer.png" />

***

## Business Rules

Business Rules guide the AI when selecting the correct agent-mentioned value, especially in negotiation scenarios where multiple values are discussed.

| Rule                           | When to Use                                      | Example                                                  |
| ------------------------------ | ------------------------------------------------ | -------------------------------------------------------- |
| **First Value**                | First mention is the official value              | Agent says 4.5%, then 4.7%, then 5.0%-system uses 4.5%   |
| **Last Value**                 | Last mention represents the official quote       | Agent says 4.5%, 4.7%, 5.0%-system uses 5.0%             |
| **Negotiated Value**           | Agreed-upon value after negotiation              | Agent and customer agree on 4.8%-system uses 4.8%        |
| **Strict Source System Value** | Zero tolerance for deviation from system data    | System shows 7.9%, agent says 7.5%-marked non-adherent   |
| **Custom Business Rule**       | Complex or organization-specific selection logic | Use the value mentioned after the customer accepts terms |

<img src="https://mintcdn.com/koreai/bPimY2iX8wmlOa2o/ai-for-service/quality-ai/configure/evaluation-criteria/metrics-measurement-types/images/business-rules.png?fit=max&auto=format&n=bPimY2iX8wmlOa2o&q=85&s=dd0da9bfc244c9564ce1e2ff1c45a86c" alt="Business Rules" width="784" height="628" data-path="ai-for-service/quality-ai/configure/evaluation-criteria/metrics-measurement-types/images/business-rules.png" />

***

## Score Logic and Adherence Criteria

### Gen AI-Based Adherence

Uses LLMs to evaluate whether the agent communicated the expected value correctly.

| Outcome                 | Meaning                                                 |
| ----------------------- | ------------------------------------------------------- |
| **Pass**                | The expected value is mentioned per the configured rule |
| **Metric Failure**      | Value is missing or incorrect                           |
| **Not Applicable (NA)** | Trigger condition not met; metric skipped               |

### Custom Script-Based Adherence

Uses rule-based logic to enforce specific validation. Suitable for deterministic or compliance-critical scenarios.

| Outcome            | Meaning                                                              |
| ------------------ | -------------------------------------------------------------------- |
| **Metric Failure** | Required value is missing, mismatched, or doesn't match backend data |
| **Not Applicable** | Value isn't relevant for the conversation; metric is skipped         |

<Note>When Custom Script is selected, the system applies the defined logic to validate all mentioned values and selects the most relevant one (for example, final or negotiated value).</Note>

19. Select **Create** to save the metric.

***

## Edit or Delete By Value Metric

1. Select the By Value metric and select the ellipsis.
2. Choose **Edit** to modify or **Delete** to remove.
3. Select **Update** to save changes.

### Language Dependency Warnings

* You can't remove a language currently used by any evaluation form.
* Remove the language from all associated forms before modifying.

<img src="https://mintcdn.com/koreai/7ED-MzuzwUbgCHyq/ai-for-service/quality-ai/configure/evaluation-criteria/metrics-measurement-types/images/by-value-modification-warning.png?fit=max&auto=format&n=7ED-MzuzwUbgCHyq&q=85&s=5fe2440c73dc90f29975ff7d7e127913" alt="Modification Warning" width="943" height="736" data-path="ai-for-service/quality-ai/configure/evaluation-criteria/metrics-measurement-types/images/by-value-modification-warning.png" />

### Delete Warnings

Before deleting a metric:

1. Remove it from all associated evaluation forms.
2. Resolve all dependencies.
3. The system permits deletion only after clearing dependencies.

<img src="https://mintcdn.com/koreai/7ED-MzuzwUbgCHyq/ai-for-service/quality-ai/configure/evaluation-criteria/metrics-measurement-types/images/by-value-delete-error.png?fit=max&auto=format&n=7ED-MzuzwUbgCHyq&q=85&s=aa846f2e43580364339f81e903009d8d" alt="Delete Warning" width="366" height="375" data-path="ai-for-service/quality-ai/configure/evaluation-criteria/metrics-measurement-types/images/by-value-delete-error.png" />

***
