---
schema_version: "1"
id: bca7ae8fac527eeebab4d504a217196ec0b5b436335343298a1e400962b641ce
title: Prompt Builder Limits
collection: admin
version: current
locale: en-us
portal_url: https://docs.salesforce.com/admin/current/en-us/ai/264-0-0/prompt_builder_limits.md
canonical_url: https://help.salesforce.com/s/articleView?id=ai.prompt_builder_limits.htm&release=264.0.0&type=5
source_site: help.salesforce.com
content_type: documentation
content_hash: 20f22afc8020b9001bcc074700c5523f750658d8f1b6646916a9a5cac4455ff6
description: Learn the numerical limits of prompt templates.
products:
  - Agentforce
  - Cross Cloud
release: "264"
---
# Prompt Builder Limits

Learn the numerical limits of prompt templates.

### Required Editions

<table class="slds-table slds-table_bordered slds-max-medium-table_stacked slds-m-bottom_small edition"><colgroup><col></colgroup><tbody><tr class=""><td class="slds-cell-wrap" style="vertical-align:top;">Available in: Lightning Experience</td></tr><tr class=""><td class="slds-cell-wrap" style="vertical-align:top;">Available in: <strong>Enterprise</strong>, <strong>Performance</strong>, and <strong>Unlimited</strong> Editions with the Einstein for Platform, or Einstein or Agentforce for Sales or Service add-on, or Agentforce Foundations</td></tr></tbody></table>

## Numerical Limits

Prompt templates have these numerical limits.

Numerical Limits  
| Limit Description | Limit |
| --- | --- |
| Maximum template size | 128,000 characters |
| Maximum number of template versions | 50 |
| Maximum number of merge fields | 50 |
| Maximum number of flow merge fields | 5 |
| Maximum number of Apex merge fields | 5 |
| Maximum number of related list merge fields | 5 |
| Maximum number of inputs in a Flex template | 5 |

## File Upload Limits

Most AI models support at least one file type for prompt templates.

These file limits apply across all AI models.

- Maximum quantity: 10 files per request
- Total file size: 15 MB per request

The 15 MB total applies to the files sent to the AI model. Files that convert to PDF count toward this total after conversion.

![Important](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-ai-generative_ai-264-0-0-production-enus/f8ef6498-d7b2-44e3-9b34-ffd5a850aae9/images/icon_important.png)

Important Some AI models have smaller limits than the ones listed here. Open **Details** for the selected AI model for per-type limits.

Unsupported files, files that fail conversion, and files that exceed a limit are excluded from the request. The Resolution panel lists excluded files after processing.

#### See Also

- [Grounding with File Inputs](https://help.salesforce.com/s/articleView?id=ai.prompt_builder_ground_file.htm&release=264.0.0&type=5 "Ground generative AI prompt templates with files so the AI model can use documents, spreadsheets, presentations, images, and email text in the resolved prompt.")
- [Prompt Builder Limitations](https://help.salesforce.com/s/articleView?id=ai.prompt_builder_limitations.htm&release=264.0.0&type=5 "Learn about the functional limitations of prompt templates that affect certain behaviors and outcomes.")