> ## Documentation Index
> Fetch the complete documentation index at: https://www.bolna.ai/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Extraction output format and results

> The JSON fields in every Bolna extraction result and how to read extracted_data via the API, webhooks, dashboard and batches.

Every [extraction](/docs/prompting/using-extractions) produces a structured result on the call execution, under `extracted_data`.

## Extraction output format

Each extraction result is a JSON object with the following fields:

| Field | Type | Description |
| - | - | - |
| `subjective` | `string \| null` | Free Text LLM response. `""` if no relevant info found; `null` if `is_subjective` is `false` |
| `objective` | `string \| null` | Selected Pre-defined value. `null` if not configured or no condition matched |
| `confidence` | `float` | LLM confidence score from `0.0` to `1.0` |
| `confidence_label` | `string` | Human-readable label: `"High"` (≥ 0.8), `"Medium"` (≥ 0.5), or `"Low"` (\< 0.5) |
| `reasoning_subjective` | `string \| null` | LLM's reasoning for the free-text response. `null` if `is_subjective` is `false` |
| `reasoning_objective` | `string \| null` | LLM's reasoning for the pre-defined selection. `null` if `is_objective` is `false` |
| `validation` | `object \| null` | Post-LLM validation result for typed free-text responses. `null` for plain `text` type or when `is_subjective` is `false` |

Results are nested by category and extraction name under `extracted_data`:

```json theme={"system"}
{
  "extracted_data": {
    "Category Name": {
      "Extraction Name": {
        "subjective": "Free text response from LLM",
        "objective": "Pre-defined value or null",
        "confidence": 0.92,
        "confidence_label": "High",
        "reasoning_subjective": "LLM's explanation for the free-text answer",
        "reasoning_objective": "LLM's explanation for the selected option",
        "validation": null
      }
    }
  }
}
```

**Complete Example:**

```json theme={"system"}
{
  "extracted_data": {
    "Lead Quality": {
      "Call Outcome": {
        "subjective": "Customer expressed strong interest and asked about enterprise pricing options.",
        "objective": "interested",
        "confidence": 0.92,
        "confidence_label": "High",
        "reasoning_subjective": "Customer asked about enterprise pricing and requested a follow-up demo.",
        "reasoning_objective": "Customer explicitly expressed interest and agreed to a next step.",
        "validation": null
      }
    },
    "Contact Info": {
      "Customer Email": {
        "subjective": "user@example.com",
        "objective": null,
        "confidence": 0.95,
        "confidence_label": "High",
        "reasoning_subjective": "Customer clearly provided their email address during the call.",
        "reasoning_objective": null,
        "validation": {
          "is_valid": true,
          "expected_type": "email"
        }
      }
    },
    "Agent Handover": {
      "Agent Handover Needed": {
        "subjective": "",
        "objective": "No",
        "confidence": 0.88,
        "confidence_label": "High",
        "reasoning_subjective": null,
        "reasoning_objective": "Customer did not request to speak with a human agent at any point.",
        "validation": null
      }
    }
  }
}
```

## Understanding the output

<AccordionGroup>
  <Accordion title="subjective field" icon="comment">
    Contains the **free text response** generated by the LLM based on the extraction prompt.

    * Returns a string with the LLM's analysis
    * Empty string `""` if no information found
    * `"null"` (string) if extraction wasn't applicable

    **Example:** `"The customer expressed interest and agreed to a demo appointment"`
  </Accordion>

  <Accordion title="objective field" icon="list-check">
    Contains the **pre-defined value** selected by the LLM from configured answer options.

    * Returns the configured answer value (e.g., `"Yes"`, `"No"`, `"hot"`, `"warm"`, `"cold"`)
    * `null` if pre-defined answers aren't configured
    * `null` if no matching condition was satisfied

    **Example:** `"No"` (from answer options "Yes" or "No")
  </Accordion>

  <Accordion title="confidence and confidence_label" icon="chart-bar">
    Every extraction result includes a **confidence score** explaining how certain the LLM was about its answer.

    | Field | Type | Description |
    | - | - | - |
    | `confidence` | float | Score from `0.0` to `1.0` — higher means more certain |
    | `confidence_label` | string | `"High"` (≥ 0.8), `"Medium"` (≥ 0.5), or `"Low"` (\< 0.5) |

    Use these to build confidence-based routing — for example, flag `"Low"` results for human review.
  </Accordion>

  <Accordion title="reasoning_subjective and reasoning_objective" icon="message">
    Brief explanations from the LLM explaining *why* it produced each answer.

    * `reasoning_subjective` — present when `is_subjective` is `true`; explains the free-text response
    * `reasoning_objective` — present when `is_objective` is `true`; explains the pre-defined selection

    Both are `null` when their respective answer type is disabled. Useful for auditing unexpected results.
  </Accordion>

  <Accordion title="validation field" icon="shield-check">
    Present when a Free Text extraction has an **Expected Format** constraint (anything other than plain `text`). Contains:

    ```json theme={"system"}
    {
      "is_valid": true,
      "expected_type": "email"
    }
    ```

    * `is_valid: false` means the LLM's response didn't match the expected format — the original response is still returned in `subjective` so no data is lost
    * `null` for plain `text` type or when `is_subjective` is `false`
  </Accordion>

  <Accordion title="Empty vs Null" icon="circle-question">
    Different empty states have different meanings:

    | Value | Meaning |
    | - | - |
    | `""` (empty string) | No relevant information found in transcript |
    | `"null"` (string) | Extraction wasn't applicable to this call |
    | `null` (JSON null) | Field not configured OR no condition matched |
  </Accordion>
</AccordionGroup>

## Accessing extraction results

Extracted data is part of the call execution result and is available as `extracted_data` in every execution response. You can access it in the following ways:

<AccordionGroup>
  <Accordion title="Via the Executions API" icon="code">
    Fetch any execution by ID using `GET /executions/{execution_id}` or list all executions for an agent using `GET /v2/agent/{agent_id}/executions`. The `extracted_data` field is returned in the response body.

    ```json theme={"system"}
    {
      "execution_id": "abc123",
      "status": "completed",
      "transcript": "...",
      "extracted_data": {
        "Agent Handover": {
          "Agent Handover Needed": {
            "subjective": "Customer asked to speak with a human.",
            "objective": "Yes",
            "confidence": 0.95,
            "confidence_label": "High",
            "reasoning_subjective": "Customer explicitly said they want to talk to a person.",
            "reasoning_objective": "Customer requested a human agent.",
            "validation": null
          }
        }
      }
    }
    ```
  </Accordion>

  <Accordion title="Via Webhooks" icon="webhook">
    If you've configured a webhook, the `extracted_data` field is included in the post-call webhook payload, the same execution object sent to your endpoint after every call.
  </Accordion>

  <Accordion title="Via the Dashboard" icon="chart-bar">
    Open any call record from **Monitor → Call History** in the dashboard to see extraction results alongside the transcript (and the call summary, when the agent's Call Summary toggle is on).
  </Accordion>

  <Accordion title="Via Batch Executions" icon="layer-group">
    For batch campaigns, `extracted_data` is returned in each execution record when fetching batch execution results.
  </Accordion>
</AccordionGroup>

## Next steps

<CardGroup cols={2}>
  <Card title="Extract data from conversations" href="/docs/prompting/using-extractions" />
</CardGroup>


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.