Prompt Templates: Reusable AI Instructions for Your Data
A prompt template is a saved instruction you write once and run many times against your data — to validate, correct, or enrich the values on your forms. Find them in the sidebar under Prompts.
Creating a Prompt Template
- Open Prompts and click the + button
- Give it a Name (e.g., "Invoice Data Validator"), an optional description, and the Prompt Text
- Click Create Template — you land on the edit page
New templates start as Draft. A template must be set to Active (Editor tab → Status) before it can run — running a draft shows "Unauthorized".
Placeholders
Type {{ in the editor to get suggestions. The available placeholders:
| Placeholder | Replaced with |
|---|---|
{{form_data}} | All the form's field values, as structured text |
{{field:FIELD_NAME}} | One specific field's value |
{{template_name}} | The form template's name |
{{form_instance_id}} | The record's identifier |
{{instance_count}} | How many records the form template has |
The editor shows a live counter ("N characters, M placeholders"). Prompt text can be up to 10,000 characters. There is no auto-save — "Unsaved changes" means exactly that; press Save before leaving the page.
The Edit Page's Tabs
- Editor — name, status, description, prompt text
- Settings — temperature, maximum answer length, confidence threshold, and optional follow-up actions
- Fields — declare the fields your prompt expects; Auto-Detect scans the prompt for
{{field:X}}placeholders, Import from Form copies field names from one of your form templates - Simulation — test the prompt safely (see below)
- Help — a built-in reference for placeholders, the expected answer format, and available follow-up actions
Trying a Prompt: Quick Run
- Open the template's page and click Run
- The Run Prompt window shows one input per simple
{{variable}}in your prompt — fill them in - Click Run
Two things to know about Quick Run:
- It only detects simple one-word placeholders like
{{city}}or{{form_data}}. Placeholders of the form{{field:NAME}}are meant for runs on real records and are left as-is here. - The run is queued in the background: the result box confirms "Execution queued" and the run is recorded in the template's execution history. To see an answer inline, use the Simulation tab instead — it shows exactly what was sent and what came back.
Running a Prompt on a Form Record
Open a form record and expand the AI Analysis card:
- AI Extract runs a prompt against the record's current values. If the form template has a Default Prompt Template configured, one click runs it; otherwise you pick from your active templates.
- Run AI Post-Processing appears when the form template has post-processing enabled — it validates and corrects values read by text extraction.
- The card's execution history shows each run with its status, the model used, duration, and a "Show output" section with the full answer. Failed runs show their error inline.
Where each run happens matters: Quick Run and simulations run through Nocarta — with Nocarta AI by default, or your own AI provider if you made one your default (see Assistant & LLM Settings). AI Extract on a record runs in your own browser against your own configured AI provider, so it requires one: without it you'll see "No LLM configuration found".
Form template owners configure the defaults under the form template's settings: AI Analysis → Default Prompt Template, and AI Post-Processing with its own prompt and confidence threshold. Up to 50 records can be processed per batch.
Testing Safely: Simulations
The Simulation tab lets you run a prompt against test data without touching any real record.
- Create a test dataset with Import JSON — paste a list of records like
[{"field_name": "value", ...}]and optionally name the dataset. (Auto-Generate needs a linked form template to know which fields to invent; Import JSON always works.) - Click Run on the dataset and watch the progress bar
- Expand a finished run to inspect each record: the exact prompt sent, the raw answer, the parsed output, timing and confidence
Each run also shows aggregate numbers — pass rate, average confidence, tokens, total time. Note that "pass rate" means the calls succeeded, not that the answers were correct. The Export button downloads everything — the prompt, all datasets, and every run's results — as one file.
Sharing, Archiving, Limits
- Prompt templates are private to their creator. If someone shared one with you, you can read and run it (and edit it with write access), but only the owner can archive it.
- The trash button on the Prompts list archives a template rather than destroying it; archived templates disappear from the list.
- Limits you may notice: prompt text up to 10,000 characters, answers up to 8,000 tokens, 50 records per AI Extract batch.
Troubleshooting
- "Unauthorized" when running — the template is still a Draft or is archived. Set its Status to Active.
- "No LLM configuration found" — add an AI provider under Assistant & LLM Settings.
- "LLM API key is missing. Please check your LLM configuration." — the configured provider needs its key (local providers are the exception).
- A note about instructions in your prompt: when you save, Nocarta may show "Heads up: this content contains instructions that look aimed at an AI assistant…". For a prompt template that's expected — a prompt is instructions — the notice only asks you to make sure you wrote them yourself. Nothing is blocked.
- "Simulation timed out" — the browser stopped waiting after 5 minutes; check the run list, the run may still have finished.
Need More Help?