o
    6t¾i  ã                   @   s6   d dl Z d dlZd dl mZ de jde jfdd„ZdS )é    N)ÚDatasetÚdatasetÚreturnc                 C   sâ   dd„ | D ƒ}g }|D ]Y}d}|d |d  }|d t |d ƒ d }|d	 t |d
 ƒ d }|d t |d ƒ d }|d t |d ƒ d }|d t |d ƒ d }|g d¢d|d  dœ}| |¡ qt |¡}t |¡} | S )Nc                 S   s   g | ]}|‘qS © r   )Ú.0Úsampler   r   úS/home/ubuntu/.local/lib/python3.10/site-packages/lm_eval/tasks/groundcocoa/utils.pyÚ
<listcomp>   s    z process_docs.<locals>.<listcomp>a[  A user has specified certain criteria for booking a flight. Below are five different flight options labeled 'A', 'B', 'C', 'D', and 'E'. Review these options and select the one that best matches the user requirements. Respond with a single option and the phrase 'The answer is Option ' followed by the correct letter - 'A', 'B', 'C', 'D', or 'E'

zUser Criteria: Úqueryz

 Option A: zOption AÚ
z
 Option B: zOption Bz
 Option C: zOption Cz
 Option D: zOption Dz
 Option E: zOption E)zThe answer is Option AzThe answer is Option BzThe answer is Option CzThe answer is Option DzThe answer is Option EzThe answer is Option ÚAnswer)ÚcriteriaÚchoicesÚgold)ÚstrÚappendÚpdÚ	DataFramer   Úfrom_pandas)r   Úcocoa_datasetÚ	processedÚdocÚquestionÚout_docÚdfr   r   r   Úprocess_docs   s$   
÷

r   )ÚdatasetsÚpandasr   r   r   r   r   r   r   Ú<module>   s    