LLMPrompt

This functionality requires LLM access »

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

Examples

open allclose all

Basic Examples  (3)

Retrieve a prompt template from the Wolfram Prompt Repository:

Apply an LLMPrompt to values to get a prompt string:

Insert values into an LLMPrompt:

Scope  (3)

Retrieve a prompt using a ResourceObject:

Get the template from an LLMFunction:

Insert a value for the first slot and renumber the second slot as the first:

Use the new function:

Use LLMPrompt directly on a TemplateObject to reconfigure the slots:

Apply the template:

Wolfram Research (2023), LLMPrompt, Wolfram Language function, https://reference.wolfram.com/language/ref/LLMPrompt.html.

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_2024_llmprompt, author="Wolfram Research", title="{LLMPrompt}", year="2023", howpublished="\url{https://reference.wolfram.com/language/ref/LLMPrompt.html}", note=[Accessed: 21-December-2024 ]}

BibLaTeX

@online{reference.wolfram_2024_llmprompt, organization={Wolfram Research}, title={LLMPrompt}, year={2023}, url={https://reference.wolfram.com/language/ref/LLMPrompt.html}, note=[Accessed: 21-December-2024 ]}