OHMOHM Studio

Prompts & the Foundation Block

Why your prompt is wrapped, and what you can / can't override.

View as Markdown

Every Studio API has a system prompt that you control. Before it reaches the extraction layer, OHM wraps it with infrastructure-level priors that protect clinical safety.

The wrapper

[OHM CLINICAL FOUNDATION BLOCK]    ← always (default-on)
[USER SCHEMA-AWARENESS BLOCK]      ← auto-derived from your fields
[YOUR SYSTEM PROMPT]               ← fully editable
[SCHEMA]                           ← Zod-derived JSON schema
[TRANSCRIPT BOUNDARY]              ← untrusted-input fence

The Foundation Block

Version-stamped (foundation@v3), read-only in the Prompt tab. Covers:

  • Vital sanity ranges — out-of-range numbers are dropped, not coerced
  • Negation handling"no fever" / "denies chest pain" never shows as a diagnosis
  • Uncertainty markers"probably", "rule out"status: provisional
  • Fahrenheit window rule — naked temperatures ("temp 99", "temperature 101.2") auto-detected as °F (90–110) or °C (33–43)
  • Past-history vs active comorbidity — "known diabetic on Metformin" → both diagnosis (active) and medication (continuing)
  • Named-investigation extraction — every named test (CBC, ECG, CK-MB, 2D Echo, …) lands in the investigation list as a separate entry, even when the result is dictated inline
  • Speaker-neutral — clinician, nurse, resident, intern, student, patient, or family — clinical facts are extracted regardless of role
  • Narrative formatting — HPI / examination / plan emitted as Markdown bullets
  • Catch-all routing — never drops a clinical fact, even when no perfect slot exists

The Foundation Block assumes the transcript is English. The audio.transcribe and audio.extract endpoints run OHM's STT in translate mode, so a Tamil / Hindi / Telugu / Bengali consult comes back in English regardless of the spoken language. Customers calling extract directly with text are responsible for passing English (or near-English code-mix).

Why prepend, not append?

Earlier instructions get more weight. Putting safety priors first means a poorly-written customer prompt can't accidentally undermine them with a contradicting later instruction.

Can I disable it?

Yes — per API, in the Settings tab. You'll need to:

  1. Toggle off "OHM Clinical Foundation Block"
  2. Provide a written reason (audit-logged)

Disabling is intentional friction. The opt-out is for advanced research deployments where you've signed a clinical-safety attestation.

Use with care

Disabling the Foundation Block strips OHM's clinical priors. A buggy custom prompt can yield medically unsafe extractions.

Tuning your prompt

Top tips from real clinics:

  • Be domain-specific. "You are an OPD documentation AI for a multi-specialty clinic in Tamil Nadu" works better than "You are a clinical AI".
  • Show, don't tell. A 3-line example transcript + expected JSON beats a 20-line rule list.
  • Don't repeat the Foundation Block. Vital sanity, negation, code-mix are already enforced.
  • Use the AI assistant. Pick Improve prompt mode and paste your current prompt. The assistant rewrites for clarity and points out edge cases.

Foundation versions

Bumping the foundation version (e.g. v2 → v3) does not break already-published APIs. They keep using the version that was current when they were published. Republish to pick up the latest.

Current latest: foundation@v3 (English-first, speaker-neutral, Fahrenheit window rule, active-comorbidity routing, named-investigation extraction).