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.
- Retain exact required phrase
- Search candidate without case folding
- Record literal criterion separately
An empty required phrase must be repaired in the answer key.
Use the filled cases
| Case | Supplied input | Expected structured output | Decision 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. |
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
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)}));
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.