File size: 39,930 Bytes
88f694a
 
 
 
dd3763f
 
88f694a
 
 
 
 
 
 
 
dd3763f
 
88f694a
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
dd3763f
88f694a
 
 
 
 
 
 
 
 
 
 
dd3763f
88f694a
 
 
 
 
 
 
 
 
 
 
dd3763f
88f694a
 
 
 
 
 
 
 
 
 
 
dd3763f
88f694a
 
 
 
 
 
 
 
 
 
 
dd3763f
88f694a
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
dd3763f
 
 
 
 
88f694a
 
dd3763f
88f694a
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
dd3763f
 
88f694a
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
dd3763f
88f694a
 
 
 
 
 
 
 
 
 
 
 
 
 
 
dd3763f
 
88f694a
 
 
 
 
 
 
 
 
 
 
 
dd3763f
88f694a
 
dd3763f
88f694a
 
 
 
 
 
 
 
 
 
 
 
dd3763f
 
88f694a
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
dd3763f
88f694a
 
 
 
 
 
 
 
 
 
 
 
 
 
dd3763f
88f694a
 
 
 
 
 
 
 
 
 
 
 
 
 
dd3763f
88f694a
 
 
 
 
 
 
 
 
 
 
 
 
 
dd3763f
88f694a
 
 
 
 
 
 
 
 
 
 
 
 
 
dd3763f
88f694a
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
dd3763f
88f694a
 
 
 
 
 
 
 
 
 
 
 
 
 
dd3763f
88f694a
 
 
 
 
 
 
 
 
 
 
 
 
 
dd3763f
88f694a
 
 
 
 
 
 
 
 
 
 
 
 
 
dd3763f
88f694a
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
dd3763f
 
 
 
 
88f694a
 
dd3763f
 
 
 
88f694a
 
 
 
dd3763f
88f694a
 
 
 
 
 
 
 
 
 
 
 
dd3763f
 
88f694a
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
dd3763f
88f694a
 
 
 
 
 
 
 
 
 
dd3763f
 
88f694a
 
 
 
 
 
 
 
 
dd3763f
88f694a
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 1,
   "id": "9e43247d",
   "metadata": {},
   "outputs": [],
   "source": [
    "import pandas as pd"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "id": "0ab32394",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "(200, 9)\n"
     ]
    },
    {
     "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>config_id</th>\n",
       "      <th>persona_id</th>\n",
       "      <th>persona</th>\n",
       "      <th>filters</th>\n",
       "      <th>context</th>\n",
       "      <th>city</th>\n",
       "      <th>llama_query_v</th>\n",
       "      <th>llama_query_p0</th>\n",
       "      <th>llama_query_p1</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>c_p_0_pop_low_easy</td>\n",
       "      <td>p_0</td>\n",
       "      <td>A top-scoring player in the local league who i...</td>\n",
       "      <td>{'popularity': 'low', 'month': 'February'}</td>\n",
       "      <td>Adana has low popularity. Adana has low season...</td>\n",
       "      <td>['Adana', 'Adiyaman', 'Agri', 'Arad', 'Arkhang...</td>\n",
       "      <td>\"Less crowded European cities to visit in Febr...</td>\n",
       "      <td>\"European cities with ice hockey facilities, l...</td>\n",
       "      <td>Which European cities have ice hockey arenas a...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>c_p_1_pop_medium_medium</td>\n",
       "      <td>p_1</td>\n",
       "      <td>A former DJ at WSUM who is now working as a mu...</td>\n",
       "      <td>{'popularity': 'medium', 'budget': 'medium', '...</td>\n",
       "      <td>Coimbra has medium popularity and medium budge...</td>\n",
       "      <td>['Coimbra', 'Brno', 'Braga']</td>\n",
       "      <td>'medium budget European city breaks with parks...</td>\n",
       "      <td>\"Medium budget European cities with parks and ...</td>\n",
       "      <td>Which European cities offer a mix of music fes...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>c_p_2_pop_high_hard</td>\n",
       "      <td>p_2</td>\n",
       "      <td>A fellow agent-turned-author who shares the sa...</td>\n",
       "      <td>{'popularity': 'high', 'budget': 'low', 'inter...</td>\n",
       "      <td>Zagreb has high popularity and low budget. Zag...</td>\n",
       "      <td>['Zagreb', 'Volgograd', 'Tirana', 'Tbilisi', '...</td>\n",
       "      <td>\"Looking for a popular and affordable European...</td>\n",
       "      <td>\"Low-budget European cities with museums and n...</td>\n",
       "      <td>Which European cities offer a mix of historica...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>c_p_3_pop_low_sustainable</td>\n",
       "      <td>p_3</td>\n",
       "      <td>a film critic who dislikes storylines involvin...</td>\n",
       "      <td>{'popularity': 'low', 'interests': 'Outdoors &amp;...</td>\n",
       "      <td>Van has low popularity. Van has low season in ...</td>\n",
       "      <td>['Van', 'Uzhhorod', 'Trabzon', 'Thessaloniki',...</td>\n",
       "      <td>\"European cities with low popularity, monaster...</td>\n",
       "      <td>\"off the beaten path European city breaks in l...</td>\n",
       "      <td>Which European cities offer a culturally rich ...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>c_p_4_pop_medium_easy</td>\n",
       "      <td>p_4</td>\n",
       "      <td>A biology major conducting research on equine ...</td>\n",
       "      <td>{'popularity': 'medium', 'budget': 'high'}</td>\n",
       "      <td>Aalborg has medium popularity and high budget....</td>\n",
       "      <td>['Aalborg', 'Astrakhan', 'Bari', 'Bremen', 'Ch...</td>\n",
       "      <td>\"European cities for a luxurious trip.\"</td>\n",
       "      <td>\"European cities with horse riding trails and ...</td>\n",
       "      <td>Which European cities have horse riding school...</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "                   config_id persona_id  \\\n",
       "0         c_p_0_pop_low_easy        p_0   \n",
       "1    c_p_1_pop_medium_medium        p_1   \n",
       "2        c_p_2_pop_high_hard        p_2   \n",
       "3  c_p_3_pop_low_sustainable        p_3   \n",
       "4      c_p_4_pop_medium_easy        p_4   \n",
       "\n",
       "                                             persona  \\\n",
       "0  A top-scoring player in the local league who i...   \n",
       "1  A former DJ at WSUM who is now working as a mu...   \n",
       "2  A fellow agent-turned-author who shares the sa...   \n",
       "3  a film critic who dislikes storylines involvin...   \n",
       "4  A biology major conducting research on equine ...   \n",
       "\n",
       "                                             filters  \\\n",
       "0         {'popularity': 'low', 'month': 'February'}   \n",
       "1  {'popularity': 'medium', 'budget': 'medium', '...   \n",
       "2  {'popularity': 'high', 'budget': 'low', 'inter...   \n",
       "3  {'popularity': 'low', 'interests': 'Outdoors &...   \n",
       "4         {'popularity': 'medium', 'budget': 'high'}   \n",
       "\n",
       "                                             context  \\\n",
       "0  Adana has low popularity. Adana has low season...   \n",
       "1  Coimbra has medium popularity and medium budge...   \n",
       "2  Zagreb has high popularity and low budget. Zag...   \n",
       "3  Van has low popularity. Van has low season in ...   \n",
       "4  Aalborg has medium popularity and high budget....   \n",
       "\n",
       "                                                city  \\\n",
       "0  ['Adana', 'Adiyaman', 'Agri', 'Arad', 'Arkhang...   \n",
       "1                       ['Coimbra', 'Brno', 'Braga']   \n",
       "2  ['Zagreb', 'Volgograd', 'Tirana', 'Tbilisi', '...   \n",
       "3  ['Van', 'Uzhhorod', 'Trabzon', 'Thessaloniki',...   \n",
       "4  ['Aalborg', 'Astrakhan', 'Bari', 'Bremen', 'Ch...   \n",
       "\n",
       "                                       llama_query_v  \\\n",
       "0  \"Less crowded European cities to visit in Febr...   \n",
       "1  'medium budget European city breaks with parks...   \n",
       "2  \"Looking for a popular and affordable European...   \n",
       "3  \"European cities with low popularity, monaster...   \n",
       "4            \"European cities for a luxurious trip.\"   \n",
       "\n",
       "                                      llama_query_p0  \\\n",
       "0  \"European cities with ice hockey facilities, l...   \n",
       "1  \"Medium budget European cities with parks and ...   \n",
       "2  \"Low-budget European cities with museums and n...   \n",
       "3  \"off the beaten path European city breaks in l...   \n",
       "4  \"European cities with horse riding trails and ...   \n",
       "\n",
       "                                      llama_query_p1  \n",
       "0  Which European cities have ice hockey arenas a...  \n",
       "1  Which European cities offer a mix of music fes...  \n",
       "2  Which European cities offer a mix of historica...  \n",
       "3  Which European cities offer a culturally rich ...  \n",
       "4  Which European cities have horse riding school...  "
      ]
     },
     "execution_count": 2,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "llama = pd.read_csv(\"../../data/llama_results_subset.csv\")\n",
    "# llama[\"model\"] = \"llama-3.2-90b\"\n",
    "\n",
    "llama.rename(columns={'query_v': \"llama_query_v\", 'query_p0': \"llama_query_p0\", \"query_p1\": \"llama_query_p1\"}, inplace = True)\n",
    "\n",
    "print(llama.shape)\n",
    "llama.head()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "id": "aed0fba7",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "(200, 9)\n"
     ]
    },
    {
     "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>config_id</th>\n",
       "      <th>persona_id</th>\n",
       "      <th>persona</th>\n",
       "      <th>filters</th>\n",
       "      <th>context</th>\n",
       "      <th>city</th>\n",
       "      <th>gemini_query_v</th>\n",
       "      <th>gemini_query_p0</th>\n",
       "      <th>gemini_query_p1</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>c_p_0_pop_low_easy</td>\n",
       "      <td>p_0</td>\n",
       "      <td>A top-scoring player in the local league who i...</td>\n",
       "      <td>{'popularity': 'low', 'month': 'February'}</td>\n",
       "      <td>Adana has low popularity. Adana has low season...</td>\n",
       "      <td>['Adana', 'Adiyaman', 'Agri', 'Arad', 'Arkhang...</td>\n",
       "      <td>Cheap European city break in February.\\n</td>\n",
       "      <td>European city break in February, less crowded ...</td>\n",
       "      <td>Best European cities for intense physical trai...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>c_p_1_pop_medium_medium</td>\n",
       "      <td>p_1</td>\n",
       "      <td>A former DJ at WSUM who is now working as a mu...</td>\n",
       "      <td>{'popularity': 'medium', 'budget': 'medium', '...</td>\n",
       "      <td>Coimbra has medium popularity and medium budge...</td>\n",
       "      <td>['Coimbra', 'Brno', 'Braga']</td>\n",
       "      <td>Medium budget European city break with parks a...</td>\n",
       "      <td>European city break, medium budget, good parks...</td>\n",
       "      <td>Best European cities for live music, especiall...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>c_p_2_pop_high_hard</td>\n",
       "      <td>p_2</td>\n",
       "      <td>A fellow agent-turned-author who shares the sa...</td>\n",
       "      <td>{'popularity': 'high', 'budget': 'low', 'inter...</td>\n",
       "      <td>Zagreb has high popularity and low budget. Zag...</td>\n",
       "      <td>['Zagreb', 'Volgograd', 'Tirana', 'Tbilisi', '...</td>\n",
       "      <td>Cheap January city break in Europe with museum...</td>\n",
       "      <td>European city break in January. Budget friendl...</td>\n",
       "      <td>Where can I find inspiring European cities wit...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>c_p_3_pop_low_sustainable</td>\n",
       "      <td>p_3</td>\n",
       "      <td>a film critic who dislikes storylines involvin...</td>\n",
       "      <td>{'popularity': 'low', 'interests': 'Outdoors &amp;...</td>\n",
       "      <td>Van has low popularity. Van has low season in ...</td>\n",
       "      <td>['Van', 'Uzhhorod', 'Trabzon', 'Thessaloniki',...</td>\n",
       "      <td>Cheap European city break in January with inte...</td>\n",
       "      <td>European city break in January. Low-budget des...</td>\n",
       "      <td>Best European cities for unique, artistic expe...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>c_p_4_pop_medium_easy</td>\n",
       "      <td>p_4</td>\n",
       "      <td>A biology major conducting research on equine ...</td>\n",
       "      <td>{'popularity': 'medium', 'budget': 'high'}</td>\n",
       "      <td>Aalborg has medium popularity and high budget....</td>\n",
       "      <td>['Aalborg', 'Astrakhan', 'Bari', 'Bremen', 'Ch...</td>\n",
       "      <td>Suggest some moderately popular European citie...</td>\n",
       "      <td>High-budget European city with equestrian attr...</td>\n",
       "      <td>European cities with renowned veterinary or ag...</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "                   config_id persona_id  \\\n",
       "0         c_p_0_pop_low_easy        p_0   \n",
       "1    c_p_1_pop_medium_medium        p_1   \n",
       "2        c_p_2_pop_high_hard        p_2   \n",
       "3  c_p_3_pop_low_sustainable        p_3   \n",
       "4      c_p_4_pop_medium_easy        p_4   \n",
       "\n",
       "                                             persona  \\\n",
       "0  A top-scoring player in the local league who i...   \n",
       "1  A former DJ at WSUM who is now working as a mu...   \n",
       "2  A fellow agent-turned-author who shares the sa...   \n",
       "3  a film critic who dislikes storylines involvin...   \n",
       "4  A biology major conducting research on equine ...   \n",
       "\n",
       "                                             filters  \\\n",
       "0         {'popularity': 'low', 'month': 'February'}   \n",
       "1  {'popularity': 'medium', 'budget': 'medium', '...   \n",
       "2  {'popularity': 'high', 'budget': 'low', 'inter...   \n",
       "3  {'popularity': 'low', 'interests': 'Outdoors &...   \n",
       "4         {'popularity': 'medium', 'budget': 'high'}   \n",
       "\n",
       "                                             context  \\\n",
       "0  Adana has low popularity. Adana has low season...   \n",
       "1  Coimbra has medium popularity and medium budge...   \n",
       "2  Zagreb has high popularity and low budget. Zag...   \n",
       "3  Van has low popularity. Van has low season in ...   \n",
       "4  Aalborg has medium popularity and high budget....   \n",
       "\n",
       "                                                city  \\\n",
       "0  ['Adana', 'Adiyaman', 'Agri', 'Arad', 'Arkhang...   \n",
       "1                       ['Coimbra', 'Brno', 'Braga']   \n",
       "2  ['Zagreb', 'Volgograd', 'Tirana', 'Tbilisi', '...   \n",
       "3  ['Van', 'Uzhhorod', 'Trabzon', 'Thessaloniki',...   \n",
       "4  ['Aalborg', 'Astrakhan', 'Bari', 'Bremen', 'Ch...   \n",
       "\n",
       "                                      gemini_query_v  \\\n",
       "0           Cheap European city break in February.\\n   \n",
       "1  Medium budget European city break with parks a...   \n",
       "2  Cheap January city break in Europe with museum...   \n",
       "3  Cheap European city break in January with inte...   \n",
       "4  Suggest some moderately popular European citie...   \n",
       "\n",
       "                                     gemini_query_p0  \\\n",
       "0  European city break in February, less crowded ...   \n",
       "1  European city break, medium budget, good parks...   \n",
       "2  European city break in January. Budget friendl...   \n",
       "3  European city break in January. Low-budget des...   \n",
       "4  High-budget European city with equestrian attr...   \n",
       "\n",
       "                                     gemini_query_p1  \n",
       "0  Best European cities for intense physical trai...  \n",
       "1  Best European cities for live music, especiall...  \n",
       "2  Where can I find inspiring European cities wit...  \n",
       "3  Best European cities for unique, artistic expe...  \n",
       "4  European cities with renowned veterinary or ag...  "
      ]
     },
     "execution_count": 3,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "gemini = pd.read_csv(\"../../data/gemini_results_subset.csv\")\n",
    "# gemini[\"model\"] = \"gemini-1.5-pro-002\"\n",
    "gemini.rename(columns={'query_v': \"gemini_query_v\", 'query_p0': \"gemini_query_p0\", \"query_p1\": \"gemini_query_p1\"}, inplace = True)\n",
    "\n",
    "print(gemini.shape)\n",
    "gemini.head()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "id": "7a0bbd7e",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "6\n"
     ]
    },
    {
     "data": {
      "text/plain": [
       "['config_id', 'persona_id', 'filters', 'persona', 'city', 'context']"
      ]
     },
     "execution_count": 4,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "common_cols = list(set(list(gemini)).intersection(set(list(llama))))\n",
    "print(len(common_cols))\n",
    "common_cols"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "id": "ca123dd4",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "(200, 12)\n"
     ]
    },
    {
     "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>config_id</th>\n",
       "      <th>persona_id</th>\n",
       "      <th>persona</th>\n",
       "      <th>filters</th>\n",
       "      <th>context</th>\n",
       "      <th>city</th>\n",
       "      <th>gemini_query_v</th>\n",
       "      <th>gemini_query_p0</th>\n",
       "      <th>gemini_query_p1</th>\n",
       "      <th>llama_query_v</th>\n",
       "      <th>llama_query_p0</th>\n",
       "      <th>llama_query_p1</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>c_p_0_pop_low_easy</td>\n",
       "      <td>p_0</td>\n",
       "      <td>A top-scoring player in the local league who i...</td>\n",
       "      <td>{'popularity': 'low', 'month': 'February'}</td>\n",
       "      <td>Adana has low popularity. Adana has low season...</td>\n",
       "      <td>['Adana', 'Adiyaman', 'Agri', 'Arad', 'Arkhang...</td>\n",
       "      <td>Cheap European city break in February.\\n</td>\n",
       "      <td>European city break in February, less crowded ...</td>\n",
       "      <td>Best European cities for intense physical trai...</td>\n",
       "      <td>\"Less crowded European cities to visit in Febr...</td>\n",
       "      <td>\"European cities with ice hockey facilities, l...</td>\n",
       "      <td>Which European cities have ice hockey arenas a...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>c_p_1_pop_medium_medium</td>\n",
       "      <td>p_1</td>\n",
       "      <td>A former DJ at WSUM who is now working as a mu...</td>\n",
       "      <td>{'popularity': 'medium', 'budget': 'medium', '...</td>\n",
       "      <td>Coimbra has medium popularity and medium budge...</td>\n",
       "      <td>['Coimbra', 'Brno', 'Braga']</td>\n",
       "      <td>Medium budget European city break with parks a...</td>\n",
       "      <td>European city break, medium budget, good parks...</td>\n",
       "      <td>Best European cities for live music, especiall...</td>\n",
       "      <td>'medium budget European city breaks with parks...</td>\n",
       "      <td>\"Medium budget European cities with parks and ...</td>\n",
       "      <td>Which European cities offer a mix of music fes...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>c_p_2_pop_high_hard</td>\n",
       "      <td>p_2</td>\n",
       "      <td>A fellow agent-turned-author who shares the sa...</td>\n",
       "      <td>{'popularity': 'high', 'budget': 'low', 'inter...</td>\n",
       "      <td>Zagreb has high popularity and low budget. Zag...</td>\n",
       "      <td>['Zagreb', 'Volgograd', 'Tirana', 'Tbilisi', '...</td>\n",
       "      <td>Cheap January city break in Europe with museum...</td>\n",
       "      <td>European city break in January. Budget friendl...</td>\n",
       "      <td>Where can I find inspiring European cities wit...</td>\n",
       "      <td>\"Looking for a popular and affordable European...</td>\n",
       "      <td>\"Low-budget European cities with museums and n...</td>\n",
       "      <td>Which European cities offer a mix of historica...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>c_p_3_pop_low_sustainable</td>\n",
       "      <td>p_3</td>\n",
       "      <td>a film critic who dislikes storylines involvin...</td>\n",
       "      <td>{'popularity': 'low', 'interests': 'Outdoors &amp;...</td>\n",
       "      <td>Van has low popularity. Van has low season in ...</td>\n",
       "      <td>['Van', 'Uzhhorod', 'Trabzon', 'Thessaloniki',...</td>\n",
       "      <td>Cheap European city break in January with inte...</td>\n",
       "      <td>European city break in January. Low-budget des...</td>\n",
       "      <td>Best European cities for unique, artistic expe...</td>\n",
       "      <td>\"European cities with low popularity, monaster...</td>\n",
       "      <td>\"off the beaten path European city breaks in l...</td>\n",
       "      <td>Which European cities offer a culturally rich ...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>c_p_4_pop_medium_easy</td>\n",
       "      <td>p_4</td>\n",
       "      <td>A biology major conducting research on equine ...</td>\n",
       "      <td>{'popularity': 'medium', 'budget': 'high'}</td>\n",
       "      <td>Aalborg has medium popularity and high budget....</td>\n",
       "      <td>['Aalborg', 'Astrakhan', 'Bari', 'Bremen', 'Ch...</td>\n",
       "      <td>Suggest some moderately popular European citie...</td>\n",
       "      <td>High-budget European city with equestrian attr...</td>\n",
       "      <td>European cities with renowned veterinary or ag...</td>\n",
       "      <td>\"European cities for a luxurious trip.\"</td>\n",
       "      <td>\"European cities with horse riding trails and ...</td>\n",
       "      <td>Which European cities have horse riding school...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>...</th>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>195</th>\n",
       "      <td>c_p_8_pop_medium_easy</td>\n",
       "      <td>p_8</td>\n",
       "      <td>A junior Flash developer seeking guidance on c...</td>\n",
       "      <td>{'popularity': 'medium', 'interests': 'Outdoor...</td>\n",
       "      <td>Zaragoza has medium popularity. In Zaragoza yo...</td>\n",
       "      <td>['Zaragoza', 'Varna', 'Turku', 'Tampere', 'Szc...</td>\n",
       "      <td>Good places to swim outdoors in Europe\\n</td>\n",
       "      <td>Good places for a Flash developer to visit in ...</td>\n",
       "      <td>Best European cities for tech meetups &amp; cowork...</td>\n",
       "      <td>\"European cities with medium popularity for ou...</td>\n",
       "      <td>A junior Flash developer seeking guidance on c...</td>\n",
       "      <td>Which European cities offer a mix of cultural ...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>196</th>\n",
       "      <td>c_p_9_pop_high_medium</td>\n",
       "      <td>p_9</td>\n",
       "      <td>An avid gamer who has played Sins of a Solar E...</td>\n",
       "      <td>{'popularity': 'high', 'month': 'April', 'budg...</td>\n",
       "      <td>Sarajevo has high popularity and medium budget...</td>\n",
       "      <td>['Sarajevo', 'Tallinn', 'Vilnius', 'Belgrade',...</td>\n",
       "      <td>Medium budget European city break in April wit...</td>\n",
       "      <td>Budget-friendly European city break in April w...</td>\n",
       "      <td>European cities with a grand, futuristic feel ...</td>\n",
       "      <td>'medium budget trip in April to a popular Euro...</td>\n",
       "      <td>\"Medium budget trip to a popular European city...</td>\n",
       "      <td>Which European cities have a rich history of e...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>197</th>\n",
       "      <td>c_p_10_pop_low_hard</td>\n",
       "      <td>p_10</td>\n",
       "      <td>An atheist, philosophy lecturer who encourages...</td>\n",
       "      <td>{'popularity': 'low', 'interests': 'Outdoors &amp;...</td>\n",
       "      <td>Malatya has low popularity and high budget. Ma...</td>\n",
       "      <td>['Malatya', 'Ioannina']</td>\n",
       "      <td>High-budget European city trip in February wit...</td>\n",
       "      <td>European city break in February. Low season &amp; ...</td>\n",
       "      <td>Where can I find European cities rich in histo...</td>\n",
       "      <td>\"Less crowded European destinations with water...</td>\n",
       "      <td>\"Less crowded European destinations for a pric...</td>\n",
       "      <td>European cities with rich history of philosoph...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>198</th>\n",
       "      <td>c_p_11_pop_medium_sustainable</td>\n",
       "      <td>p_11</td>\n",
       "      <td>A young apprentice fascinated by the technolog...</td>\n",
       "      <td>{'popularity': 'medium', 'budget': 'low', 'mon...</td>\n",
       "      <td>Chelyabinsk has medium popularity , low budget...</td>\n",
       "      <td>['Chelyabinsk', 'Kirov', 'Podgorica', 'Rijeka'...</td>\n",
       "      <td>Suggest a low-budget, walkable European city b...</td>\n",
       "      <td>Budget-friendly European city break in April, ...</td>\n",
       "      <td>Which European cities offer glimpses into the ...</td>\n",
       "      <td>\"European cities with great walkability and lo...</td>\n",
       "      <td>\"European cities with industrial heritage site...</td>\n",
       "      <td>Which European cities showcase historic indust...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>199</th>\n",
       "      <td>c_p_12_pop_high_easy</td>\n",
       "      <td>p_12</td>\n",
       "      <td>A high school guidance counselor in Winnebago ...</td>\n",
       "      <td>{'popularity': 'high', 'budget': 'medium'}</td>\n",
       "      <td>Belgrade has high popularity and medium budget...</td>\n",
       "      <td>['Belgrade', 'Bratislava', 'Budapest', 'Nicosi...</td>\n",
       "      <td>Popular and affordable European city break des...</td>\n",
       "      <td>Affordable, popular European capitals for a we...</td>\n",
       "      <td>Affordable, safe European cities with historic...</td>\n",
       "      <td>'medium budget european city breaks in popular...</td>\n",
       "      <td>\"Medium budget city breaks in Europe for a sch...</td>\n",
       "      <td>Which European cities offer a mix of cultural ...</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>200 rows × 12 columns</p>\n",
       "</div>"
      ],
      "text/plain": [
       "                         config_id persona_id  \\\n",
       "0               c_p_0_pop_low_easy        p_0   \n",
       "1          c_p_1_pop_medium_medium        p_1   \n",
       "2              c_p_2_pop_high_hard        p_2   \n",
       "3        c_p_3_pop_low_sustainable        p_3   \n",
       "4            c_p_4_pop_medium_easy        p_4   \n",
       "..                             ...        ...   \n",
       "195          c_p_8_pop_medium_easy        p_8   \n",
       "196          c_p_9_pop_high_medium        p_9   \n",
       "197            c_p_10_pop_low_hard       p_10   \n",
       "198  c_p_11_pop_medium_sustainable       p_11   \n",
       "199           c_p_12_pop_high_easy       p_12   \n",
       "\n",
       "                                               persona  \\\n",
       "0    A top-scoring player in the local league who i...   \n",
       "1    A former DJ at WSUM who is now working as a mu...   \n",
       "2    A fellow agent-turned-author who shares the sa...   \n",
       "3    a film critic who dislikes storylines involvin...   \n",
       "4    A biology major conducting research on equine ...   \n",
       "..                                                 ...   \n",
       "195  A junior Flash developer seeking guidance on c...   \n",
       "196  An avid gamer who has played Sins of a Solar E...   \n",
       "197  An atheist, philosophy lecturer who encourages...   \n",
       "198  A young apprentice fascinated by the technolog...   \n",
       "199  A high school guidance counselor in Winnebago ...   \n",
       "\n",
       "                                               filters  \\\n",
       "0           {'popularity': 'low', 'month': 'February'}   \n",
       "1    {'popularity': 'medium', 'budget': 'medium', '...   \n",
       "2    {'popularity': 'high', 'budget': 'low', 'inter...   \n",
       "3    {'popularity': 'low', 'interests': 'Outdoors &...   \n",
       "4           {'popularity': 'medium', 'budget': 'high'}   \n",
       "..                                                 ...   \n",
       "195  {'popularity': 'medium', 'interests': 'Outdoor...   \n",
       "196  {'popularity': 'high', 'month': 'April', 'budg...   \n",
       "197  {'popularity': 'low', 'interests': 'Outdoors &...   \n",
       "198  {'popularity': 'medium', 'budget': 'low', 'mon...   \n",
       "199         {'popularity': 'high', 'budget': 'medium'}   \n",
       "\n",
       "                                               context  \\\n",
       "0    Adana has low popularity. Adana has low season...   \n",
       "1    Coimbra has medium popularity and medium budge...   \n",
       "2    Zagreb has high popularity and low budget. Zag...   \n",
       "3    Van has low popularity. Van has low season in ...   \n",
       "4    Aalborg has medium popularity and high budget....   \n",
       "..                                                 ...   \n",
       "195  Zaragoza has medium popularity. In Zaragoza yo...   \n",
       "196  Sarajevo has high popularity and medium budget...   \n",
       "197  Malatya has low popularity and high budget. Ma...   \n",
       "198  Chelyabinsk has medium popularity , low budget...   \n",
       "199  Belgrade has high popularity and medium budget...   \n",
       "\n",
       "                                                  city  \\\n",
       "0    ['Adana', 'Adiyaman', 'Agri', 'Arad', 'Arkhang...   \n",
       "1                         ['Coimbra', 'Brno', 'Braga']   \n",
       "2    ['Zagreb', 'Volgograd', 'Tirana', 'Tbilisi', '...   \n",
       "3    ['Van', 'Uzhhorod', 'Trabzon', 'Thessaloniki',...   \n",
       "4    ['Aalborg', 'Astrakhan', 'Bari', 'Bremen', 'Ch...   \n",
       "..                                                 ...   \n",
       "195  ['Zaragoza', 'Varna', 'Turku', 'Tampere', 'Szc...   \n",
       "196  ['Sarajevo', 'Tallinn', 'Vilnius', 'Belgrade',...   \n",
       "197                            ['Malatya', 'Ioannina']   \n",
       "198  ['Chelyabinsk', 'Kirov', 'Podgorica', 'Rijeka'...   \n",
       "199  ['Belgrade', 'Bratislava', 'Budapest', 'Nicosi...   \n",
       "\n",
       "                                        gemini_query_v  \\\n",
       "0             Cheap European city break in February.\\n   \n",
       "1    Medium budget European city break with parks a...   \n",
       "2    Cheap January city break in Europe with museum...   \n",
       "3    Cheap European city break in January with inte...   \n",
       "4    Suggest some moderately popular European citie...   \n",
       "..                                                 ...   \n",
       "195           Good places to swim outdoors in Europe\\n   \n",
       "196  Medium budget European city break in April wit...   \n",
       "197  High-budget European city trip in February wit...   \n",
       "198  Suggest a low-budget, walkable European city b...   \n",
       "199  Popular and affordable European city break des...   \n",
       "\n",
       "                                       gemini_query_p0  \\\n",
       "0    European city break in February, less crowded ...   \n",
       "1    European city break, medium budget, good parks...   \n",
       "2    European city break in January. Budget friendl...   \n",
       "3    European city break in January. Low-budget des...   \n",
       "4    High-budget European city with equestrian attr...   \n",
       "..                                                 ...   \n",
       "195  Good places for a Flash developer to visit in ...   \n",
       "196  Budget-friendly European city break in April w...   \n",
       "197  European city break in February. Low season & ...   \n",
       "198  Budget-friendly European city break in April, ...   \n",
       "199  Affordable, popular European capitals for a we...   \n",
       "\n",
       "                                       gemini_query_p1  \\\n",
       "0    Best European cities for intense physical trai...   \n",
       "1    Best European cities for live music, especiall...   \n",
       "2    Where can I find inspiring European cities wit...   \n",
       "3    Best European cities for unique, artistic expe...   \n",
       "4    European cities with renowned veterinary or ag...   \n",
       "..                                                 ...   \n",
       "195  Best European cities for tech meetups & cowork...   \n",
       "196  European cities with a grand, futuristic feel ...   \n",
       "197  Where can I find European cities rich in histo...   \n",
       "198  Which European cities offer glimpses into the ...   \n",
       "199  Affordable, safe European cities with historic...   \n",
       "\n",
       "                                         llama_query_v  \\\n",
       "0    \"Less crowded European cities to visit in Febr...   \n",
       "1    'medium budget European city breaks with parks...   \n",
       "2    \"Looking for a popular and affordable European...   \n",
       "3    \"European cities with low popularity, monaster...   \n",
       "4              \"European cities for a luxurious trip.\"   \n",
       "..                                                 ...   \n",
       "195  \"European cities with medium popularity for ou...   \n",
       "196  'medium budget trip in April to a popular Euro...   \n",
       "197  \"Less crowded European destinations with water...   \n",
       "198  \"European cities with great walkability and lo...   \n",
       "199  'medium budget european city breaks in popular...   \n",
       "\n",
       "                                        llama_query_p0  \\\n",
       "0    \"European cities with ice hockey facilities, l...   \n",
       "1    \"Medium budget European cities with parks and ...   \n",
       "2    \"Low-budget European cities with museums and n...   \n",
       "3    \"off the beaten path European city breaks in l...   \n",
       "4    \"European cities with horse riding trails and ...   \n",
       "..                                                 ...   \n",
       "195  A junior Flash developer seeking guidance on c...   \n",
       "196  \"Medium budget trip to a popular European city...   \n",
       "197  \"Less crowded European destinations for a pric...   \n",
       "198  \"European cities with industrial heritage site...   \n",
       "199  \"Medium budget city breaks in Europe for a sch...   \n",
       "\n",
       "                                        llama_query_p1  \n",
       "0    Which European cities have ice hockey arenas a...  \n",
       "1    Which European cities offer a mix of music fes...  \n",
       "2    Which European cities offer a mix of historica...  \n",
       "3    Which European cities offer a culturally rich ...  \n",
       "4    Which European cities have horse riding school...  \n",
       "..                                                 ...  \n",
       "195  Which European cities offer a mix of cultural ...  \n",
       "196  Which European cities have a rich history of e...  \n",
       "197  European cities with rich history of philosoph...  \n",
       "198  Which European cities showcase historic indust...  \n",
       "199  Which European cities offer a mix of cultural ...  \n",
       "\n",
       "[200 rows x 12 columns]"
      ]
     },
     "execution_count": 5,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "merged = pd.merge(gemini, llama, on=common_cols, how=\"right\")\n",
    "print(merged.shape)\n",
    "merged"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 7,
   "id": "53314432",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "config_id          0\n",
       "persona_id         0\n",
       "persona            0\n",
       "filters            0\n",
       "context            0\n",
       "city               0\n",
       "gemini_query_v     0\n",
       "gemini_query_p0    0\n",
       "gemini_query_p1    0\n",
       "llama_query_v      0\n",
       "llama_query_p0     0\n",
       "llama_query_p1     0\n",
       "dtype: int64"
      ]
     },
     "execution_count": 7,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "merged.isna().sum()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 8,
   "id": "b4e05bdc",
   "metadata": {},
   "outputs": [],
   "source": [
    "merged.to_csv(\"../../data/user-evaluation/merged.csv\", index=False)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "7abcac32",
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": ".crs-venv",
   "language": "python",
   "name": ".crs-venv"
  },
  "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.10.15"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 5
}