FabricFabricExperiments
AI Quality

Prompt registry

Versioned, content-addressed prompt templates — publish, diff, and trace judge provenance back to a registry version.

The prompt registry stores chat prompt templates as immutable, content-addressed versions. Publishing is idempotent: submitting a template whose canonical content hash matches the current latest version returns that version rather than minting a new number — version history only advances on real change.

Templates

A version holds an ordered list of chat messages (system / user / assistant) plus model parameters (model, temperature, max tokens). Messages use {{variable}} placeholders; the registry derives the variable list from the template, so the playground can prompt you for exactly the inputs a version needs.

await api.prompts.create({ id: 'support-answer', name: 'Support answer' });
await api.prompts.createVersion('support-answer', {
  template: {
    messages: [
      { role: 'system', content: 'Answer support questions about {{topic}}.' },
      { role: 'user', content: '{{question}}' },
    ],
    params: { temperature: 0.1 },
  },
  note: 'tighter system framing',
});

Diffing versions

The Studio prompt detail page renders any version side by side with the latest, line-diffed per message — review a prompt change the way you review code before replaying it against a dataset.

Provenance

Judge scores across the eval system record a promptHash. Because registry versions are content-addressed with the same canonicalization, a score's prompt provenance can be traced back to the exact registry version (or draft) that produced it.

On this page