Utilize LLM to infer and extract structured parameters from natural language for subsequent tool invocation or HTTP requests.
Dify workflows provide a rich selection of tools, most of which require structured parameters as input. The parameter extractor can convert user natural language into parameters recognizable by these tools, facilitating tool invocation.
Some nodes within the workflow require specific data formats as inputs, such as the iteration node, which requires an array format. The parameter extractor can conveniently achieve structured parameter conversion.
In this example: The Arxiv paper retrieval tool requires paper author or paper ID as input parameters. The parameter extractor extracts the paper ID 2405.10739 from the query “What is the content of this paper: 2405.10739” and uses it as the tool parameter for precise querying.
Configuration Steps
Advanced Settings
Inference Mode
Some models support two inference modes, achieving parameter extraction through function/tool calls or pure prompt methods, with differences in instruction compliance. For instance, some models may perform better in prompt inference if function calling is less effective.
Memory
When memory is enabled, each input to the question classifier will include the chat history in the conversation to help the LLM understand the context and improve question comprehension during interactive dialogues.
Output Variables
__is_success Number
Extraction success status, with a value of 1 for success and 0 for failure.
__reason String
Extraction error reason