Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
4 tasks done
mrbaowei opened this issue Jun 19, 2024 · 5 comments
Closed
4 tasks done
Assignees
Labels
🤔 cant-reproduce We can not reproduce it or the information is limited

Comments

@mrbaowei
Copy link

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

@dosubot dosubot bot added the 🐞 bug Something isn't working label Jun 19, 2024
Copy link

dosubot bot commented 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.

@crazywoola
Copy link
Member

image Cant reproduce that. Do you have a screenshot or do you have more details?

@crazywoola crazywoola added 🤔 cant-reproduce We can not reproduce it or the information is limited and removed 🐞 bug Something isn't working labels Jun 19, 2024
@mrbaowei
Copy link
Author

@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
Copy link
Author

reproduce

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

@crazywoola
Copy link
Member

Can you export a DSL here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🤔 cant-reproduce We can not reproduce it or the information is limited
Projects
None yet
Development

No branches or pull requests

2 participants