There are a few important concepts to understand:

  • prompt_slug: This is the name of your prompt. It must be unique for your workspace. You can see the prompt slug in the URL and in the sidebar in the playground.

  • prompt_template: This is a versioned prompt template. Every prompt_template must belong to a prompt_slug. Draft prompts are also stored as prompt_template but without an associated version.

  • version (integer): This is the current version of the prompt template. Versions are stored as auto-incrementing integers. When you commit a prompt, a new version is created.

  • is_live: When you deploy a prompt_template, it is marked as live. The live prompt is the one that is used when you run the prompt via API (unless overridden with an explicit version).

  • prompt_execution: This refers to an individual execution (or run) of a prompt_template in the playground.


A saved prompt_template in Athina looks like this:

{
  "id": "b40a5aa1-f2f8-47ac-a8a0-6d44b0aa1d9a",
  "user_id": "aba83f31-3ea3-4861-9b01-739149108840",
  "org_id": "athina_demo",
  "workspace_slug": "default",
  "prompt_slug": "generate-response", // this is the name of the prompt
  "user_version": 1,
  "is_live": false, // the live version of the prompt is the default version used when running the prompt
  "commit_message": "An optional commit message to explain the changes in this version",
  "prompt": [
    {
      "role": "system",
      "content": "You are an expert at generating high-quality sales emails."
    },
    {
      "role": "user",
      "content": "Write an email to {{name}} from {{company}} explaining why they should use your product."
    }
  ],
  "model": null, // default model to use
  "provider": "default", // Uses Athina's gateway by default. Can be set to a custom provider like "azure" or "gcp", if configured in settings.
  "parameters": {
    "temperature": 1
    // other parameters like max_tokens, top_p, etc
  },
  "tools": null,
  "tool_choice": null,
  "hash": "b12f2e0d-2f73-5577-8aee-c6627c181ce0",
  "created_at": "2024-06-20T15:05:14.193Z",
  "updated_at": "2024-06-20T15:05:14.193Z"
}