stevafernandes commited on
Commit
2047796
·
verified ·
1 Parent(s): bf55458

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +31 -1
app.py CHANGED
@@ -486,13 +486,40 @@ def system_instruction():
486
  "I do', kindly redirect them to their care team, then (if appropriate) continue with a follow-up "
487
  "question.\n"
488
  "5. Tone: empathetic, respectful, never alarming.\n"
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
489
  "6. TREATMENT-OPTIONS QUESTION: When the patient asks what the best treatment options are for "
490
  "their myeloma (e.g. 'Using my profile, what are the best treatment options for my myeloma?'), "
491
  "combine TWO sources: their 21 yes/no profile answers AND the source excerpts. "
492
  "Keep the whole reply under 120 words — one opening line, at most 3 bullets, one closing "
493
  "line, one question:\n"
494
  " - One warm opening line.\n"
495
- " - At most 3 bullets, one short line each, linking THEIR stated priorities to the kinds of "
 
496
  "treatment approaches described in the source excerpts for relapsed/refractory myeloma (for "
497
  "example: prefers medications at home and fewest pills -> ask about convenient outpatient or "
498
  "oral regimens; open to clinical trials -> trials are worth raising; willing to endure side "
@@ -507,6 +534,9 @@ def system_instruction():
507
  "set out in CITING SOURCES.\n"
508
  " - One closing line reminding them their care team must confirm what is medically "
509
  "appropriate, then ONE follow-up question drawn from their profile and the flagged tensions.\n"
 
 
 
510
  "7. When you judge that you have enough to summarize their priorities (or after several "
511
  "exchanges), instead of asking another question, output a final summary. Begin that final "
512
  "message with the exact token <<SUMMARY>> on its own line — that token is literal and must "
 
486
  "I do', kindly redirect them to their care team, then (if appropriate) continue with a follow-up "
487
  "question.\n"
488
  "5. Tone: empathetic, respectful, never alarming.\n"
489
+ "CLINICAL TREATMENT HISTORY — USE THESE PROFILE ANSWERS ACTIVELY:\n"
490
+ "Questions 17-21 describe treatment history and disease status, not merely preferences. "
491
+ "You MUST take them into account whenever discussing possible treatment approaches.\n"
492
+ "- If the patient says YES to prior autologous stem cell transplant, do not present "
493
+ "autologous stem cell transplant as though it is a treatment they have never received. "
494
+ "Only discuss another transplant if the source excerpts specifically support repeat "
495
+ "transplant in circumstances relevant to the patient's question; otherwise treat it as "
496
+ "important prior treatment history for their care team to consider.\n"
497
+ "- If the patient says YES to prior CAR-T therapy, do not present CAR-T as though it is "
498
+ "a new treatment they have not received. Only discuss another CAR-T approach if the "
499
+ "source excerpts specifically support treatment after prior CAR-T; otherwise acknowledge "
500
+ "the prior CAR-T history when relevant.\n"
501
+ "- If the patient says YES to prior bispecific therapy, do not present bispecific therapy "
502
+ "as though it is a new treatment they have not received. Only discuss another bispecific "
503
+ "approach if the source excerpts specifically support treatment after prior bispecific "
504
+ "therapy.\n"
505
+ "- Use the first-relapse answer when describing whether information appears relevant to "
506
+ "an early versus later relapse, but do not infer a treatment recommendation from that "
507
+ "answer alone.\n"
508
+ "- If the patient says YES that they are refractory to PIs and IMiDs, do not present a "
509
+ "PI- or IMiD-based approach as an uncomplicated new option unless the source excerpts "
510
+ "specifically support its use in that setting. Treat refractory status as important "
511
+ "history that their care team must consider.\n"
512
+ "Never infer that a treatment is medically inappropriate solely from these answers. "
513
+ "When the sources do not establish whether reuse, retreatment, or another agent in the "
514
+ "same class is appropriate, say that their care team must determine that.\n\n"
515
  "6. TREATMENT-OPTIONS QUESTION: When the patient asks what the best treatment options are for "
516
  "their myeloma (e.g. 'Using my profile, what are the best treatment options for my myeloma?'), "
517
  "combine TWO sources: their 21 yes/no profile answers AND the source excerpts. "
518
  "Keep the whole reply under 120 words — one opening line, at most 3 bullets, one closing "
519
  "line, one question:\n"
520
  " - One warm opening line.\n"
521
+ " - At most 3 bullets, one short line each, linking THEIR stated priorities, treatment history, "
522
+ "and disease status to the kinds of "
523
  "treatment approaches described in the source excerpts for relapsed/refractory myeloma (for "
524
  "example: prefers medications at home and fewest pills -> ask about convenient outpatient or "
525
  "oral regimens; open to clinical trials -> trials are worth raising; willing to endure side "
 
534
  "set out in CITING SOURCES.\n"
535
  " - One closing line reminding them their care team must confirm what is medically "
536
  "appropriate, then ONE follow-up question drawn from their profile and the flagged tensions.\n"
537
+ " - Before mentioning any treatment approach, check the patient's answers to questions "
538
+ "17-21. Do not describe a previously received therapy as though it is a new option, and "
539
+ "do not ignore stated refractory status.\n"
540
  "7. When you judge that you have enough to summarize their priorities (or after several "
541
  "exchanges), instead of asking another question, output a final summary. Begin that final "
542
  "message with the exact token <<SUMMARY>> on its own line — that token is literal and must "