"Prompt" (Resource Object Type)
Details
- LLM prompt resources contain templated messages that can be accessed with LLMPrompt.
Properties
- There are standard ResourceObject properties common to all resource types. Additionally, each resource type defines additional special properties.
- Special properties for prompt resources include:
-
"PromptParameter" number or names of template parameters "PromptLocation" storage location of prompt template "SampleChat" sample of a chat notebook featuring the prompt - The "PromptLocation" property can be a CloudObject, LocalObject, File or URL.
- Properties used for sorting prompt resources include:
-
"Categories" type of prompt: function, persona, etc. "Topics" corresponding domains - Commonly used standard ResourceObject properties for prompt resources include:
-
"DefinitionNotebook" notebook defining the prompt and resource "ExampleNotebook" notebook showing programmatic use
Using a Prompt Resource
- The prompt is accessed with LLMPrompt or LLMResourceFunction.
- LLMPrompt["name"] provides the TemplateObject defining the prompt and can be applied to values to create prompt strings.
- LLMResourceFunction["name"][val1,val2,…] applies the prompt and sends the message to an LLM to generate a response.
- Properties can be accessed using ResourceObject[…]["prop"].
Creating a Prompt Resource
- To create a prompt resource with complete metadata, use the definition notebook available with CreateNotebook["PromptResource"].
- Using the definition notebook, the resource can also be stored locally, deployed to the cloud or submitted for publication in the Wolfram Prompt Repository.
Publishing in the Prompt Repository
- Prompt resources can be published in the Wolfram Prompt Repository.
- Submission to the prompt repository requires a PublisherID.
- Publication requires approval from a review team and typically involves modifications.