## 3 Crafting a Spanish Fake News Dataset
### Developing a Custom Dataset for Spanish Politics-Related Fake News
#### 3.2.3 Leveraging Generative Models via the OpenAI API  
As previously mentioned, the incorporation of both authentic and deceptive news into the training dataset, with closely aligned language and structure, enables us to enhance the model's capability to discern very subtle distinctions between genuine and misleading information. For that purpose, we have resorted to generative large language models to reformulate the headlines scraped from reliable media reports (Section 3.2.1) and constructed from objective statistics retrieved from the INE API (Section 3.2.2). To do so, we have made different requests to OpenAI API, starting from specific headlines (e.g., \"The Spanish government increases social spending in the 2022 state budget\") to generate the different types of news, which are detailed next:  
* First, we created news items that are equivalent to the original ones but with very similar wording (in our particular example, headlines such as \"The Spanish government boosts social expenditure in the 2022 state budget\", \"The Spanish government increases in allocations for social initiatives in the 2022 state budget\", or \"The Spanish government amplifies social spending in 2022\").
* Second, we crafted alternative news with different wording (e.g., \"Spanish fiscal plan for 2022 boosts social expenditure\", \"The government of Spain boosts investment in social programs in 2022\", \"Spain allocates additional resources to social policies in 2022\", \"Spain increases budget allocations for social programs in 2022\", \"Spanish 2022 fiscal plan sees a surge in allocations toward social welfare initiatives\", or \"Spain allocates substantial increase to social investment in the 2022 fiscal plan\").
* Third, we generated contrasting news using different terms (e.g., \"In 2022 Spain decreases investment in social programs\", \"The Spanish government invests less in welfare policies in 2022\", or \"Contraction in Spain's social expenditure for 2022\").
* Lastly, we also considered the generation of contrasting news using very similar terms (e.g., \"The Spanish government reduces social spending in the 2022 state budget\" or \"The Spanish government advocate for reduction social spending in the 2022 state budget\").  
As depicted in Figure 3, we resorted to a GPT-3 model to create a multitude of fictitious news articles about economic data, healthcare, employability, etc., with varying semantic nuances and syntactic structures to enrich the knowledge from which the Transformers models trained with our custom corpus will learn [48]. Specifically, we employed the _gpt-3.5-turbo_ model, which operates within a token limit of 4097. This limit encompasses both the input (the prompt given to the model) and the output (the response generated), meaning that the total number of text units exchanged in each interaction must stay within this boundary. Our approach involved interacting with the model by requesting batches of news generation until the token limit was reached, after which the content was categorized and saved appropriately. As shown in Figure 3, the roles in this process are defined as 'user' for providing prompts and requesting news, and 'assistant' for the model's response generation.