Assignment 4
Hello, dear friend, you can consult us at any time if you have any questions, add WeChat: daixieit
Assignment 4
Due: 11pm EST, 4/18/2025
1. LSTM
How many gates does an LSTM have? State what they are and what each gate does (one sentence/gate).
2. BERT
The drug review dataset provides patient reviews on drugs and a positive and negative rating reflecting overall patient satisfaction (https://archive.ics.uci.edu/dataset/461/drug+review+ dataset+druglib+com. The dataset consists of two files: drug review train.csv for training and drug review test .csv for testing. Both files contain plain-text, UTF8-encoded sample set in a tab-separated format with the following columns:
• Text
• Three labels (-1: negative, 0: neutral, 1: positive)
(a) Use DistillBERT to build a classifier.
1 from transformers import AutoTokenizer
2 tokenizer = AutoTokenizer.from_pretrained("distilbert/distilbert-base-uncased " )
|
DistillBERT |
true positive |
false positive |
false negative |
precision |
recall |
F1-score |
|
positive |
|
|
|
|
|
|
|
neutral |
|
|
|
|
|
|
|
negative |
|
|
|
|
|
|
(b) Upload the source codes.
3. Clinical QA
In this section, you will use Generative AI tools to answer the following medical questions from the MedM- CQA dataset:
Question 1: In a female, intraocular metastasis most commonly occurs from which of the following gynae- cological primary?
A) Breast
B) Ovary
C) Cervix
D) Endometrium
Question 2: A research was undertaken by a group of psychiatrists and obstetricians to assess postpartum depression in mothers giving birth to male versus female children according to the Edinburgh depression scale (EPDS). What test should be used to compare the outcomes?
A) Student’s t-test”
B) Paired t-test
C) Chi-square test
D) Pearson’s correlation coefficient
Question 3: A 27-year-old woman comes to the office for counseling prior to conception. She states that a friend recently delivered a newborn with a neural tube defect and she wants to decrease her risk for having a child with this condition. She has no history of major medical illness and takes no medications. Physical examination shows no abnormalities. It is most appropriate to recommend that this patient begin supplementation with a vitamin that is a cofactor in which of the following processes?
A) Biosynthesis of nucleotides
B) Protein gamma glutamate carboxylation
C) Scavenging of free radicals
D) Transketolation
E) Triglyceride lipolysis
(a) Use a Generative AI tool of your choice to answer the medical questions provided above. Prompt the AI tool multiple times, using each of the following prompt engineering strategies:
• Zero-shot
• One-shot
• Chain-of-thought
Record each of your prompts, as well as the corresponding AI response, in the table below:
|
|
Prompt |
Response |
|
Zero-shot |
|
|
|
Few-shot |
|
|
|
Chain-of-thought |
|
|
(b) Which of your three prompts produced the best result? Explain your reasoning.
2025-06-21
Clinical QA