> ## 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.

# Recipe 2 — writingStylePrompt: rules + worked examples

> How to structure and prompt the writingStylePrompt

<Badge className="accent-badge" shape="rounded">Beta</Badge>

← Back to [Prompting & outputSchema Cookbook](/textgen/prompting-cookbook)

## What `writingStylePrompt` does

`writingStylePrompt` controls **writing style style and voice aspects** — tone, register, sentence length, terminology preferences, level of details to include, compress or omit, how to compress. It complements `contentPrompt` (*what* to synthesize) and `outputSchema` (*what shape* and *how* to synthesize).

## Examples served via Corti Standards corpus patterns

<Info>
  We've incorporated some simplistic but very illustrative examples into the writingStylePrompts of Corti Standards. The hope is that you can derive from it a solid structure with clear examples to take forward for your own prompt tuning for more domain- and use-case specific needs.
</Info>

Corti Standard writing styles follow a skeleton that turns the writingStylePrompt into a set of configurable "knobs" for standardization and harmonization.
You can take inspiration, copy & adjust to test the impact of tweaks, or of course apply your own writingStylePrompt approach.

```
<!-- {style_name}_en --> // Note that the naming primarily serves to more easily identify & maintain the writingStylePrompt for Corti Standards

### Voice
Person: ...
Syntax: ...
Sentence length: ...
Redundancy: ...
Compression: ...

### Register
Terminology: ...
Abbreviations: ...
Dates: ...

### Word substitutions
Generalise from all examples to similar cases.
Avoid: {phrasing the model defaults to} — Use: {what you want instead}

### Frequently used words
{frequently used terms or stock phrases}

### Anti-patterns
Generalise to similar cases.
{specific anti-patterns you want to steer against}
Avoid: {anti-pattern the model drifts to} — Use: {what you want instead}

### Example outputs
Generalise to similar cases. These are examples of good phrasings. Never use the content here verbatim, only use it as a basis to generalise the writing style.
"{example output}"
```

<Info>
  **Examples are safer, but leakage can still happen.** The new text-generation pipeline is much more robust to example contamination than Documents Classic, so worked examples are a **powerful** way to teach a writing voice. That said, phrases, names, or facts from an example occasionally surface verbatim in real output. If you see this, remove the example or **disclaim it very clearly** — see [Disclaiming examples](#disclaiming-examples-to-reduce-leakage) below.
</Info>

## Comparison: terse vs narrative

Two writingStyles are broadly used across Corti Standards. While **terse, telegraphic medical notation** sits on one end, the other aims at **fluent narrative prose** on the other.

|                     | **Terse (`terse_and_detailed_medical`)**                                | **Narrative (`comprehensive_and_fluent_medical`)**                                 |
| :------------------ | :---------------------------------------------------------------------- | :--------------------------------------------------------------------------------- |
| **Person**          | Impersonal, subject omitted                                             | Third person, subject included                                                     |
| **Syntax**          | Telegraphic; copula verbs and conjunctions dropped; minimal punctuation | Full sentences; conjunctions retained where natural                                |
| **Sentence length** | Max **15 words**                                                        | Max **20 words**                                                                   |
| **Compression**     | Required, even at the cost of readability                               | Combine related observations with conjunctions — not at the expense of readability |
| **Best for**        | Lists, exam findings, vitals, structured short outputs (most sections)  | HPI, Plan, Assessment, Referral, Interval History, Subjective, Well-child          |

<Tabs>
  <Tab title="Terse — prompt example">
    ```text theme={null}
    ### Voice
    Person: impersonal, subject omitted
    Syntax: telegraphic, copula verbs and conjunctions omitted, minimal punctuation
    Sentence length: max 15 words, always observed
    Redundancy: forbidden, both within and between sentences
    Compression: required

    ### Register
    Terminology: medical terminology throughout, no lay language
    Abbreviations: use standard abbreviations (R, postop, prod.)
    Dates: compact, abbreviated month ("Jun 3"), never fully written out

    ...
    ```
  </Tab>

  <Tab title="Narrative — prompt example">
    ```text theme={null}
    ### Voice
    Person: third person, subject included
    Syntax: full sentences, copula verbs and conjunctions retained where natural
    Sentence length: max 20 words, always observed
    Compression: combine related observations on the same topic with conjunctions rather than short disjointed sentences, not at the expense of readability

    ### Register
    Terminology: medical terminology throughout, no lay language except in direct quotes from the patient
    Abbreviations: use standard abbreviations (R, postop, prod.)
    Dates: compact, abbreviated month ("Jun 3"), never fully written out

    ...
    ```
  </Tab>
</Tabs>

### Same source, different style — output comparison

The same source material (GP transcript sample you can find in Corti Console), generated with the **terse** vs **narrative** writingStyle, side by side for the History of Present Illness and the Assessment Corti Standard sections.

<Tabs>
  <Tab title="HPI">
    | Terse                                                                                                                                                                                                                                                                                                                                                                                | Narrative                                                                                                                                                                                                                                                                                                                                                                                                                                                            |
    | :----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
    | Diarrhoea for 2–3 weeks. Previously normal bowel habit, every 2 days. Stool looser and runnier, color unchanged. Frequency increased to 8 times daily. Nocturnal stools present, disturbing sleep. Blood in stool present. No difficulty flushing. No undigested food. Crampy central abdominal pain, 4/10, preceding defecation, partially relieved afterwards. Worse after eating. | The patient presents with 2–3 weeks of diarrhea, having previously opened her bowels normally once every couple of days. The stool is looser and more frequent, up to eight times daily, with nocturnal bowel motions and visible blood, but no change in colour, no difficulty flushing, and no undigested food. She has crampy central abdominal pain, rated 4/10, occurring mainly before defecation and easing somewhat afterwards, and eating worsens the pain. |
    | 372 chars                                                                                                                                                                                                                                                                                                                                                                            | 452 chars                                                                                                                                                                                                                                                                                                                                                                                                                                                            |
  </Tab>

  <Tab title="Assessment">
    | Terse                                                                                                                                                                                                                                                                                                                                        | Narrative                                                                                                                                                                                                                                                                                                                                                                                                                                                                  |   |
    | :------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | - |
    | Diarrhoea 2–3 weeks with increased frequency, hematochezia, nocturnal stools, crampy abdominal pain pre-defecation partially relieved post-defecation. Stool not difficult to flush. Patient suspects infection. Concern re bowel cancer due to rectal bleeding. Initial assessment for infection with blood tests and stool sample planned. | The patient presents with 2–3 weeks of diarrhoea with increased frequency and rectal bleeding. She reports nocturnal stooling and crampy abdominal pain that occurs before defecation and eases afterwards. She considers infection a possible cause, while bowel cancer is a specific concern because of the bleeding. An aunt had an unspecified abdominal condition that was not cancer. Blood tests and a stool sample were planned initially to assess for infection. |   |
    | 332 chars                                                                                                                                                                                                                                                                                                                                    | 458 chars                                                                                                                                                                                                                                                                                                                                                                                                                                                                  |   |
  </Tab>
</Tabs>

## Alternative example prompting — input/output/explanation triples

When you need to teach a **rewriting transformation** rather than a voice — *"take text in shape A, produce text in shape B"* — you might want to try structure `writingStylePrompt` differently, with explicit `Input` / `Output` / `Explanation` triples. This pattern can be powerful when a single representative input→output→reason carries more signal than a long list of `Avoid / Use` corrections.

Below is an exemplary **History of Present Illness** writingStyle with clearly-demarcated input / output / rationale:

```text theme={null}
### General writing style rules
Produce a concise, fact-focused clinical summary. Retain only observable findings, reported symptoms, concrete history, and essential temporal markers. Exclude subjectivity, emotional framing, interpretation, speculation, causality, and diagnostic framing. Rewrite freely rather than copying source phrasing. Use brief clinical constructions and professional terminology in place of colloquial language when meaning is preserved. Do not use verbatim text, inference verbs, or subjective language.

### Writing style examples
<example_1>
input: |
  The patient reports having had abdominal pain for 3 days.
  The pain started after eating cucumber salad.
  He feels nauseous lying down but not sitting.
  Pain mostly on the right side but also on the left.

output: |
  Abdominal pain for 3 days. Right and left sided.

explanation:
  Keeps only high-yield facts.
</example_1>

<example_2>
input:
  Reports "stomach flu" with vomiting and diarrhea since this morning.

output:
  Reports acute-onset vomiting and diarrhea since this morning.

explanation:
  Avoids colloquial terms; uses professional terms with identical meaning.
</example_2>
```

**Demarcated `input` / `output` / `explanation`** headers make the transformation contract obvious to the model: take *this* kind of source, produce *that* kind of output, for *this* reason. This pattern can be useful when:

* The output shape differs significantly from the input shape (compression, restructuring).
* A single representative input/output pair carries more signal than ten `Avoid / Use` pairs would.
* You're teaching the model *what to drop*, not just *what to substitute*.

## Heading levels — `###` and below for your own styles

<Check>
  **When authoring your own writing styles, start at `###` (H3) and only go deeper if needed.** Do not use `#` or `##`.
</Check>

The system prompt that wraps `writingStylePrompt` at generation time uses H1 and H2 for its own hierarchy. An H1 in your prompt reads as a peer of system-level structure, flattening the hierarchy and diluting instructions that should win.

If you need more than four levels, restructure rather than nest deeper.

## Disclaiming examples to reduce leakage

If an example contains concrete detail that could plausibly appear in real source material (specific names, places, IDs, unusual facts), **prefix the example block with a disclaimer**:

```text theme={null}
[examples]

These examples are *illustrative of writing style only*. The content (names, conditions, identifiers) is fictional and must not appear in any generated output. Use the form, not the facts.

"Mr. Patel, 64M, reports left-sided chest tightness …"
```

For a single risky example among generic ones, disclaim inline:

```text theme={null}
"(Illustrative — fictional content. Do not reuse the name, date, or identifying details.) Mr. Patel, 64M, reports left-sided chest tightness …"
```

The same approach works for the alternative input/output/explanation pattern — prefix `### Writing style examples` or disclaim a single `#### Input` triple inline.

Rules of thumb:

1. **Strip identifying detail where you can.** Lowest-leakage examples use generic phrasing (`"The patient reports …"`, `[age]-year-old`, `Mr. X`). Only reach for a realistic-looking example when the generic version doesn't teach the rule.
2. **Evaluate, then tighten.** Run a leakage check after deploying a writingStyle change. If a phrase from an example surfaces across generations, remove or rewrite that example.

## Anti-patterns

* **Don't put *"what to write about"* rules here** — that's `contentPrompt` ([Recipe 1](/textgen/prompting-cookbook/recipe-1-content-prompt)).
* **Don't put structured edge-case fallbacks here** — that's `miscPrompt` ([Recipe 2](/textgen/prompting-cookbook/recipe-2-misc-prompt)). *"If the patient has no allergies, output NKDA"* is a fallback rule, not a voice rule.
* **Don't paste real PHI** — keep examples obviously synthetic.
* **Don't use H1 or H2 markdown structure** — see above.
* **Don't write 20-rule Voice paragraphs.** If your `## Voice` + `## Register` rules exceed \~8 short sentences each, split into two writing styles or move some rules to `miscPrompt` or relevant `outputSchema` descriptions.
* **Don't reinvent the four corpus styles when one fits.** If you need terse medical, comprehensive medical, patient-facing, or mental-health-experiential, start from the corresponding Standard and inherit, then tweak as the need arises.

## Related

* [Recipe 1 — contentPrompt](/textgen/prompting-cookbook/recipe-1-content-prompt) — what to write about.
* [Recipe 3 — miscPrompt](/textgen/prompting-cookbook/recipe-3-misc-prompt) — fall-back guardrails.
* [Corti Standards](/textgen/corti-standards) — sections (and their writing styles) in original context.
