Skip to content
Agentic Workflowdocs
v0.8.2Install free

nodes / builtin / ai / aiagents

Q&A Agent

Generate an action plan and execute it. Can use external tools.

AI ExtensionWeb app

Answer a question from your own documents, with a cloud chat model or fully on-device.

Q&A Agent takes the question in Prompt, looks up the most relevant passages in the knowledge base connected to Knowledge, and answers from them. What you connect to Model decides how it answers; there is no setting to switch:

  • A chat model (for example Chat OpenAI or Web LLM) writes an answer in its own words, using the passages. Without a knowledge base, it answers from what the model knows.
  • A Local Q&A Model runs in your browser: free, private and offline. It reads each retrieved passage and quotes the best-scoring span, so the answer always comes word for word from your documents. It needs a knowledge base, and System message and the output parser do not apply.

Passages are added to the prompt as reference data, not as instructions. A knowledge base marked Device only is never sent to a cloud model.

  • Answer questions about your notes, manuals or saved pages.
  • Look up a fact (a price, a date, a policy) in a knowledge base inside a workflow.
  • Keep everything on your device with a Local Q&A Model and Local Embeddings.

For a multi-turn chat with memory over your documents, use RAG Agent. To answer from one passage you already have, use Answer Question.

SettingTypeWhat it does
Prompt (required)Text
Options GroupThe options for the node.
Options › System message Long textThe system message to use.
Options › Knowledge documents (k) NumberHow many documents to retrieve from the connected knowledge base. Default: 4
Options › Max knowledge context length NumberMaximum characters of retrieved knowledge to inject into the prompt. Default: 4000
Options › Fail on knowledge error ToggleIf enabled, the node fails when knowledge retrieval errors instead of answering without context. Default: Off
Options › Search type ChoiceHow passages are picked from the connected knowledge base. Options: Most similar, Diverse (MMR). Default: Most similar
Options › Match by ChoiceHow a knowledge base is searched with "Most similar". Diverse (MMR) and other vector stores always match by meaning. Options: Keywords and meaning, Meaning only. Default: Keywords and meaning
Options › Minimum relevance NumberDrop passages less similar to the question than this (0 to 1). 0 keeps every passage. Default: 0
Options › Metadata filter Key-value pairsOnly search passages whose metadata matches every key = value (e.g. sourceType = web). Keys use letters, numbers and _; numbers and true/false are matched as such.
Options › Device-only knowledge with a cloud model ChoiceA knowledge base marked "Device only" is never sent to a cloud model. Choose what the node does when its model is a cloud model. Options: Stop with an error, Answer without it. Default: Stop with an error

Prompt is the question, for example {{ $input.question }} or a fixed What is our refund window?.

With a Local Q&A Model, Max knowledge context length limits how much of each passage the model reads.

  • Output

Each output item has these fields:

FieldTypeWhat it holds
response AnyThe model reply; the parsed result when an output parser is connected
answer Text
score Number
source Text
sources List of entriesThe knowledge base sources used for the answer
Shape of an output item
{
"response": null,
"answer": "…",
"score": 0,
"source": "…",
"sources": []
}
  • With a chat model, you get response, plus sources when a knowledge base is connected.
  • With a Local Q&A Model, response and answer hold the quoted answer (empty when none was found), score is the model’s confidence, and source names the document it came from.

Each entry in sources has title, url (when there is one), knowledgeId, sourceId and score. After a run, the node shows a badge such as 3 sources cited.

SlotAcceptsConnections
Model (required)chat model, local qaOne node.
Knowledge vector storeOne node.
Output Parser output parserOne node.
  • Model: a chat model, or a Local Q&A Model to answer on-device. Cloud models hold their own API key.
  • Knowledge: a Local Knowledge node. Optional with a chat model, required with a Local Q&A Model.
  • Output Parser: shapes the chat model’s answer. Ignored by the Local Q&A Model.
  1. Add your product manual to a knowledge base on the knowledge bases page, or with the Indexer.
  2. Get Selected Text reads a customer question you highlighted, with Output field name question.
  3. Q&A Agent with Prompt {{ $input.question }}, a Local Knowledge node on Knowledge and a Local Q&A Model on Model.
  4. Display Markdown shows {{ $input.answer }} and {{ $input.source }}.

Nothing leaves the browser.

  • “The Local Q&A Model answers by quoting a passage, so it needs a context: connect a Knowledge to the Q&A Agent.” Connect a Local Knowledge node to Knowledge.
  • answer is empty. None of the retrieved passages contained an answer (a warning is logged). Raise Knowledge documents (k), lower Minimum relevance, or rephrase the question.
  • “Knowledge retrieval failed: …”. The knowledge base could not be searched. Open the Local Knowledge node and check its knowledge base and embedding model.
  • “… is on this device only, but … is a cloud model.” The knowledge base is marked Device only. Use an on-device model, change the knowledge base’s privacy, or set Device-only knowledge with a cloud model to Answer without it.
  • “Model not found”. The connected chat model node is not set up: open it and choose a model and its credential.
Edit page

Last updated:

Was this page useful?
Ask Aria about Q&A Agent