Maxim Logo
How toEvaluate Prompts

Deploy Prompts

Quick iterations on Prompts should not require code deployments every time. With more and more stakeholders working on prompt engineering, its critical to keep deployments of Prompts as easy as possible without much overhead. Prompt deployments on Maxim allow conditional deployment of prompt changes that can be used via the SDK.

Why deploy Prompts via Maxim

  • Prompt experimentation - Create multiple versions of your Prompts, and use a wide variety of models available on Maxim to test and compare their performance using your custom data.
  • Deploy without code changes - Deploy the final version directly from UI—no code changes required. Use Maxim’s RBAC support to limit deployment permission to key stakeholders.
  • Custom variables - Use custom variables to create rules to control which environments or user groups should receive the updates. This helps in setting up A/B tests or testing prompt variations internally before pushing to users.

Deploying a prompt

Open the prompt version you want to deploy.

Prompt version list

Click the button in the header and choose to deploy the present version.

Add one or more rules for deployment e.g. Environment = prod.

Deployment rules selection

Edit or define new variables by clicking

Define the name and type of any variable. For variables of type select provide possible options. e.g. Environment: Beta, Staging, Prod.

Add new deployment variable

Every time you have a new version to deploy, use the variable based rules to deploy conditionally.

View existing deployments for any prompt from the deploy button in the header.

Deployments list

Fetching Prompts via SDK

For building query to get prompt with specific deployment variables, you can use QueryBuilder.

import { Maxim, QueryBuilder } from "@maximai/maxim-js;
 
const maxim = new Maxim({ apiKey: "", promptManagement: true });
 
const prompt = await maxim.getPrompt("prompt-id",
					new QueryBuilder()
						.and()
						.deploymentVar("Environment", "prod")
						.build());

Add multiple queries

import { Maxim, QueryBuilder } from "@maximai/maxim-js;
 
const maxim = new Maxim({ apiKey: "", promptManagement: true });
 
const prompt = await maxim.getPrompt(
	"prompt-id",
	new QueryBuilder().and().deploymentVar("Environment", "prod").deploymentVar("CustomerId", "123").build(),
);

Add filters based on tags

import { Maxim, QueryBuilder } from "@maximai/maxim-js;
 
const maxim = new Maxim({ apiKey: "", promptManagement: true});
 
const prompt = await maxim.getPrompt(
	"prompt-id",
	new QueryBuilder().and().deploymentVar("Environment", "prod").tag("TenantId", "3000").build(),
);
Learn more about advanced prompt querying techniques.

On this page