Personalized Medical Second Opinion GPT
Build Your Own AI Health Assistant
Imagine having access to an assistant that understands your medical history, lab results, medications, and even your genetic risks — and can help you navigate your care options without waiting for an appointment. With the right setup, this kind of personalized medical GPT isn’t hypothetical. It’s something you can create for yourself.
This guide outlines a method for building a medical GPT assistant that integrates structured and unstructured health data, lab reports, genomics, medications, and lifestyle context. It’s the same general approach I used to create a custom GPT that supports ongoing second opinions, updated as new clinical data becomes available.
What Is a Personalized GPT?
In this context, a GPT isn’t just OpenAI’s general language model — it’s a custom version of ChatGPT configured with specific context, documents, and instruction logic to support medical decision-making.
It relies on:
- A structured set of GPT instructions tailored to a patient profile
- A collection of curated health documents (lab results, genomic reports, clinical summaries)
- Optional files such as insurance formulary PDFs or imaging reports
- Lifestyle and preference data that informs suggestions or constraints
The GPT isn’t meant to replace clinical judgment but to provide a consistent, context-aware reference point that can support more informed conversations with healthcare providers.
Step 1: Write the GPT Instructions
The foundation is a well-structured instruction set. It defines what kind of GPT you’re building, who it’s for, and how it should reason across different types of input.
Here’s a simplified template to start from:
You are a Medical Second Opinion GPT. Answer questions based on the medical history, current treatment plan, and clinical context of [Patient Name].Always use [Patient Name] full clinical profile as your source of truth. GPT instructions supersede file attachments.Structure responses around the following:
- Medication schedules by frequency and timing
- Supplement details, grouped by dose and timing
- Chronological lab and imaging summaries
- Pharmacogenomic guidance for medication interactions
- Insurance tier checks for coverage alignmentCurrent Medications (supersedes any conflicting info)Organize medications and supplements in the following hierarchy:
- Daily
- AM dosing: [your medications and dosages]
- PM dosing: [your medications and dosages]
- Weekly: [your medications and dosages]
- Monthly: [your medications and dosages]
- As-needed: [your medications and dosages]Organize supplements by dosing schedule and AM/PM preference for optimal absorption, and lack of side effects.Supplements:
- [your supplements and dosages, and frequency]Previous Ineffective Medications:
- [Any medications that you previously took that you've stopped taking due to it being ineffective for you]Biometric Averages and ranges:
- Heart Rate: XX.X bpm (range data)
- SpO2: XX-XX% avg (range data)
- HRV (SDNN): XX.XX ms (range data)
- BMI: XX.X (range data)
- Weight: XXX lbs (range data)
- Respiratory Rate: XX-XX breaths/min (range data)Consider including things like key body measurements, like hip, chest, stomach, neck, wrist and ankle circumferences, and height can improve responses. While it tends to be found in other documents its ok to add data like date of birth, sex assigned at birth, or any other "fixed" data here as well. Dietary Pattern:
[e.g. vegetarian, gluten free, any food allergies, etc.]Medical Conditions:
[acute conditions with start and end dates][Chronic medical conditions]Always treat [patient name] known conditions as context (e.g., "as [patient] has [chronic condition]"). When suggesting diagnostics or treatments, include options in these categories:
1. Prescription therapies (on/off-label)
2. OTC/supplement alternatives
3. Lifestyle-based interventionsAlways cross-check prescriptions with [PBM/pharmacy coverage Insurance formulary].pdf for tier, prior authorization, or step therapy.
- Suggest alternatives only when a medication is excluded from coverage.
You can also include static information in this file — like current medications, lab norms, known genetic variants, dietary restrictions, or biometric averages — so that the model can refer to them without needing additional files every time.
Step 2: Curate and Prepare Health Data
This step involves assembling the inputs your GPT will need to reason effectively.
Relevant data might include:
- PDF lab reports from Quest, LabCorp, or your health system/doctor
- Genomic/Pharmacogenomics results from ClarityX, 23andMe, or similar
- Imaging reports (MRIs, CTs, scans) use the observations rather than the images themselves
- Medication lists (with specific formularies, dosage, and form)
- Insurance coverage PDFs (e.g., formulary or tier listings)
- Device biometrics (Apple Health, Oura, Withings, etc.)
Label files clearly and bundle similar types together to simplify reference and re-uploading. For example:
Lab_Results_Q1_2024.pdf
Genomic_Report.pdf
Step 3: Reduce File Limitations
GPTs can only handle a limited number of files at a time, and large files may be truncated.
Workarounds include:
- Merging related documents into a single PDF
- Prioritizing summaries over raw exports from your medical provider, or any data source (like Apple Health or Withings)
- Extracting only clinically relevant data fields
To extract useful information from large documents, try prompting ChatGPT with:
“From this lab report, extract: clinically relevant data, including test name, values, reference ranges, flags, and collection date. Organize by date.”
This ensures your GPT isn’t overloaded with unnecessary formatting or data that isn’t clinically useful.
Step 4: Upload and Configure
Add your instructions first, then your curated health PDFs. Follow the instructions to make a GPT to ensure the assistant can reference uploaded files contextually.
Examples of effective prompts:
- “Am I currently taking any medications that conflict with my MTHFR variant?”
- “Compare my [lab value] and [lab value] levels across the last three lab panels.”
- “Does my plan require prior authorization for [medication]? Is there a lower-tier alternative?”
- “How would taking [supplement] affect me? If safe, when would it be most effective to take?”
The GPT should answer only based on your inputs — not general knowledge — unless you explicitly request external context.
Step 5: Add Genomic Context
Pharmacogenomic and health-risk genomics can be incorporated to make your GPT context-aware beyond labs and prescriptions. This infomation could come from a source like 23andMe, ClarityX or similar testing pharmacogenomic provider.
Useful integrations:
- Variant-specific medication guidance (e.g., CYP2C19 and clopidogrel metabolism)
- Risk-based monitoring suggestions (e.g., APOE4 and cognitive screening)
- Supplement modifications (e.g., methylfolate for MTHFR)
These adjustments can create a much more personalized and clinically relevant output.
Step 6: Keep It Current
Your GPT should evolve as your medical history changes. Every time you get new lab results, imaging, or a medication change:
- Update your PDFs (append new data to the top of each file)
- Re-upload to your GPT session
You can ask follow-up prompts like:
- “What’s changed in my lipids since my last test?”
- “Do these new labs suggest I should adjust my supplement stack?”
Treat your GPT like a living record of your care that builds value as more data is added.
It’s Not a Doctor, But It’s Better Than a Search Engine
This setup doesn’t replace your physician or specialist — but it provides a reliable second-opinion system, grounded in your real data. It doesn’t forget what you told it last week, and it doesn’t misread your lab work.
When used correctly, it can help you:
- Prepare better for provider visits
- Avoid unnecessary medications or tests
- Understand genomics and lab data more confidently
- Take a more proactive role in your care
This approach gives you a reliable, repeatable method for creating your own virtual medical second opinion assistant. It’s not for everyone — but for those managing multiple conditions, medications, or complex genomic data, it can be transformative.
Additional Optional Integrations
Insurance Formulary Checks
Upload a full insurance drug list (e.g., OptumRx PDF) and prompt the GPT to:
- Check medication tier
- Identify prior authorization needs
- Suggest lower-cost options
Prompt example:
“Is Ozempic covered under my plan? If not, what’s an alternative that doesn’t require a PA?”
Lifestyle Context
Embedding lifestyle constraints into the instruction file helps ensure recommendations remain usable.
Include:
- Dietary restrictions
- Supplement preferences (e.g., plant-based, no gelatin)
- Injury history or physical limitations
Prompt example:
“Which of my supplements should I take with food in the morning?” “What are safe OTC options for sleep given my current meds and supplement list?”
After creating my medical second opinion GPT, I’ve utilized it in conjunction with regular feedback from my doctors. At my most recent doctor visit, I shared what I’d created and how I’d been using it. My doctor is very open to change, technology, and patient lead healthcare, not only was she interested but she also shared that she’d created a similar system for herself, and had been using it similarly to how I was, for her own health advocacy and journey.
Disclaimer:
This content is for informational and educational purposes only and is not a substitute for professional medical advice, diagnosis, or treatment. Do not upload or share sensitive personal health information with AI tools unless you fully understand and accept the associated privacy risks. Language models like ChatGPT may generate inaccurate or misleading responses (commonly referred to as “hallucinations”), and are not capable of independent medical judgment. Additionally, uploading medical documents to online platforms carries inherent risks of data leakage or unauthorized access. Always consult with a licensed healthcare provider before making any medical decisions based on AI-generated outputs.