Take Home Test: Reformat a Public Dataset for LLM Training
- Reformatted Dataset: a.json
- Transformation Code: data_split.py
- Statistics: 106155
- Performance Metrics: 1.0415241718292236 seconds
The goal of this task is to prepare public datasets for more effective use in training and fine-tuning Large Language Models (LLMs). You are required to reformat a specific subset of a public dataset into a structured, consistent format to facilitate its usability.
-
Dataset: You are assigned the
Headline
subset of the AdaptLLM/finance-tasks dataset. -
Task Description: Each entry in the
input
column contains multiple "Yes" or "No" questions alongside their respective answers. Your task is to:-
Develop a Python script to parse and separate each question and its answer from the entry.
-
Save each question-answer pair in a structured JSON format as follows:
{ "id": "<unique_identifier>", "Question": "<question_text>", "Answer": "<answer_text>" }
-
You are encouraged to introduce additional attributes if needed to preserve the integrity and completeness of the information. Adding relevant tag information is strongly recommended.
-
-
Automation Requirement: The task must be completed using Python. Manual editing or data manipulation is strictly prohibited. Your script should efficiently handle variations in data format within the column.
- Reformatted Dataset: Provide the schema of the final format you adopted for saving the results.
- Transformation Code: Submit the complete code used for converting the dataset into the designated format.
- Statistics: Report the total number of question-answer pairs extracted from the dataset.
- Performance Metrics: Document the time taken to complete the dataset cleanup and transformation process.