POST https://api.zatomic.ai/v1/prompts/balance
Zatomic API
- Overview
- Versioning
- Authentication
- Workspaces
- Status Codes and Errors
- Token Usage
- Expanding Objects
- OpenAPI Spec
- Changelog
- Projects
- The Project Object
- Create Project
- Update Project
- Delete Project
- Retrieve Project
- Retrieve All Projects
- Prompts
- The Prompt Object
- Create Prompt
- Update Prompt
- Delete Prompt
- Retrieve Prompt
- Retrieve All Prompts
- Generate Prompt
- Versions
- The Version Object
- Create Version
- Update Version
- Delete Version
- Retrieve Version
- Retrieve All Versions
- Calculate Version Score
- Retrieve Version Score
- Generate Version Heatmap
- Retrieve Version Heatmap
- Analyze Version Balance
- Retrieve Version Balance
- Analyze Version Risk
- Retrieve Version Risk
- Improve Version
- Scoring Criteria
- The Scoring Criteria Object
- The Scoring Criterion Object
- Create Scoring Criteria
- Update Scoring Criteria
- Delete Scoring Criteria
- Retrieve Scoring Criteria
- Retrieve All Scoring Criteria
- Generate Scoring Criteria
- Create Scoring Criterion
- Update Scoring Criterion
- Delete Scoring Criterion
- Retrieve Scoring Criterion
- Scoring Criteria Results
- The Scoring Criteria Results Object
- Scoring
- The Scoring Object
- Calculate Prompt Score
- Heatmaps
- The Heatmap Object
- Generate Prompt Heatmap
- Balance
- The Balance Object
- Analyze Prompt Balance
- Risk
- The Risk Object
- Analyze Prompt Risk
Balance
Balance refers to the overall effectiveness of the structure and makeup of a prompt version. When the balance of a prompt version is analyzed, the prompt's content is broken down into meaningful phrases, which are then categorized to determine the balance of the prompt.
Balance analysis can be performed and retrieved on individual prompt versions using their specific balance endpoints. You can also analyze the balance for prompts without a version stored in the system by using the non-version specific endpoint.
Prompt phrases are put into one of the following categories:
| Phrase Category | Description | Ideal Distribution |
|---|---|---|
| Instruction | Tells AI models what needs to be done. | 20 - 35% |
| Entity | Gives AI models context and specificity. | 20 - 35% |
| Concept | Defines themes and abstract ideas for AI models to consider. | 15 - 30% |
| Detail | Supporting context to help refine AI responses. | 15 - 30% |
The categories are then analyzed to determine their distribution, as one of the following:
| Category Distribution | Description |
|---|---|
| Balanced | The prompt has the right amount of phrases in that category to ensure high-quality AI responses. |
| Overused | There are too many phrases in that category that could lead to overly complex, unfocused output. |
| Underused | There aren't enough phrases in that category for the AI model to produce meaningful results. |