> ## Documentation Index
> Fetch the complete documentation index at: https://docs.corti.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Build a section

> A walkthrough for creating and customizing the sections that make up your templates.

## Overview

A section is a single part of a clinical document, such as Chief Complaint, Allergies, or Plan. Each section carries a heading, a set of instructions that tell the model what to write, and an output schema that controls the shape of what it produces. Templates are built by arranging sections in order, and a single section can be reused across many templates. To see how the two fit together, see [Intro to guided templates and sections](/textgen/console-templates/get-started).

Corti provides a set of standard sections out of the box, so the fastest way to get going is to copy one and adjust it. This guide covers both routes:

1. Edit a copy of a Corti section (recommended starting point).
2. Build a section from scratch (for more customized needs).

It also shows how to preview your output as you work, and how to add the metadata that keeps your library organized.

## Before you begin

In Corti Console, open **Templates** from the sidebar and switch to the **Sections** tab to view your section library. {/* TODO: link to the Console Templates page */} You can also work with sections directly in the template builder while composing a template. See [Build a template](/textgen/console-templates/build-a-template).

<Tip>
  **Sections are shared.** A section can be used in more than one template.
  Editing an existing section changes it everywhere it is used. When you want a
  change to apply in just one place, use **Edit a copy** to create a new,
  independent section instead.
</Tip>

## Edit a copy of a Corti section

Starting from a Corti standard is the quickest way to a working section, and it means you inherit Corti's ongoing improvements.

<Steps>
  <Step title="Open a section">
    You can edit a copy of a section from a few places:

    * From the **Sections** tab, choose **Edit a copy** on a section in the table, or from that section's details page.
    * From the **template builder**, choose **Edit a copy** on a section that is part of a template.

    Either way, **Edit a copy** gives you your own independent section, leaving the original untouched.
  </Step>

  <Step title="Make your changes">
    You can adjust the parts of the section that shape its output:

    * **Heading:** the title used in the generated document. It is also given to the model as context.
    * **Instructions:** the prompts that tell the model what to write. These cover what content to include, the writing style and tone, and any extra guidance. For more on each instruction field, see [Create a Section](/textgen/section-creation). {/* TODO: re-point to the dedicated prompt-engineering guide once it ships */}
    * **Output schema:** controls the shape of the output, from a single paragraph of free text to structured data such as a list or a set of labeled fields. To choose the right shape, see [Designing section output schemas](/textgen/section-schemas).

    <Note>
      **About inherited fields:** Some fields are highlighted in blue. These inherit their values from the Corti section you copied. Leave them as they are to automatically benefit from Corti's ongoing improvements, or override them to set your own value. You can revert an override at any time.

      Overriding a field replaces the inherited value with your own, and that field no longer follows the Corti original. Fields you leave inherited keep reflecting Corti's updates. Learn more about [inheritance](/textgen/inheritance).
    </Note>
  </Step>

  <Step title="Test your output as you go">
    Use the preview pane to see how your changes affect the section's output. Add your own sample data, such as a transcript, then choose **Run** to generate output from the section. Keep editing and re-running to see the effect of each change. {/* TODO: confirm the section builder has a Run/preview pane and the exact label */}

    <Note>
      The preview uses the same generation engine as the documents API, so what you see here is what your integration produces in production.
    </Note>
  </Step>

  <Step title="Save your section">
    When you are happy with the result, save the section to your library. Once saved, you can reference it via the API, add it to any of your templates, and, if you use the Embedded Assistant, make it available to your customers and their end users. See [Assign access to customers](/textgen/console-templates/manage-library#assign-access-to-customers).

    <Note>
      New sections are not visible to Embedded Assistant customers or users until you assign access. By default they are available only to API clients in your project.
    </Note>
  </Step>
</Steps>

## Build a section from scratch

We recommend starting from a Corti standard and adjusting it. Build from scratch when you need something so unique or customized that no Corti standard is a useful starting point.

<Steps>
  <Step title="Start a new section">
    * From the **Sections** tab, select **+ New section** at the top of the page to open the builder for a single section.
    * Or, from the **template builder**, add a brand new section while composing a template.
  </Step>

  <Step title="Define the section">
    Set the **heading**, write the **instructions**, and choose an **output
    schema**. Start simple. A plain text output with clear instructions is often
    all you need, and you can add structure later. For guidance on each, see
    [Create a Section](/textgen/section-creation) and [Designing section output
    schemas](/textgen/section-schemas).
  </Step>

  <Step title="Preview and refine">
    Add sample data and choose **Run** to generate output, just as you would when
    editing a copy. Adjust the heading, instructions, and schema until the output
    matches what you need.
  </Step>

  <Step title="Save your section">
    When the section is ready, choose **Save** to add it to your library. The builder shows all of a section's fields up front, including its name and metadata, so make sure you have filled these in before you save. See [Add metadata to manage your sections](#add-metadata-to-manage-your-sections) below.
  </Step>
</Steps>

## Add metadata to manage your sections

Metadata makes your section easy to find and organize as your library grows.

* **Name and description:** a clear, human-friendly label and summary so you and your team can identify the section at a glance.
* **Properties:** built-in properties such as Languages, Regions, and Specialty record where the section is intended to be used and let you filter your library.
* **Custom properties:** define your own property, give it a name and one or more values (for example a property named Department with the value Cardiology), then filter on it to group related sections.

<Note>
  In the API, custom properties appear as labels, where the property name is the key and each value you enter is one of its values.

  Metadata is for organizing and filtering your library. It is not sent to the model and does not affect the content of generated documents.
</Note>

To filter your library by these properties, see [Manage your templates and sections library](/textgen/console-templates/manage-library).

## What's next

<CardGroup cols={2}>
  <Card title="Build a template" href="/textgen/console-templates/build-a-template">
    Arrange your sections into a complete document.
  </Card>

  <Card title="Manage your library" href="/textgen/console-templates/manage-library">
    Filter your library and assign customer access.
  </Card>

  <Card title="Create a Section" href="/textgen/section-creation">
    Go deeper on writing instructions.
  </Card>

  <Card title="Designing section output schemas" href="/textgen/section-schemas">
    Shape free text or structured output.
  </Card>
</CardGroup>

## FAQ

<AccordionGroup>
  <Accordion title="Does editing a copy change the original Corti section?">
    No. A copy is your own independent section. Corti standards are read-only
    and cannot be changed. Note that any fields you leave inherited (highlighted
    in blue) will continue to reflect Corti's updates to the original.
  </Accordion>

  <Accordion title="I edited a section and it changed one of my other templates. Why?">
    Sections are shared. When a section is used in more than one template,
    editing it changes the output everywhere it is used. To make a change that
    applies in only one place, use **Edit a copy** to create an independent
    section.
  </Accordion>

  <Accordion title="Who can see a section I create?">
    By default, a new section is available only to API clients in your project.
    It is not visible to Embedded Assistant customers or end users until you
    assign access. See [Assign access to
    customers](/textgen/console-templates/manage-library#assign-access-to-customers).
  </Accordion>

  <Accordion title="Do I have to choose an output schema?">
    A section produces free text by default, which works well for narrative
    parts of a note. You only need to define a structured schema when you want
    structured output, such as a list or labeled fields. See [Designing section
    output schemas](/textgen/section-schemas).
  </Accordion>

  <Accordion title="What is the difference between a section and a template?">
    A section is one part of a note, such as Allergies or Plan. A template is
    the full document, made by arranging sections in order. See [Intro to guided
    templates and sections](/textgen/console-templates/get-started).
  </Accordion>
</AccordionGroup>
