"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

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.

Examples

open allclose all

Basic Examples  (1)

Retrieve a prompt resource from the public repository:

The resource has type "Prompt":

Retrieve the prompt template:

Apply the template to create a message:

Scope  (2)

Explore the metadata for a published prompt resource:

See the location of the prompt content:

See how many parameters are accepted by the template:

Open the definition notebook:

See the categories:

See the topics:

Open a blank prompt resource definition notebook to create a new prompt resource with metadata: