Customize documentation templates

Published

October 24, 2024

The ValidMind AI risk platform offers robust and fully customizable templates for model documentation and validation reports. Configure these templates via multiple methods to suit your organization’s unique 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
    • Validation Report
    • Ongoing Monitoring
  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.4
    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 Section Before.
      • To add a section below the current section, select Section After.
      • To add a subsection within the current section, select 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.

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

A gif demonstrating editing a template outline

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
    • Validation Report
    • Ongoing Monitoring
  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,5 then click Continue to view a side-by-side comparison of your changes with 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.

A gif demonstrating editing the raw YAML behind a template

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
    • Validation Report
    • Ongoing Monitoring
  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.

A gif demonstrating duplicating a template

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