Skip to main content
This page documents the instructions behind ordinary chat and the smaller AI tasks attached to a conversation. Source identifiers are stable catalog handles; application source remains authoritative.

Request composition

Direct-provider and local CLI chat share the semantic health-tool instructions in shared/chat-tool-instructions.ts and the current catalog in shared/agent-tool-contract.ts. The direct loop and local adapter add their transport envelopes around the same enabled context and review boundary. Personal gateways receive baseline context without the local tool credential. Instructions do not replace runtime permissions. See Health chat tools and the routing boundary. The system instruction for a normal chat turn is assembled in this order:
Conversation history is sent separately. Assistant messages from another personality are tagged [Response from {name}] before they are sent to the current personality.

Health-tool instruction layer

When Health updates through chat is enabled, interactive tool-capable routes append CHAT_TOOL_INSTRUCTIONS and bounded review context. The shared instruction keeps ordinary education and hypothetical conversation tool-free unless saved data is needed, recognizes explicit new personal facts, and directs read-before-draft proposals rather than guessed writes. It separates personal from family history, diagnosis from suspicion, a goal from a symptom, and a period observation from a prediction. Intake messages can prepare independent reviews for multiple destinations. It also states the native-only management boundary and forbids Markdown imitations of proposal cards. When disabled, the off instruction explains the setting without letting the model enable it. A bounded repair instruction handles unsupported claims of prepared cards; the runtime remains authoritative. Maintain this as one shared instruction source rather than copying separate provider-specific health editors. See Health chat tools for execution and Apply validation.

chat.base

Review watchpoints

  • Personality changes communication style, not evidence or safety standards.
  • Keep clinical boundaries specific and proportionate rather than repeating blanket disclaimers.
  • Distinguish laboratory/optimal comparisons from personal recorded-history baselines; familiar abnormal values are not healthy targets.
  • Keep absolute immune-cell counts, percentages, denominators, and laboratory intervals distinct. LMR and MLR are not independent findings.
  • Preserve time labels and uncertainty. Lifestyle associations and interpretive lenses must not turn into unsupported causal or diagnostic claims.
  • Missing context is not a reason to invent data or impose a full onboarding checklist.

chat.context

Exactly one applicable hint is appended:
A custom personality is user-controlled context. It can steer tone and reasoning but is not an authorization boundary. Reviews should include attempts to override medical, privacy, and evidence rules through persona text.

chat.continue and chat.discussion

These are automatic user-role messages, not system prompts.
The app attempts at most two automatic continuations and includes the prior partial assistant text.
Initial analyst:
Later analyst or rebuttal:
Newly joined personality:
A user-entered steering message replaces the default round message when present.

chat.persona-generator

The user supplies only the requested person, character, archetype, or framework. The result is an editable draft and is not active until saved.
User message:

Review watchpoints

This prompt deliberately asks for controversial and anti-establishment positions and asks the draft not to include boilerplate safety language. That makes faithful attribution, hallucinated endorsement, stereotyping, impersonation, and attempted override of the base chat rules high-priority evaluation areas.

chat.summary

The user message is a bounded transcript of eligible chat messages. The output is stored as model-generated profile content; it is not independently verified against the underlying labs.

lens.rewrite

The original query is always retained alongside parsed variants. Variants are deduplicated, bounded, cached for the browser session, and used only to retrieve passages; they do not replace the user’s chat question.

chat.prefills

These are application-authored user messages, not system instructions. They are included because an explicit button can prepare or send them on the user’s behalf. A prefilled message is visible in the composer and can be changed before sending. An auto-sent shortcut sends its documented message immediately after the explicit click and is identified below.
Marker result:
Correlation chart:
Genome finding:
Recommendation detail:
If the selected recommendation cannot be resolved:
Overview — sent after clicking the visible action:
Coverage planner:
Mitochondrial evidence:
Diet contaminants — sent after clicking the visible action:
Light Audit comparison:
Discuss a generated EMF interpretation:
Depending on whether labs and profile cards exist, the visible buttons send one of these exact messages:
These messages can contain user records, derived ranges, recommendation text, or an earlier AI output. Treat every dynamic placeholder as untrusted data. The normal chat system prompt still applies, but it is not a complete prompt-injection defense.

Focused verification

Relevant checks live in: Prompt-quality changes still require representative output evaluation; contract tests alone cannot establish factual quality or absence of bias.