Harnessing LLMs for Educational Content-Driven Italian Crossword Generation

Kamyar Zeinalipour, Achille Fusco, Asya Zanollo, Marco Maggini, Marco Gori

Abstract

Crossword puzzles are effective tools for language acquisition and cognitive development, yet their manual creation is a labor-intensive task for educators. This paper presents a novel pipeline designed to automatically generate high-quality Italian crossword puzzles from educational texts using Large Language Models (LLMs). By introducing the Italian-Clue-Instruct dataset and fine-tuning open-source models like Mistral-7B and Llama-3, the research demonstrates a method for transforming static learning materials into interactive, syntactically diverse vocabulary exercises.

Introduction

While English-centric tools for crossword generation are relatively common, there is a significant gap in sophisticated, context-aware generators for the Italian language. The primary challenge in an educational setting is not merely finding a word and its dictionary definition, but generating clues that are contextually relevant to specific source material, such as a textbook chapter. Furthermore, educational tools require linguistic variety to tailor difficulty levels. Standard LLMs often struggle to adhere to specific syntactic constraints—such as "bare noun phrases" or "copular sentences"—without specialized training.

Methodology

The researchers developed a multi-stage pipeline to bridge the gap between raw educational text and functional crossword clues.

The multi-stage pipeline for generating Italian crossword clues, from Wikipedia data collection to LLM training.

As illustrated in the pipeline above, the process involves:

  1. Data Curation: Extracting and filtering introductory sections from Italian Wikipedia to ensure high-quality source material.
  2. Prompt Engineering: Utilizing GPT-4o with specialized prompts to generate training data across four distinct clue styles: Unrestricted, Definite Determiner Phrases, Copular Sentences, and Bare Noun Phrases.
  3. Fine-Tuning: Applying Low-Rank Adaptation (LoRA) to fine-tune Mistral-7B-Instruct-v0.3 and Llama3-8b-Instruct. This specialization allows smaller models to handle the nuances of Italian crossword syntax with high precision.

The Italian-Clue-Instruct Dataset

A key contribution of this work is the Italian-Clue-Instruct dataset, which contains over 30,000 entries and 15,000 unique clues derived from 5,000 refined Wikipedia articles. The dataset spans 29 thematic categories, providing a broad base for educational applications.

Token distribution of unique clues in the Italian-Clue-Instruct dataset, showing a concentration of concise phrases.

Analysis of the dataset shows that the generated clues are typically concise, with the majority falling under 20 tokens, which is ideal for the spatial constraints of crossword grids.

Key Results

Performance was evaluated using both automated metrics and expert human review:

  • Quantitative Gains: Fine-tuning resulted in substantial performance improvements. Mistral-7B's ROUGE-L score increased from 0.261 to 0.556 after training on the new dataset.
  • Qualitative Excellence: Human linguistics experts assigned an "A" rating (coherent, valid, and context-aligned) to the majority of clues generated by the fine-tuned Mistral model.
  • Model Comparison: Mistral-7B-Instruct-v0.3 emerged as the superior model for this task, consistently outperforming Llama-3 in generating syntactically correct and contextually appropriate Italian clues.

Conclusion and Future Work

This research demonstrates that fine-tuning open-source LLMs on specialized datasets is essential for achieving the linguistic precision required for educational crossword generation. While the current system is robust, future work will focus on addressing category imbalances (e.g., increasing representation for Mathematics and Architecture) and integrating clue generation with automated grid-layout algorithms to create a fully end-to-end "text-to-puzzle" pipeline.

Summary updated

Abstract

In this work, we unveil a novel tool for generating Italian crossword puzzles from text, utilizing advanced language models such as GPT-4o, Mistral-7B-Instruct-v0.3, and Llama3-8b-Instruct. Crafted specifically for educational applications, this cutting-edge generator makes use of the comprehensive Italian-Clue-Instruct dataset, which comprises over 30,000 entries including diverse text, solutions, and types of clues. This carefully assembled dataset is designed to facilitate the creation of contextually relevant clues in various styles associated with specific texts and keywords. The study delves into four distinctive styles of crossword clues: those without format constraints, those formed as definite determiner phrases, copular sentences, and bare noun phrases. Each style introduces unique linguistic structures to diversify clue presentation. Given the lack of sophisticated educational tools tailored to the Italian language, this project seeks to enhance learning experiences and cognitive development through an engaging, interactive platform. By meshing state-of-the-art AI with contemporary educational strategies, our tool can dynamically generate crossword puzzles from Italian educational materials, thereby providing an enjoyable and interactive learning environment. This technological advancement not only redefines educational paradigms but also sets a new benchmark for interactive and cognitive language learning solutions.

Empirical ResultsBrowse all benchmarks →

BenchmarkMethodMetricScoreProtocol / Evidence
Italian-Clue-Instruct dataset; generated clues compared with input sentences extracted from WikipediaItalian-Clue-Instruct cluesROUGE-10.159Crossword Clue Generation
Source quote
L125: Producing accurate and engaging Italian educational crossword clues is inhibited by the absence of a reference corpus, making it difficult to draw comparisons using standard measures, such as ROUGE scores. Our evaluation strategy adapts uniquely to the task requirements. Specifically, effective clues should represent contextually accurate paraphrases of text information. To accommodate this, we adopted an extractive method, using the ROUGE-L score to gauge the adequacy of clues in reflecting the input context that we extracted from Wikipedia. By comparing input sentences to the generated clues, the evaluation aimed to attain high scores to ensure strict adherence to the original text, minimizing irrelevant content and avoiding clues that merely replicate the input or improperly introduce the target keyword. Results indicated a substantial connection between the context and the clues, with an average ROUGE-1, ROUGE-2, and ROUGE-L score of 0.159, 0.114, and 0.146 respectively.
Italian-Clue-Instruct dataset; generated clues compared with input sentences extracted from WikipediaItalian-Clue-Instruct cluesROUGE-20.114Crossword Clue Generation
Source quote
L125: Producing accurate and engaging Italian educational crossword clues is inhibited by the absence of a reference corpus, making it difficult to draw comparisons using standard measures, such as ROUGE scores. Our evaluation strategy adapts uniquely to the task requirements. Specifically, effective clues should represent contextually accurate paraphrases of text information. To accommodate this, we adopted an extractive method, using the ROUGE-L score to gauge the adequacy of clues in reflecting the input context that we extracted from Wikipedia. By comparing input sentences to the generated clues, the evaluation aimed to attain high scores to ensure strict adherence to the original text, minimizing irrelevant content and avoiding clues that merely replicate the input or improperly introduce the target keyword. Results indicated a substantial connection between the context and the clues, with an average ROUGE-1, ROUGE-2, and ROUGE-L score of 0.159, 0.114, and 0.146 respectively.
Italian-Clue-Instruct dataset; generated clues compared with input sentences extracted from WikipediaItalian-Clue-Instruct cluesROUGE-L0.146Crossword Clue Generation
Source quote
L125: Producing accurate and engaging Italian educational crossword clues is inhibited by the absence of a reference corpus, making it difficult to draw comparisons using standard measures, such as ROUGE scores. Our evaluation strategy adapts uniquely to the task requirements. Specifically, effective clues should represent contextually accurate paraphrases of text information. To accommodate this, we adopted an extractive method, using the ROUGE-L score to gauge the adequacy of clues in reflecting the input context that we extracted from Wikipedia. By comparing input sentences to the generated clues, the evaluation aimed to attain high scores to ensure strict adherence to the original text, minimizing irrelevant content and avoiding clues that merely replicate the input or improperly introduce the target keyword. Results indicated a substantial connection between the context and the clues, with an average ROUGE-1, ROUGE-2, and ROUGE-L score of 0.159, 0.114, and 0.146 respectively.
BibTeX
@inproceedings{zeinalipour2024harnessing,
  author = {Kamyar Zeinalipour and Achille Fusco and Asya Zanollo and Marco Maggini and Marco Gori},
  title = {{Harnessing LLMs for Educational Content-Driven Italian Crossword Generation}},
  booktitle = {CLiC-it},
  year = {2024},
  url = {https://openreview.net/forum?id=RbsM9DKYJn},
}
Figure