

LLMGraph
Details
- An LLMGraph can be used to efficiently schedule and combine multiple LLM generation steps for an optimal evaluation managing LLM submissions' concurrency.
- LLMGraph requires external service authentication, billing and internet connectivity.
- Possible values for node evaluation function funi include:
-
LLMFunction[…] an LLMFunction for LLM submission Function[…] a pure function for Wolfram kernel submission <|key1val1, …|> an Association with detailed node specifications nodespec - Possible keys in nodespec for evaluation specifications are:
-
"NodeFunction" arbitrary function to evaluate on the node "LLMFunction" LLM evaluation via an LLMFunction "ListableLLMFunction" threaded LLM evaluation on list input values "Input" explicit list of nodes required as function arguments "TestFunction" whether the node should run "TestFunctionInput" explicit list of nodes required as test arguments - Each node must be defined with only one of "NodeFunction", "LLMFunction" or "ListableLLMFunction".
- The function specified in "ListableLLMFunction" threads over list input. Non-list input is copied. The output of the node is always a list.
- Possible "LLMFunction" specifications as prompti include:
-
"text" static text {"text1",…} a list of strings LLMPrompt["name"] a repository prompt StringTemplate[…] templated text TemplateObject[…] template for creating a prompt LLMFunction[…] an LLMFunction object - If a prompti is explicitly dependent on the parameter TemplateSlot["namej"], the results from nodej evaluation will be computed first and then used to build the new prompt.
- If nodej has no function specification, its result can be provided in input.
- The computation in a node is started as soon as all its dependencies are available.
- Cyclic prompt dependencies are not supported.
- Possible values for input are:
-
val value for the single graph input <|name1val1, …|> values for each of the nodes or inputs namei - Possible values for prop are:
-
Automatic results for the output nodes All results for all the nodes "LLMGraph" a new LLMGraph annotated with the result - LLMGraph supports the following options:
-
Authentication Automatic fallback authentication LLMEvaluator $LLMEvaluator fallback LLM configuration - To evaluate a node, its own LLMConfiguration nconf will be used. LLMEvaluatorgconf can be used to specify defaults for Missing[…] or Automatic values.



History
Text
Wolfram Research (2025), LLMGraph, Wolfram Language function, https://reference.wolfram.com/language/res/LLMGraph.html.
CMS
Wolfram Language. 2025. "LLMGraph." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/res/LLMGraph.html.
APA
Wolfram Language. (2025). LLMGraph. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/res/LLMGraph.html
BibTeX
@misc{reference.wolfram_2025_llmgraph, author="Wolfram Research", title="{LLMGraph}", year="2025", howpublished="\url{https://reference.wolfram.com/language/res/LLMGraph.html}", note=[Accessed: 25-August-2025 ]}
BibLaTeX
@online{reference.wolfram_2025_llmgraph, organization={Wolfram Research}, title={LLMGraph}, year={2025}, url={https://reference.wolfram.com/language/res/LLMGraph.html}, note=[Accessed: 25-August-2025 ]}