# Manage key values
URL: https://docs.datarobot.com/en/docs/workbench/nxt-registry/nxt-model-directory/nxt-key-values.html

> View and manage key values for a registered model version in the NextGen Registry.

# Manage key values for registered model versions

After you register a model, you can add key values and edit existing (user-created) key values from Registry. For more information on key values, see the [documentation](https://docs.datarobot.com/en/docs/classic-ui/mlops/deployment/registry/reg-key-values.html).

> [!TIP] Runtime parameter key values
> You cannot create or edit runtime parameter key values in Registry, those are defined in the [Workshop](https://docs.datarobot.com/en/docs/workbench/nxt-registry/nxt-model-workshop/nxt-create-custom-model.html#manage-runtime-parameters).

## Add key values

To add a new key value to a registered model version:

1. On theModelstab, in the table of registered models, click the registered model containing the version you want to manage key values for, opening the list of versions.
2. In the list of versions, click the version you want to edit, opening the registered model version panel:
3. Click theOverviewtab and locate theKey valuessection.
4. In the group box for a key values category, click+ Add(or, if one or more key values exist for that category, click+ Add tag,+ Add metric, etc.).
5. In theAdd key value(s)dialog box, select one of the following: Add newCopy from previousImport with APITo add a new key value to a registered model version, configure the following fields:SettingDescriptionCategoryDefaults to the category of the group box where you clicked+ Add. Select one of the following categories for the new key value to organize your key values by purpose:Training parameterMetricTagArtifactValue typeSelect one of the following value types for the new key value:StringNumericBooleanURLJSONYAMLNameEnter a descriptive name for the key in the key-value pair.ValueIf you selected one of the following value types, enter the appropriate data:String: Enter any string up to 4 KB.Numeric: Enter an integer or floating-point number.Boolean: SelectTrueorFalse.URL: A URL in the formatscheme://location; for example,https://example.com. DataRobot does not fetch the URL or provide a link to this URL in the user interface; however, in a downloaded compliance document, the URL may appear as a link.JSON: Enter or upload JSON as a string. This JSON must parse correctly; otherwise, DataRobot won't accept it.YAML: Enter or upload YAML as a string. DataRobot does not validate this YAML.Description(Optional)Enter a description of the key value's purpose.To copy key values from a previous registered model version, selectAll categoriesor a single category, and then clickAddto copy the key values:If a key value with the same name exists in the newer version and it is not read-only, the value from the older version will overwrite it. Otherwise, a new key value with that name is created in the newer version. If you edit either key value to use a different file, the other key value is unaffected, and the file is no longer shared. System key values are not included in bulk copy; for example,model.versionis not overwritten in a newer version with the old version's value.To import key values through the API, clickCopy to clipboardto copy the Python code snippet for importing key values:This is a Python template for adding key values to a registered model version. Replace the implementation offetch_values()with code that obtains the metrics, tags, parameters, and artifacts to import as key values for the DataRobot model version. You must provide your API key as an environment variable:export MLOPS_API_TOKEN=<value of API token from Developer Tools page>.
6. ClickAddto save the key value. The new key appears in the list for the selectedCategory.

## Add key values for moderation and evaluation guard models

> [!NOTE] Availability information
> Evaluation and moderation guardrails are a premium feature. Contact your DataRobot representative or administrator for information on enabling this feature.
> 
> Feature flag: Enable Moderation Guardrails ( Premium), Enable Global Models in the Model Registry ( Premium), Enable Additional Custom Model Output in Prediction Responses

If a model is intended for use as a custom deployment guard model for text-generation (LLM) model [evaluation and moderation](https://docs.datarobot.com/en/docs/workbench/nxt-registry/nxt-model-workshop/nxt-configure-evaluation-moderation.html), you can define the input and output column names on the registered model version so that each user doesn't need to specify this information when they select the model during evaluation and moderation setup. To do this, define the following key values for custom model versions with a naming convention. Any user with write permissions for the custom model version can define the evaluation and moderation input and output columns. To define the input and output column names, on the Registry > Models tab, open the registered model version you want to deploy (or have deployed) as a guard model. In the Key Values section, expand the Tags panel, and do the following:

- Click+ Add Tagto create a new key value in theTagcategory. Set theValue typetoStringand theNametomoderations.input_column_name. ForValue, enter the name of the dataframe column your model reads as input; for example:promptText.
- Click+ Add Tagto create a new key value in theTagcategory. Set theValue typetoStringand theNametomoderations.output_column_name. ForValue, enter the name of the dataframe column your model reads as output; for example:sincerity_sincere_PREDICTION.

With this information configured, you can deploy the registered model version, and when the deployment is selected as a Custom Deployment evaluation (in the [Playground](https://docs.datarobot.com/en/docs/agentic-ai/playground-tools/playground-eval-metrics.html) or [Workshop](https://docs.datarobot.com/en/docs/workbench/nxt-registry/nxt-model-workshop/nxt-configure-evaluation-moderation.html)), the Input column and Output column fields are configured automatically.

## Customize compliance templates with key values

If you've added key values to a registered model, you can build a custom compliance documentation template with references to those key values. Referencing key values adds the associated data to the generated template, limiting the amount of manual editing needed to complete the compliance documentation. To learn how to reference key values in a compliance documentation template, see the [Template Builder documentation](https://docs.datarobot.com/en/docs/workbench/compliance/build-doc-templates.html).

## Edit or delete key values

To edit or delete added, copied, or imported key values:

1. On theModelstab, in the table of registered models, click the registered model containing the version you want to manage key values for, opening the list of versions.
2. In the list of versions, click the version you want to edit, opening the registered model version panel:
3. Click theOverviewtab, locate theKey valuessection, and do either of the following:
4. For key values you've created, you can click the edit () and delete () icons:

---
