An introduction to Large Language Models
and their relevance for Statistical Offices
Dario Buono, Ph.D.
Marius Felecan, MSE
Cristiano Tessitore, Ph.D.
An Eurostat AI paper by
https://ec.europa.eu/eurostat/product?code=KS-TC-24-001
Hallucinate
Part One
Framing the Context
GenAI Technology
Large Language Models whats and hows.
AI definition 2018
“Artificial intelligence (AI) systems are software (and possibly also hardware)
systems designed by humans that, given a complex goal, act in the physical or
digital dimension by perceiving their environment through data acquisition,
interpreting the collected structured or unstructured data,
reasoning on the knowledge, or processing the information,
derived from this data and
deciding the best action(s) to take to achieve the given goal.
AI systems can either use symbolic rules or learn a numeric model,
and they can also adapt their behaviour by analysing how
the environment is affected by their previous actions”
Independent High-Level Group on AI (hired by the European Commission), 2018
AI definition 2024
‘AI system‘ is a machine-based system designed to operate with
varying levels of autonomy and that may exhibit adaptiveness
after deployment and that, for explicit or implicit objectives,
infers, from the input it receives, how to generate outputs such
as predictions, content, recommendations, or decisions that can
influence physical or virtual environments”
Art. 3, EU AI Act
Large Language Models
Architecture
Domains
Fields
Transformers
NLP Self Driving
Tesla
LLMs:
Gemini
ChatGPT
Deep Learning
Machine Learning
Artificial Intelligence
Large Language Models - Training
LLM
(parameters)
Corpus
Large Language Models – Fine tuning
LLM
(parameters)
Large Language Models – Inference
Mary had a little
LLM lamb
Prompt (Context)
Charting LLMs
A Call for Standardization
Emerging & Disrupting
Emerging - new and innovative development that significantly alters the
current landscape of business and society.
Disrupting - groundbreaking product or service that fundamentally
changes the market or society.
Cars Prediction (1903)
“The automobile is a fad, a novelty. Horses are here to
stay.”
President of Michigan Savings Bank
… forecasts about disruptors
PC Prediction (mid-1970s)
“There is no reason an individual would ever want a computer in their home.”
Ken Olsen, founder of DEC
digital photography, mobile computing, smart phone …
Internet is now 35 years old!
still reinventing itself
Not mature: Still progress to be made.
Not well understood: Still the expectations are
sometimes unrealistic.
Emergent Disruptive
Huge potential
Chain reactions
How fast?
Hype vs. Reality
FOMO (fear of missing out)
FOBO (fear of a better option)
Fear of Being too Early
high risk, high reward
Now & Near Future
Some Strategies to Consider
Education and Awareness
Technology Adoption and Integration
Workforce Reskilling and Upskilling
Partnerships and Collaborations
Ethical AI Use and Governance
Jeff Bezos on AI: Large language models are
‘not inventions, they’re discoveries’
Source: Jeff Bezos - Amazon and Blue Origin, Lex Fridman Podcast, YouTube
Questions ?
Part Two
Use Cases
LLM4Statistics
Interesting concepts and applications
Degrees of AI integration
1. Assisted AI (Supportive): AI systems that enhance human tasks without replacing human decision-
making. Examples include analytical tools that provide insights for humans to interpret.
2. Augmented AI (Collaborative): These AI systems work alongside humans, enhancing their capabilities
through suggestions or automating routine parts of tasks. This is seen in applications like medical
diagnostics, where AI assists in analyzing data.
3. Automated AI (Independent): AI that operates fully autonomously, performing tasks without human
intervention. Common uses include robotic process automation for repetitive tasks such as data entry.
4. Autonomous AI (Self-sufficient): The most advanced form, these systems operate independently in
changing environments, making decisions without human input. Autonomous vehicles and intelligent
drones are key examples.
Multitool vs Screwdriver
LLM vs SLM
LLM SLM
Parameters Several billions (even
trillion)
Few billions (1 to 3)
Knowledge Wide To be specialized
Languages Several English
Fine tuning Expensive Cheap
Hardware specs High Low
Performances on
benchmark
High variable
Mixture of experts
INPUT Router
Expert 1
Expert 2
Expert 3
Expert 4
Expert 5
Additive
combination
OUTPUT
LMSYS Chatbot Arena Leaderboard as of 07/03/24
Training Extremely expensive
Fine tuning May be not that cheap
RAG = Retrieval-Augmented Generation
Solution for incorporating knowledge from external databases
Dynamic | Cost-effective | Modular
Training vs Fine tuning vs RAG systems
RAG systems
Source: NVIDIA
RAG systems
Source: Gao et al (2024)
Selected Use cases
GPT@JRC
Cloud + Hosted Models
Unified Graphical User Interface
API available
Internal Security and Privacy Rules Compliant
European Commission Joint Research Centre GPTs Platform
Coding
Improved efficiency
Our Use Case: Old, inherited codebase
Documenting and Commenting
Boilerplate code
Our recommendation: Use IDE integrated
plugins, mature and efficient
Comments: careful with prompts
Code Generation
Test Case Generation
Our experience: debugging works better for
not so experienced developers
Testing and Debugging
(Semi-)Automation
Teams of GPTs
Future developments
Research
Partner
Assistant
Critic (reviewer)
Personas
ChatGPT with plugins
Commercially available solutions
• Writefull - for academic and technical writing
• HeyGPT - Chat with PDFs
• Litmaps - Best Literature Search
• Jenni - Helps you write, edit, and cite with confidence.
In-house custom developed scripts
Literature review
(Semi-)Automation
Exploring big context models
Future developments
Model tuning
Going beyond prompting
EUBERT is a pretrained BERT uncased model that has been trained on a vast corpus of documents registered by the
European Publications Office. These documents span the last 30 years, providing a comprehensive dataset that encompasses
a wide range of topics and domains.
EU-BERT Model
Text Classification, Question Answering, Named entity recognition, part-of-speech tagging, text generation ...
https://huggingface.co/EuropeanParliament/EUBERT
Using the EuroHPC Meluxina cluster, a core component of Europe's high-performance computing landscape:
● Hardware Type: 4 x GPUs 24GB
● GPU Days: 16
Model size: 94M params
Questions ?
Part Three
IP and Ethics
• Generative AI tools are already pre-trained when available for use.
• Most of the main models have been trained vast amounts of data
available on the Internet, not always respecting copyright or intellectual
property.
• The output of the model can infringe copyright
• The proprietorship of the output of GenAI is an issue, as copyright
protection is only available for works created by human beings.
What’s different on GenAI
Copyright issue – text
Copyright issue - image
Practical scenarios
Intellectual Property
1. No intention to use the output in any document;
2. Intention to use the output in an internal document;
3. Intention to use the output in an external document.
Nature of the information
4. Public information;
5. Non-Public information;
Nature of the system
6. Public system;
7. Trusted-cloud provider;
8. Internal LLM.
• [Rule n°1] Staff must never share any information that is not already in
the public domain, nor personal data, with an online available generative
AI model.
• [Rule n°2] Staff should always critically assess any response produced
by an online available generative AI model for potential biases and
factually inaccurate information.
European Commission Guidelines
• [Rule n°3] Staff should always critically assess whether the outputs of an
online available generative AI model are not violating intellectual property
rights, in particular copyright of third parties.
• [Rule n°4] Staff shall never directly replicate the output of a generative
AI model in public documents, such as the creation of Commission texts,
notably legally binding ones.
• [Rule n°5] Staff should never rely on online available generative AI
models for critical and time-sensitive processes.
European Commission Guidelines
Ethics
It’s a wrap
Not a magic wand but a useful tool
To be continued…
https://cros.ec.europa.eu/dashboard/ntts-2025
Thank you
© European Union 2024
CREDITS:
Slide 3: Dictionary.com
Slide 19: Gartner, https://www.gartner.com/en/articles/what-s-new-in-artificial-intelligence-from-the-2023-gartner-hype-cycle
Slide 23: Jeff Bezos - Amazon and Blue Origin, Lex Fridman Podcast, YouTube
Slide 33: Gao et al (2024) Retrieval-Augmented Generation for Large Language Models: A Survey
Slide 53: https://www.theguardian.com/technology/2024/apr/16/techscape-ai-gadgest-humane-ai-pin-chatgpt
Unless otherwise noted the reuse of this presentation is authorised under the CC BY 4.0 license. For any use or reproduction of elements that are
not owned by the EU, permission may need to be sought directly from the respective right holders.

Introduction to LLMs and their relevance for Official Statistics

  • 1.
    An introduction toLarge Language Models and their relevance for Statistical Offices Dario Buono, Ph.D. Marius Felecan, MSE Cristiano Tessitore, Ph.D. An Eurostat AI paper by https://ec.europa.eu/eurostat/product?code=KS-TC-24-001
  • 3.
  • 4.
  • 5.
    GenAI Technology Large LanguageModels whats and hows.
  • 6.
    AI definition 2018 “Artificialintelligence (AI) systems are software (and possibly also hardware) systems designed by humans that, given a complex goal, act in the physical or digital dimension by perceiving their environment through data acquisition, interpreting the collected structured or unstructured data, reasoning on the knowledge, or processing the information, derived from this data and deciding the best action(s) to take to achieve the given goal. AI systems can either use symbolic rules or learn a numeric model, and they can also adapt their behaviour by analysing how the environment is affected by their previous actions” Independent High-Level Group on AI (hired by the European Commission), 2018
  • 7.
    AI definition 2024 ‘AIsystem‘ is a machine-based system designed to operate with varying levels of autonomy and that may exhibit adaptiveness after deployment and that, for explicit or implicit objectives, infers, from the input it receives, how to generate outputs such as predictions, content, recommendations, or decisions that can influence physical or virtual environments” Art. 3, EU AI Act
  • 8.
    Large Language Models Architecture Domains Fields Transformers NLPSelf Driving Tesla LLMs: Gemini ChatGPT Deep Learning Machine Learning Artificial Intelligence
  • 9.
    Large Language Models- Training LLM (parameters) Corpus
  • 10.
    Large Language Models– Fine tuning LLM (parameters)
  • 11.
    Large Language Models– Inference Mary had a little LLM lamb Prompt (Context)
  • 12.
    Charting LLMs A Callfor Standardization
  • 13.
    Emerging & Disrupting Emerging- new and innovative development that significantly alters the current landscape of business and society. Disrupting - groundbreaking product or service that fundamentally changes the market or society.
  • 14.
    Cars Prediction (1903) “Theautomobile is a fad, a novelty. Horses are here to stay.” President of Michigan Savings Bank
  • 15.
    … forecasts aboutdisruptors PC Prediction (mid-1970s) “There is no reason an individual would ever want a computer in their home.” Ken Olsen, founder of DEC digital photography, mobile computing, smart phone … Internet is now 35 years old! still reinventing itself
  • 16.
    Not mature: Stillprogress to be made. Not well understood: Still the expectations are sometimes unrealistic. Emergent Disruptive Huge potential Chain reactions How fast? Hype vs. Reality
  • 17.
    FOMO (fear ofmissing out) FOBO (fear of a better option) Fear of Being too Early high risk, high reward
  • 19.
    Now & NearFuture Some Strategies to Consider Education and Awareness Technology Adoption and Integration Workforce Reskilling and Upskilling Partnerships and Collaborations Ethical AI Use and Governance
  • 20.
    Jeff Bezos onAI: Large language models are ‘not inventions, they’re discoveries’ Source: Jeff Bezos - Amazon and Blue Origin, Lex Fridman Podcast, YouTube
  • 21.
  • 22.
  • 23.
  • 24.
    Degrees of AIintegration 1. Assisted AI (Supportive): AI systems that enhance human tasks without replacing human decision- making. Examples include analytical tools that provide insights for humans to interpret. 2. Augmented AI (Collaborative): These AI systems work alongside humans, enhancing their capabilities through suggestions or automating routine parts of tasks. This is seen in applications like medical diagnostics, where AI assists in analyzing data. 3. Automated AI (Independent): AI that operates fully autonomously, performing tasks without human intervention. Common uses include robotic process automation for repetitive tasks such as data entry. 4. Autonomous AI (Self-sufficient): The most advanced form, these systems operate independently in changing environments, making decisions without human input. Autonomous vehicles and intelligent drones are key examples.
  • 25.
  • 26.
    LLM vs SLM LLMSLM Parameters Several billions (even trillion) Few billions (1 to 3) Knowledge Wide To be specialized Languages Several English Fine tuning Expensive Cheap Hardware specs High Low Performances on benchmark High variable
  • 27.
    Mixture of experts INPUTRouter Expert 1 Expert 2 Expert 3 Expert 4 Expert 5 Additive combination OUTPUT LMSYS Chatbot Arena Leaderboard as of 07/03/24
  • 28.
    Training Extremely expensive Finetuning May be not that cheap RAG = Retrieval-Augmented Generation Solution for incorporating knowledge from external databases Dynamic | Cost-effective | Modular Training vs Fine tuning vs RAG systems
  • 29.
  • 30.
  • 31.
  • 32.
    GPT@JRC Cloud + HostedModels Unified Graphical User Interface API available Internal Security and Privacy Rules Compliant European Commission Joint Research Centre GPTs Platform
  • 33.
  • 34.
    Improved efficiency Our UseCase: Old, inherited codebase Documenting and Commenting
  • 35.
    Boilerplate code Our recommendation:Use IDE integrated plugins, mature and efficient Comments: careful with prompts Code Generation
  • 36.
    Test Case Generation Ourexperience: debugging works better for not so experienced developers Testing and Debugging
  • 37.
  • 38.
  • 39.
  • 40.
    ChatGPT with plugins Commerciallyavailable solutions • Writefull - for academic and technical writing • HeyGPT - Chat with PDFs • Litmaps - Best Literature Search • Jenni - Helps you write, edit, and cite with confidence. In-house custom developed scripts Literature review
  • 41.
    (Semi-)Automation Exploring big contextmodels Future developments
  • 42.
  • 43.
    EUBERT is apretrained BERT uncased model that has been trained on a vast corpus of documents registered by the European Publications Office. These documents span the last 30 years, providing a comprehensive dataset that encompasses a wide range of topics and domains. EU-BERT Model Text Classification, Question Answering, Named entity recognition, part-of-speech tagging, text generation ... https://huggingface.co/EuropeanParliament/EUBERT Using the EuroHPC Meluxina cluster, a core component of Europe's high-performance computing landscape: ● Hardware Type: 4 x GPUs 24GB ● GPU Days: 16 Model size: 94M params
  • 44.
  • 45.
  • 46.
    • Generative AItools are already pre-trained when available for use. • Most of the main models have been trained vast amounts of data available on the Internet, not always respecting copyright or intellectual property. • The output of the model can infringe copyright • The proprietorship of the output of GenAI is an issue, as copyright protection is only available for works created by human beings. What’s different on GenAI
  • 47.
  • 48.
  • 49.
    Practical scenarios Intellectual Property 1.No intention to use the output in any document; 2. Intention to use the output in an internal document; 3. Intention to use the output in an external document. Nature of the information 4. Public information; 5. Non-Public information; Nature of the system 6. Public system; 7. Trusted-cloud provider; 8. Internal LLM.
  • 50.
    • [Rule n°1]Staff must never share any information that is not already in the public domain, nor personal data, with an online available generative AI model. • [Rule n°2] Staff should always critically assess any response produced by an online available generative AI model for potential biases and factually inaccurate information. European Commission Guidelines
  • 51.
    • [Rule n°3]Staff should always critically assess whether the outputs of an online available generative AI model are not violating intellectual property rights, in particular copyright of third parties. • [Rule n°4] Staff shall never directly replicate the output of a generative AI model in public documents, such as the creation of Commission texts, notably legally binding ones. • [Rule n°5] Staff should never rely on online available generative AI models for critical and time-sensitive processes. European Commission Guidelines
  • 52.
  • 53.
    It’s a wrap Nota magic wand but a useful tool
  • 54.
  • 55.
    Thank you © EuropeanUnion 2024 CREDITS: Slide 3: Dictionary.com Slide 19: Gartner, https://www.gartner.com/en/articles/what-s-new-in-artificial-intelligence-from-the-2023-gartner-hype-cycle Slide 23: Jeff Bezos - Amazon and Blue Origin, Lex Fridman Podcast, YouTube Slide 33: Gao et al (2024) Retrieval-Augmented Generation for Large Language Models: A Survey Slide 53: https://www.theguardian.com/technology/2024/apr/16/techscape-ai-gadgest-humane-ai-pin-chatgpt Unless otherwise noted the reuse of this presentation is authorised under the CC BY 4.0 license. For any use or reproduction of elements that are not owned by the EU, permission may need to be sought directly from the respective right holders.

Editor's Notes

  • #8 Artificial intelligence Artificial intelligence is the development of smart systems and machines with the ability to carry out tasks that would otherwise require human intelligence.  (chess system) Machine learning It focuses on creating algorithms that can learn from the given data and make decisions based on patterns observed in this data. These smart systems will require human intervention when the decision made is incorrect or undesirable. (spam detection) Deep learning It utilizes an artificial neural network to process data through various layers of algorithms and reach an accurate decision without human intervention. (chatbot)
  • #12 Exploring the rapid advancement and disruptive impact of Large Language Models, framing their current technological maturity and advocating for the introduction of industry standards as a crucial next step.
  • #18 A way to track the maturity, adoption, and social application of specific technologies over time. Phases: Innovation Trigger: A potential technology breakthrough kicks things off. Early proof-of-concept stories and media interest trigger significant publicity. Often no usable products exist and commercial viability is unproven. Peak of Inflated Expectations: Early publicity produces a number of success stories — often accompanied by scores of failures. Some companies take action; many do not. Trough of Disillusionment: Interest wanes as experiments and implementations fail to deliver. Producers of the technology shake out or fail. Investments continue only if the surviving providers improve their products to the satisfaction of early adopters. Slope of Enlightenment: More instances of how the technology can benefit the enterprise start to crystallize and become more widely understood. Second- and third-generation products appear from technology providers. More enterprises fund pilots; conservative companies remain cautious. Plateau of Productivity: Mainstream adoption starts to take off. Criteria for assessing provider viability are more clearly defined. The technology's broad market applicability and relevance are clearly paying off.
  • #19 An organization should adopt a cautiously optimistic approach to integrating this technology. A proactive strategy is essential for success in an increasingly AI-dominated landscape. Education and Awareness: Educate leaders and staff about AI's capabilities and impacts to proactively anticipate and adapt to changes. Technology Adoption and Integration: Gradually integrate AI into current processes to gain immediate benefits and reduce risks, allowing for adaptation and learning. Workforce Reskilling and Upskilling: Offer training programs to equip employees with AI-relevant skills for future demands. Prompting. Partnerships and Collaborations: Collaborate with tech firms, academia, and industry groups to stay current on AI advancements and gain external insights. Ethical AI Use and Governance: Implement ethical guidelines and a governance framework to ensure responsible AI use, focusing on data privacy, security, and fairness.
  • #20 The Need for Standardization As the technology matures.
  • #43 Some limited Phi 2 experiences were conducted by us, which is billion level model (2.78B)
  • #55 Update/add/delete parts of the copy right notice where appropriate. More information: https://myintracomm.ec.europa.eu/corp/intellectual-property/Documents/2019_Reuse-guidelines%28CC-BY%29.pdf