AI Prompts: Reusable AI Prompts for Your Data

An AI Prompt 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 AI Prompts.


Creating an AI Prompt

  1. Open AI Prompts and click the + button
  2. Give it a Name (e.g., "Invoice Data Validator"), an optional description, and the Prompt Text
  3. Click Create AI Prompt — you land on the edit page

New AI Prompts start as Draft. An AI Prompt 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:

PlaceholderReplaced with
{{text}}The text read from the record's pages, with its recordings' transcripts
{{page:N}}Page N's image (for example {{page:1}}), sent with the prompt to a model that reads images. A prompt reads one page.
{{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

  1. Open the AI Prompt's page and click Run
  2. The Run Prompt window shows one input per simple {{variable}} in your prompt — fill them in
  3. Click Run

Two things to know about Quick Run:

  • It only detects simple one-word placeholders like {{city}} or {{form_data}}, and you type their values; {{text}} is one of them here, because Quick Run has no record to read. Placeholders of the form {{field:NAME}} and {{page:N}} are meant for runs on real records and notebooks 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 AI Prompt'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 Prompt for AI Extract set, one click runs it; otherwise you pick from your active AI Prompts.
  • 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: Prompt for AI Extract, and AI Post-Processing with its own prompt and confidence threshold. Up to 50 records can be processed per batch.

A prompt with {{page:N}} needs a model that reads images: the prompt's own model or your Answer a question model when it reads images, otherwise your Fill from a photo model in Settings. A record without page N, or a {{text}} on a record whose pages have not been read yet, stops the run before anything is sent, naming the record.


Running a Prompt on a Notebook

Open a notebook and choose Ask about this notebook under Tools. Choose what it looks at — the text, the picture of one page, or all pages — type the question, or click one of your AI Prompts under Your prompts, and press Ask.

  • On a notebook a prompt reads two placeholders: {{text}}, the notebook's text, and {{page:N}}, page N's image. You do not type them there: the card you choose adds one. A saved prompt that has one chooses its card, and Save this as a prompt keeps the card's placeholder in the saved prompt.
  • The field placeholders ({{form_data}}, {{field:NAME}} and the others) are for form records; a notebook prompt that uses one is refused, naming it.
  • A prompt with {{page:N}} is answered by Nocarta's image model, or by your own model for Fill from a photo on Nocarta Desktop when you chose one. Without it, the Assistant's model answers.

Asking About an Instance

Open an instance and choose Ask about this instance. It works as on a notebook, with one more card first: The fields, the instance's filled fields. Choose what it looks at — the fields, the text, the picture of one page, or all pages — type the question, and press Ask.

  • The fields card adds {{form_data}}: the filled fields, one "NAME: value" line each. A saved prompt with {{form_data}} chooses that card.
  • The other field placeholders ({{field:NAME}} and the others) are not read there; a prompt that uses one is refused, naming it. Use AI Extract for those.

Testing Safely: Simulations

The Simulation tab lets you run a prompt against test data without touching any real record.

  1. 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.)
  2. Click Run on the dataset and watch the progress bar
  3. 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

  • AI Prompts 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 AI Prompts list archives an AI Prompt rather than destroying it; archived AI Prompts 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 AI Prompt 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 an AI Prompt 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?

Ask AI Assistant