PromptLayer allows attach metadata to requests.

Metadata types:

Learn more about how this all fits together & how to build an evaluation system using these features.

All tracking in PromptLayer is based on the pl_request_id . Depending on how you are using PromptLayer, you will need to get the pl_request_id.

Associating a Request to a PromptTemplate

To associate requests with a prompt from the prompt registry, run the following line

promptlayer.track.prompt(
				request_id=pl_request_id, 
				prompt_name="example-2", 
				prompt_input_variables=input_variables
)

Where prompt_name is a prompt in your prompt registry and prompt_input_variables is a dictionary corresponding to the input variables you formatted the prompt with.

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

Score (0-100) for each Request

To associate a score with a prompt, you can either do this from the dashboard under the request page or by running the following line

promptlayer.track.score(
			request_id=pl_request_id, 
			score=100
)

The score must be between 0 to 100 (inclusive). You will see the score on the dashboard. If you have a prompt associated with a request, you will also get an average score for that prompt on the prompt registry page associated with that prompt.

General Metadata