File size: 22,672 Bytes
feb5be5
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 2,
   "id": "16fd83c7-9f91-40ab-ac15-57b02a63b7f4",
   "metadata": {
    "tags": []
   },
   "outputs": [],
   "source": [
    "import os\n",
    "os.environ['HF_HOME'] = \"/scratch/tar3kh/models/cache\"\n",
    "import torch \n",
    "\n",
    "from datasets import load_dataset #datasets is huggingface's dataset package\n",
    "import matplotlib.pyplot as plt\n",
    "import numpy as np\n",
    "import pandas as pd\n",
    "import PIL"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "f748fb12-da99-4702-bfb2-263e091fee14",
   "metadata": {},
   "source": [
    "## Synthetic Dataset (generating budgets)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 14,
   "id": "61502633-b04c-44fd-b39f-7803ef778205",
   "metadata": {
    "tags": []
   },
   "outputs": [],
   "source": [
    "size = 3000\n",
    "\n",
    "np.random.seed(60)\n",
    "Income_Randomizer = np.random.randint(29000,251000, size=size).astype(int)\n",
    "#print(Income_Randomizer)\n",
    "np.random.seed(60)\n",
    "\n",
    "Rent_Randomizer = np.random.randint(500,2500, size=size).astype(int)\n",
    "#print(Rent_Randomizer)\n",
    "np.random.seed(60)\n",
    "\n",
    "Car_Randomizer = np.random.randint(200,1000, size=size).astype(int)\n",
    "#print(Car_Randomizer)\n",
    "np.random.seed(60)\n",
    "\n",
    "Other_Randomizer = np.random.randint(200,600, size=size).astype(int)\n",
    "#print(Other_Randomizer)\n",
    "\n",
    "Example_promtps = []\n",
    "\n",
    "for x in range(len(Income_Randomizer)):\n",
    "    Example_promtps.append('I  have an income of about ' +\n",
    "                           str(Income_Randomizer[x]) +\n",
    "                           ' a year and my monthly expenses include ' +\n",
    "                           str(Rent_Randomizer[x]) +\n",
    "                           ' a month in rent and utilities, a ' +\n",
    "                           str(Car_Randomizer[x]) +\n",
    "                           ' car payment, $300 in food, and about ' +\n",
    "                           str(Other_Randomizer[x]) +\n",
    "                           ' a month in other expenses. Using python, can you create for me a budget spreadsheet and export it to excel?')\n",
    "\n",
    "#Example_promtps = ['I  have an income of about ' + str(Income_Randomizer[0]) + ' a year and my monthly expenses include ' + str(Rent_Randomizer[0]) + ' a month in rent and utilities, a ' + str(Car_Randomizer[0]) + ' car payment, $300 in food, and about ' + str(Other_Randomizer[0]) + ' a month in other expenses. Using python, can you create for me a budget spreadsheet and export it to excel?',]\n",
    "Example_outputs = []\n",
    "\n",
    "for x in range(len(Income_Randomizer)):\n",
    "    Example_outputs.append(''' import pandas as pd\n",
    "import openpyxl\n",
    "\n",
    "# Define income and expenses\n",
    "annual_income = '''+ str(Income_Randomizer[x])+'''\n",
    "monthly_income = annual_income / 12\n",
    "\n",
    "expenses = {\n",
    "    \"Rent & Utilities\": '''+ str(Rent_Randomizer[x] )+''',\n",
    "    \"Car Payment\": '''+ str(Car_Randomizer[x]) +''',\n",
    "    \"Food\": 300,\n",
    "    \"Other Expenses\": '''+ str(Other_Randomizer[x]) +'''\n",
    "}\n",
    "\n",
    "total_expenses = sum(expenses.values())\n",
    "net_savings = monthly_income - total_expenses\n",
    "\n",
    "# Create DataFrame\n",
    "budget_data = {\n",
    "    \"Category\": [\"Monthly Income\"] + list(expenses.keys()) + [\"Total Expenses\", \"Net Savings\"],\n",
    "    \"Amount ($)\": [monthly_income] + list(expenses.values()) + [total_expenses, net_savings]\n",
    "}\n",
    "\n",
    "df = pd.DataFrame(budget_data)\n",
    "\n",
    "# Save to Excel\n",
    "file_name = \"budget.xlsx\"\n",
    "df.to_excel(file_name, index=False, engine='openpyxl')\n",
    "\n",
    "print(f\"Budget spreadsheet saved as {file_name}\")''')\n",
    "\n",
    "df2 = pd.DataFrame({'question':Example_promtps,\n",
    "                    'response': Example_outputs})\n",
    "\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 15,
   "id": "79e98786-47d7-4a83-943a-7d5484bd4c2c",
   "metadata": {
    "tags": []
   },
   "outputs": [],
   "source": [
    "df2['instruct'] = \"Q: \" + df2['question'] + \"\\n\\nA: \" + \"Lets think step by step.\" + df2['response']\n",
    "df2['question_1'] = \"Q: \" + df2['question'] + \"\\n\\nA: \" + \"Lets think step by step.\" "
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 16,
   "id": "1199470a-790e-4c60-8bb5-15d7b64aa43a",
   "metadata": {
    "tags": []
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>question</th>\n",
       "      <th>response</th>\n",
       "      <th>instruct</th>\n",
       "      <th>question_1</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>I  have an income of about 162325 a year and m...</td>\n",
       "      <td>import pandas as pd\\nimport openpyxl\\n\\n# Def...</td>\n",
       "      <td>Q: I  have an income of about 162325 a year an...</td>\n",
       "      <td>Q: I  have an income of about 162325 a year an...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>I  have an income of about 35543 a year and my...</td>\n",
       "      <td>import pandas as pd\\nimport openpyxl\\n\\n# Def...</td>\n",
       "      <td>Q: I  have an income of about 35543 a year and...</td>\n",
       "      <td>Q: I  have an income of about 35543 a year and...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>I  have an income of about 203179 a year and m...</td>\n",
       "      <td>import pandas as pd\\nimport openpyxl\\n\\n# Def...</td>\n",
       "      <td>Q: I  have an income of about 203179 a year an...</td>\n",
       "      <td>Q: I  have an income of about 203179 a year an...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>I  have an income of about 197008 a year and m...</td>\n",
       "      <td>import pandas as pd\\nimport openpyxl\\n\\n# Def...</td>\n",
       "      <td>Q: I  have an income of about 197008 a year an...</td>\n",
       "      <td>Q: I  have an income of about 197008 a year an...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>I  have an income of about 223681 a year and m...</td>\n",
       "      <td>import pandas as pd\\nimport openpyxl\\n\\n# Def...</td>\n",
       "      <td>Q: I  have an income of about 223681 a year an...</td>\n",
       "      <td>Q: I  have an income of about 223681 a year an...</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "                                            question  \\\n",
       "0  I  have an income of about 162325 a year and m...   \n",
       "1  I  have an income of about 35543 a year and my...   \n",
       "2  I  have an income of about 203179 a year and m...   \n",
       "3  I  have an income of about 197008 a year and m...   \n",
       "4  I  have an income of about 223681 a year and m...   \n",
       "\n",
       "                                            response  \\\n",
       "0   import pandas as pd\\nimport openpyxl\\n\\n# Def...   \n",
       "1   import pandas as pd\\nimport openpyxl\\n\\n# Def...   \n",
       "2   import pandas as pd\\nimport openpyxl\\n\\n# Def...   \n",
       "3   import pandas as pd\\nimport openpyxl\\n\\n# Def...   \n",
       "4   import pandas as pd\\nimport openpyxl\\n\\n# Def...   \n",
       "\n",
       "                                            instruct  \\\n",
       "0  Q: I  have an income of about 162325 a year an...   \n",
       "1  Q: I  have an income of about 35543 a year and...   \n",
       "2  Q: I  have an income of about 203179 a year an...   \n",
       "3  Q: I  have an income of about 197008 a year an...   \n",
       "4  Q: I  have an income of about 223681 a year an...   \n",
       "\n",
       "                                          question_1  \n",
       "0  Q: I  have an income of about 162325 a year an...  \n",
       "1  Q: I  have an income of about 35543 a year and...  \n",
       "2  Q: I  have an income of about 203179 a year an...  \n",
       "3  Q: I  have an income of about 197008 a year an...  \n",
       "4  Q: I  have an income of about 223681 a year an...  "
      ]
     },
     "execution_count": 16,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df2.head()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 17,
   "id": "1b66310d-41e4-4592-8516-b35b635baead",
   "metadata": {
    "tags": []
   },
   "outputs": [],
   "source": [
    "df2.to_csv('budget_dataset.csv', index=False)"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "2fac1974-19a0-4853-bbe5-9867b57819ce",
   "metadata": {},
   "source": [
    "## Synthetic Dataset (Financial Goals)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 18,
   "id": "e4d8b755-25ec-472f-a8e4-52d153ff2f46",
   "metadata": {
    "tags": []
   },
   "outputs": [],
   "source": [
    "# datset set up\n",
    "\n",
    "size = 3000\n",
    "\n",
    "\n",
    "np.random.seed(60)\n",
    "short_term_goals = np.random.randint(1000,5000, size=size).astype(int)\n",
    "\n",
    "np.random.seed(60)\n",
    "medium_term_goals = np.random.randint(5000,10000, size=size).astype(int)\n",
    "\n",
    "np.random.seed(60)\n",
    "long_term_goals = np.random.randint(75000,200000, size=size).astype(int)\n",
    "\n",
    "# print(short_term_goals)\n",
    "# print(medium_term_goals)\n",
    "# print(long_term_goals)\n",
    "\n",
    "prompts = []\n",
    "\n",
    "for x in range(len(short_term_goals)):\n",
    "    prompts.append('My short term goal is to save for a $' +\n",
    "                   str(short_term_goals[x]) +\n",
    "                   ' vacation in the next year, my medium term goal is to save for down payment for a new car, around ' +\n",
    "                   str(medium_term_goals[x]) +\n",
    "                   ' in the next 2 or 3 years, and my long term goal is to save for a down payment for a house around ' +\n",
    "                   str(long_term_goals[x]) +\n",
    "                   ' in the next ten years, can you help me integrate these goals into my budget as well as where I should store these savings?')\n",
    "\n",
    "outputs = []\n",
    "for x in range(len(short_term_goals)):\n",
    "    outputs.append(''' 1. Short-Term Goal: $'''+ str(short_term_goals[x]) +''' Vacation (1 Year)\n",
    "Timeline: 12 months\n",
    "Monthly Savings Needed: '''+ str(short_term_goals[x]) + ''' / 12 = '''+ str((short_term_goals[x]/12).round()) +'''\n",
    "\n",
    "Best Storage Option: High-yield savings account (HYSA)\n",
    "Easy access\n",
    "Earns some interest\n",
    "Safe from market fluctuations,\n",
    "\n",
    "2. Medium-Term Goal: $'''+ str(medium_term_goals[x]) +'''  Car Down Payment (2–3 Years)\n",
    "Timeline Options:\n",
    "2 years (24 months) → $''' + str((medium_term_goals[x]/24).round()) + '''/month\n",
    "3 years (36 months) → $''' + str((medium_term_goals[x]/36).round()) + '''/month\n",
    "Best Storage Option: HYSA or conservative investment\n",
    "If comfortable with some risk, a mix of HYSA + conservative investments (e.g., CDs, bond ETFs)\n",
    "If risk-averse, keep it in an HYSA,\n",
    "\n",
    "3. Long-Term Goal: $'''+ str(long_term_goals[x]) +'''   House Down Payment (10 Years)\n",
    "Timeline: 120 months\n",
    "Monthly Savings Needed: '''+ str(long_term_goals[x]) + ''' / 120 = '''+ str((long_term_goals[x]/120).round()) +''' \n",
    "\n",
    "Best Storage Option: Investment account\n",
    "Given the long time horizon, investing in a mix of index funds (S&P 500, total stock market) + bonds could provide higher returns.\n",
    "Consider Roth IRA (if eligible) or brokerage account to allow tax-efficient growth.\n",
    "\n",
    "Summary of Total Savings Targets:\n",
    "Total Monthly Savings goal = $''' +str(((short_term_goals[x]/12)+(medium_term_goals[x]/36)+(long_term_goals[x]/120)).round()) +''' - $''' +str(((short_term_goals[x]/12)+(medium_term_goals[x]/24)+(long_term_goals[x]/120)).round()) +'''/month'''\n",
    "                  )\n",
    "    \n",
    "df3 = pd.DataFrame({'question':prompts,\n",
    "                    'response':outputs})"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 19,
   "id": "f7f484a6-5cc5-4a77-a474-1fc921095dc2",
   "metadata": {
    "tags": []
   },
   "outputs": [],
   "source": [
    "df3['instruct'] = \"Q: \" + df3['question'] + \"\\n\\nA: \" + \"Lets think step by step.\" + df3['response']\n",
    "df3['question_1'] = \"Q: \" + df3['question'] + \"\\n\\nA: \" + \"Lets think step by step.\" "
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 20,
   "id": "63d3c1cd-943b-41b3-ab4f-85f11510eeca",
   "metadata": {
    "tags": []
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>question</th>\n",
       "      <th>response</th>\n",
       "      <th>instruct</th>\n",
       "      <th>question_1</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>My short term goal is to save for a $3253 vaca...</td>\n",
       "      <td>1. Short-Term Goal: $3253 Vacation (1 Year)\\n...</td>\n",
       "      <td>Q: My short term goal is to save for a $3253 v...</td>\n",
       "      <td>Q: My short term goal is to save for a $3253 v...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>My short term goal is to save for a $4137 vaca...</td>\n",
       "      <td>1. Short-Term Goal: $4137 Vacation (1 Year)\\n...</td>\n",
       "      <td>Q: My short term goal is to save for a $4137 v...</td>\n",
       "      <td>Q: My short term goal is to save for a $4137 v...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>My short term goal is to save for a $4654 vaca...</td>\n",
       "      <td>1. Short-Term Goal: $4654 Vacation (1 Year)\\n...</td>\n",
       "      <td>Q: My short term goal is to save for a $4654 v...</td>\n",
       "      <td>Q: My short term goal is to save for a $4654 v...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>My short term goal is to save for a $2418 vaca...</td>\n",
       "      <td>1. Short-Term Goal: $2418 Vacation (1 Year)\\n...</td>\n",
       "      <td>Q: My short term goal is to save for a $2418 v...</td>\n",
       "      <td>Q: My short term goal is to save for a $2418 v...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>My short term goal is to save for a $3447 vaca...</td>\n",
       "      <td>1. Short-Term Goal: $3447 Vacation (1 Year)\\n...</td>\n",
       "      <td>Q: My short term goal is to save for a $3447 v...</td>\n",
       "      <td>Q: My short term goal is to save for a $3447 v...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>5</th>\n",
       "      <td>My short term goal is to save for a $3147 vaca...</td>\n",
       "      <td>1. Short-Term Goal: $3147 Vacation (1 Year)\\n...</td>\n",
       "      <td>Q: My short term goal is to save for a $3147 v...</td>\n",
       "      <td>Q: My short term goal is to save for a $3147 v...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>6</th>\n",
       "      <td>My short term goal is to save for a $1072 vaca...</td>\n",
       "      <td>1. Short-Term Goal: $1072 Vacation (1 Year)\\n...</td>\n",
       "      <td>Q: My short term goal is to save for a $1072 v...</td>\n",
       "      <td>Q: My short term goal is to save for a $1072 v...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>7</th>\n",
       "      <td>My short term goal is to save for a $3169 vaca...</td>\n",
       "      <td>1. Short-Term Goal: $3169 Vacation (1 Year)\\n...</td>\n",
       "      <td>Q: My short term goal is to save for a $3169 v...</td>\n",
       "      <td>Q: My short term goal is to save for a $3169 v...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>8</th>\n",
       "      <td>My short term goal is to save for a $4985 vaca...</td>\n",
       "      <td>1. Short-Term Goal: $4985 Vacation (1 Year)\\n...</td>\n",
       "      <td>Q: My short term goal is to save for a $4985 v...</td>\n",
       "      <td>Q: My short term goal is to save for a $4985 v...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>9</th>\n",
       "      <td>My short term goal is to save for a $3722 vaca...</td>\n",
       "      <td>1. Short-Term Goal: $3722 Vacation (1 Year)\\n...</td>\n",
       "      <td>Q: My short term goal is to save for a $3722 v...</td>\n",
       "      <td>Q: My short term goal is to save for a $3722 v...</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "                                            question  \\\n",
       "0  My short term goal is to save for a $3253 vaca...   \n",
       "1  My short term goal is to save for a $4137 vaca...   \n",
       "2  My short term goal is to save for a $4654 vaca...   \n",
       "3  My short term goal is to save for a $2418 vaca...   \n",
       "4  My short term goal is to save for a $3447 vaca...   \n",
       "5  My short term goal is to save for a $3147 vaca...   \n",
       "6  My short term goal is to save for a $1072 vaca...   \n",
       "7  My short term goal is to save for a $3169 vaca...   \n",
       "8  My short term goal is to save for a $4985 vaca...   \n",
       "9  My short term goal is to save for a $3722 vaca...   \n",
       "\n",
       "                                            response  \\\n",
       "0   1. Short-Term Goal: $3253 Vacation (1 Year)\\n...   \n",
       "1   1. Short-Term Goal: $4137 Vacation (1 Year)\\n...   \n",
       "2   1. Short-Term Goal: $4654 Vacation (1 Year)\\n...   \n",
       "3   1. Short-Term Goal: $2418 Vacation (1 Year)\\n...   \n",
       "4   1. Short-Term Goal: $3447 Vacation (1 Year)\\n...   \n",
       "5   1. Short-Term Goal: $3147 Vacation (1 Year)\\n...   \n",
       "6   1. Short-Term Goal: $1072 Vacation (1 Year)\\n...   \n",
       "7   1. Short-Term Goal: $3169 Vacation (1 Year)\\n...   \n",
       "8   1. Short-Term Goal: $4985 Vacation (1 Year)\\n...   \n",
       "9   1. Short-Term Goal: $3722 Vacation (1 Year)\\n...   \n",
       "\n",
       "                                            instruct  \\\n",
       "0  Q: My short term goal is to save for a $3253 v...   \n",
       "1  Q: My short term goal is to save for a $4137 v...   \n",
       "2  Q: My short term goal is to save for a $4654 v...   \n",
       "3  Q: My short term goal is to save for a $2418 v...   \n",
       "4  Q: My short term goal is to save for a $3447 v...   \n",
       "5  Q: My short term goal is to save for a $3147 v...   \n",
       "6  Q: My short term goal is to save for a $1072 v...   \n",
       "7  Q: My short term goal is to save for a $3169 v...   \n",
       "8  Q: My short term goal is to save for a $4985 v...   \n",
       "9  Q: My short term goal is to save for a $3722 v...   \n",
       "\n",
       "                                          question_1  \n",
       "0  Q: My short term goal is to save for a $3253 v...  \n",
       "1  Q: My short term goal is to save for a $4137 v...  \n",
       "2  Q: My short term goal is to save for a $4654 v...  \n",
       "3  Q: My short term goal is to save for a $2418 v...  \n",
       "4  Q: My short term goal is to save for a $3447 v...  \n",
       "5  Q: My short term goal is to save for a $3147 v...  \n",
       "6  Q: My short term goal is to save for a $1072 v...  \n",
       "7  Q: My short term goal is to save for a $3169 v...  \n",
       "8  Q: My short term goal is to save for a $4985 v...  \n",
       "9  Q: My short term goal is to save for a $3722 v...  "
      ]
     },
     "execution_count": 20,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df3.head(10)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 21,
   "id": "2a4deb48-724f-46a4-8e55-4e41f648af6e",
   "metadata": {
    "tags": []
   },
   "outputs": [],
   "source": [
    "df3.to_csv('goals_dataset.csv', index=False)\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "313cd80a-c7be-489c-9c70-30885c7e614a",
   "metadata": {},
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "20de1e90-1c13-486a-b5db-09c957622a69",
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "llm_course_2",
   "language": "python",
   "name": "llm_course_2"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.11.11"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 5
}