|
a |
|
b/notebooks/inference_adapter.ipynb |
|
|
1 |
{ |
|
|
2 |
"cells": [ |
|
|
3 |
{ |
|
|
4 |
"cell_type": "code", |
|
|
5 |
"execution_count": 1, |
|
|
6 |
"id": "3e433e60-1bee-40b9-bc8a-57524a8a7329", |
|
|
7 |
"metadata": { |
|
|
8 |
"tags": [] |
|
|
9 |
}, |
|
|
10 |
"outputs": [ |
|
|
11 |
{ |
|
|
12 |
"name": "stderr", |
|
|
13 |
"output_type": "stream", |
|
|
14 |
"text": [ |
|
|
15 |
"/hpc/group/aipi591-f23/ak704/miniconda3/envs/new/lib/python3.10/site-packages/tqdm/auto.py:21: TqdmWarning: IProgress not found. Please update jupyter and ipywidgets. See https://ipywidgets.readthedocs.io/en/stable/user_install.html\n", |
|
|
16 |
" from .autonotebook import tqdm as notebook_tqdm\n" |
|
|
17 |
] |
|
|
18 |
} |
|
|
19 |
], |
|
|
20 |
"source": [ |
|
|
21 |
"import json\n", |
|
|
22 |
"import sys\n", |
|
|
23 |
"import time\n", |
|
|
24 |
"from pathlib import Path\n", |
|
|
25 |
"from typing import Literal, Optional\n", |
|
|
26 |
"\n", |
|
|
27 |
"import lightning as L\n", |
|
|
28 |
"import torch\n", |
|
|
29 |
"from lightning.fabric.plugins import BitsandbytesPrecision\n", |
|
|
30 |
"from lightning.fabric.strategies import FSDPStrategy\n", |
|
|
31 |
"\n", |
|
|
32 |
"import os\n", |
|
|
33 |
"## Add the lit_gpt folder to the path\n", |
|
|
34 |
"sys.path.insert(0, os.path.abspath('../'))\n", |
|
|
35 |
"\n", |
|
|
36 |
"from generate.base import generate\n", |
|
|
37 |
"from lit_gpt import Tokenizer\n", |
|
|
38 |
"from lit_gpt.adapter_v2 import GPT, Block, Config\n", |
|
|
39 |
"from lit_gpt.utils import check_valid_checkpoint_dir, get_default_supported_precision, gptq_quantization, lazy_load\n", |
|
|
40 |
"from scripts.prepare_entity_extraction_data import generate_prompt" |
|
|
41 |
] |
|
|
42 |
}, |
|
|
43 |
{ |
|
|
44 |
"cell_type": "code", |
|
|
45 |
"execution_count": 2, |
|
|
46 |
"id": "7ac87e9a-6846-4f84-9c02-27f46fa417ce", |
|
|
47 |
"metadata": { |
|
|
48 |
"tags": [] |
|
|
49 |
}, |
|
|
50 |
"outputs": [], |
|
|
51 |
"source": [ |
|
|
52 |
"torch.set_float32_matmul_precision(\"high\")" |
|
|
53 |
] |
|
|
54 |
}, |
|
|
55 |
{ |
|
|
56 |
"cell_type": "code", |
|
|
57 |
"execution_count": 3, |
|
|
58 |
"id": "e6eec0b2-81d9-4a88-b20c-0be57ec6b2a2", |
|
|
59 |
"metadata": {}, |
|
|
60 |
"outputs": [], |
|
|
61 |
"source": [ |
|
|
62 |
"with open('..data/entity_extraction/entity-extraction-test-data.json', 'r') as file:\n", |
|
|
63 |
" test_data = json.load(file)" |
|
|
64 |
] |
|
|
65 |
}, |
|
|
66 |
{ |
|
|
67 |
"cell_type": "code", |
|
|
68 |
"execution_count": 4, |
|
|
69 |
"id": "4d92ad07", |
|
|
70 |
"metadata": {}, |
|
|
71 |
"outputs": [], |
|
|
72 |
"source": [ |
|
|
73 |
"sample = {\n", |
|
|
74 |
" \"input\": \"Natalie Cooper,\\nncooper@example.com\\n6789 Birch Street, Denver, CO 80203,\\n303-555-6543, United States\\n\\nRelationship to XYZ Pharma Inc.: Patient\\nReason for contacting: Adverse Event\\n\\nMessage: Hi, after starting Abilify for bipolar I disorder, I've noticed that I am experiencing nausea and vomiting. Are these typical reactions? Best, Natalie Cooper\",\n", |
|
|
75 |
" \"output\": \"{\\\"drug_name\\\": \\\"Abilify\\\", \\\"adverse_events\\\": [\\\"nausea\\\", \\\"vomiting\\\"]}\"\n", |
|
|
76 |
" }" |
|
|
77 |
] |
|
|
78 |
}, |
|
|
79 |
{ |
|
|
80 |
"cell_type": "code", |
|
|
81 |
"execution_count": 5, |
|
|
82 |
"id": "c7e65d14-07f2-4889-849f-277df3887c76", |
|
|
83 |
"metadata": {}, |
|
|
84 |
"outputs": [], |
|
|
85 |
"source": [ |
|
|
86 |
"## Choose one\n", |
|
|
87 |
"model_type = 'stablelm'\n", |
|
|
88 |
"#model_type = 'llama2'" |
|
|
89 |
] |
|
|
90 |
}, |
|
|
91 |
{ |
|
|
92 |
"cell_type": "code", |
|
|
93 |
"execution_count": 8, |
|
|
94 |
"id": "e3c30b09-e631-44b8-a45b-ac79dbbab52f", |
|
|
95 |
"metadata": { |
|
|
96 |
"tags": [] |
|
|
97 |
}, |
|
|
98 |
"outputs": [ |
|
|
99 |
{ |
|
|
100 |
"name": "stdout", |
|
|
101 |
"output_type": "stream", |
|
|
102 |
"text": [ |
|
|
103 |
"StableLM 3B\n" |
|
|
104 |
] |
|
|
105 |
} |
|
|
106 |
], |
|
|
107 |
"source": [ |
|
|
108 |
"input: str = sample[\"input\"]\n", |
|
|
109 |
"if model_type == \"stablelm\":\n", |
|
|
110 |
" print(\"[INFO] Using StableLM-3B Adapter Fine-tuned\")\n", |
|
|
111 |
" adapter_path: Path = Path(\"../out/adapter_v2/Stable-LM/entity_extraction/lit_model_adapter_finetuned.pth\")\n", |
|
|
112 |
" checkpoint_dir: Path = Path(\"../checkpoints/stabilityai/stablelm-base-alpha-3b\")\n", |
|
|
113 |
" predictions_file_name = '../data/predictions-stablelm-adapter.json'\n", |
|
|
114 |
"\n", |
|
|
115 |
"if model_type == \"llama2\":\n", |
|
|
116 |
" print(\"[INFO] Using LLaMa-2-7B Adapter Fine-tuned\")\n", |
|
|
117 |
" adapter_path: Path = Path(\"../out/adapter_v2/Llama-2/entity_extraction/lit_model_adapter_finetuned.pth\")\n", |
|
|
118 |
" checkpoint_dir: Path = Path(\"../checkpoints/meta-llama/Llama-2-7b-hf\")\n", |
|
|
119 |
" predictions_file_name = '../data/predictions-llama2-adapter.json'\n", |
|
|
120 |
"\n", |
|
|
121 |
"quantize: Optional[Literal[\"bnb.nf4\", \"bnb.nf4-dq\", \"bnb.fp4\", \"bnb.fp4-dq\", \"bnb.int8\", \"gptq.int4\"]] = None\n", |
|
|
122 |
"max_new_tokens: int = 100\n", |
|
|
123 |
"top_k: int = 200\n", |
|
|
124 |
"temperature: float = 0.1\n", |
|
|
125 |
"strategy: str = \"auto\"\n", |
|
|
126 |
"devices: int = 1\n", |
|
|
127 |
"precision: Optional[str] = None" |
|
|
128 |
] |
|
|
129 |
}, |
|
|
130 |
{ |
|
|
131 |
"cell_type": "code", |
|
|
132 |
"execution_count": 9, |
|
|
133 |
"id": "b842b257-2c9c-4c64-b011-f97e215c3794", |
|
|
134 |
"metadata": {}, |
|
|
135 |
"outputs": [ |
|
|
136 |
{ |
|
|
137 |
"name": "stderr", |
|
|
138 |
"output_type": "stream", |
|
|
139 |
"text": [ |
|
|
140 |
"Loading model 'checkpoints/stabilityai/stablelm-base-alpha-3b/lit_model.pth' with {'name': 'stablelm-base-alpha-3b', 'hf_config': {'org': 'stabilityai', 'name': 'stablelm-base-alpha-3b'}, 'block_size': 4096, 'vocab_size': 50254, 'padding_multiple': 512, 'padded_vocab_size': 50688, 'n_layer': 16, 'n_head': 32, 'n_embd': 4096, 'rotary_percentage': 0.25, 'parallel_residual': True, 'bias': True, 'lm_head_bias': False, 'n_query_groups': 32, 'shared_attention_norm': False, '_norm_class': 'LayerNorm', 'norm_eps': 1e-05, '_mlp_class': 'GptNeoxMLP', 'gelu_approximate': 'none', 'intermediate_size': 16384, 'rope_condense_ratio': 1, 'rope_base': 10000, 'adapter_prompt_length': 10, 'adapter_start_layer': 2, 'head_size': 128, 'rope_n_elem': 32}\n", |
|
|
141 |
"Time to instantiate model: 0.07 seconds.\n", |
|
|
142 |
"Time to load the model weights: 47.84 seconds.\n" |
|
|
143 |
] |
|
|
144 |
} |
|
|
145 |
], |
|
|
146 |
"source": [ |
|
|
147 |
"if strategy == \"fsdp\":\n", |
|
|
148 |
" strategy = FSDPStrategy(auto_wrap_policy={Block}, cpu_offload=False)\n", |
|
|
149 |
"fabric = L.Fabric(devices=devices, precision=precision, strategy=strategy)\n", |
|
|
150 |
"fabric.launch()\n", |
|
|
151 |
"\n", |
|
|
152 |
"check_valid_checkpoint_dir(checkpoint_dir)\n", |
|
|
153 |
"\n", |
|
|
154 |
"config = Config.from_json(checkpoint_dir / \"lit_config.json\")\n", |
|
|
155 |
"\n", |
|
|
156 |
"if quantize is not None and devices > 1:\n", |
|
|
157 |
" raise NotImplementedError\n", |
|
|
158 |
"if quantize == \"gptq.int4\":\n", |
|
|
159 |
" model_file = \"lit_model_gptq.4bit.pth\"\n", |
|
|
160 |
" if not (checkpoint_dir / model_file).is_file():\n", |
|
|
161 |
" raise ValueError(\"Please run `python quantize/gptq.py` first\")\n", |
|
|
162 |
"else:\n", |
|
|
163 |
" model_file = \"lit_model.pth\"\n", |
|
|
164 |
"checkpoint_path = checkpoint_dir / model_file\n", |
|
|
165 |
"\n", |
|
|
166 |
"tokenizer = Tokenizer(checkpoint_dir)\n", |
|
|
167 |
"prompt = generate_prompt(sample)\n", |
|
|
168 |
"encoded = tokenizer.encode(prompt, device=fabric.device)\n", |
|
|
169 |
"prompt_length = encoded.size(0)\n", |
|
|
170 |
"max_returned_tokens = prompt_length + max_new_tokens\n", |
|
|
171 |
"\n", |
|
|
172 |
"fabric.print(f\"Loading model {str(checkpoint_path)!r} with {config.__dict__}\", file=sys.stderr)\n", |
|
|
173 |
"t0 = time.perf_counter()\n", |
|
|
174 |
"with fabric.init_module(empty_init=True), gptq_quantization(quantize == \"gptq.int4\"):\n", |
|
|
175 |
" model = GPT(config)\n", |
|
|
176 |
"fabric.print(f\"Time to instantiate model: {time.perf_counter() - t0:.02f} seconds.\", file=sys.stderr)\n", |
|
|
177 |
"with fabric.init_tensor():\n", |
|
|
178 |
" # set the max_seq_length to limit the memory usage to what we need\n", |
|
|
179 |
" model.max_seq_length = max_returned_tokens\n", |
|
|
180 |
" # enable the kv cache\n", |
|
|
181 |
" model.set_kv_cache(batch_size=1)\n", |
|
|
182 |
"model.eval()\n", |
|
|
183 |
"\n", |
|
|
184 |
"t0 = time.perf_counter()\n", |
|
|
185 |
"checkpoint = lazy_load(checkpoint_path)\n", |
|
|
186 |
"adapter_checkpoint = lazy_load(adapter_path)\n", |
|
|
187 |
"checkpoint.update(adapter_checkpoint.get(\"model\", adapter_checkpoint))\n", |
|
|
188 |
"model.load_state_dict(checkpoint)\n", |
|
|
189 |
"fabric.print(f\"Time to load the model weights: {time.perf_counter() - t0:.02f} seconds.\", file=sys.stderr)\n", |
|
|
190 |
"\n", |
|
|
191 |
"model = fabric.setup(model)" |
|
|
192 |
] |
|
|
193 |
}, |
|
|
194 |
{ |
|
|
195 |
"cell_type": "code", |
|
|
196 |
"execution_count": 11, |
|
|
197 |
"id": "59e00f69-d9fd-4cf5-a4ed-f142991b870f", |
|
|
198 |
"metadata": { |
|
|
199 |
"tags": [] |
|
|
200 |
}, |
|
|
201 |
"outputs": [ |
|
|
202 |
{ |
|
|
203 |
"data": { |
|
|
204 |
"text/plain": [ |
|
|
205 |
"\"### Input:\\nNatalie Cooper,\\nncooper@example.com\\n6789 Birch Street, Denver, CO 80203,\\n303-555-6543, United States\\n\\nRelationship to XYZ Pharma Inc.: Patient\\nReason for contacting: Adverse Event\\n\\nMessage: Hi, after starting Abilify for bipolar I disorder, I've noticed that I am experiencing nausea and vomiting. Are these typical reactions? Best, Natalie Cooper\\n\\n### Response:\"" |
|
|
206 |
] |
|
|
207 |
}, |
|
|
208 |
"execution_count": 11, |
|
|
209 |
"metadata": {}, |
|
|
210 |
"output_type": "execute_result" |
|
|
211 |
} |
|
|
212 |
], |
|
|
213 |
"source": [ |
|
|
214 |
"prompt" |
|
|
215 |
] |
|
|
216 |
}, |
|
|
217 |
{ |
|
|
218 |
"cell_type": "code", |
|
|
219 |
"execution_count": 12, |
|
|
220 |
"id": "3eeaa237-7a95-4c9d-aeda-8a3c246d02fe", |
|
|
221 |
"metadata": {}, |
|
|
222 |
"outputs": [ |
|
|
223 |
{ |
|
|
224 |
"name": "stderr", |
|
|
225 |
"output_type": "stream", |
|
|
226 |
"text": [ |
|
|
227 |
"[rank: 0] Seed set to 1234\n" |
|
|
228 |
] |
|
|
229 |
}, |
|
|
230 |
{ |
|
|
231 |
"name": "stdout", |
|
|
232 |
"output_type": "stream", |
|
|
233 |
"text": [ |
|
|
234 |
"{\"drug_name\": \"Abilify\", \"adverse_events\": [\"nausea\", \"vomiting\"]}\n" |
|
|
235 |
] |
|
|
236 |
}, |
|
|
237 |
{ |
|
|
238 |
"name": "stderr", |
|
|
239 |
"output_type": "stream", |
|
|
240 |
"text": [ |
|
|
241 |
"\n", |
|
|
242 |
"\n", |
|
|
243 |
"Time for inference: 1.49 sec total, 18.77 tokens/sec\n", |
|
|
244 |
"Memory used: 14.72 GB\n" |
|
|
245 |
] |
|
|
246 |
} |
|
|
247 |
], |
|
|
248 |
"source": [ |
|
|
249 |
"L.seed_everything(1234)\n", |
|
|
250 |
"t0 = time.perf_counter()\n", |
|
|
251 |
"\n", |
|
|
252 |
"y = generate(model, encoded, max_returned_tokens, temperature=temperature, top_k=top_k, eos_id=tokenizer.eos_id)\n", |
|
|
253 |
"t = time.perf_counter() - t0\n", |
|
|
254 |
"\n", |
|
|
255 |
"output = tokenizer.decode(y)\n", |
|
|
256 |
"output = output.split(\"### Response:\")[1].strip()\n", |
|
|
257 |
"fabric.print(output)\n", |
|
|
258 |
"\n", |
|
|
259 |
"tokens_generated = y.size(0) - prompt_length\n", |
|
|
260 |
"fabric.print(f\"\\n\\nTime for inference: {t:.02f} sec total, {tokens_generated / t:.02f} tokens/sec\", file=sys.stderr)\n", |
|
|
261 |
"if fabric.device.type == \"cuda\":\n", |
|
|
262 |
" fabric.print(f\"Memory used: {torch.cuda.max_memory_allocated() / 1e9:.02f} GB\", file=sys.stderr)" |
|
|
263 |
] |
|
|
264 |
}, |
|
|
265 |
{ |
|
|
266 |
"cell_type": "code", |
|
|
267 |
"execution_count": 13, |
|
|
268 |
"id": "69075dce-b170-43f6-8db5-22367ab073e4", |
|
|
269 |
"metadata": {}, |
|
|
270 |
"outputs": [ |
|
|
271 |
{ |
|
|
272 |
"data": { |
|
|
273 |
"text/plain": [ |
|
|
274 |
"'{\"drug_name\": \"Abilify\", \"adverse_events\": [\"nausea\", \"vomiting\"]}'" |
|
|
275 |
] |
|
|
276 |
}, |
|
|
277 |
"execution_count": 13, |
|
|
278 |
"metadata": {}, |
|
|
279 |
"output_type": "execute_result" |
|
|
280 |
} |
|
|
281 |
], |
|
|
282 |
"source": [ |
|
|
283 |
"output" |
|
|
284 |
] |
|
|
285 |
}, |
|
|
286 |
{ |
|
|
287 |
"cell_type": "code", |
|
|
288 |
"execution_count": 14, |
|
|
289 |
"id": "09d286fb-d595-4d8c-94a1-06ec7357722f", |
|
|
290 |
"metadata": {}, |
|
|
291 |
"outputs": [], |
|
|
292 |
"source": [ |
|
|
293 |
"def parse_model_response(response):\n", |
|
|
294 |
" \"\"\"\n", |
|
|
295 |
" Parse the model response to extract entities.\n", |
|
|
296 |
"\n", |
|
|
297 |
" Args:\n", |
|
|
298 |
" - response: A string representing the model's response.\n", |
|
|
299 |
"\n", |
|
|
300 |
" Returns:\n", |
|
|
301 |
" - A dictionary containing the extracted entities.\n", |
|
|
302 |
" \"\"\"\n", |
|
|
303 |
" return json.loads(response)" |
|
|
304 |
] |
|
|
305 |
}, |
|
|
306 |
{ |
|
|
307 |
"cell_type": "code", |
|
|
308 |
"execution_count": 15, |
|
|
309 |
"id": "faee8a5e-9e3c-4d95-b351-d19a46c3f0a2", |
|
|
310 |
"metadata": { |
|
|
311 |
"scrolled": true, |
|
|
312 |
"tags": [] |
|
|
313 |
}, |
|
|
314 |
"outputs": [ |
|
|
315 |
{ |
|
|
316 |
"name": "stdout", |
|
|
317 |
"output_type": "stream", |
|
|
318 |
"text": [ |
|
|
319 |
"### Input:\n", |
|
|
320 |
"Natalie Cooper,\n", |
|
|
321 |
"ncooper@example.com\n", |
|
|
322 |
"6789 Birch Street, Denver, CO 80203,\n", |
|
|
323 |
"303-555-6543, United States\n", |
|
|
324 |
"\n", |
|
|
325 |
"Relationship to XYZ Pharma Inc.: Patient\n", |
|
|
326 |
"Reason for contacting: Adverse Event\n", |
|
|
327 |
"\n", |
|
|
328 |
"Message: Hi, after starting Abilify for bipolar I disorder, I've noticed that I am experiencing nausea and vomiting. Are these typical reactions? Best, Natalie Cooper\n", |
|
|
329 |
"\n", |
|
|
330 |
"### Response:\n", |
|
|
331 |
"{\"drug_name\": \"Abilify\", \"adverse_events\": [\"nausea\", \"vomiting\"]}\n", |
|
|
332 |
"---------------------------------------------------------\n", |
|
|
333 |
"\n", |
|
|
334 |
"\n", |
|
|
335 |
"### Input:\n", |
|
|
336 |
"Mia Garcia\n", |
|
|
337 |
"mia.garcia@email.com\n", |
|
|
338 |
"321 Magnolia Drive, Dallas, TX 75201\n", |
|
|
339 |
"555-890-1234, United States\n", |
|
|
340 |
"\n", |
|
|
341 |
"Relationship to XYZ Pharma Inc.: Patient\n", |
|
|
342 |
"Reason for contacting: Adverse Event\n", |
|
|
343 |
"\n", |
|
|
344 |
"Message: I experienced a feeling of light-headedness and near-fainting after taking Staxyn for my erectile dysfunction. Is this a common side effect, and should I be worried?\n", |
|
|
345 |
"\n", |
|
|
346 |
"### Response:\n", |
|
|
347 |
"{\"drug_name\": \"Staxyn\", \"adverse_events\": [\"feeling light-headed\", \"near-fainting\"]}\n", |
|
|
348 |
"---------------------------------------------------------\n", |
|
|
349 |
"\n", |
|
|
350 |
"\n", |
|
|
351 |
"### Input:\n", |
|
|
352 |
"Brandon Lee,\n", |
|
|
353 |
"blee@example.com\n", |
|
|
354 |
"3333 Pine Road, Hilltown, MA 02108,\n", |
|
|
355 |
"617-555-3333, United States\n", |
|
|
356 |
"\n", |
|
|
357 |
"Relationship to XYZ Pharma Inc.: Patient\n", |
|
|
358 |
"Reason for contacting: Adverse Event\n", |
|
|
359 |
"\n", |
|
|
360 |
"Message: Since I started on Byetta, I've noticed an increase in thirst and dry mouth. Is this related to the medication? Best, Brandon Lee\n", |
|
|
361 |
"\n", |
|
|
362 |
"### Response:\n", |
|
|
363 |
"{\"drug_name\": \"Byetta\", \"adverse_events\": [\"increase in thirst\", \"dry mouth\"]}\n", |
|
|
364 |
"---------------------------------------------------------\n", |
|
|
365 |
"\n", |
|
|
366 |
"\n", |
|
|
367 |
"### Input:\n", |
|
|
368 |
"William Brown\n", |
|
|
369 |
"william.brown@example.com\n", |
|
|
370 |
"444 Oakwood Lane, Phoenix, AZ 85001\n", |
|
|
371 |
"6025559090, United States\n", |
|
|
372 |
"\n", |
|
|
373 |
"Relationship to XYZ Pharma Inc.: Patient\n", |
|
|
374 |
"Reason for contacting: Adverse Event\n", |
|
|
375 |
"\n", |
|
|
376 |
"Message: I've been taking Lipitor, and I've noticed that I'm experiencing frequent nosebleeds. They are quite sudden and inconvenient. I'm wondering if this is a known side effect and if there's anything I can do to prevent it.\n", |
|
|
377 |
"\n", |
|
|
378 |
"### Response:\n", |
|
|
379 |
"{\"drug_name\": \"Lipitor\", \"adverse_events\": [\"frequent nosebleeds\", \"unconventional side effects\"]}\n", |
|
|
380 |
"---------------------------------------------------------\n", |
|
|
381 |
"\n", |
|
|
382 |
"\n", |
|
|
383 |
"### Input:\n", |
|
|
384 |
"Diane Wilson,\n", |
|
|
385 |
"dwilson@example.com\n", |
|
|
386 |
"10101 Birch Street, Hillside, IL 60010,\n", |
|
|
387 |
"847-555-1010, United States\n", |
|
|
388 |
"\n", |
|
|
389 |
"Relationship to XYZ Pharma Inc.: Patient\n", |
|
|
390 |
"Reason for contacting: Adverse Event\n", |
|
|
391 |
"\n", |
|
|
392 |
"Message: After using Cialis, I've begun experiencing upset stomach and flushing. Are these common reactions to the medication? Thanks, Diane Wilson\n", |
|
|
393 |
"\n", |
|
|
394 |
"### Response:\n", |
|
|
395 |
"{\"drug_name\": \"Cialis\", \"adverse_events\": [\"upset stomach\", \"flushing\"]}\n", |
|
|
396 |
"---------------------------------------------------------\n", |
|
|
397 |
"\n", |
|
|
398 |
"\n", |
|
|
399 |
"### Input:\n", |
|
|
400 |
"Emily Clark,\n", |
|
|
401 |
"eclark@example.com\n", |
|
|
402 |
"151617 Elm Street, Rivertown, FL 33101,\n", |
|
|
403 |
"305-555-7890, United States\n", |
|
|
404 |
"\n", |
|
|
405 |
"Relationship to XYZ Pharma Inc.: Patient\n", |
|
|
406 |
"Reason for contacting: Adverse Event\n", |
|
|
407 |
"\n", |
|
|
408 |
"Message: Hi, I've been on Cialis for a few months and have recently had an erection that is painful and lasts longer than 4 hours. Could this be related to the medication? Regards, Emily Clark\n", |
|
|
409 |
"\n", |
|
|
410 |
"### Response:\n", |
|
|
411 |
"{\"drug_name\": \"Cialis\", \"adverse_events\": [\"painful erection\", \"longer erection\"]}\n", |
|
|
412 |
"---------------------------------------------------------\n", |
|
|
413 |
"\n", |
|
|
414 |
"\n", |
|
|
415 |
"### Input:\n", |
|
|
416 |
"Emily Smith,\n", |
|
|
417 |
"emily.smith@example.com\n", |
|
|
418 |
"456 Oak Lane, Springfield, IL 62704,\n", |
|
|
419 |
"987-654-3210, United States\n", |
|
|
420 |
"\n", |
|
|
421 |
"Relationship to XYZ Pharma Inc.: Patient\n", |
|
|
422 |
"Reason for contacting: Adverse Event\n", |
|
|
423 |
"\n", |
|
|
424 |
"Message: Hello, after taking Viagra, I have noticed that I am experiencing some muscle pain and back pain. These symptoms started soon after I began the medication. Can you advise? Best, Emily Smith\n", |
|
|
425 |
"\n", |
|
|
426 |
"### Response:\n", |
|
|
427 |
"{\"drug_name\": \"Viagra\", \"adverse_events\": [\"muscle pain\", \"back pain\"]}\n", |
|
|
428 |
"---------------------------------------------------------\n", |
|
|
429 |
"\n", |
|
|
430 |
"\n", |
|
|
431 |
"### Input:\n", |
|
|
432 |
"Ella Anderson\n", |
|
|
433 |
"ella.anderson@email.com\n", |
|
|
434 |
"345 Willow Lane, Miami, FL 33101\n", |
|
|
435 |
"555-789-0123, United States\n", |
|
|
436 |
"\n", |
|
|
437 |
"Relationship to XYZ Pharma Inc.: Patient\n", |
|
|
438 |
"Reason for contacting: Adverse Event\n", |
|
|
439 |
"\n", |
|
|
440 |
"Message: I'm using Vytorin, and I've noticed that I'm feeling extremely tired. Is this a side effect of the medication?\n", |
|
|
441 |
"\n", |
|
|
442 |
"### Response:\n", |
|
|
443 |
"{\"drug_name\": \"Vytorin\", \"adverse_events\": [\"feeling extremely tired\"]}\n", |
|
|
444 |
"---------------------------------------------------------\n", |
|
|
445 |
"\n", |
|
|
446 |
"\n", |
|
|
447 |
"### Input:\n", |
|
|
448 |
"Isabella Clark\n", |
|
|
449 |
"isabella.clark@email.com\n", |
|
|
450 |
"123 Oakwood Drive, Atlanta, GA 30301\n", |
|
|
451 |
"555-901-2345, United States\n", |
|
|
452 |
"\n", |
|
|
453 |
"Relationship to XYZ Pharma Inc.: Patient\n", |
|
|
454 |
"Reason for contacting: Adverse Event\n", |
|
|
455 |
"\n", |
|
|
456 |
"Message: I've been taking Prozac for my major depressive disorder, and I've had an increase in heart rate and chest pain. Is this a known side effect of the medication?\n", |
|
|
457 |
"\n", |
|
|
458 |
"### Response:\n", |
|
|
459 |
"{\"drug_name\": \"Prozac\", \"adverse_events\": [\"increase in heart rate\", \"chest pain\"]}\n", |
|
|
460 |
"---------------------------------------------------------\n", |
|
|
461 |
"\n", |
|
|
462 |
"\n", |
|
|
463 |
"### Input:\n", |
|
|
464 |
"Emily Wilson\n", |
|
|
465 |
"emily.wilson@example.com\n", |
|
|
466 |
"45 Maple Street, Los Angeles, CA 90001\n", |
|
|
467 |
"2135557890, United States\n", |
|
|
468 |
"\n", |
|
|
469 |
"Relationship to XYZ Pharma Inc.: Patient\n", |
|
|
470 |
"Reason for contacting: Adverse Event\n", |
|
|
471 |
"\n", |
|
|
472 |
"Message: I've been taking Nexium for my acid reflux, and I recently experienced severe stomach pain and watery diarrhea. Is this a side effect of Nexium?\n", |
|
|
473 |
"\n", |
|
|
474 |
"### Response:\n", |
|
|
475 |
"{\"drug_name\": \"Nexium\", \"adverse_events\": [\"severe stomach pain\", \"severe watery diarrhea\"]}\n", |
|
|
476 |
"---------------------------------------------------------\n", |
|
|
477 |
"\n", |
|
|
478 |
"\n", |
|
|
479 |
"### Input:\n", |
|
|
480 |
"William Harris\n", |
|
|
481 |
"william.harris@example.com\n", |
|
|
482 |
"890 Oak Road, San Francisco, CA 94101\n", |
|
|
483 |
"4155558765, United States\n", |
|
|
484 |
"\n", |
|
|
485 |
"Relationship to XYZ Pharma Inc.: Patient\n", |
|
|
486 |
"Reason for contacting: Adverse Event\n", |
|
|
487 |
"\n", |
|
|
488 |
"Message: I received Neupogen and had trouble breathing and fever. Are these common side effects of the medication?\n", |
|
|
489 |
"\n", |
|
|
490 |
"### Response:\n", |
|
|
491 |
"{\"drug_name\": \"Neupogen\", \"adverse_events\": [\"trouble breathing\", \"fever\"]}\n", |
|
|
492 |
"---------------------------------------------------------\n", |
|
|
493 |
"\n", |
|
|
494 |
"\n", |
|
|
495 |
"### Input:\n", |
|
|
496 |
"Alex Martinez\n", |
|
|
497 |
"alexm@example.com\n", |
|
|
498 |
"234 River Road, Austin, TX 78701\n", |
|
|
499 |
"5121234567, United States\n", |
|
|
500 |
"\n", |
|
|
501 |
"Relationship to XYZ Pharma Inc.: Patient\n", |
|
|
502 |
"Reason for contacting: Adverse Event\n", |
|
|
503 |
"\n", |
|
|
504 |
"Message: I've been taking Cymbalta for chronic back pain. I've started experiencing severe constipation and occasional vision changes. Are these known side effects?\n", |
|
|
505 |
"\n", |
|
|
506 |
"### Response:\n", |
|
|
507 |
"{\"drug_name\": \"Cymbalta\", \"adverse_events\": [\"severe constipation\", \"occasional vision changes\"]}\n", |
|
|
508 |
"---------------------------------------------------------\n", |
|
|
509 |
"\n", |
|
|
510 |
"\n", |
|
|
511 |
"### Input:\n", |
|
|
512 |
"Daniel Wilson\n", |
|
|
513 |
"daniel.wilson@example.com\n", |
|
|
514 |
"112 Pine Avenue, Atlanta, GA 30301\n", |
|
|
515 |
"4045554321, United States\n", |
|
|
516 |
"\n", |
|
|
517 |
"Relationship to XYZ Pharma Inc.: Patient\n", |
|
|
518 |
"Reason for contacting: Adverse Event\n", |
|
|
519 |
"\n", |
|
|
520 |
"Message: I took Nexium for acid reflux, and I had a headache and stomach pain. Could this be due to the medication?\n", |
|
|
521 |
"\n", |
|
|
522 |
"### Response:\n", |
|
|
523 |
"{\"drug_name\": \"Nexium\", \"adverse_events\": [\"headache\", \"stomach pain\"]}\n", |
|
|
524 |
"---------------------------------------------------------\n", |
|
|
525 |
"\n", |
|
|
526 |
"\n", |
|
|
527 |
"### Input:\n", |
|
|
528 |
"Sebastian Cooper\n", |
|
|
529 |
"sebastian.cooper@email.com\n", |
|
|
530 |
"567 Maple Road, Austin, TX 78701\n", |
|
|
531 |
"555-567-8901, United States\n", |
|
|
532 |
"\n", |
|
|
533 |
"Relationship to XYZ Pharma Inc.: Patient\n", |
|
|
534 |
"Reason for contacting: Adverse Event\n", |
|
|
535 |
"\n", |
|
|
536 |
"Message: After receiving a Remicade infusion for my plaque psoriasis, I've experienced blurred vision and severe headaches. Are these symptoms related to the medication?\n", |
|
|
537 |
"\n", |
|
|
538 |
"### Response:\n", |
|
|
539 |
"{\"drug_name\": \"Remicade\", \"adverse_events\": [\"blurred vision\", \"severe headaches\"]}\n", |
|
|
540 |
"---------------------------------------------------------\n", |
|
|
541 |
"\n", |
|
|
542 |
"\n", |
|
|
543 |
"### Input:\n", |
|
|
544 |
"James Garcia,\n", |
|
|
545 |
"james.garcia@example.com\n", |
|
|
546 |
"121314 Maple Lane, Boston, MA 02108,\n", |
|
|
547 |
"617-555-4568, United States\n", |
|
|
548 |
"\n", |
|
|
549 |
"Relationship to XYZ Pharma Inc.: Patient\n", |
|
|
550 |
"Reason for contacting: Adverse Event\n", |
|
|
551 |
"\n", |
|
|
552 |
"Message: Hi, I'm on Advair for emphysema and have started experiencing fever and chills, along with a cough with mucus. Are these effects related to Advair? Thanks, James Garcia\n", |
|
|
553 |
"\n", |
|
|
554 |
"### Response:\n", |
|
|
555 |
"{\"drug_name\": \"Advair\", \"adverse_events\": [\"fever\", \"chills\", \"cough with mucus\"]}\n", |
|
|
556 |
"---------------------------------------------------------\n", |
|
|
557 |
"\n", |
|
|
558 |
"\n", |
|
|
559 |
"### Input:\n", |
|
|
560 |
"Ethan Clark\n", |
|
|
561 |
"e.clark@example.com\n", |
|
|
562 |
"456 Pine Lane, Dallas, TX 75201\n", |
|
|
563 |
"2141234567, United States\n", |
|
|
564 |
"\n", |
|
|
565 |
"Relationship to XYZ Pharma Inc.: Patient\n", |
|
|
566 |
"Reason for contacting: Adverse Event\n", |
|
|
567 |
"\n", |
|
|
568 |
"Message: I started Doxycycline as a treatment for chlamydia, and I've noticed darkening of my skin color. Is this related to the medication?\n", |
|
|
569 |
"\n", |
|
|
570 |
"### Response:\n", |
|
|
571 |
"{\"drug_name\": \"Doxycycline\", \"adverse_events\": [\"darkening of skin color\"]}\n", |
|
|
572 |
"---------------------------------------------------------\n", |
|
|
573 |
"\n", |
|
|
574 |
"\n", |
|
|
575 |
"### Input:\n", |
|
|
576 |
"Sophie Turner\n", |
|
|
577 |
"sophie.turner@email.com\n", |
|
|
578 |
"654 Oak Avenue, San Diego, CA 92101\n", |
|
|
579 |
"555-345-6789, United States\n", |
|
|
580 |
"\n", |
|
|
581 |
"Relationship to XYZ Pharma Inc.: Patient\n", |
|
|
582 |
"Reason for contacting: Adverse Event\n", |
|
|
583 |
"\n", |
|
|
584 |
"Message: Since taking Victoza, I've been experiencing a persistent cough and wheezing. Is this a known side effect?\n", |
|
|
585 |
"\n", |
|
|
586 |
"### Response:\n", |
|
|
587 |
"{\"drug_name\": \"Victoza\", \"adverse_events\": [\"persistent cough\", \"wheezing\"]}\n", |
|
|
588 |
"---------------------------------------------------------\n", |
|
|
589 |
"\n", |
|
|
590 |
"\n", |
|
|
591 |
"### Input:\n", |
|
|
592 |
"Michael Johnson,\n", |
|
|
593 |
"michael.johnson@example.com\n", |
|
|
594 |
"789 Pine Road, Metropolis, NY 10001,\n", |
|
|
595 |
"456-123-7890, United States\n", |
|
|
596 |
"\n", |
|
|
597 |
"Relationship to XYZ Pharma Inc.: Patient\n", |
|
|
598 |
"Reason for contacting: Adverse Event\n", |
|
|
599 |
"\n", |
|
|
600 |
"Message: I've been prescribed Viagra and have been using it for a few weeks. Recently, I've started to experience a stuffy nose and some nosebleeds. Is this a common side effect? Thanks, Michael Johnson\n", |
|
|
601 |
"\n", |
|
|
602 |
"### Response:\n", |
|
|
603 |
"{\"drug_name\": \"Viagra\", \"adverse_events\": [\"stuffy nose\", \"nosebleeds\"]}\n", |
|
|
604 |
"---------------------------------------------------------\n", |
|
|
605 |
"\n", |
|
|
606 |
"\n", |
|
|
607 |
"### Input:\n", |
|
|
608 |
"William Turner\n", |
|
|
609 |
"william.turner@email.com\n", |
|
|
610 |
"890 Cedar Lane, Houston, TX 77001\n", |
|
|
611 |
"555-456-7890, United States\n", |
|
|
612 |
"\n", |
|
|
613 |
"Relationship to XYZ Pharma Inc.: Patient\n", |
|
|
614 |
"Reason for contacting: Adverse Event\n", |
|
|
615 |
"\n", |
|
|
616 |
"Message: Since taking Provigil, I've developed a persistent headache and hallucinations. Could this be a side effect of the medication?\n", |
|
|
617 |
"\n", |
|
|
618 |
"### Response:\n", |
|
|
619 |
"{\"drug_name\": \"Provigil\", \"adverse_events\": [\"persistent headache\", \"hallucinations\"]}\n", |
|
|
620 |
"---------------------------------------------------------\n", |
|
|
621 |
"\n", |
|
|
622 |
"\n", |
|
|
623 |
"### Input:\n", |
|
|
624 |
"Liam Davis\n", |
|
|
625 |
"liam.davis@email.com\n", |
|
|
626 |
"234 Cedar Road, Miami, FL 33101\n", |
|
|
627 |
"555-678-9012, United States\n", |
|
|
628 |
"\n", |
|
|
629 |
"Relationship to XYZ Pharma Inc.: Patient\n", |
|
|
630 |
"Reason for contacting: Adverse Event\n", |
|
|
631 |
"\n", |
|
|
632 |
"Message: Since I started Protonix, I've noticed swelling in my face and hands along with a rapid heart rate. Is this a known side effect of the medication?\n", |
|
|
633 |
"\n", |
|
|
634 |
"### Response:\n", |
|
|
635 |
"{\"drug_name\": \"Protonix\", \"adverse_events\": [\"swelling in face\", \"rapid heart rate\"]}\n", |
|
|
636 |
"---------------------------------------------------------\n", |
|
|
637 |
"\n", |
|
|
638 |
"\n", |
|
|
639 |
"### Input:\n", |
|
|
640 |
"Sophia Turner\n", |
|
|
641 |
"sophia.turner@email.com\n", |
|
|
642 |
"567 Elm Road, Seattle, WA 98101\n", |
|
|
643 |
"555-890-1234, United States\n", |
|
|
644 |
"\n", |
|
|
645 |
"Relationship to XYZ Pharma Inc.: Patient\n", |
|
|
646 |
"Reason for contacting: Adverse Event\n", |
|
|
647 |
"\n", |
|
|
648 |
"Message: Since starting Prilosec, I've had a persistent cough and vomiting. Is this a common side effect of the medication?\n", |
|
|
649 |
"\n", |
|
|
650 |
"### Response:\n", |
|
|
651 |
"{\"drug_name\": \"Prilosec\", \"adverse_events\": [\"persistent cough\", \"vomiting\"]}\n", |
|
|
652 |
"---------------------------------------------------------\n", |
|
|
653 |
"\n", |
|
|
654 |
"\n", |
|
|
655 |
"### Input:\n", |
|
|
656 |
"Ava Johnson\n", |
|
|
657 |
"ava.johnson@email.com\n", |
|
|
658 |
"456 Maple Avenue, Los Angeles, CA 90001\n", |
|
|
659 |
"555-234-5678, United States\n", |
|
|
660 |
"\n", |
|
|
661 |
"Relationship to XYZ Pharma Inc.: Patient\n", |
|
|
662 |
"Reason for contacting: Adverse Event\n", |
|
|
663 |
"\n", |
|
|
664 |
"Message: I have been taking Symbicort, and it caused me to have white patches in my mouth and throat, along with pain when swallowing. What should I do about these symptoms?\n", |
|
|
665 |
"\n", |
|
|
666 |
"### Response:\n", |
|
|
667 |
"{\"drug_name\": \"Symbicort\", \"adverse_events\": [\"white patches in mouth\", \"pain when swallowing\"]}\n", |
|
|
668 |
"---------------------------------------------------------\n", |
|
|
669 |
"\n", |
|
|
670 |
"\n", |
|
|
671 |
"### Input:\n", |
|
|
672 |
"Claire Brown,\n", |
|
|
673 |
"cbrown@example.com\n", |
|
|
674 |
"91011 Pine Avenue, Metropolis, NY 10001,\n", |
|
|
675 |
"212-555-2468, United States\n", |
|
|
676 |
"\n", |
|
|
677 |
"Relationship to XYZ Pharma Inc.: Patient\n", |
|
|
678 |
"Reason for contacting: Adverse Event\n", |
|
|
679 |
"\n", |
|
|
680 |
"Message: I've been treated with Byetta for diabetes and recently started experiencing symptoms of low blood sugar like dizziness and sweating. Is this a side effect of the drug? Sincerely, Claire Brown\n", |
|
|
681 |
"\n", |
|
|
682 |
"### Response:\n", |
|
|
683 |
"{\"drug_name\": \"Byetta\", \"adverse_events\": [\"symptoms of low blood sugar\", \"dizziness\", \"sweating\"]}\n", |
|
|
684 |
"---------------------------------------------------------\n", |
|
|
685 |
"\n", |
|
|
686 |
"\n", |
|
|
687 |
"### Input:\n", |
|
|
688 |
"Thomas Brown,\n", |
|
|
689 |
"tbrown@example.com\n", |
|
|
690 |
"7890 Spruce Street, Portland, OR 97201,\n", |
|
|
691 |
"503-555-1122, United States\n", |
|
|
692 |
"\n", |
|
|
693 |
"Relationship to XYZ Pharma Inc.: Patient\n", |
|
|
694 |
"Reason for contacting: Adverse Event\n", |
|
|
695 |
"\n", |
|
|
696 |
"Message: Hi, I started taking Abilify for schizophrenia and I've noticed some problems with speech and a mask-like appearance of my face. Is this a known side effect? Thanks, Thomas Brown\n", |
|
|
697 |
"\n", |
|
|
698 |
"### Response:\n", |
|
|
699 |
"{\"drug_name\": \"Abilify\", \"adverse_events\": [\"speech problems\", \"mask-like face\"]}\n", |
|
|
700 |
"---------------------------------------------------------\n", |
|
|
701 |
"\n", |
|
|
702 |
"\n", |
|
|
703 |
"### Input:\n", |
|
|
704 |
"Maria Rodriguez\n", |
|
|
705 |
"maria.rodriguez@example.com\n", |
|
|
706 |
"999 Walnut Street, Philadelphia, PA 19101\n", |
|
|
707 |
"2155551414, United States\n", |
|
|
708 |
"\n", |
|
|
709 |
"Relationship to XYZ Pharma Inc.: Patient\n", |
|
|
710 |
"Reason for contacting: Adverse Event\n", |
|
|
711 |
"\n", |
|
|
712 |
"Message: I've been on Lipitor for a while, and I've developed a persistent cough. It's quite bothersome, and I'm wondering if this could be related to the medication. What should I do about it?\n", |
|
|
713 |
"\n", |
|
|
714 |
"### Response:\n", |
|
|
715 |
"{\"drug_name\": \"Lipitor\", \"adverse_events\": [\"persistent cough\"]}\n", |
|
|
716 |
"---------------------------------------------------------\n", |
|
|
717 |
"\n", |
|
|
718 |
"\n", |
|
|
719 |
"### Input:\n", |
|
|
720 |
"David Martinez\n", |
|
|
721 |
"david.martinez@email.com\n", |
|
|
722 |
"567 Cedar Road, Miami, FL 33101\n", |
|
|
723 |
"555-765-4321, United States\n", |
|
|
724 |
"\n", |
|
|
725 |
"Relationship to XYZ Pharma Inc.: Patient\n", |
|
|
726 |
"Reason for contacting: Adverse Event\n", |
|
|
727 |
"\n", |
|
|
728 |
"Message: I received Rituximab along with methotrexate for rheumatoid arthritis, and I've been experiencing painful urination and muscle spasms. Could this be related to the treatment?\n", |
|
|
729 |
"\n", |
|
|
730 |
"### Response:\n", |
|
|
731 |
"{\"drug_name\": \"Rituximab\", \"adverse_events\": [\"painful urination\", \"muscle spasms\"]}\n", |
|
|
732 |
"---------------------------------------------------------\n", |
|
|
733 |
"\n", |
|
|
734 |
"\n", |
|
|
735 |
"### Input:\n", |
|
|
736 |
"Grace Lee,\n", |
|
|
737 |
"glee@example.com\n", |
|
|
738 |
"3030 Maple Drive, Smallville, KS 66002,\n", |
|
|
739 |
"785-555-3030, United States\n", |
|
|
740 |
"\n", |
|
|
741 |
"Relationship to XYZ Pharma Inc.: Patient\n", |
|
|
742 |
"Reason for contacting: Adverse Event\n", |
|
|
743 |
"\n", |
|
|
744 |
"Message: I've been using Byetta for my diabetes management and recently started experiencing rapid heartbeats and difficulty breathing. Should I seek medical attention? Best, Grace Lee\n", |
|
|
745 |
"\n", |
|
|
746 |
"### Response:\n", |
|
|
747 |
"{\"drug_name\": \"Byetta\", \"adverse_events\": [\"rapid heartbeats\", \"rapid breathing\"]}\n", |
|
|
748 |
"---------------------------------------------------------\n", |
|
|
749 |
"\n", |
|
|
750 |
"\n", |
|
|
751 |
"### Input:\n", |
|
|
752 |
"David Clark\n", |
|
|
753 |
"david.clark@email.com\n", |
|
|
754 |
"567 Cedar Road, New York, NY 10001\n", |
|
|
755 |
"555-345-6789, United States\n", |
|
|
756 |
"\n", |
|
|
757 |
"Relationship to XYZ Pharma Inc.: Patient\n", |
|
|
758 |
"Reason for contacting: Adverse Event\n", |
|
|
759 |
"\n", |
|
|
760 |
"Message: I'm using Prevacid for Zollinger-Ellison syndrome, and I've noticed new and unusual pain in my hip. Could this be a side effect of the medication?\n", |
|
|
761 |
"\n", |
|
|
762 |
"### Response:\n", |
|
|
763 |
"{\"drug_name\": \"Prevacid\", \"adverse_events\": [\"new and unusual pain in my hip\"]}\n", |
|
|
764 |
"---------------------------------------------------------\n", |
|
|
765 |
"\n", |
|
|
766 |
"\n", |
|
|
767 |
"### Input:\n", |
|
|
768 |
"Samantha Green,\n", |
|
|
769 |
"sgreen@example.com\n", |
|
|
770 |
"1818 Cedar St, Hillside, NJ 07205,\n", |
|
|
771 |
"908-555-1818, United States\n", |
|
|
772 |
"\n", |
|
|
773 |
"Relationship to XYZ Pharma Inc.: Patient\n", |
|
|
774 |
"Reason for contacting: Adverse Event\n", |
|
|
775 |
"\n", |
|
|
776 |
"Message: Since I began taking Celexa, I've experienced sudden changes in mood and increased anxiety. Are these known side effects? Regards, Samantha Green\n", |
|
|
777 |
"\n", |
|
|
778 |
"### Response:\n", |
|
|
779 |
"{\"drug_name\": \"Celexa\", \"adverse_events\": [\"sudden mood changes\", \"increased anxiety\"]}\n", |
|
|
780 |
"---------------------------------------------------------\n", |
|
|
781 |
"\n", |
|
|
782 |
"\n", |
|
|
783 |
"### Input:\n", |
|
|
784 |
"Liam Johnson\n", |
|
|
785 |
"liam.johnson@example.com\n", |
|
|
786 |
"101 Oak Street, Boston, MA 02101\n", |
|
|
787 |
"6175551234, United States\n", |
|
|
788 |
"\n", |
|
|
789 |
"Relationship to XYZ Pharma Inc.: Patient\n", |
|
|
790 |
"Reason for contacting: Adverse Event\n", |
|
|
791 |
"\n", |
|
|
792 |
"Message: I received Neupogen during chemotherapy and had a sudden and severe pain in my chest. Is this a known side effect of the medication?\n", |
|
|
793 |
"\n", |
|
|
794 |
"### Response:\n", |
|
|
795 |
"{\"drug_name\": \"Neupogen\", \"adverse_events\": [\"sudden and severe pain in chest\"]}\n", |
|
|
796 |
"---------------------------------------------------------\n", |
|
|
797 |
"\n", |
|
|
798 |
"\n", |
|
|
799 |
"### Input:\n", |
|
|
800 |
"David Clark\n", |
|
|
801 |
"david.clark@email.com\n", |
|
|
802 |
"234 Redwood Drive, Boston, MA 02101\n", |
|
|
803 |
"555-678-9012, United States\n", |
|
|
804 |
"\n", |
|
|
805 |
"Relationship to XYZ Pharma Inc.: Patient\n", |
|
|
806 |
"Reason for contacting: Adverse Event\n", |
|
|
807 |
"\n", |
|
|
808 |
"Message: I've been taking Onglyza, and I've been experiencing shortness of breath, especially when lying down. Could this be related to the medication?\n", |
|
|
809 |
"\n", |
|
|
810 |
"### Response:\n", |
|
|
811 |
"{\"drug_name\": \"Onglyza\", \"adverse_events\": [\"shortness of breath\"]}\n", |
|
|
812 |
"---------------------------------------------------------\n", |
|
|
813 |
"\n", |
|
|
814 |
"\n", |
|
|
815 |
"### Input:\n", |
|
|
816 |
"James Turner\n", |
|
|
817 |
"james.turner@example.com\n", |
|
|
818 |
"666 Willow Lane, Seattle, WA 98101\n", |
|
|
819 |
"2065559876, United States\n", |
|
|
820 |
"\n", |
|
|
821 |
"Relationship to XYZ Pharma Inc.: Patient\n", |
|
|
822 |
"Reason for contacting: Adverse Event\n", |
|
|
823 |
"\n", |
|
|
824 |
"Message: I started using Lunesta, and I've been experiencing hallucinations and confusion. It's quite distressing. Is this a known side effect of the medication?\n", |
|
|
825 |
"\n", |
|
|
826 |
"### Response:\n", |
|
|
827 |
"{\"drug_name\": \"Lunesta\", \"adverse_events\": [\"hallucinations\", \"confusion\"]}\n", |
|
|
828 |
"---------------------------------------------------------\n", |
|
|
829 |
"\n", |
|
|
830 |
"\n", |
|
|
831 |
"### Input:\n", |
|
|
832 |
"John Smith\n", |
|
|
833 |
"john.smith@email.com\n", |
|
|
834 |
"234 Birch Avenue, Miami, FL 33101\n", |
|
|
835 |
"555-567-8901, United States\n", |
|
|
836 |
"\n", |
|
|
837 |
"Relationship to XYZ Pharma Inc.: Patient\n", |
|
|
838 |
"Reason for contacting: Adverse Event\n", |
|
|
839 |
"\n", |
|
|
840 |
"Message: I've been using Prevacid OTC, and I've been feeling a rapid heart rate and a jittery sensation. Is this a known side effect?\n", |
|
|
841 |
"\n", |
|
|
842 |
"### Response:\n", |
|
|
843 |
"{\"drug_name\": \"Prevacid\", \"adverse_events\": [\"rapid heart rate\", \"jittery sensation\"]}\n", |
|
|
844 |
"---------------------------------------------------------\n", |
|
|
845 |
"\n", |
|
|
846 |
"\n", |
|
|
847 |
"### Input:\n", |
|
|
848 |
"Henry Adams\n", |
|
|
849 |
"henry.adams@email.com\n", |
|
|
850 |
"876 Birch Street, Atlanta, GA 30301\n", |
|
|
851 |
"555-234-5678, United States\n", |
|
|
852 |
"\n", |
|
|
853 |
"Relationship to XYZ Pharma Inc.: Patient\n", |
|
|
854 |
"Reason for contacting: Adverse Event\n", |
|
|
855 |
"\n", |
|
|
856 |
"Message: Symbicort is giving me leg cramps and irregular heartbeats. I'm concerned about these symptoms.\n", |
|
|
857 |
"\n", |
|
|
858 |
"### Response:\n", |
|
|
859 |
"{\"drug_name\": \"Symbicort\", \"adverse_events\": [\"leg cramps\", \"irregular heartbeats\"]}\n", |
|
|
860 |
"---------------------------------------------------------\n", |
|
|
861 |
"\n", |
|
|
862 |
"\n", |
|
|
863 |
"### Input:\n", |
|
|
864 |
"Isabella Rodriguez\n", |
|
|
865 |
"isabella.rodriguez@email.com\n", |
|
|
866 |
"901 Pine Street, Chicago, IL 60601\n", |
|
|
867 |
"555-456-7890, United States\n", |
|
|
868 |
"\n", |
|
|
869 |
"Relationship to XYZ Pharma Inc.: Patient\n", |
|
|
870 |
"Reason for contacting: Adverse Event\n", |
|
|
871 |
"\n", |
|
|
872 |
"Message: I've been using Prezista for my HIV treatment, and I've developed swelling in my neck and throat. Is this a known side effect?\n", |
|
|
873 |
"\n", |
|
|
874 |
"### Response:\n", |
|
|
875 |
"{\"drug_name\": \"Prezista\", \"adverse_events\": [\"swelling in neck\", \"swelling in throat\"]}\n", |
|
|
876 |
"---------------------------------------------------------\n", |
|
|
877 |
"\n", |
|
|
878 |
"\n", |
|
|
879 |
"### Input:\n", |
|
|
880 |
"Ethan Turner\n", |
|
|
881 |
"ethan.turner@email.com\n", |
|
|
882 |
"123 Cedar Road, Denver, CO 80123\n", |
|
|
883 |
"555-543-7890, United States\n", |
|
|
884 |
"\n", |
|
|
885 |
"Relationship to XYZ Pharma Inc.: Patient\n", |
|
|
886 |
"Reason for contacting: Adverse Event\n", |
|
|
887 |
"\n", |
|
|
888 |
"Message: I've been taking Singulair for allergy management, and I've experienced flu-like symptoms and a sore throat. Is this a common reaction to the medication?\n", |
|
|
889 |
"\n", |
|
|
890 |
"### Response:\n", |
|
|
891 |
"{\"drug_name\": \"Singulair\", \"adverse_events\": [\"flu-like symptoms\", \"sore throat\"]}\n", |
|
|
892 |
"---------------------------------------------------------\n", |
|
|
893 |
"\n", |
|
|
894 |
"\n", |
|
|
895 |
"### Input:\n", |
|
|
896 |
"Andrew Brown\n", |
|
|
897 |
"andrew.brown@email.com\n", |
|
|
898 |
"789 Oakwood Drive, Boston, MA 02101\n", |
|
|
899 |
"555-345-6789, United States\n", |
|
|
900 |
"\n", |
|
|
901 |
"Relationship to XYZ Pharma Inc.: Patient\n", |
|
|
902 |
"Reason for contacting: Adverse Event\n", |
|
|
903 |
"\n", |
|
|
904 |
"Message: Since starting Prezista for my HIV treatment, I've had trouble with balance and eye movement, and I feel weak. Could this be related to the medication?\n", |
|
|
905 |
"\n", |
|
|
906 |
"### Response:\n", |
|
|
907 |
"{\"drug_name\": \"Prezista\", \"adverse_events\": [\"trouble with balance\", \"eye movement\", \"weakness\"]}\n", |
|
|
908 |
"---------------------------------------------------------\n", |
|
|
909 |
"\n", |
|
|
910 |
"\n", |
|
|
911 |
"### Input:\n", |
|
|
912 |
"Zoe Wilson\n", |
|
|
913 |
"zoe.wilson@example.com\n", |
|
|
914 |
"567 Elm Road, Chicago, IL 60601\n", |
|
|
915 |
"3125550101, United States\n", |
|
|
916 |
"\n", |
|
|
917 |
"Relationship to XYZ Pharma Inc.: Patient\n", |
|
|
918 |
"Reason for contacting: Adverse Event\n", |
|
|
919 |
"\n", |
|
|
920 |
"Message: I received Infliximab for my ankylosing spondylitis, and I'm having trouble swallowing and pain in my throat. Is this a known side effect?\n", |
|
|
921 |
"\n", |
|
|
922 |
"### Response:\n", |
|
|
923 |
"{\"drug_name\": \"Infliximab\", \"adverse_events\": [\"trouble swallowing\", \"pain in throat\"]}\n", |
|
|
924 |
"---------------------------------------------------------\n", |
|
|
925 |
"\n", |
|
|
926 |
"\n", |
|
|
927 |
"### Input:\n", |
|
|
928 |
"James White\n", |
|
|
929 |
"james.white@example.com\n", |
|
|
930 |
"123 Oak Road, Seattle, WA 98101\n", |
|
|
931 |
"2065550101, United States\n", |
|
|
932 |
"\n", |
|
|
933 |
"Relationship to XYZ Pharma Inc.: Patient\n", |
|
|
934 |
"Reason for contacting: Adverse Event\n", |
|
|
935 |
"\n", |
|
|
936 |
"Message: I received an Infliximab infusion for my Crohn's disease, and I've been experiencing severe diarrhea and abdominal pain. Is this expected with the treatment?\n", |
|
|
937 |
"\n", |
|
|
938 |
"### Response:\n", |
|
|
939 |
"{\"drug_name\": \"Infliximab\", \"adverse_events\": [\"severe diarrhea\", \"abdominal pain\"]}\n", |
|
|
940 |
"---------------------------------------------------------\n", |
|
|
941 |
"\n", |
|
|
942 |
"\n", |
|
|
943 |
"### Input:\n", |
|
|
944 |
"Liam Thomas\n", |
|
|
945 |
"liam.thomas@email.com\n", |
|
|
946 |
"567 Pine Street, Philadelphia, PA 19101\n", |
|
|
947 |
"555-012-3456, United States\n", |
|
|
948 |
"\n", |
|
|
949 |
"Relationship to XYZ Pharma Inc.: Patient\n", |
|
|
950 |
"Reason for contacting: Adverse Event\n", |
|
|
951 |
"\n", |
|
|
952 |
"Message: I've been using Provigil for my narcolepsy, and I'm experiencing a severe headache and dizziness. Is this a known side effect of the medication?\n", |
|
|
953 |
"\n", |
|
|
954 |
"### Response:\n", |
|
|
955 |
"{\"drug_name\": \"Provigil\", \"adverse_events\": [\"severe headache\", \"dizziness\"]}\n", |
|
|
956 |
"---------------------------------------------------------\n", |
|
|
957 |
"\n", |
|
|
958 |
"\n", |
|
|
959 |
"### Input:\n", |
|
|
960 |
"William Turner\n", |
|
|
961 |
"william.turner@example.com\n", |
|
|
962 |
"101 Pine Lane, Philadelphia, PA 19101\n", |
|
|
963 |
"2155551234, United States\n", |
|
|
964 |
"\n", |
|
|
965 |
"Relationship to XYZ Pharma Inc.: Patient\n", |
|
|
966 |
"Reason for contacting: Adverse Event\n", |
|
|
967 |
"\n", |
|
|
968 |
"Message: I started Metoprolol, and I'm feeling depressed and confused. Could these be side effects of the medication?\n", |
|
|
969 |
"\n", |
|
|
970 |
"### Response:\n", |
|
|
971 |
"{\"drug_name\": \"Metoprolol\", \"adverse_events\": [\"depressed\", \"confused\"]}\n", |
|
|
972 |
"---------------------------------------------------------\n", |
|
|
973 |
"\n", |
|
|
974 |
"\n", |
|
|
975 |
"### Input:\n", |
|
|
976 |
"Emma Thompson,\n", |
|
|
977 |
"ethompson@example.com\n", |
|
|
978 |
"3690 Elm Road, Coastville, FL 33101,\n", |
|
|
979 |
"305-555-3690, United States\n", |
|
|
980 |
"\n", |
|
|
981 |
"Relationship to XYZ Pharma Inc.: Patient\n", |
|
|
982 |
"Reason for contacting: Adverse Event\n", |
|
|
983 |
"\n", |
|
|
984 |
"Message: Since being prescribed Atripla, I've had episodes of severe dizziness and feeling cold. Are these typical reactions to the medication? Regards, Emma Thompson\n", |
|
|
985 |
"\n", |
|
|
986 |
"### Response:\n", |
|
|
987 |
"{\"drug_name\": \"Atripla\", \"adverse_events\": [\"severe dizziness\", \"feeling cold\"]}\n", |
|
|
988 |
"---------------------------------------------------------\n", |
|
|
989 |
"\n", |
|
|
990 |
"\n", |
|
|
991 |
"### Input:\n", |
|
|
992 |
"Ava Wilson\n", |
|
|
993 |
"ava.wilson@example.com\n", |
|
|
994 |
"999 Willow Road, Seattle, WA 98101\n", |
|
|
995 |
"2065555432, United States\n", |
|
|
996 |
"\n", |
|
|
997 |
"Relationship to XYZ Pharma Inc.: Patient\n", |
|
|
998 |
"Reason for contacting: Adverse Event\n", |
|
|
999 |
"\n", |
|
|
1000 |
"Message: I'm using Metoprolol for angina, and I've been feeling anxious and agitated. Is this expected with the medication?\n", |
|
|
1001 |
"\n", |
|
|
1002 |
"### Response:\n", |
|
|
1003 |
"{\"drug_name\": \"Metoprolol\", \"adverse_events\": [\"feeling anxious\", \"agitated\"]}\n", |
|
|
1004 |
"---------------------------------------------------------\n", |
|
|
1005 |
"\n", |
|
|
1006 |
"\n", |
|
|
1007 |
"### Input:\n", |
|
|
1008 |
"Henry Taylor\n", |
|
|
1009 |
"henry.taylor@email.com\n", |
|
|
1010 |
"890 Pine Road, Phoenix, AZ 85001\n", |
|
|
1011 |
"555-901-2345, United States\n", |
|
|
1012 |
"\n", |
|
|
1013 |
"Relationship to XYZ Pharma Inc.: Patient\n", |
|
|
1014 |
"Reason for contacting: Adverse Event\n", |
|
|
1015 |
"\n", |
|
|
1016 |
"Message: I've been using Protonix for my GERD, and I've experienced persistent diarrhea and joint pain. Is this a known side effect of the medication?\n", |
|
|
1017 |
"\n", |
|
|
1018 |
"### Response:\n", |
|
|
1019 |
"{\"drug_name\": \"Protonix\", \"adverse_events\": [\"persistent diarrhea\", \"joint pain\"]}\n", |
|
|
1020 |
"---------------------------------------------------------\n", |
|
|
1021 |
"\n", |
|
|
1022 |
"\n", |
|
|
1023 |
"### Input:\n", |
|
|
1024 |
"Richard Turner,\n", |
|
|
1025 |
"richard.turner@email.com\n", |
|
|
1026 |
"987 Pine Street, Boston, MA 02101,\n", |
|
|
1027 |
"555-987-6543, United States\n", |
|
|
1028 |
"\n", |
|
|
1029 |
"Relationship to XYZ Pharma Inc.: Patient\n", |
|
|
1030 |
"Reason for contacting: Adverse Event\n", |
|
|
1031 |
"\n", |
|
|
1032 |
"Message: I've been using Enbrel for polyarticular juvenile idiopathic arthritis in my child, and they have developed skin sores and redness. Could this be related to Enbrel? Regards, Richard Turner\n", |
|
|
1033 |
"\n", |
|
|
1034 |
"### Response:\n", |
|
|
1035 |
"{\"drug_name\": \"Enbrel\", \"adverse_events\": [\"skin sores\", \"redness\"]}\n", |
|
|
1036 |
"---------------------------------------------------------\n", |
|
|
1037 |
"\n", |
|
|
1038 |
"\n", |
|
|
1039 |
"### Input:\n", |
|
|
1040 |
"John Smith\n", |
|
|
1041 |
"john.smith@example.com\n", |
|
|
1042 |
"789 Elm Avenue, Los Angeles, CA 90001\n", |
|
|
1043 |
"2135550101, United States\n", |
|
|
1044 |
"\n", |
|
|
1045 |
"Relationship to XYZ Pharma Inc.: Patient\n", |
|
|
1046 |
"Reason for contacting: Adverse Event\n", |
|
|
1047 |
"\n", |
|
|
1048 |
"Message: I've been using Januvia, and I'm experiencing severe pain in my joints. Could this be related to the medication?\n", |
|
|
1049 |
"\n", |
|
|
1050 |
"### Response:\n", |
|
|
1051 |
"{\"drug_name\": \"Januvia\", \"adverse_events\": [\"severe pain in joints\"]}\n", |
|
|
1052 |
"---------------------------------------------------------\n", |
|
|
1053 |
"\n", |
|
|
1054 |
"\n", |
|
|
1055 |
"### Input:\n", |
|
|
1056 |
"Sophia Martinez\n", |
|
|
1057 |
"sophia.martinez@email.com\n", |
|
|
1058 |
"901 Cedar Road, Chicago, IL 60601\n", |
|
|
1059 |
"555-345-6789, United States\n", |
|
|
1060 |
"\n", |
|
|
1061 |
"Relationship to XYZ Pharma Inc.: Patient\n", |
|
|
1062 |
"Reason for contacting: Adverse Event\n", |
|
|
1063 |
"\n", |
|
|
1064 |
"Message: Since I began taking Prilosec, I've been experiencing new and unusual pain in my wrist. Could this be related to the medication?\n", |
|
|
1065 |
"\n", |
|
|
1066 |
"### Response:\n", |
|
|
1067 |
"{\"drug_name\": \"Prilosec\", \"adverse_events\": [\"new and unusual wrist pain\"]}\n", |
|
|
1068 |
"---------------------------------------------------------\n", |
|
|
1069 |
"\n", |
|
|
1070 |
"\n", |
|
|
1071 |
"### Input:\n", |
|
|
1072 |
"Ava Martin\n", |
|
|
1073 |
"ava.martin@example.com\n", |
|
|
1074 |
"567 Maple Street, New York, NY 10002\n", |
|
|
1075 |
"2129876543, United States\n", |
|
|
1076 |
"\n", |
|
|
1077 |
"Relationship to XYZ Pharma Inc.: Patient\n", |
|
|
1078 |
"Reason for contacting: Adverse Event\n", |
|
|
1079 |
"\n", |
|
|
1080 |
"Message: I've been taking Doxycycline for acne, and I've noticed a significant loss of appetite and nausea. Could this be related to the medication?\n", |
|
|
1081 |
"\n", |
|
|
1082 |
"### Response:\n", |
|
|
1083 |
"{\"drug_name\": \"Doxycycline\", \"adverse_events\": [\"significant loss of appetite\", \"nausea\"]}\n", |
|
|
1084 |
"---------------------------------------------------------\n", |
|
|
1085 |
"\n", |
|
|
1086 |
"\n", |
|
|
1087 |
"### Input:\n", |
|
|
1088 |
"Mia Johnson,\n", |
|
|
1089 |
"mia.johnson@example.com\n", |
|
|
1090 |
"789 Park Ave, Chicago, IL 60601,\n", |
|
|
1091 |
"312-555-5678, United States\n", |
|
|
1092 |
"\n", |
|
|
1093 |
"Relationship to XYZ Pharma Inc.: Patient\n", |
|
|
1094 |
"Reason for contacting: Adverse Event\n", |
|
|
1095 |
"\n", |
|
|
1096 |
"Message: Since starting on Amlodipine, I've had instances of severe drowsiness and weakness. Are these common side effects? Sincerely, Mia Johnson\n", |
|
|
1097 |
"\n", |
|
|
1098 |
"### Response:\n", |
|
|
1099 |
"{\"drug_name\": \"Amlodipine\", \"adverse_events\": [\"severe drowsiness\", \"weakness\"]}\n", |
|
|
1100 |
"---------------------------------------------------------\n", |
|
|
1101 |
"\n", |
|
|
1102 |
"\n", |
|
|
1103 |
"### Input:\n", |
|
|
1104 |
"Samantha Davis,\n", |
|
|
1105 |
"sdavis@example.com\n", |
|
|
1106 |
"6565 Pine Road, Miami, FL 33101,\n", |
|
|
1107 |
"305-555-6565, United States\n", |
|
|
1108 |
"\n", |
|
|
1109 |
"Relationship to XYZ Pharma Inc.: Patient\n", |
|
|
1110 |
"Reason for contacting: Adverse Event\n", |
|
|
1111 |
"\n", |
|
|
1112 |
"Message: Hi, I've been prescribed Atorvastatin for lowering cholesterol and recently noticed nausea and upset stomach. Are these reactions to the medication? Thanks, Samantha Davis\n", |
|
|
1113 |
"\n", |
|
|
1114 |
"### Response:\n", |
|
|
1115 |
"{\"drug_name\": \"Atorvastatin\", \"adverse_events\": [\"nausea\", \"upset stomach\"]}\n", |
|
|
1116 |
"---------------------------------------------------------\n", |
|
|
1117 |
"\n", |
|
|
1118 |
"\n", |
|
|
1119 |
"### Input:\n", |
|
|
1120 |
"Liam Smith\n", |
|
|
1121 |
"l.smith@example.com\n", |
|
|
1122 |
"789 Oak Road, Phoenix, AZ 85001\n", |
|
|
1123 |
"6021234567, United States\n", |
|
|
1124 |
"\n", |
|
|
1125 |
"Relationship to XYZ Pharma Inc.: Patient\n", |
|
|
1126 |
"Reason for contacting: Adverse Event\n", |
|
|
1127 |
"\n", |
|
|
1128 |
"Message: I'm taking Doxycycline for gonorrhea, and I've developed a fever, swollen glands, and body aches. Is this a possible reaction to the medication?\n", |
|
|
1129 |
"\n", |
|
|
1130 |
"### Response:\n", |
|
|
1131 |
"{\"drug_name\": \"Doxycycline\", \"adverse_events\": [\"fever\", \"swollen glands\", \"body aches\"]}\n", |
|
|
1132 |
"---------------------------------------------------------\n", |
|
|
1133 |
"\n", |
|
|
1134 |
"\n", |
|
|
1135 |
"### Input:\n", |
|
|
1136 |
"John Davis,\n", |
|
|
1137 |
"john.davis@email.com\n", |
|
|
1138 |
"123 Maple Lane, San Francisco, CA 94101,\n", |
|
|
1139 |
"555-123-9876, United States\n", |
|
|
1140 |
"\n", |
|
|
1141 |
"Relationship to XYZ Pharma Inc.: Patient\n", |
|
|
1142 |
"Reason for contacting: Adverse Event\n", |
|
|
1143 |
"\n", |
|
|
1144 |
"Message: I have been on Enbrel for ankylosing spondylitis and noticed pain, redness, and swelling at the injection site. Is this something I should be concerned about? Thank you, John Davis\n", |
|
|
1145 |
"\n", |
|
|
1146 |
"### Response:\n", |
|
|
1147 |
"{\"drug_name\": \"Enbrel\", \"adverse_events\": [\"pain at injection site\", \"redness at injection site\"]}\n", |
|
|
1148 |
"---------------------------------------------------------\n", |
|
|
1149 |
"\n", |
|
|
1150 |
"\n", |
|
|
1151 |
"### Input:\n", |
|
|
1152 |
"Ethan White\n", |
|
|
1153 |
"ethan.white@email.com\n", |
|
|
1154 |
"456 Elm Avenue, New York, NY 10001\n", |
|
|
1155 |
"555-234-5678, United States\n", |
|
|
1156 |
"\n", |
|
|
1157 |
"Relationship to XYZ Pharma Inc.: Patient\n", |
|
|
1158 |
"Reason for contacting: Adverse Event\n", |
|
|
1159 |
"\n", |
|
|
1160 |
"Message: Since starting Protonix, I've experienced persistent diarrhea and joint pain. Is this a known side effect of the medication?\n", |
|
|
1161 |
"\n", |
|
|
1162 |
"### Response:\n", |
|
|
1163 |
"{\"drug_name\": \"Protonix\", \"adverse_events\": [\"persistent diarrhea\", \"joint pain\"]}\n", |
|
|
1164 |
"---------------------------------------------------------\n", |
|
|
1165 |
"\n", |
|
|
1166 |
"\n", |
|
|
1167 |
"### Input:\n", |
|
|
1168 |
"Karen Green\n", |
|
|
1169 |
"karen.green@email.com\n", |
|
|
1170 |
"789 Oakwood Road, Houston, TX 77001\n", |
|
|
1171 |
"555-678-9012, United States\n", |
|
|
1172 |
"\n", |
|
|
1173 |
"Relationship to XYZ Pharma Inc.: Patient\n", |
|
|
1174 |
"Reason for contacting: Adverse Event\n", |
|
|
1175 |
"\n", |
|
|
1176 |
"Message: I've been taking Prezista for my HIV, and I've been experiencing upper stomach pain that may spread to my back and nausea. Is this a known side effect?\n", |
|
|
1177 |
"\n", |
|
|
1178 |
"### Response:\n", |
|
|
1179 |
"{\"drug_name\": \"Prezista\", \"adverse_events\": [\"upper stomach pain\", \"nausea\"]}\n", |
|
|
1180 |
"---------------------------------------------------------\n", |
|
|
1181 |
"\n", |
|
|
1182 |
"\n", |
|
|
1183 |
"### Input:\n", |
|
|
1184 |
"Emily Anderson,\n", |
|
|
1185 |
"emily.anderson@email.com\n", |
|
|
1186 |
"123 Elm Street, Springfield, IL 62701,\n", |
|
|
1187 |
"555-123-4567, United States\n", |
|
|
1188 |
"\n", |
|
|
1189 |
"Relationship to XYZ Pharma Inc.: Patient\n", |
|
|
1190 |
"Reason for contacting: Adverse Event\n", |
|
|
1191 |
"\n", |
|
|
1192 |
"Message: I have been using Enbrel for my rheumatoid arthritis, and recently, I've developed a severe skin rash with redness and itching. Is this a common side effect of Enbrel? Regards, Emily Anderson\n", |
|
|
1193 |
"\n", |
|
|
1194 |
"### Response:\n", |
|
|
1195 |
"{\"drug_name\": \"Enbrel\", \"adverse_events\": [\"severe skin rash\", \"redness\", \"itching\"]}\n", |
|
|
1196 |
"---------------------------------------------------------\n", |
|
|
1197 |
"\n", |
|
|
1198 |
"\n", |
|
|
1199 |
"### Input:\n", |
|
|
1200 |
"Madison Evans\n", |
|
|
1201 |
"madison.evans@email.com\n", |
|
|
1202 |
"654 Cedar Drive, Phoenix, AZ 85001\n", |
|
|
1203 |
"555-345-6789, United States\n", |
|
|
1204 |
"\n", |
|
|
1205 |
"Relationship to XYZ Pharma Inc.: Patient\n", |
|
|
1206 |
"Reason for contacting: Adverse Event\n", |
|
|
1207 |
"\n", |
|
|
1208 |
"Message: I've been using Symbicort, and it's causing me to experience shortness of breath. This is worrisome as it's supposed to help with breathing issues.\n", |
|
|
1209 |
"\n", |
|
|
1210 |
"### Response:\n", |
|
|
1211 |
"{\"drug_name\": \"Symbicort\", \"adverse_events\": [\"shortness of breath\"]}\n", |
|
|
1212 |
"---------------------------------------------------------\n", |
|
|
1213 |
"\n", |
|
|
1214 |
"\n", |
|
|
1215 |
"### Input:\n", |
|
|
1216 |
"Sarah Johnson\n", |
|
|
1217 |
"sarah.johnson@email.com\n", |
|
|
1218 |
"123 Elm Street, New York, NY 10001\n", |
|
|
1219 |
"555-123-4567, United States\n", |
|
|
1220 |
"\n", |
|
|
1221 |
"Relationship to XYZ Pharma Inc.: Patient\n", |
|
|
1222 |
"Reason for contacting: Adverse Event\n", |
|
|
1223 |
"\n", |
|
|
1224 |
"Message: I received Rituximab treatment for non-Hodgkin's lymphoma, and I developed a severe skin rash with blistering and peeling. Is this a known side effect?\n", |
|
|
1225 |
"\n", |
|
|
1226 |
"### Response:\n", |
|
|
1227 |
"{\"drug_name\": \"Rituximab\", \"adverse_events\": [\"severe skin rash\", \"blistering and peeling\"]}\n", |
|
|
1228 |
"---------------------------------------------------------\n", |
|
|
1229 |
"\n", |
|
|
1230 |
"\n", |
|
|
1231 |
"### Input:\n", |
|
|
1232 |
"Michael Johnson,\n", |
|
|
1233 |
"mjohnson@example.com\n", |
|
|
1234 |
"2525 Birch Avenue, Riverside, CA 92507,\n", |
|
|
1235 |
"951-555-2525, United States\n", |
|
|
1236 |
"\n", |
|
|
1237 |
"Relationship to XYZ Pharma Inc.: Patient\n", |
|
|
1238 |
"Reason for contacting: Adverse Event\n", |
|
|
1239 |
"\n", |
|
|
1240 |
"Message: I'm taking Celexa and have recently had a seizure. Is this a known side effect of the medication? Regards, Michael Johnson\n", |
|
|
1241 |
"\n", |
|
|
1242 |
"### Response:\n", |
|
|
1243 |
"{\"drug_name\": \"Celexa\", \"adverse_events\": [\"seizure\"]}\n", |
|
|
1244 |
"---------------------------------------------------------\n", |
|
|
1245 |
"\n", |
|
|
1246 |
"\n", |
|
|
1247 |
"### Input:\n", |
|
|
1248 |
"Daniel Clark\n", |
|
|
1249 |
"daniel.clark@example.com\n", |
|
|
1250 |
"666 Elm Street, Denver, CO 80201\n", |
|
|
1251 |
"3035551111, United States\n", |
|
|
1252 |
"\n", |
|
|
1253 |
"Relationship to XYZ Pharma Inc.: Patient\n", |
|
|
1254 |
"Reason for contacting: Adverse Event\n", |
|
|
1255 |
"\n", |
|
|
1256 |
"Message: I've been prescribed Lipitor, and I've noticed a persistent metallic taste in my mouth. It's quite unpleasant, and I'm concerned about this taste being related to the medication. Can you provide some guidance?\n", |
|
|
1257 |
"\n", |
|
|
1258 |
"### Response:\n", |
|
|
1259 |
"{\"drug_name\": \"Lipitor\", \"adverse_events\": [\"persistent metallic taste in mouth\"]}\n", |
|
|
1260 |
"---------------------------------------------------------\n", |
|
|
1261 |
"\n", |
|
|
1262 |
"\n" |
|
|
1263 |
] |
|
|
1264 |
} |
|
|
1265 |
], |
|
|
1266 |
"source": [ |
|
|
1267 |
"test_data_with_prediction = []\n", |
|
|
1268 |
"for sample in test_data:\n", |
|
|
1269 |
" # Generate prompt from sample\n", |
|
|
1270 |
" prompt = generate_prompt(sample)\n", |
|
|
1271 |
" fabric.print(prompt)\n", |
|
|
1272 |
" \n", |
|
|
1273 |
" # Encode the prompt\n", |
|
|
1274 |
" encoded = tokenizer.encode(prompt, device=fabric.device)\n", |
|
|
1275 |
" \n", |
|
|
1276 |
" # Generate the prediction from the LLM\n", |
|
|
1277 |
" y = generate(model, encoded, max_returned_tokens, temperature=temperature, top_k=top_k, eos_id=tokenizer.eos_id)\n", |
|
|
1278 |
" output = tokenizer.decode(y)\n", |
|
|
1279 |
" \n", |
|
|
1280 |
" # Process the predicted completion\n", |
|
|
1281 |
" output = output.split(\"### Response:\")[1].strip()\n", |
|
|
1282 |
" \n", |
|
|
1283 |
" # Store prediction along with input and ground truth\n", |
|
|
1284 |
" sample['prediction'] = output\n", |
|
|
1285 |
" test_data_with_prediction.append(sample)\n", |
|
|
1286 |
" \n", |
|
|
1287 |
" fabric.print(output)\n", |
|
|
1288 |
" fabric.print(\"---------------------------------------------------------\\n\\n\")" |
|
|
1289 |
] |
|
|
1290 |
}, |
|
|
1291 |
{ |
|
|
1292 |
"cell_type": "code", |
|
|
1293 |
"execution_count": 16, |
|
|
1294 |
"id": "1616278a-0dca-48b7-b254-f1bd957942ef", |
|
|
1295 |
"metadata": {}, |
|
|
1296 |
"outputs": [], |
|
|
1297 |
"source": [ |
|
|
1298 |
"# Write the predictions data to a file\n", |
|
|
1299 |
"with open(predictions_file_name, 'w') as file:\n", |
|
|
1300 |
" json.dump(test_data_with_prediction, file, indent=4)" |
|
|
1301 |
] |
|
|
1302 |
}, |
|
|
1303 |
{ |
|
|
1304 |
"cell_type": "code", |
|
|
1305 |
"execution_count": null, |
|
|
1306 |
"id": "047cb010-58dd-4913-a0e5-fe167d32c320", |
|
|
1307 |
"metadata": {}, |
|
|
1308 |
"outputs": [], |
|
|
1309 |
"source": [] |
|
|
1310 |
} |
|
|
1311 |
], |
|
|
1312 |
"metadata": { |
|
|
1313 |
"kernelspec": { |
|
|
1314 |
"display_name": "new", |
|
|
1315 |
"language": "python", |
|
|
1316 |
"name": "new" |
|
|
1317 |
}, |
|
|
1318 |
"language_info": { |
|
|
1319 |
"codemirror_mode": { |
|
|
1320 |
"name": "ipython", |
|
|
1321 |
"version": 3 |
|
|
1322 |
}, |
|
|
1323 |
"file_extension": ".py", |
|
|
1324 |
"mimetype": "text/x-python", |
|
|
1325 |
"name": "python", |
|
|
1326 |
"nbconvert_exporter": "python", |
|
|
1327 |
"pygments_lexer": "ipython3", |
|
|
1328 |
"version": "3.10.13" |
|
|
1329 |
} |
|
|
1330 |
}, |
|
|
1331 |
"nbformat": 4, |
|
|
1332 |
"nbformat_minor": 5 |
|
|
1333 |
} |