Skip to main content

Document Generation: Section Level Overrides Best Practices

Updated yesterday

When generating documents with the Corti API, section-level overrides allow you to customize how each part of a document is generated. Using this functionality, you can override the content guidance, writing style, instructions, and even the section title for individual sections within a document template.

This approach is especially useful when you want to:

  • Adapt a clinical template for a different audience (e.g., clinician → patient)

  • Generate multiple document types from the same transcript

  • Adjust tone, structure, or instructions for specific use cases

If you haven’t already reviewed the basics of document generation, see:
➡️ How to Generate Documents Using Corti’s API


Why Section Overrides Are Powerful

Corti document templates already include structured clinical sections. See our API documentation here for a full list of the Corti standard sections.

With section overrides, you can modify how each of these sections behaves during generation by controlling:

Override Type

Purpose

nameOverride

to return a different section name (title), e.g. Subjective -> Anamnesis

writingStyleOverride

to prompt how the writing style should be, e.g. telegraphic, laymen, etc

formatRuleOverride

to prompt format, e.g. bullets, subheadings, etc

additionalInstructionsOverride

to prompt with additional instructions or context

contentOverride

controls what input content (facts) get assigned this section, and guides content 1

This makes it possible to reuse the same template while generating entirely different outputs depending on use case.


Best Practices for Section Overrides

1. Prevent Contradictions in Your Prompts

One of the most common issues when using overrides is contradicting instructions across fields.

For example:

Conflicting Instruction

contentOverride: "Include detailed lab results"
additionalInstructionsOverride: "Do not include lab values"

Conflicting instructions can reduce output quality or lead to inconsistent results.

Best Practice

Ensure all override fields reinforce the same instruction set.

Think of the fields as layers:

  1. Content guidance

  2. Style guidance

  3. Detailed generation instructions

When these align, the model performs significantly better.

2. Use the Correct Override Field for the Right Type of Instruction

Each override exists for a specific purpose. For example, common mistake is prompting writing style, formatting, and content instructions into additionalInstructionsOverride.

This can make prompts harder for the model to interpret.

Not Recommended

additionalInstructionsOverride:
"Write in a friendly tone, use numbered steps, avoid jargon,
include medications, and format the output clearly."

This mixes tone, formatting, and content instructions into one field.

Recommended Approach

contentOverride:
"Include medications, dosage instructions, and home care tasks."

writingStyleOverride:
"Plain language, numbered steps, action-oriented."

additionalInstructionsOverride:
"Provide instructions the pet owner can follow at home."

Separating responsibilities between fields improves clarity and model performance.

3. Be Explicit in Your Instructions

We often say that working with AI prompting is at times like talking with children (trust me, we have a few Corti kiddos here). Be very direct in your instruction. The model performs best when instructions clearly define:

  • What to include

  • What to exclude

  • Desired tone

  • Expected format

Vague Instruction

Write a summary of the visit

Explicit Instruction

Include the presenting complaint, symptom duration, and relevant history.
Exclude lab values and technical medical terminology.
Write 2–3 sentences in plain language suitable for a pet owner.

Clear constraints dramatically improve reliability.


Example: Custom SOAP + Client Summary Documents

One of our team members used the Corti API to build a demo app for vetrinary purposes. Below is an example of how they used section overrides to generate a client-facing summary using the SOAP sections as starting points.

'soap-note': {
templateKey: 'corti-soap',
},

'client-summary': {
sections: [
{
key: 'corti-subjective',
nameOverride: 'Visit Overview',
contentOverride: 'Include: reason for visit, presenting complaint, relevant history, patient signalment. Exclude: detailed physical exam findings, lab values, technical medical terms.',
writingStyleOverride: 'Warm, clear, plain language suitable for pet owners. Avoid medical jargon.',
additionalInstructionsOverride: `Write a brief, friendly summary of why the pet was brought in today.
IMPORTANT: Use ONLY the facts provided. Do NOT invent or assume symptoms.
2-3 sentences. Use language a pet owner would understand.`,
},
{
key: 'corti-assessment',
nameOverride: 'What We Found',
contentOverride: 'Include: diagnosis or working diagnosis, key exam findings explained simply, test results in plain language.',
writingStyleOverride: 'Reassuring, clear, plain language for pet owners',
additionalInstructionsOverride: `Explain the findings and diagnosis in pet-owner-friendly language.`,
},
{
key: 'corti-plan',
nameOverride: 'Care Instructions',
contentOverride: 'Include: medications with simple dosing instructions, home care tasks, dietary changes, activity restrictions.',
writingStyleOverride: 'Action-oriented, numbered steps, plain language',
additionalInstructionsOverride: `Provide clear home care instructions the pet owner can follow.`,
},
],
}

Why This Example Works Well

1. Each Section Aligns With the SOAP Structure

The overrides map clearly to the underlying clinical structure:

Section

Purpose

Subjective

Visit overview and presenting complaint

Assessment

Findings and diagnosis

Plan

Treatment instructions and follow-up care

This keeps the clinical reasoning intact while adapting the output for a non-clinical audience.

2. The Overrides Separate Responsibilities Clearly

Each override field serves a distinct purpose.

nameOverride

nameOverride: 'Visit Overview'

Changes the section heading to be more user-friendly for pet owners.

contentOverride

Include: reason for visit, presenting complaint, relevant history
Exclude: detailed exam findings

Defines what information belongs in the section, helping prevent content overlap between sections.

writingStyleOverride

Warm, clear, plain language suitable for pet owners

Controls tone and readability, ensuring the document matches the intended audience.

additionalInstructionsOverride

Write a brief, friendly summary...
Use ONLY the facts provided.
2-3 sentences.

Provides specific behavioral instructions, including output lengt, factual grounding, and phrasing guidance

3. The Instructions Are Explicit and Constrained

The example clearly defines:

  • What to include

  • What to exclude

  • Who the audience is

  • Desired output format

These constraints help produce consistent and reliable documents.


Summary

Section-level overrides allow you to:

  • Customize section level and document behavior

  • Control tone, structure, and instructions per section

When designing overrides:

✔ Avoid contradictory instructions
✔ Use each override field for its intended purpose
✔ Be explicit about what to include and exclude
✔ Store and reuse overrides across generation calls

Used correctly, section overrides provide fine-grained control over document generation while preserving the reliability of Corti’s structured templates.

Did this answer your question?