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

# Splitting a PDF with a smart split

<div className="article_labels_list" style={{display: 'none'}} dangerouslySetInnerHTML={{__html: "End User , Box Doc Gen , Instruction , Article , Product Utilization , New"}} />

A smart split uses a natural language prompt to decide how Box groups the pages of a PDF into output documents. Clear, specific prompts produce more reliable splits.

Use a smart split when the boundaries between documents depend on what is on the page rather than on fixed page numbers.

<Note>
  Box Doc Split is available through the Box API only. To split documents, work with your development team or see [Smart split](https://developer.box.com/guides/docgen/smart-split/) in the Box Developer Documentation.
</Note>

<Info>
  A smart split consumes 1 AI Unit for every 4 pages processed. For details, see [Understanding AI Units in Box](/en/box-ai/understanding-ai-units-in-box).
</Info>

## Before you begin

Make sure you have:

* Box Doc Split and Box AI enabled. See [Enabling Box Doc Split](/en/box-doc-gen/doc-split/enabling-box-doc-split).
* A source PDF already stored in Box
* A destination folder in Box that you can write to
* A prompt that describes how to group the pages

## What you define

A smart split request includes the following:

| Setting            | Description                                                                                 |
| ------------------ | ------------------------------------------------------------------------------------------- |
| Source file        | The PDF you want to split                                                                   |
| Destination folder | The folder where Box stores the output documents                                            |
| Split type         | Smart                                                                                       |
| Prompt             | A natural language description of how Box analyzes the source PDF and identifies the splits |

## Writing an effective prompt

Follow these guidelines when you write a prompt:

* State that the Box file you supply is the source document.
* Describe the splitting rule, such as a page count, a marker like a QR code, or a content criterion.
* Prefer sequential ranges when order matters, such as contract exhibits followed by signature pages.
* Call out the pages or sections to include, and where it helps, the ones to skip.
* Avoid ambiguous language such as "split somehow" or "use whatever makes sense."

## Example prompts

### Explicit page groups

Use this approach to split a file into 2 documents whose ranges you describe in natural language.

```text theme={null}
Use this document as the source, and split the documents into 2 parts.
Pages 1-3 should be the first document, and pages 5-8 should be the
second document.
```

This produces 2 documents, one for pages 1 to 3 and one for pages 5 to 8.

<Tip>
  If you already know the exact ranges, use a [manual split](/en/box-doc-gen/doc-split/manual-split) instead. The results are the same every time.
</Tip>

### QR code as a break point

Use this approach to treat each QR code page as a separator between documents. Pages before a QR code form one output document, and Box excludes the QR code page itself unless you say otherwise.

```text theme={null}
Use this document as the source.
Identify individual pages that contain a QR code, and use each QR code
page as a breaking point between document splits.
Build the split definition so that if a QR code appears on page 5,
pages 1-4 are the first document. If the next QR code appears on
page 11, pages 6-10 are the second document.
Continue this pattern through the rest of the file.
```

This produces sequential ranges bounded by the marker pages. In the example, markers on pages 5 and 11 produce documents for pages 1 to 4 and pages 6 to 10.

### Content-based contractual pages

Use this approach to keep only the pages with substantive contractual content, such as ID proofs, signatures, and executed terms, and to skip boilerplate terms and conditions.

```text theme={null}
Use this document as the source.
Identify all pages that contain real contractual details, such as ID
proofs of the signers, signatures of the signers, and other executed
contractual details.
Skip pages that only contain terms and conditions.
Split the retained sections sequentially. For example, if ID proofs are
on pages 1-3 and executed signatures are on pages 4-6, produce two
documents: pages 1-3 and pages 4-6.
```

This produces one output document for each continuous block of content that matches the criteria. In the example, that means documents for pages 1 to 3 and pages 4 to 6.

## When to use a manual split instead

Choose a [manual split](/en/box-doc-gen/doc-split/manual-split) when you already know the page ranges. A manual split does not consume AI Units and returns the same result every time.
