---
title: Answer Question
description: Extract an answer from a passage, on-device
---

Find the answer to a question inside a passage of text, with a model that runs in your browser.

## What it does

Answer Question reads the **Context** passage and returns the piece of it that best answers the **Question**, with a confidence score. The answer is always copied word for word from the context: the model does not write new text, so it cannot make up facts that are not there.

It runs on your device with a question-answering model such as *DistilBERT SQuAD* or the TensorFlow.js *MobileBERT Q\&A*. There is no cost per run and no API key.

## When to use it

* Pull one fact out of an email, an invoice or a scraped page: an order number, a date, a price.
* Ask the same question of many items, such as "Who is the sender?" for every message in a list.

When you need a written answer that combines several facts, use [Q\&A Agent](/nodes/builtin/ai/aiagents/qanode/) with a chat model. To pull several named fields at once, use [Information Extractor](/nodes/builtin/ai/aiagents/informationextractornode/).

## Inputs and settings

Both **Question** and **Context** must have text. Ask short, direct questions ("What is the delivery date?"). Keep the context focused: these small models read a limited amount of text, so pass the relevant paragraph rather than a whole page.

## Outputs

Each output item has these fields:

```json title="Shape of an output item"
{
  "answer": "…",
  "score": 0
}
```

`answer` is the extracted text (empty when the model finds nothing). `score` is the model's confidence from 0 to 1. Use an [IF](/nodes/builtin/flow/if/) on `{{ $input.score }}` to skip low-confidence answers.

## Dependencies and credentials

None. This node needs no connection and has no slots for other nodes.

The **Model** picker lists your installed models first, then models that download on first use. Manage them on the [Local AI](/app/local-models/) page.

## Example workflow

Pull the order number from the email text you select:

1. [Context Menu](/nodes/builtin/trigger/contextmenu/) with **Menu Contexts** set to **Selection**.
2. Answer Question with **Model** *DistilBERT SQuAD*, **Question** `What is the order number?` and **Context** `{{ $input.selectionText }}`.
3. [Clipboard Write](/nodes/extension/clipboardwrite/) with **Text** `{{ $input.answer }}`.

## Common issues

* **"Choose a Q\&A model."** **Model** is empty. Pick one.
* **"Provide both a question and a context passage."** **Question** or **Context** is empty after expressions run. Check the field names in your expressions.
* **The answer is wrong or very short.** The answer must appear in the context. Rephrase the question with words used in the text, or trim the context to the relevant part.
* **"Model "…" isn't available. Install it from Local AI."** The saved model is no longer in your list, for example a removed custom model. Pick another model.

## Related nodes

* [Q\&A Agent](/nodes/builtin/ai/aiagents/qanode/): answer with a chat model.
* [Information Extractor](/nodes/builtin/ai/aiagents/informationextractornode/): pull several fields at once.
* [Run Local Model](/nodes/builtin/ai/localai/run-local-model/): its **Answer question** task takes question and context as one JSON input.
* [Summarize](/nodes/builtin/ai/localai/summarize/): condense a passage on-device.