Customize documentation templates

Published

September 4, 2024

The ValidMind AI risk platform offers robust and fully customizable templates for model documentation and validation reports. Easily configure these templates via multiple methods to suit your custom needs.

Prerequisites

If you are not sure which template or which version of a template your model documentation is using, check the Documentation page of your model.3 The Document Template section in the right sidebar lists the information.

Edit template outline

  1. In the left sidebar, click Settings.

  2. Under Workplace Settings, select Templates.

  3. Select one of the tabs for the type of template you want to edit:

    • Documentation Templates
    • Validation Report Templates
    • Ongoing Monitoring Templates
  4. Locate the template to edit and on the template details page, click Edit Outline.

  5. In outline editing mode, you can:

    1. Expand sections:
      • Expand the menu for any sections with subsections by clicking .
    2. Add content to sections:
      • For validation report templates, you’re able to add additional content.
      • Click to add content to that section of the template, such as a Summary Block or a Guideline Block.
    3. Rename sections:
      • Hover over a section until the appears, then click on it to change the name.
      • Save by clicking , and discard changes by clicking .
    4. Insert new sections:
      • Click to add a new section or subsection to the template.
      • To add a section above the current section, select Add section before.
      • To add a section below the current section, select Add section after.
      • To add a subsection within the current section, select Add subsection.
    5. Remove sections:
      • Click to delete a section.
      • After you confirm, that section will be removed.
    6. Reorder sections:
      • Click and hold firmly to drag to reorder sections.
  6. When you’re done, click Create New Version to view a side-by-side comparison of your changes with the previous version:

    • Add a description in Version Notes to track your changes.
    • Click Save to save the new version or Cancel to return to the previous screen.

Once saved, your new template version becomes available for use.

A gif demonstrating editing a template outline

To add guidelines to your template, edit the YAML template directly.

Edit YAML template

  1. In the left sidebar, click Settings.

  2. Under Workplace Settings, select Templates.

  3. Select one of the tabs for the type of template you want to edit:

    • Documentation Templates
    • Validation Report Templates
    • Ongoing Monitoring Templates
  4. Locate the template to edit and on the template details page, click Edit Raw.

  5. In the Edit Template YAML editor that opens, make your changes according to the template schema,4 then:

    • Click Continue to view a side-by-side comparison of your changes with the previous version of the template.
    • Click Discard changes to delete your changes and return to the previous version of the template.
  6. On the Review Changes screen:

    • Add a description in Version Notes to track your changes.
    • Click Save version # to save the new version or Discard changes to return to the latest version of the template.
    • Click Go back to return to the previous Edit Template screen.

A gif demonstrating editing the raw YAML behind a template

Once saved, your new template version becomes available for use.

Template schema

Schema Docs Type: object

Type: string

Unique identifier for the template.

Type: string

Name of the template.

Type: string

Version of the template.

Type: string

Description of the template.

Type: array

Documentation sections of the template.

Each item of this array must be:

Type: object

Type: string

Unique identifier for the section.

Type: string

Title of the section.

Type: string

Description of the section.

Type: string

ID of the parent section.

Type: integer

Order of the section in the navigation menu. By default sections are ordered alphabetically. If order is specified, sections will be ordered by the order value, and then alphabetically.

Type: string

Default text for the section. If set, a metadata content row will be created with this text when installing the template

Type: boolean

If true, the section will be displayed in the navigation menu, but it will not be accessible via direct link.

Type: boolean

If true, the section will condense all of its subsections into a single section.

Type: array of string

Documentation or validation guidelines for the section.

Each item of this array must be:

Type: array

Contents to be displayed on the section.

Each item of this array must be:

Type: object

Single content block of the module.

Type: enum (of string) Default: "metadata_text"

Must be one of:

  • "metadata_text"
  • "dynamic"
  • "metric"
  • "test"

Examples:

"metadata_text"
"test"

Type: string

ID of the content to be displayed for the given content type (text, tests, etc.).


Examples:

"sample_text"
"section_intro"

Type: object

Options for the content block.


Examples:

{
    "default_text": "This is a sample text block."
}
{
    "metric_id": "metric_1",
    "title": "Custom Title for Metric 1"
}
{
    "test_id": "adf_test"
}

Type: string

Default text for the content block. Only applicable for metadata_text content blocks.

Type: string

Title of the content block. Only applicable for test content blocks.

Duplicate template

To duplicate an existing template and start with version one of that new template:

  1. In the left sidebar, click Settings.

  2. Under Workplace Settings, select Templates.

  3. Select one of the tabs for the type of template you want to duplicate:

    • Documentation Templates
    • Validation Report Templates
  4. Locate the template to duplicate and on the template details page, click Duplicate Template.

  5. In the Duplicate Template YAML editor that opens, give your copy a Template Name.

    Optionally, you can also add a Template Description.

  6. Click Duplicate template to create a copy of your template, or click to cancel and exit the Duplicate Template menu.

A gif demonstrating duplicating a template

Once duplicated, customize your new template to your needs, making it available for use with model documentation or validation reports.

Troubleshooting

The documentation template editor validates the YAML changes you make and flags any errors that it finds. If you make a change that the editor cannot parse correctly, the editor will not let you save the changes until you correct the YAML.

Common issues with YAML include incorrect indenting, imbalanced quotes, or missing colons between keys and values. If you run into issues with incorrect YAML, check the error message provided by the template editor, as it might provide a line and column number where the error occurs.

What’s next