Skip to content
Astera Technology

Test an AI draft’s declared literal-name policy

Semantic aliases receive a pass where literal business names are required.

Download complete case notes and answer keys ↓

Define the local evaluation task

A synthetic desk instruction must include a supplied exact case-sensitive phrase. The local matcher requires the entire phrase but permits surrounding text; it does not accept synonyms or case variants. Empty phrases are invalid. This criterion checks literal terminology separately from factual or language quality.

  1. Retain exact required phrase
  2. Search candidate without case folding
  3. Record literal criterion separately

An empty required phrase must be repaired in the answer key.

Use the filled cases

Original synthetic input and literal answer key
CaseSupplied inputExpected structured outputDecision and reason
Exact desk name{"term":"North Desk","draft":"Ask North Desk for the folder."}{"matched":true}The exact required phrase occurs in the candidate.
Lowercase variant{"term":"North Desk","draft":"Ask north desk for the folder."}{"matched":false}The local case-sensitive rule rejects lowercase words.
Only a synonym used{"term":"North Desk","draft":"Ask the northern counter."}{"matched":false}A semantic alternative is not the requested literal name.
Download editable CSV ↓

Work the synonym-only case. Which output is required, and why?

Show the worked answer

{"matched":false} — A semantic alternative is not the requested literal name.

Run the self-contained evaluator

Save as .mjs and run with Node.js; supplied fixtures only
import assert from 'node:assert/strict';

function evaluate(x){return x.term.length?{matched:x.draft.includes(x.term)}:{error:'empty-term'};}

const cases = [
  {
    "id": "literal-name",
    "input": {
      "term": "North Desk",
      "draft": "Ask North Desk for the folder."
    },
    "expected": {
      "matched": true
    }
  },
  {
    "id": "case-variant",
    "input": {
      "term": "North Desk",
      "draft": "Ask north desk for the folder."
    },
    "expected": {
      "matched": false
    }
  },
  {
    "id": "synonym-only",
    "input": {
      "term": "North Desk",
      "draft": "Ask the northern counter."
    },
    "expected": {
      "matched": false
    }
  }
];
for (const c of cases) assert.deepEqual(evaluate(c.input), c.expected, c.id);
console.log(JSON.stringify({checked:cases.length,caseIds:cases.map(c=>c.id)}));
Download runnable example ↓

Add separate criteria when name boundaries or full-field equality matter; this declared rule is substring inclusion. Literal matching alone must not be reported as complete draft approval.

Related resources