Skip to main content

Prompt Templates

A Prompt Template stores reusable prompt content, variables, and examples. It also records evaluation metadata. AI Applications reference prompt templates to make prompt ownership and change history visible in the catalog. Prompt Template names are globally unique. The fully qualified name is the template name, such as summarize_support_cases.

API Endpoints

The required create fields are name and templateContent. Prompt metadata includes systemPrompt, variables, examples, and templateVersion. Governance metadata includes owners, domains, and dataProducts. Valid templateType values are ChatCompletion, TextGeneration, CodeGeneration, Embedding, Classification, Extraction, and Custom.

Create a Prompt Template

The Java example assumes a configured OpenMetadataClient named client.
Java SDK
The v2.0 Java SDK exposes prompt templates through the direct client. The v2.0 Python core SDK has no typed route for this resource, so use the REST API.

Update and Delete

Send an RFC 6902 JSON Patch document with Content-Type: application/json-patch+json to a PATCH endpoint. Set hardDelete=true on a DELETE request for permanent deletion. Restore a soft-deleted template by sending its id to /v1/promptTemplates/restore.