LLMPrompt["name"]
gives the TemplateObject for the specified large language model prompt.
LLMPrompt[resource]
retrieves the TemplateObject for the specified resource.
LLMPrompt[…,params]
gives the TemplateObject with slots filled in by params.
LLMPrompt[…][p1,p2,…]
applies a template with numbered slots to parameter values pi.
LLMPrompt[…] [key1p1,key2p2]
applies a template with named slots to parameter data.
LLMPrompt
LLMPrompt["name"]
gives the TemplateObject for the specified large language model prompt.
LLMPrompt[resource]
retrieves the TemplateObject for the specified resource.
LLMPrompt[…,params]
gives the TemplateObject with slots filled in by params.
LLMPrompt[…][p1,p2,…]
applies a template with numbered slots to parameter values pi.
LLMPrompt[…] [key1p1,key2p2]
applies a template with named slots to parameter data.
Details and Options
- LLMPrompt retrieves prompts from the Wolfram Prompt Repository.
- The resource can be a prompt ResourceObject, an LLMFunction or a TemplateObject.
- The params should be a list for templates with numbered slots or an Association for templates with named slots.
- In LLMPrompt["name",params], using TemplateSlot as a value will rename or reorder slots within the template.
- LLMPrompt is commonly used within LLMFunction and LLMSynthesize.
- LLMPrompt takes the following options:
-
ResourceSystemBase Automatic the base location of the global resource system ResourceSystemPath $ResourceSystemPath path along which to search ResourceVersion Automatic version to select of a published resource
Examples
open all close allBasic Examples (3)
Retrieve a prompt template from the Wolfram Prompt Repository:
LLMPrompt["ELI5"]Use it to pass instruction in LLMSynthesize:
LLMSynthesize[{LLMPrompt["ELI5"], "The sun is powered by nuclear fusion"}]Apply an LLMPrompt to values to get a prompt string:
LLMPrompt["InformalRephrase"]["Welcome colleagues"]Use a prompt in LLMFunction:
LLMFunction[LLMPrompt["InformalRephrase"]]["I have received an invitation to a gathering."]Scope (5)
Retrieve a prompt template from the Wolfram Prompt Repository:
LLMPrompt["CodeWriter"]Retrieve a prompt using a ResourceObject:
LLMPrompt[ResourceObject["Prompt" -> "ELI5"]]Insert values into an LLMPrompt:
LLMPrompt["InformalRephrase", {"Welcome colleagues"}]Reconfigure the slots of an existing TemplateObject:
LLMPrompt[TemplateObject[{"Start all ", TemplateSlot[1], " with a ", TemplateSlot[2]},
CombinerFunction -> StringJoin, InsertionFunction -> TextString], {"sentences", TemplateSlot["Letter"]}]Use the prompt in LLMConfiguration:
LLMConfiguration["Prompts" -> LLMPrompt["ELI5"]]LLMConfiguration["Prompts" -> {LLMPrompt["ELI5"], LLMPrompt["GenZSpeak"]}]Options (3)
ResourceSystemBase (1)
Specify Wolfram repositories as the source of a published prompt:
LLMPrompt["ELI5", ResourceSystemBase -> "https://resources.wolframcloud.com"]ResourceSystemPath (1)
Only look for published prompts, ignoring any local or cloud-deployed content:
LLMPrompt["ELI5", ResourceSystemPath -> {URL["https://resources.wolframcloud.com"]}]Instead, look for a resource you have deployed to your own cloud account:
LLMPrompt["SixtiesRockstar", ResourceSystemPath -> {PersistenceLocation["Cloud"]}]Applications (1)
Modify the slots in an existing LLMFunction:
llmf = LLMFunction[StringTemplate["How many `1` fit inside one `2`?"]]Get the template from the function:
LLMPrompt[llmf]Insert a value for the first slot and renumber the second slot as the first:
newprompt = LLMPrompt[llmf, {"tennis balls", TemplateSlot[1]}]newllmf = LLMFunction[newprompt]newllmf["basketball"]Properties & Relations (1)
Applying LLMPrompt on a TemplateObject does not change it:
template = StringTemplate["How many `1` fit inside one `2`?"]LLMPrompt[template] == templateHistory
Introduced in 2023 (13.3)
Text
Wolfram Research (2023), LLMPrompt, Wolfram Language function, https://reference.wolfram.com/language/ref/LLMPrompt.html.
CMS
Wolfram Language. 2023. "LLMPrompt." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/LLMPrompt.html.
APA
Wolfram Language. (2023). LLMPrompt. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/LLMPrompt.html
BibTeX
@misc{reference.wolfram_2026_llmprompt, author="Wolfram Research", title="{LLMPrompt}", year="2023", howpublished="\url{https://reference.wolfram.com/language/ref/LLMPrompt.html}", note=[Accessed: 13-June-2026]}
BibLaTeX
@online{reference.wolfram_2026_llmprompt, organization={Wolfram Research}, title={LLMPrompt}, year={2023}, url={https://reference.wolfram.com/language/ref/LLMPrompt.html}, note=[Accessed: 13-June-2026]}