diff --git a/docs/integrations/builtin/cluster-nodes/root-nodes/n8n-nodes-langchain.agent/common-issues.md b/docs/integrations/builtin/cluster-nodes/root-nodes/n8n-nodes-langchain.agent/common-issues.md index 467e49161..7a154bd9a 100644 --- a/docs/integrations/builtin/cluster-nodes/root-nodes/n8n-nodes-langchain.agent/common-issues.md +++ b/docs/integrations/builtin/cluster-nodes/root-nodes/n8n-nodes-langchain.agent/common-issues.md @@ -1,6 +1,6 @@ --- #https://www.notion.so/n8n/Frontmatter-432c2b8dff1f43d4b1c8d20075510fe4 -title: AI Agent node Common Issues +title: AI Agent node common issues description: Documentation for common issues and questions in the AI Agent node in n8n, a workflow automation platform. Includes details of the issue and suggested solutions. contentType: integration priority: critical diff --git a/docs/integrations/builtin/cluster-nodes/root-nodes/n8n-nodes-langchain.chainllm.md b/docs/integrations/builtin/cluster-nodes/root-nodes/n8n-nodes-langchain.chainllm.md index ab2d18129..bb2e030a3 100644 --- a/docs/integrations/builtin/cluster-nodes/root-nodes/n8n-nodes-langchain.chainllm.md +++ b/docs/integrations/builtin/cluster-nodes/root-nodes/n8n-nodes-langchain.chainllm.md @@ -83,4 +83,4 @@ You might see this error in one of two scenarios: 1. When you've set the **Prompt** to **Define below** and haven't entered anything in the **Text** field. * To resolve, enter a valid prompt in the **Text** field. 2. When you've set the **Prompt** to **Take from previous node automatically** and the incoming data has no field called `chatInput`. - * The node expects the `chatInput` field. If your previous node doesn't have this field, add an [Edit Fields (Set)](/builtin/core-nodes/n8n-nodes-base.set/) node to edit an incoming field name to `chatInput`. + * The node expects the `chatInput` field. If your previous node doesn't have this field, add an [Edit Fields (Set)](/integrations/builtin/core-nodes/n8n-nodes-base.set/) node to edit an incoming field name to `chatInput`. diff --git a/docs/integrations/builtin/cluster-nodes/root-nodes/n8n-nodes-langchain.chainretrievalqa/common-issues.md b/docs/integrations/builtin/cluster-nodes/root-nodes/n8n-nodes-langchain.chainretrievalqa/common-issues.md new file mode 100644 index 000000000..ed959d007 --- /dev/null +++ b/docs/integrations/builtin/cluster-nodes/root-nodes/n8n-nodes-langchain.chainretrievalqa/common-issues.md @@ -0,0 +1,40 @@ +--- +#https://www.notion.so/n8n/Frontmatter-432c2b8dff1f43d4b1c8d20075510fe4 +title: Question and Answer Chain node common issues +description: Documentation for common issues and questions in the Question and Answer Chain node in n8n, a workflow automation platform. Includes details of the issue and suggested solutions. +contentType: integration +priority: high +--- + +# Question and Answer Chain node common issues + +Here are some common errors and issues with the [Question and Answer Chain node](/integrations/builtin/cluster-nodes/root-nodes/n8n-nodes-langchain.chainretrievalqa/) and steps to resolve or troubleshoot them. + +## No prompt specified error + +This error displays when the **Prompt** is empty or invalid. + +You might see this in one of two scenarios: + +1. When you've set the **Prompt** to **Define below** and have an expression in your **Text** that isn't generating a value. + * To resolve, enter a valid prompt in the **Text** field. + * Make sure any expressions reference valid fields and that they resolve to valid input rather than null. +2. When you've set the **Prompt** to **Take from previous node automatically** and the incoming data has null values. + * To resolve, make sure your input contains a `chatInput` field. Add an [Edit Fields (Set)](/integrations/builtin/core-nodes/n8n-nodes-base.set/) node to edit an incoming field name to `chatInput`. + * Remove any null values from the `chatInput` field of the input node. + + +## A Retriever sub-node must be connected error + + +This error displays when n8n tries to execute the node without having a Retriever connected. + +To resolve this, click the + Retriever button at the bottom of your screen when the node is open, or click the Retriever + connector when the node isn't open. n8n will then open a selection of possible Retrievers to pick from. + +## Can't produce longer responses + +If you need to generate longer responses than the Question and Answer Chain node produces by default, you can try one or more of the following techniques: + +* **Connect a more verbose model**: Some AI models produce more terse results than others. Swapping your model for one with a larger context window and more verbose output can increase the word length of your responses. +* **Increase the maximum number of tokens**: Many model nodes (for example the [OpenAI Chat Model](/integrations/builtin/cluster-nodes/sub-nodes/n8n-nodes-langchain.lmchatopenai/#maximum-number-of-tokens)) include a **Maximum Number of Tokens** option. You can set this to increase the maximum number of tokens the model can use to produce a response. +* **Build larger responses in stages**: For more detailed answers, you may want to construct replies in stages using a variety of AI nodes. You can use AI split up a single question into multiple prompts and create responses for each. You can then compose a final reply by combining the responses again. Though the details are different, you can find a good example of the general idea in this [template for writing a WordPress post with AI](https://n8n.io/workflows/2187-write-a-wordpress-post-with-ai-starting-from-a-few-keywords/). diff --git a/docs/integrations/builtin/cluster-nodes/root-nodes/n8n-nodes-langchain.chainretrievalqa.md b/docs/integrations/builtin/cluster-nodes/root-nodes/n8n-nodes-langchain.chainretrievalqa/index.md similarity index 85% rename from docs/integrations/builtin/cluster-nodes/root-nodes/n8n-nodes-langchain.chainretrievalqa.md rename to docs/integrations/builtin/cluster-nodes/root-nodes/n8n-nodes-langchain.chainretrievalqa/index.md index 46cecdc63..db40a5264 100644 --- a/docs/integrations/builtin/cluster-nodes/root-nodes/n8n-nodes-langchain.chainretrievalqa.md +++ b/docs/integrations/builtin/cluster-nodes/root-nodes/n8n-nodes-langchain.chainretrievalqa/index.md @@ -28,4 +28,9 @@ The question you want to ask. Refer to [LangChain's documentation on retrieval chains](https://js.langchain.com/docs/tutorials/rag/){:target=_blank .external-link} for examples of how LangChain can use a vector store as a retriever. --8<-- "_snippets/integrations/builtin/cluster-nodes/langchain-overview-link.md" + +## Common issues + +For common errors or issues and suggested resolution steps, refer to [Common Issues](/integrations/builtin/cluster-nodes/root-nodes/n8n-nodes-langchain.chainretrievalqa/common-issues/). + --8<-- "_glossary/ai-glossary.md" diff --git a/mkdocs.yml b/mkdocs.yml index d21aa3507..6811677d6 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -855,7 +855,9 @@ nav: - Tools Agent: integrations/builtin/cluster-nodes/root-nodes/n8n-nodes-langchain.agent/tools-agent.md - Common issues: integrations/builtin/cluster-nodes/root-nodes/n8n-nodes-langchain.agent/common-issues.md - Basic LLM Chain: integrations/builtin/cluster-nodes/root-nodes/n8n-nodes-langchain.chainllm.md - - Question and Answer Chain: integrations/builtin/cluster-nodes/root-nodes/n8n-nodes-langchain.chainretrievalqa.md + - Question and Answer Chain: + - Question and Answer Chain: integrations/builtin/cluster-nodes/root-nodes/n8n-nodes-langchain.chainretrievalqa/index.md + - Common issues: integrations/builtin/cluster-nodes/root-nodes/n8n-nodes-langchain.chainretrievalqa/common-issues.md - Summarization Chain: integrations/builtin/cluster-nodes/root-nodes/n8n-nodes-langchain.chainsummarization.md - Information Extractor: integrations/builtin/cluster-nodes/root-nodes/n8n-nodes-langchain.information-extractor.md - Text Classifier: integrations/builtin/cluster-nodes/root-nodes/n8n-nodes-langchain.text-classifier.md