Scan → Validate
AI-generatedSummary
Validates a prompt or prompt-plus-output using the TestSavant.AI Guard API and routes each item into valid or not‑valid output streams.
Inputs
- main (required) — Input items; each may contain prompt and/or output JSON fields.
Output shape
An array of two item arrays: [validItems, notValidItems]. Each item has json { valid: boolean, prompt: string, output: string | null, result: any } and pairedItem { item: number }.
Valid items (is_valid === true) go to the first array; items that fail validation or error go to the second.
Examples
Example 1: Input scan with prompt provided
Set scanType to 'input', provide prompt, optionally select scanners or use project defaults.
Example 2: Output scan with prompt and output provided
Set scanType to 'output', provide both prompt and output text, optionally select scanners.