Question and Answer Chain
ai.chain_retrieval_qa · version 1.5 · AI
Answers questions from documents found by a retriever.
Ports
| Port | Kind | Label | Required | Max connections |
|---|---|---|---|---|
| input 0 | main | |||
| input 1 | ai_languageModel | yes | 1 | |
| input 2 | ai_retriever | yes | 1 | |
| output 0 | main |
Credentials
This node uses no credentials.
Parameters
| Name | Type | Default | Required | Shown when | Description |
|---|---|---|---|---|---|
promptType | options | "auto" | Prompt Source. One of auto, define. | ||
text | string | promptType = define | Question. | ||
options | collection | ||||
options.systemPromptTemplate | string | "Answer the user's question using only the context below. If the context does not contain the answer, say that you don't know instead of guessing.\n\nContext:\n{context}" | System Prompt. {context} is replaced with the retrieved documents. |
Import
Exported workflows that use these node types import to this node. Unverified ranges import with a parameter warning until parity fixtures confirm them; see Migrating.
| Source type | Version range | Status | Fixtures |
|---|---|---|---|
@n8n/n8n-nodes-langchain.chainRetrievalQa | 1 | unverified |