PromptLayer allows you to track prompt template usage, latency, cost, and more. This is done by associating a request with a prompt template as shown below.

Endpoint Reference

To associate requests with a prompt from the prompt registry, run the code

Where prompt_name is a prompt in your prompt registry, prompt_input_variables is a dictionary corresponding to the input variables you formatted the prompt with, and version is the version of the prompt you are trying to track. version is optional, by default it will track the newest version of the prompt.

This information will appear on your dashboard under your request and prompt template pages.

score

You can also use prompt template release labels instead of a version number.