Installation
First, install the Maxim SDK for your preferred language:Getting Your API Key
Before you can use the Maxim SDK, you need to obtain an API key from the Maxim platform:- Log in to Maxim: Go to app.getmaxim.ai/login and sign in to your account
- Navigate to Settings: Click on “Settings” in the left sidebar
- Go to API Keys: Click on “API keys” under “Organization settings”
- Generate New Key: Click the “Generate new” button
- Name Your Key: Enter a descriptive name for your API key (e.g., “Development”, “CI/CD”, “Local Testing”)
- Copy the Key: Once generated, copy the API key immediately - you won’t be able to see it again
Store your API key securely! You won’t be able to view the complete key value again after closing the generation dialog.
Configuration
Initialize the Maxim SDK with your API key:Basic Prompt Test Run
Here’s how to create and run a basic prompt evaluation test run using a dataset from the platform:-
createTestRun
is the main function that creates a test run. It takes the name of the test run and the workspace id. -
withDataStructure
is used to define the data structure of the dataset. It takes an object with the keys as the column names and the values as the column types. -
withData
is used to specify the dataset to use for the test run. Can be a datasetId(string), a CSV file, an array of column to value mappings. -
withEvaluators
is used to specify the evaluators to use/attach for the test run. You may create an evaluator locally through code or use an evaluator that is installed in your workspace through the name directly -
withPromptVersionId
is used to specify the prompt version to use for the test run. It takes the id of the prompt version. -
run
is used to execute the test run.
Next Steps
Now that you’ve run your first prompt evaluation, explore these guides:- Local Prompt Testing - Learn how to test prompts with custom logic
- Maxim Prompt Testing - Use prompts stored on the Maxim platform
- Prompt Management - Retrieve and use prompts in production workflows
- CI/CD Integration - Automate prompt testing in your CI/CD pipeline