---
title: "Tune prompts and compare OCR results in Playground"
description: "Separate runs by workspace, adjust the vision correction prompt and models, then compare two runs side by side to see what changed"
canonical_url: "https://docs.ardge.com/en/knowledge/precisemd/playground-prompt-tuning"
---
# Tune prompts and compare OCR results in Playground

> Separate runs by workspace, adjust the vision correction prompt and models, then compare two runs side by side to see what changed

## Overview

Different document types call for different prompts. **Playground** keeps a full record of every run, so you can adjust prompts and models repeatedly on the same file, compare two results side by side, and decide from there what your **OCR task** should use.

This article covers creating a workspace, adjusting the vision correction prompt and models in **Advanced settings**, reviewing a single result, and using **Compare** to see the difference between two runs.

## What you'll learn

- Use workspaces to keep runs for different document types apart
- Adjust the vision correction prompt and pick OCR and VLM models
- Review a run's source file, OCR regions, and Markdown output
- Compare two runs side by side to see what the prompt changed

**Estimated time: about 20 minutes**

## Applies to

- PreciseMD 1.4.0 and later

## Before you begin

- You have checked the **Model connections** settings, and both the OCR and the VLM model read **Running** in AI Model Center. See [Set up the model connection in PreciseMD](https://docs.ardge.com/en/knowledge/precisemd/model-connection)
- You have a representative document to tune against. For supported formats and size caps, see [What file formats and limits does PreciseMD support?](https://docs.ardge.com/en/knowledge/precisemd/formats-and-limits)

## Step 1: Create a workspace and upload files

A workspace holds every run record and file inside it. Create one per document type — invoices, contracts, and reports each in their own workspace.

1. Go to the **Playground** page
2. Click the add icon next to the **Workspace** selector at the top right of the page to open the **Create workspace** dialog
3. Enter a name in **Workspace name** and click **Create**
4. In the *Source documents* panel, click **Upload**
5. Drag files onto the dialog, or click it to select files, then click upload

<note>

**Per-upload limit:**

50 files. The dialog shows "N / 50 files selected" at the bottom.

</note>

The system switches to the new workspace automatically, and the *Source documents* panel lists the uploaded files with **Name**, **Size**, and **Modified** columns.

![The Playground page](https://docs.ardge.com/screenshots/knowledge/en/precisemd/playground-prompt-tuning/step-1-1.webp)

![Creating a workspace](https://docs.ardge.com/screenshots/knowledge/en/precisemd/playground-prompt-tuning/step-1-2.webp)

![The upload dialog](https://docs.ardge.com/screenshots/knowledge/en/precisemd/playground-prompt-tuning/step-1-3.webp)

## Step 2: Set vision correction and the prompt

1. In the *Source documents* panel, select the files to run
2. Click **Advanced settings** below the panel
3. Turn on the **Vision correction** toggle
4. Describe this document's type and content in the prompt editor

<tip>

**Describing the file type and content improves accuracy:**

The prompt field's example reads "A scanned invoice with a line-item table and a total." The closer your description is to the actual document, the more accurate the correction.

</tip>

<warning>

**Without vision correction you can't enter a prompt:**

The prompt editor is disabled while **Vision correction** is off, showing "Enable vision correction first to enter a prompt."

</warning>

With **Vision correction** on, both the prompt editor and the **VLM** dropdown in the **Model connections** section become available.

![Advanced config and vision correction](https://docs.ardge.com/screenshots/knowledge/en/precisemd/playground-prompt-tuning/step-2-1.webp)

![Entering a prompt](https://docs.ardge.com/screenshots/knowledge/en/precisemd/playground-prompt-tuning/step-2-2.webp)

## Step 3: Pick the OCR and VLM models

The **Model connections** section of **Advanced settings** lets you set the two models separately. Leave them unset and the system's default models are used.

1. In the **OCR** dropdown, select the model connection to use
2. In the **VLM** dropdown, select the multimodal model connection used for correction

<note>

**What the dropdowns list:**

Custom model connections only — not the two marked **Default**. With no custom connection created, the dropdown shows "No models available" and both models fall back to the defaults.

</note>

Unset, both dropdowns read "Select to override the default model".

![The model menu with no models available](https://docs.ardge.com/screenshots/knowledge/en/precisemd/playground-prompt-tuning/step-3.webp)

## Step 4: Run and review the result

1. Confirm files are selected in the *Source documents* panel. Click **Run** with nothing selected and it shows "Select a file before running"
2. Click **Run**
3. Click the file name in that row of the *Run results* panel on the right

The *Run results* panel has **File**, **Status**, **Time**, and **Prompt** columns, with the status moving from **Processing** to **Completed**. Records with status **Completed** or **Failed** open when you click the file name.

The result window offers two view toggles:

<table>
<thead>
  <tr>
    <th>
      Toggle
    </th>
    
    <th>
      Option
    </th>
    
    <th>
      What it shows
    </th>
  </tr>
</thead>

<tbody>
  <tr>
    <td>
      Image view
    </td>
    
    <td>
      <strong>
        Source
      </strong>
    </td>
    
    <td>
      The page's original image
    </td>
  </tr>
  
  <tr>
    <td>
      Image view
    </td>
    
    <td>
      <strong>
        OCR regions
      </strong>
    </td>
    
    <td>
      The detected layout blocks marked on the image
    </td>
  </tr>
  
  <tr>
    <td>
      Text view
    </td>
    
    <td>
      <strong>
        Preview
      </strong>
    </td>
    
    <td>
      The Markdown rendered
    </td>
  </tr>
  
  <tr>
    <td>
      Text view
    </td>
    
    <td>
      <strong>
        Markdown
      </strong>
    </td>
    
    <td>
      The raw Markdown
    </td>
  </tr>
</tbody>
</table>

The top of the window also shows the OCR and VLM models used for this run — **Default** when none was set.

![A run in progress](https://docs.ardge.com/screenshots/knowledge/en/precisemd/playground-prompt-tuning/step-4-1.webp)

![The result window with the original file and preview](https://docs.ardge.com/screenshots/knowledge/en/precisemd/playground-prompt-tuning/step-4-2.webp)

![OCR regions and the Markdown source](https://docs.ardge.com/screenshots/knowledge/en/precisemd/playground-prompt-tuning/step-4-3.webp)

## Step 5: Adjust the prompt and compare the two results

1. Go back to **Advanced settings** and edit the prompt
2. Keep the same file selected and click **Run** again
3. Once a second **Completed** record appears in *Run results*, click one record's file name
4. Click **Compare** in the result window
5. Pick the other record in the dropdown on the right half

<note>

**What can be compared:**

Other runs in the same workspace, on the same file name, with status **Completed**. Unset, the dropdown reads "Select a run above to compare".

</note>

The comparison window shows both results side by side across three tabs:

- **Preview** — the rendered Markdown on each side
- **Markdown** — the raw Markdown on each side
- **Diff** — the differences marked line by line

Each side's header shows that run's **Prompt**, **OCR** and **VLM** models, and how many seconds it took. For documents longer than one page, the page navigation at the bottom of the window moves both sides together.

![Compare, before choosing a run](https://docs.ardge.com/screenshots/knowledge/en/precisemd/playground-prompt-tuning/step-5-1.webp)

![Compare, previews side by side](https://docs.ardge.com/screenshots/knowledge/en/precisemd/playground-prompt-tuning/step-5-2.webp)

![Compare, diff](https://docs.ardge.com/screenshots/knowledge/en/precisemd/playground-prompt-tuning/step-5-3.webp)

## Step 6: Clean up files in the workspace

1. In the *Source documents* panel, select the files you no longer need
2. Click **Delete (N)** at the top right of the page
3. Click **Delete** in the **Delete selected files** dialog

Deleted files can't be recovered, and the *Source documents* panel no longer lists them.

![Deleting the selected files](https://docs.ardge.com/screenshots/knowledge/en/precisemd/playground-prompt-tuning/step-6.webp)

## Troubleshooting

<table>
<thead>
  <tr>
    <th>
      Message
    </th>
    
    <th>
      Likely cause
    </th>
    
    <th>
      What to do
    </th>
  </tr>
</thead>

<tbody>
  <tr>
    <td>
      <code>
        Workspace name already exists
      </code>
    </td>
    
    <td>
      The name duplicates an existing workspace
    </td>
    
    <td>
      Go back to Step 1 and use a different name
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        Select a file before running
      </code>
    </td>
    
    <td>
      No file is selected in the <em>
        Source documents
      </em>
      
       panel
    </td>
    
    <td>
      Go back to Step 4 and select the files to run
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        No models available
      </code>
    </td>
    
    <td>
      No custom model connection exists yet
    </td>
    
    <td>
      Add one per "Adding a custom model connection" in <a href="https://docs.ardge.com/en/knowledge/precisemd/model-connection">
        Set up the model connection in PreciseMD
      </a>
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        Playground processing timed out
      </code>
    </td>
    
    <td>
      The run exceeded the processing time limit
    </td>
    
    <td>
      Select fewer files per run, or use a document with fewer pages
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        The AI service is temporarily unavailable. Try again later
      </code>
    </td>
    
    <td>
      The model service isn't responding
    </td>
    
    <td>
      Confirm the model status is <strong>
        Running
      </strong>
      
       in AI Model Center, then retry
    </td>
  </tr>
</tbody>
</table>

## Next steps

Apply a tuned prompt to a scheduled batch task — see [Schedule an OCR task to process a folder automatically](https://docs.ardge.com/en/knowledge/precisemd/schedule-ocr-tasks).

## Related articles

- [Set up the model connection in PreciseMD](https://docs.ardge.com/en/knowledge/precisemd/model-connection)
- [When should I enable vision correction?](https://docs.ardge.com/en/knowledge/precisemd/vision-correction)
- [What file formats and limits does PreciseMD support?](https://docs.ardge.com/en/knowledge/precisemd/formats-and-limits)


## Sitemap

See the full [sitemap](https://docs.ardge.com/sitemap.md) for all pages.
