> For the complete documentation index, see [llms.txt](https://doc.duaer.com/zh/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://doc.duaer.com/zh/integrations/builtin/cluster-nodes/root-nodes/n8n-nodes-langchain.chainretrievalqa/common-issues.md).

# Duaer 里 Question and Answer Chain 的常见问题

Duaer 里 Question and Answer Chain 的常见问题：提示词为空、没接检索器、回答太短。
## No prompt specified <a href="#no-prompt-specified-error" id="no-prompt-specified-error"></a>

Source for Prompt (User Message) 选 Connected Chat Trigger Node 时，节点要在输入里找 chatInput 字段。没有这个字段就报这个错：用 Edit Fields (Set) 把字段改名为 chatInput，或改成 Define below。

选 Define below 时报这个错，说明 Prompt (User Message) 为空，或表达式没算出值。检查表达式引用的字段是否存在、是否为 null。

## A Retriever sub-node must be connected and enabled <a href="#a-retriever-sub-node-must-be-connected-error" id="a-retriever-sub-node-must-be-connected-error"></a>

Question and Answer Chain 没有接检索器，或检索器被停用了。点节点下方 Retriever 接口上的 +，选一个检索器，例如 Vector Store Retriever，再给它接上向量库。Model 接口同理，没接模型会报 A Model sub-node must be connected and enabled。

## 回答太短 <a href="#cant-produce-longer-responses" id="cant-produce-longer-responses"></a>

- 在模型子节点里调高最大输出长度，例如 OpenAI Chat Model 的 Options → Maximum Number of Tokens。
- 换一个上下文更长、输出更详细的模型。
- 在 Options → System Prompt Template 里要求更完整的回答，保留 {context} 占位符。
- 把大问题拆成几步，分别用 AI 节点回答，最后再合并。
## Questions

### Duaer 的 Question and Answer Chain 必须接什么？

Duaer 的 Question and Answer Chain 要接一个模型和一个检索器，缺一个就会报 sub-node must be connected and enabled。

