The Maxim SDK provides a convenient way to programmatically add new entries to your datasets. This guide will walk you through the process of using the SDK to add entries, helping you efficiently manage and update your datasets for AI training and evaluation.
Getting your Dataset ID
Get the Dataset ID from the Maxim dashboard:
- Click the three dots on your target Dataset
- Select “Copy ID”
- Use the copied Dataset ID in your code
Adding entries to a Dataset
// [!code word:apiKey]
const maxim = new Maxim({ apiKey: "" });
await maxim.addDatasetEntries("dataset-id", [
{
input: {
type: "text",
payload: "your content here",
},
//optional
expectedOutput: {
type: "text",
payload: "your content here",
},
//optional
context: {
type: "text",
payload: "your content here",
},
},
]);
You can insert a maximum of 100 entries at a time to your Dataset.