[{"data":1,"prerenderedAt":261},["ShallowReactive",2],{"studies-en-ghigliottina":3},{"id":4,"title":5,"body":6,"category":238,"description":72,"extension":239,"featured":240,"links":241,"meta":243,"navigation":240,"order":244,"path":245,"period":246,"role":247,"seo":248,"slug":249,"stack":250,"stem":257,"subtitle":258,"summary":259,"__hash__":260},"projects_en\u002Fprojects\u002Fen\u002Fghigliottina.md","Ghigliottina Solver",{"type":7,"value":8,"toc":229},"minimark",[9,14,32,43,47,58,61,65,76,82,112,115,133,143,147,176,180,183,207,211,222],[10,11,13],"h2",{"id":12},"context","Context",[15,16,17,18,22,23,26,27,31],"p",{},"\"La Ghigliottina\" is the final game of the Italian TV show ",[19,20,21],"em",{},"L'Eredità",": five clues, unrelated to each other, each linked to one hidden word. The link is almost always lexical or cultural — the solution forms a compound, an idiom, or a frequent collocation with each clue (",[19,24,25],{},"doppio, carta, soldi, pasta, regalo"," → ",[28,29,30],"strong",{},"pacco","). The player has 60 seconds.",[15,33,34,35,38,39,42],{},"The ",[28,36,37],{},"Natural Language Processing"," exam required a system that solves the game within the time limit ",[19,40,41],{},"and"," generates a description explaining the link with each clue. Dataset: 965 training games, 100 test games — and only 22% of test solutions appear in training. Memorisation is not enough: genuine association reasoning is required.",[10,44,46],{"id":45},"core-idea","Core idea",[15,48,49,50,53,54,57],{},"The finding that drives the whole project is empirical: general-purpose LLMs are ",[28,51,52],{},"weak at solving"," this game (GPT-4 reaches ~4% in the literature), whereas a ",[28,55,56],{},"knowledge-based ranker"," grounded in word associations — the historical approach to this game (OTTHO, UNIOR4NLP) — is far more reliable and essentially instantaneous.",[15,59,60],{},"So: division of labour. A knowledge-based solver finds the solution; the LLM only generates the description — where generation is its actual strength.",[10,62,64],{"id":63},"how-it-works","How it works",[66,67,73],"pre",{"className":68,"code":70,"language":71,"meta":72},[69],"language-text","5 clues ─► [A] candidate generation ─► [B] coverage-based scoring ─► SOLUTION\n                                                                  └─► description (LLM)\n","text","",[74,75,70],"code",{"__ignoreMap":72},[15,77,78,81],{},[28,79,80],{},"(A) Association knowledge base."," Three sources, all indexed by co-occurrence:",[83,84,85,92,106],"ol",{},[86,87,88,91],"li",{},[28,89,90],{},"Multiword expressions and proverbs"," provided by the course (~36,000 entries, including the De Mauro dictionary)",[86,93,94,97,98,101,102,105],{},[28,95,96],{},"Multiword Italian Wikipedia titles"," treated as expressions (\"Conquista del West\" links ",[19,99,100],{},"conquista"," and ",[19,103,104],{},"west",")",[86,107,108,111],{},[28,109,110],{},"Collocations mined from the Paisà corpus"," — for each clue, the words co-occurring within ±3 tokens with positive PMI",[15,113,114],{},"Given the five clues, the candidates are all words associated with at least one of them.",[15,116,117,120,121,124,125,128,129,132],{},[28,118,119],{},"(B) Coverage-based scoring."," Each candidate is scored as ",[74,122,123],{},"score = W · coverage + mwe_strength \u002F √frequency",". Coverage — how many of the five clues the candidate is linked to — dominates: a word linked to all five beats one linked to two, which is exactly the game's logic. Dividing by √frequency is an IDF-like penalty that stops common words (",[19,126,127],{},"dire",", ",[19,130,131],{},"grande",") from polluting the ranking. Hyper-parameters were chosen on a 200-game dev set, leaving the test set untouched until the final evaluation.",[15,134,135,138,139,142],{},[28,136,137],{},"(C) Description."," Generated by ",[28,140,141],{},"Qwen2.5-7B running locally"," (via Ollama), with two few-shot examples from the training descriptions, in the gold style. Local because it is free, unlimited, and not subject to the 60-second limit — which applies to solving only.",[10,144,146],{"id":145},"results","Results",[148,149,150,156,162,169],"ul",{},[86,151,152,155],{},[28,153,154],{},"47% top-1 accuracy"," on the solution, MRR 0.55, gold in the top-50 for 82% of games",[86,157,158,161],{},[28,159,160],{},"0.01 s\u002Fgame"," — zero games over 60 seconds",[86,163,164,165,168],{},"Description: ",[28,166,167],{},"BERTScore-F1 0.73"," (multilingual BERT), ROUGE-1 0.33, BLEU 6.73",[86,170,171,172,175],{},"Progression of design choices: 21% (raw MWE count) → 25% (coverage + rarity) → 36% (Wikipedia titles, recall 63%→89%) → ",[28,173,174],{},"47%"," (corpus collocations)",[10,177,179],{"id":178},"what-was-tried-and-dropped","What was tried and dropped",[15,181,182],{},"The ablation is half the value of the project:",[148,184,185,191,197],{},[86,186,187,190],{},[28,188,189],{},"fastText embeddings"," — helpful for recall before the Wikipedia titles (25%→31%), redundant and slightly harmful afterwards → out of the final system",[86,192,193,196],{},[28,194,195],{},"Graph scorer (Personalized PageRank)"," — spreading activation from the five clues does not beat the direct ranker: the bottleneck is data coverage, not the algorithm",[86,198,199,202,203,206],{},[28,200,201],{},"LLM solution selection"," — degrades the ranker: local models score ~0% on a diagnostic test, the 14B exceeds 60 seconds. Confirms that LLMs do not help to ",[19,204,205],{},"solve"," this game",[10,208,210],{"id":209},"takeaways","Takeaways",[15,212,213,214,217,218,221],{},"The decisive lever wasn't the algorithm but the ",[28,215,216],{},"breadth of the knowledge base",": every accuracy jump came from adding a source of associations, not from refining the scoring. And the negative result is worth as much as the positive one — knowing ",[19,219,220],{},"where"," an LLM doesn't help is a design skill, not a defeat. The pipeline is conceptually RAG taken to the extreme: retrieval decides the answer, the model merely explains it.",[15,223,224,225,228],{},"Individual project for the NLP course at ",[28,226,227],{},"Università degli Studi di Bari Aldo Moro",".",{"title":72,"searchDepth":230,"depth":230,"links":231},2,[232,233,234,235,236,237],{"id":12,"depth":230,"text":13},{"id":45,"depth":230,"text":46},{"id":63,"depth":230,"text":64},{"id":145,"depth":230,"text":146},{"id":178,"depth":230,"text":179},{"id":209,"depth":230,"text":210},"studies","md",true,{"github":242},"https:\u002F\u002Fgithub.com\u002FTomValenzano\u002Fghigliottina-solver",{},9,"\u002Fprojects\u002Fen\u002Fghigliottina","2026","Natural Language Processing · MSc AI track",{"title":5,"description":72},"ghigliottina",[251,252,253,254,255,256],"Python","gensim · scikit-learn","PMI · corpus mining","Wikipedia · Paisà corpus","Qwen2.5-7B · Ollama","BERTScore · ROUGE · BLEU","projects\u002Fen\u002Fghigliottina","Knowledge-based solver for the Italian TV word game La Ghigliottina — coverage-based ranking over a knowledge base of lexical associations, with a local LLM used only to explain the solution.",null,"qS8JKlfI7MyxcngA9ltNQnevt7XFSZIyojNuFTEKcNI",1785261405488]