> ## 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 3 — miscPrompt: the defensive guardrail

> When and how to use miscPrompt as a fall-back to tighten repeated model misbehaviour that contentPrompt or outputSchema cannot prevent.

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

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

## What `miscPrompt` is for

`miscPrompt` is the **fall-back lever** in the `instructions` block. Reach for it after `contentPrompt` and `outputSchema` are pulling their weight — only to tighten **repeated misbehaviour** the other two can't cleanly prevent.

<Tip>
  **Most sections don't need one.** Only a small subset of Corti Standards populate `miscPrompt`. If you can express the rule via `contentPrompt` Include/Exclude or as a (typed) constraint on `outputSchema`, do that first.
</Tip>

Categories where miscPrompt can be useful:

1. **Edge-case fallbacks** — what to write when the natural case isn't in the source.
2. **Vocabulary** — locking the model to fixed abbreviations, units, phrasings, or relevant vocabulary.
3. **Defensive grounding** — *"do not include suspected"* /  *"do not infer"* /  *"only when explicitly mentioned in the source material"* rules for sections where this extra critical to constrain the model from applying its intelligence.

## Examples from Corti Standards

### Edge-case fallback — Allergies

> `miscPrompt`: For a documented allergen with no described reaction, set the reaction to `: not specified`. If the patient has no known allergies, output `NKDA` with an empty reaction. Do not add allergies, intolerances, or reactions not explicitly stated in the source.

Three rules, all "fallback when the natural case is absent". Adds extra robustness in combination with the prompting in `outputSchema` paired with the Allergies section's array-of-objects schema `{ allergen, reaction }`.

```
"outputSchema": {
      "type": "array",
      "description": "Open-ended set of allergy or intolerance entries, one per substance documented in the source material.",
      "itemFormat": "{item}\n",
      "items": {
        "type": "object",
        "description": "One allergy or intolerance entry.",
        "fieldFormat": "{allergen}{reaction}",
        "fields": [
          {
            "key": "allergen",
            "description": "Name of the allergen or substance the patient does not tolerate.",
            "value": {
              "type": "string"
            }
          },
          {
            "key": "reaction",
            "description": "Reaction detail with a leading ': ', e.g. ': rash' or ': anaphylaxis'. For a documented allergen with no described reaction, use ': not specified'. Leave empty for no known allergies (NKDA).",
            "value": {
              "type": "string"
            }
          }
        ]
      }
```

<Note>
  Why not use `default`s here? The `default` is output when the model does not generate anything. In the `{reaction}` field case, we would need 2 different `default`s: one that is an empty string when allergies are explicitly negated (**NKA**) vs one where an allergy was mentioned but the reaction is **not specified**. `miscPrompt` handles these in the absence of conditional `default`s.
</Note>

### Vocabulary normalization — Medications & Actions-and-Plan

> `miscPrompt`: Always use the following route abbreviations when the route is explicitly stated: **PO** for per os (by mouth), **IV** for intravenous, **IM** for intramuscular, **SC** for subcutaneous, **SL** for sublingual, **PR** for per rectum, **ID** for intradermal, **NG** for nasogastric, **INH** for inhalation, and **TOP** for topical use. Always use the following frequency phrasings when the frequency is explicitly stated: **once daily, twice daily, three times daily, four times daily, every morning, every evening, at bedtime, every other day, every N hours, as needed (PRN), …** Normalize route and frequency to these standardized terms instead of copying the source wording verbatim.

The two-list pattern. You *could* split each list as `enum` on a per-field schema, but enumerating in `miscPrompt` is more readable, easier to extend, and handles composite cases (route + frequency together) easily.

### Defensive grounding — Past Surgical History

> `miscPrompt`: **Omit suspected, uncertain, planned, or merely considered procedures.** Do not include the indication or outcome unless the source includes it as part of the procedure name itself.

Tight prohibition list. The model has a prior to medicalize and infer — `miscPrompt` is where you push back when that prior fires too often. Past Medical History uses the analogous *"Omit suspected or uncertain diagnoses. Do not include treatments or negative findings."*

The same pattern shows up in Prescription (*"Do not include a medication here if the clinician has merely mentioned or considered it without issuing a prescription"*).

## When **not** to use `miscPrompt`

* **`contentPrompt` Include/Exclude already covers it** — don't restate.
* **`outputSchema` can express it more strictly** — prefer the schema. Typed `enum` is enforced; prose *"use one of: …"* is only steered.
* **Tone or sentence-shape (in general)** — that's writingStyle ([Recipe 3](/textgen/prompting-cookbook/recipe-3-writing-style)). The Referral example above is borderline — sentence-count budgets are layout, not voice.
* **As a dumping ground** — long multi-paragraph `miscPrompt`s compete with `contentPrompt` for attention. Keep each rule to one or two sentences. The Medications vocabulary lists are at the upper bound of acceptable length.

## Related

* [Recipe 1 — contentPrompt](/textgen/prompting-cookbook/recipe-1-content-prompt) — positive scope.
* [Recipe 2 — writingStylePrompt](/textgen/prompting-cookbook/recipe-2-writing-style) — tone and shape.
* [Section Schemas — `enum` & `pattern`](/textgen/section-schemas) — typed constraints that beat prose.
