VereskLearn

Module 5 · Writing the answer

Lesson 5.5

Citations, refusing, and escalating

An answer cites its sources, is refused when they are silent, or is escalated when they conflict.

Lesson 36 of 621 min read

The problem

Why it matters

Without it

The model guesses when the sources are silent. The reader gets a confident answer with no source to check.

With it

Three routes. An answer with sources is shown. A silent source list is refused. A conflict goes to a person.

How it works

  • Escalation is checked first

    The route function checks escalate before anything else. A conflict is never shown as a plain answer, even when it has sources. Two sources with escalate set to true go to a person.

    function route(sourceIds: string[], escalate: boolean): string {  if (escalate) return "escalate to a person";  if (sourceIds.length === 0) return "refuse: no source answers it";  return "show the answer with " + sourceIds.join(", ");}console.log(route(["faq-12", "manual-3"], true));

    Output

    escalate to a person
  • No source means refusal

    An empty sourceIds list means no source answers the question. The route refuses instead of guessing, so an unsupported answer never reaches the reader. A refusal is a normal result, not an error.

    • Two sources, no conflictshow
    • No sourcesrefuse
    • Two conflicting sourcesescalate
    Three cases and the route each one takes.
  • A normal answer names its sources

    When sources exist and do not conflict, the route shows the answer with their ids. The reader can open faq-12 to check the text. The ids come from the search, not from the model memory.

    1. Escalate flag
    2. Source list
    3. Answer with ids
    The checks that lead to a shown answer.

Full code

Read the program

See the full code

Common mistakes

What goes wrong

  • Asking the model to refuse, then not checking the source list. Check sourceIds in code as well.
  • Counting every refusal as a failure. A correct refusal is right when no source answers the question.
  • Escalating every hard question. Escalate true conflicts only, or the reviewers receive too many cases.

Use it when and skip it when

Is it the right tool?

Use it when

  • A wrong answer would cost more than a refusal.
  • Your documents sometimes disagree with each other.

Skip it when

  • Every question has one clear source, and readers do not need the source named.

Words to know

Terms in this lesson

Citation
A named source that supports a fact in the answer.
Refusal
An answer that says the sources do not cover the question.
Escalation
Passing a case to a person for a decision.
Route
The path one reply takes, such as show, refuse, or escalate.
Full code