seems that some variables are lost after the Parameter Extraction node. #4175

Closed
opened 2026-02-21 18:05:03 -05:00 by yindo · 5 comments
Owner

Originally created by @mrbaowei on GitHub (Jun 19, 2024).

Originally assigned to: @crazywoola on GitHub.

Self Checks

  • This is only for bug report, if you would like to ask a question, please head to Discussions.
  • I have searched for existing issues search for existing issues, including closed ones.
  • I confirm that I am using English to submit this report (我已阅读并同意 Language Policy).
  • Please do not modify this template :) and fill in all the required fields.

Dify version

0.6.11 latest

Cloud or Self Hosted

Self Hosted (Docker)

Steps to reproduce

Phenomenon:

When using the Parameter Extraction node, its next node is not always able to correctly obtain the variables on the process. Sometimes it cannot be found, and sometimes it can be found, but the variables are empty.

Reproduction method:

Just add a Parameter Extraction node after the LLM node, and then add a DirectReply node to try to find variables, and some variables will be found to be missing.

✔️ Expected Behavior

Variables should be found at any point in the process.

Actual Behavior

No response

Originally created by @mrbaowei on GitHub (Jun 19, 2024). Originally assigned to: @crazywoola on GitHub. ### Self Checks - [X] This is only for bug report, if you would like to ask a question, please head to [Discussions](https://github.com/langgenius/dify/discussions/categories/general). - [X] I have searched for existing issues [search for existing issues](https://github.com/langgenius/dify/issues), including closed ones. - [X] I confirm that I am using English to submit this report (我已阅读并同意 [Language Policy](https://github.com/langgenius/dify/issues/1542)). - [X] Please do not modify this template :) and fill in all the required fields. ### Dify version 0.6.11 latest ### Cloud or Self Hosted Self Hosted (Docker) ### Steps to reproduce # Phenomenon: When using the Parameter Extraction node, its next node is not always able to correctly obtain the variables on the process. Sometimes it cannot be found, and sometimes it can be found, but the variables are empty. # Reproduction method: Just add a Parameter Extraction node after the LLM node, and then add a DirectReply node to try to find variables, and some variables will be found to be missing. ### ✔️ Expected Behavior Variables should be found at any point in the process. ### ❌ Actual Behavior _No response_
yindo added the 🤔 cant-reproduce label 2026-02-21 18:05:03 -05:00
yindo closed this issue 2026-02-21 18:05:03 -05:00
Author
Owner

@dosubot[bot] commented on GitHub (Jun 19, 2024):

Hey @mrbaowei! 👋 I'm here to help you with any bugs, questions, or contributions you have for the repository. Let's tackle this issue together!

The variables might be missing or empty after the Parameter Extraction node in your self-hosted Dify version 0.6.11 (Docker) due to several potential reasons:

  1. Incorrect Input Variable Selection: Ensure that the correct input variable is selected for parameter extraction.
  2. Model Selection and Configuration: The model used for parameter extraction might not be configured correctly or might not be suitable for the specific extraction task.
  3. Parameter Definition: The parameters to be extracted need to be defined accurately. If they are not defined correctly, the extraction might fail.
  4. Instructions and Examples: Providing clear instructions and examples can help the LLM improve the effectiveness and stability of extracting complex parameters.
  5. Inference Mode: The chosen inference mode (Function Call/Tool Call or Prompt) might affect the extraction performance. Some models may perform better in prompt inference if function calling is less effective.
  6. Memory Settings: If memory is enabled, it includes the chat history in the conversation, which might affect the extraction process.
  7. Output Variables: Ensure that the output variables are correctly defined and checked. The node provides built-in variables such as __is_success to indicate if the extraction was successful and __reason to provide error reasons if the extraction fails.
  8. Node Configuration: The configuration of the Parameter Extraction node itself might be incorrect. Ensure that the parameters are correctly mapped and that the node is properly set up to handle the expected input and output variables.
  9. LLM Invocation and Error Handling: The LLM invocation process might fail, leading to empty or missing variables. The _invoke_llm method handles the LLM invocation and any exceptions that occur during this process. If an exception is raised, the node will return a failure status with the error reason.
  10. Result Validation and Transformation: The extracted results are validated and transformed into a standard format. If the validation fails, the extraction might result in empty or missing variables. The _validate_result method checks the validity of the extracted parameters, and the _transform_result method ensures the results are in the correct format [1][2][3][4].

To continue talking to Dosu, mention @dosu.

@dosubot[bot] commented on GitHub (Jun 19, 2024): <!-- Greeting --> Hey @mrbaowei! 👋 I'm here to help you with any bugs, questions, or contributions you have for the repository. Let's tackle this issue together! <!-- Answer --> The variables might be missing or empty after the Parameter Extraction node in your self-hosted Dify version 0.6.11 (Docker) due to several potential reasons: 1. **Incorrect Input Variable Selection**: Ensure that the correct input variable is selected for parameter extraction. 2. **Model Selection and Configuration**: The model used for parameter extraction might not be configured correctly or might not be suitable for the specific extraction task. 3. **Parameter Definition**: The parameters to be extracted need to be defined accurately. If they are not defined correctly, the extraction might fail. 4. **Instructions and Examples**: Providing clear instructions and examples can help the LLM improve the effectiveness and stability of extracting complex parameters. 5. **Inference Mode**: The chosen inference mode (Function Call/Tool Call or Prompt) might affect the extraction performance. Some models may perform better in prompt inference if function calling is less effective. 6. **Memory Settings**: If memory is enabled, it includes the chat history in the conversation, which might affect the extraction process. 7. **Output Variables**: Ensure that the output variables are correctly defined and checked. The node provides built-in variables such as `__is_success` to indicate if the extraction was successful and `__reason` to provide error reasons if the extraction fails. 8. **Node Configuration**: The configuration of the Parameter Extraction node itself might be incorrect. Ensure that the parameters are correctly mapped and that the node is properly set up to handle the expected input and output variables. 9. **LLM Invocation and Error Handling**: The LLM invocation process might fail, leading to empty or missing variables. The `_invoke_llm` method handles the LLM invocation and any exceptions that occur during this process. If an exception is raised, the node will return a failure status with the error reason. 10. **Result Validation and Transformation**: The extracted results are validated and transformed into a standard format. If the validation fails, the extraction might result in empty or missing variables. The `_validate_result` method checks the validity of the extracted parameters, and the `_transform_result` method ensures the results are in the correct format <sup>[[1]](https://github.com/langgenius/dify-docs/blob/main/en/guides/workflow/node/parameter-extractor.md)</sup><sup>[[2]](https://github.com/langgenius/dify-docs/blob/main/zh_CN/guides/workflow/node/parameter_extractor.md)</sup><sup>[[3]](https://github.com/langgenius/dify/blob/main/web/app/components/workflow/nodes/_base/components/variable/utils.ts)</sup><sup>[[4]](https://github.com/langgenius/dify/blob/main/api/core/workflow/nodes/parameter_extractor/parameter_extractor_node.py)</sup>. <!-- Dosu Comment Footer --> *To continue talking to [Dosu](https://dosu.dev), mention @dosu.*
Author
Owner

@crazywoola commented on GitHub (Jun 19, 2024):

image Cant reproduce that. Do you have a screenshot or do you have more details?
@crazywoola commented on GitHub (Jun 19, 2024): <img width="1504" alt="image" src="https://github.com/langgenius/dify/assets/100913391/237d89db-bece-4ad3-8f55-1734dd0f3f58"> Cant reproduce that. Do you have a screenshot or do you have more details?
Author
Owner

@mrbaowei commented on GitHub (Jun 19, 2024):

@crazywoola
image

it seems output null in first Direct Reply node. must set up two direct reply nodes in order to output the content in the Parameter Extraction node.

@mrbaowei commented on GitHub (Jun 19, 2024): @crazywoola <img width="1265" alt="image" src="https://github.com/langgenius/dify/assets/16350494/cdecedfd-f5c6-4ac1-af89-4983514aa021"> it seems output null in first Direct Reply node. must set up two direct reply nodes in order to output the content in the Parameter Extraction node.
Author
Owner

@mrbaowei commented on GitHub (Jun 21, 2024):

reproduce

Hi @crazywoola, could you please try to reproduce the issue with my method?

@mrbaowei commented on GitHub (Jun 21, 2024): > reproduce Hi @crazywoola, could you please try to reproduce the issue with my method?
Author
Owner

@crazywoola commented on GitHub (Jul 11, 2024):

Can you export a DSL here.

@crazywoola commented on GitHub (Jul 11, 2024): Can you export a DSL here.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify#4175