Skip to main content
Second Opinion PrePrompts are the suggestion cards shown to users in the Second Opinion feature. They are stored in a separate collection (second_opinion_preprompts) from the main chat preprompts. Each pre-prompt stores:
  • a unique key (used by clients),
  • the publicValue shown in UI suggestion cards,
  • the maskedValue sent to the LLM when user clicks the card,
  • optional description (subtitle text) and tags.

Authentication

Administrative endpoints live under /api/v1/second-opinion/preprompts and are protected by the backendSecretMiddleware. Send either:
or
where BACKEND_SECRET is configured in your environment variables.

Surface area

See the endpoint pages for request bodies, parameter constraints, and example responses pulled directly from the OpenAPI schema.

Quick start

  1. Create suggestion cards via the admin API (requires BACKEND_SECRET).
  2. Surface the public catalog (GET /api/v1/public/second-opinion/preprompts) to end-users.
  3. Render the cards in the Second Opinion UI for users to tap and get instant opinions.
All records persist inside the MongoDB second_opinion_preprompts collection.

Current PrePrompts

The following suggestion cards are currently configured:

Frontend Integration

Front-ends should:
  1. Fetch the public catalog on component mount
  2. Render the publicValue as card titles and description as subtitles
  3. When user taps a card, send maskedValue (or publicValue with emojis stripped) to the Second Opinion API
The maskedValue is intentionally kept separate to allow different text to be sent to the LLM than what’s displayed to users (e.g., removing emojis, adding context).