Run failed: Variable #xxx not found in variable pool
Self Checks
- [X] This is only for bug report, if you would like to ask a question, please head to Discussions.
- [X] I have searched for existing issues search for existing issues, including closed ones.
- [X] I confirm that I am using English to submit this report (我已阅读并同意 Language Policy).
- [X] [FOR CHINESE USERS] 请务必使用英文提交 Issue,否则会被关闭。谢谢!:)
- [X] Please do not modify this template :) and fill in all the required fields.
Dify version
v0.10.1
Cloud or Self Hosted
Self Hosted (Docker)
Steps to reproduce
- Set an optional input parameter.
- Add a IF/ELSE block.
- Add a LLM Block for the if branch.
- Add a variable aggregator block for the LLM Block and else branch.
- Add a template block.
6.Add a LLM block and an ANSWER block.
This is the YAML file: test.txt
✔️ Expected Behavior
Can run normally. Additionally, can I directly use the output of variable aggregator in the LLM prompt instead of using a template block?
❌ Actual Behavior
Running error in v0.10.1:
but running normally in v0.9.2:
The error "Variable image_text not found in variable pool" in version 0.10.1 likely occurs because the variable image_text is not being correctly fetched from the variable pool. This behavior might have changed between versions 0.9.2 and 0.10.1, leading to the error in the newer version [1].
Regarding your question about using the output of the variable aggregator directly in the LLM prompt, you cannot do this without using a template block. The prompt generation process involves using a prompt template and inputs, which are processed through methods that require a template block to structure the prompt correctly [1].
To continue talking to Dosu, mention @dosu.
This is expected behavior. The VariableAggregator is designed to select the truly completed branch among several preceding ones. In your example, VLM wasn’t executed, and the subsequent Template tried to use the output of VLM… It couldn’t access this value, which led to an error.
but running normally in v0.9.2:
That might have been unintended behavior.
Additionally, can I directly use the output of VariableAggregator in the LLM prompt instead of using a template block?
You can use all variables of types string, number, array[string], and array[number] in the LLM.
Similar issues were encountered in version 0.10.2.
dsl.txt
Similar issues were encountered in version 0.10.2.
dsl.txt
Please check if the node where the variable you referenced is actually executed. If it hasn’t been, it’s best to use an aggregator to adjust your workflow.
Variable #1749624841670.text# not found,请问这个怎么解决?