Use cases

The clinical tasks Olive is built for, what each request carries, and what to check before the output is used.

Each use case is one chat completion. The system prompt and the output format change from one to the next.

Use caseThe request carriesCheck before use
Differential diagnosis supportThe presenting complaint, history, and observationsRed flags Olive did not raise. A plausible ranking can still be wrong.
Grounded clinical Q&AThe guideline text in the user message, and an instruction to answer only from it and to say when it does not cover the questionEvery claim against the source text
Clinical documentationThe encounter note, and the sections you want in the system promptOmissions. A finding Olive does not mention does not appear.
Medical codingThe encounter text, and a request for JSON in the promptEach code against the current code set, before billing
Medication reviewThe medication list and patient contextInteractions and dosing against your formulary and the patient record. Olive sees only what you send.
Patient communicationThe clinical explanation, and the reading level in the system promptThe rewrite against the source. Simplifying can drop a caveat.

For structured output, see Structured outputs.

Before this reaches a patient

Olive supports clinical work. It does not replace clinical judgement. A qualified clinician reviews every output that affects care before it is acted on.

Differential diagnosis support

The ranking comes with the reasoning behind it. Read reasoning_content with the answer to see which features drove the ranking. See Reasoning.

Grounded clinical Q&A

Pass the source text in the user message. In the system prompt, tell the model to answer only from that text, and to say when the text does not answer the question. Answers then trace back to a document you chose.

Clinical documentation

Fix the section list in the system prompt. The output keeps the same shape from one encounter to the next, so it fits a chart or a template.

Medical coding

Ask for the codes as JSON in the prompt, then validate them in code before you route them. See Structured outputs.

Medication review

Add a severity field with the values high, moderate, and low to each item. You can then sort and triage the list instead of reading it top to bottom.

Patient communication

Name the reading level in the system prompt. "Simple language" means something different to each reader.

Example: differential diagnosis

The other use cases change only the system prompt and the output format. This example is runnable as written, with your key set in the environment.

import os
from openai import OpenAI

client = OpenAI(
    base_url="https://api.avey.ai/llm",
    api_key=os.environ["AVEY_API_KEY"],
)

response = client.chat.completions.create(
    model="olive",
    messages=[
        {
            "role": "system",
            "content": "You are supporting a clinician. Give a ranked differential "
                       "with the discriminating features for each entry.",
        },
        {
            "role": "user",
            "content": (
                "58-year-old man. Three weeks of exertional chest tightness relieved "
                "by rest. Smoker, hypertensive. BP 148/92, HR 78, ECG normal at rest."
            ),
        },
    ],
)

message = response.choices[0].message
print(message.reasoning_content)  # how Olive weighed the possibilities
print(message.content)              # the ranked differential
Last updated