Skip to content
Astera Technology

Return candidate referents for an ambiguous instruction

The closest noun is assumed to be the user’s intended referent.

Download complete case notes and answer keys ↓

Define the local evaluation task

A synthetic interface shows several version IDs. Staff annotate a deictic instruction with either a supplied pointer ID or null when no pointer is observed. Null returns every visible distinct candidate and leaves resolution false, even if one candidate happens to be last. A pointer outside the visible set is invalid.

  1. Retain the visible version set
  2. Read the observed pointer or null
  3. Return resolved choice or full candidate list

An invalid pointer is not silently replaced by the nearest visible item.

Use the filled cases

Original synthetic input and literal answer key
CaseSupplied inputExpected structured outputDecision and reason
Two versions, no pointer{"visible":["A","B"],"pointer":null}{"candidates":["A","B"],"resolved":false,"selected":null}Both remain candidates; proximity is not a supplied tie rule.
Observed pointer to B{"visible":["A","B"],"pointer":"B"}{"candidates":["A","B"],"resolved":true,"selected":"B"}The observed pointer selects B without deleting A from the candidate evidence.
Pointer names unseen version{"visible":["A","B"],"pointer":"C"}{"error":"pointer-not-visible"}C is not among the supplied visible versions; review the annotation.
Download editable CSV ↓

Work the invisible-pointer case. Which output is required, and why?

Show the worked answer

{"error":"pointer-not-visible"} — C is not among the supplied visible versions; review the annotation.

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){
 const candidates=[...new Set(x.visible)].sort();if(x.pointer===null)return {candidates,resolved:false,selected:null};
 return candidates.includes(x.pointer)?{candidates,resolved:true,selected:x.pointer}:{error:'pointer-not-visible'};
}

const cases = [
  {
    "id": "no-pointer",
    "input": {
      "visible": [
        "A",
        "B"
      ],
      "pointer": null
    },
    "expected": {
      "candidates": [
        "A",
        "B"
      ],
      "resolved": false,
      "selected": null
    }
  },
  {
    "id": "explicit-pointer",
    "input": {
      "visible": [
        "A",
        "B"
      ],
      "pointer": "B"
    },
    "expected": {
      "candidates": [
        "A",
        "B"
      ],
      "resolved": true,
      "selected": "B"
    }
  },
  {
    "id": "invisible-pointer",
    "input": {
      "visible": [
        "A",
        "B"
      ],
      "pointer": "C"
    },
    "expected": {
      "error": "pointer-not-visible"
    }
  }
];
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 ↓

Keep the original instruction with this grounding annotation. The resolver consumes supplied observations; a resolved pointer alone grants no write or publication authority.

Related resources