SlideShare a Scribd company logo
1 of 18
Greg Makowski
Head of Data Science Solutions
Cybernator.Net
Friday, September 29, 2023, 10:10 am
Global AI Conference
https://www.globalbigdataconference.com/virtual/global-artificial-intelligence-
conference/schedule-139.html Conference Schedule
https://www.slideshare.net/gregmakowski Slides
www.LinkedIn.com/in/GregMakowski Connect on LinkedIn
Understanding
Hallucinations in LLMs,
and Why Retrieval
Augmented Generation
(RAG) Reduces the Issue
Greg Makowski
Friday, September 29, 2023 Understanding Hallucinations in LLMs - Greg Makowski of Cybernator 2
• Goal since high school was “Applied Science Fiction”
• Deploying Data Science and Artificial Intelligence since 1992
• Worked for American Express, then 6 startups
• Been through 4 acquisitions or startup exits
• Deployed ~96 models for clients
• 10 Enterprise AI Applications
• Growing DS teams since 2010
• Applied for 9 DS patents since Jan 2022
Friday, September 29, 2023 Understanding Hallucinations in LLMs - Greg Makowski of Cybernator 3
Example Hallucination Problem
Understanding Fundamentals
• Word2Vec – early embedding
• Representing books in embedding
• Recurrent NN feed outputs back into the next time step
• Byte Pair Encoding (about 4 char) embedding for GPT
• Hallucination is a point between training data points
Solutions
• Use LLMs for reasoning, not a corporate knowledge base
• Retrieval Augmented Generation (RAG, for the short term)
• Dr. Yann LeCun’s Objective-Driven AI (long-term)
Agenda
Q) How could this happen?
Q) Is this limited to AI in the Law? NO
Q) Why don’t AI people just use factual training data? Would that fix it? NO
Q) What if I used another LLM – would it still be an issue? YES
Q) Could it happen to you, in your company? YES
Q) Will this talk help you avoid this? YES !!
Example Hallucination Problem
New York Lawyers Sanctioned for Using Fake ChatGPT Cases in
Legal Brief
https://www.cnbc.com/2023/06/22/judge-sanctions-lawyers-whose-ai-written-filing-
contained-fake-citations.html
Judge P. Kevin Castel said that the attorneys, Peter LoDuca and Steven
Schwartz (pictured), “abandoned their responsibilities” when they submitted
the A.I.-written brief in their client’s lawsuit… in March, and “then continued
to stand by the fake opinions after judicial orders called their existence into
question”
Friday, September 29, 2023 Understanding Hallucinations in LLMs - Greg Makowski of Cybernator 4
Understanding Fundamentals
Word2Vec – an early embedding
• Before, represented one word with one column, with 0/1 val
• Represent a sentence or paragraph
• 10k or 50k words determines the number of inputs to a model
• Problems
• Order of words does not matter
• Same representation for “bank” in “river bank”, “plane banks left”,
“financial bank”
• After, advantages of Word2Vec
• May “compress” 10k sparse columns to 300 columns, with words as “points”
• Based on context of words around “bank”, it discovers different meanings
• Once created, save as a lookup table “word x”  “embedding vector x”
• Embedding spaces are used for
• Words, paragraphs, Face recognition, Speaker recognition, Social Networks
Friday, September 29, 2023 Understanding Hallucinations in LLMs - Greg Makowski of Cybernator 5
https://arxiv.org/pdf/1310.4546.pdf
Distributed Representations of Words and Phrases and their Compositionality – 2013
https://medium.com/@zafaralibagh6/a-simple-word2vec-tutorial-61e64e38a6a1
https://github.com/tmikolov/word2vec https://github.com/loretoparisi/word2vec
10k context 300
inputs compressed
The
plane
banks
left
before
Embedding of Books – to encode concepts
• In the chart on the right, book embeddings
• Non-Fiction – top right, green
• Science Fiction – left, blue
• Fiction – Orange, middle to lower right
• Starting state setup by LLM PROMPT
ENGINEERING
• This sets the “starting place” to run the
time series dialog with the LLM, i.e. start:
• Non-fiction
• Respectful
Friday, September 29, 2023 Understanding Hallucinations in LLMs - Greg Makowski of Cybernator 6
https://towardsdatascience.com/neural-network-embeddings-explained-4d028e6f0526
T-Distributed Stochastic Neighbor Embedding (TSNE)
Non-fiction.
Next slide,
drill down
New Data Points in Embedding Space Cause
New Text to be Generated (Hallucinations)
• HALLUCINATIONS
• New LLM conversations, between existing training
points, which all may be factual
• LLM is not 300 dimensions, but 7B to 500B+
• A new location data point in N dimensions is some
interpolation of surrounding concepts, like the
neighboring COMPRESSED training data points
(i.e. existing legal cases)
• NOT a web search
• NOT information retrieval!
• IT IS Text generation
Friday, September 29, 2023 Understanding Hallucinations in LLMs - Greg Makowski of Cybernator 7
ChatGPT
GPT = Generated Pretrained Transformers
Generation is a type of Hallucination
Friday, September 29, 2023 Understanding Hallucinations in LLMs - Greg Makowski of Cybernator 8
Embedding: close neighbors can be close concepts
• Local, very close neighbors in the embedding space, are
• Related meanings are used in similar conversations
• Word embeddings  a word is a “point” in 300 dimension embedding space
• LLM weight activations  answer paragraphs are a “point” in 70B LLM neural
network weight embedding space
• Legal cases group close together, and have a similar format and structure
(prosecution, defense, judgment)
• A new HALLUCINATED case in this embedding space will have a similar
structure but may have new person names in the generated case. This could be
helpful if you are writing a legal thriller.
• EVEN IF only trained on factual legal cases (excluded legal thriller fiction)
Friday, September 29, 2023 Understanding Hallucinations in LLMs - Greg Makowski of Cybernator 9
https://serokell.io/blog/word2vec
Going from embedding concept points
to NEW IMAGES is good and creative.
NOT used to retrieve exact images.
How LLM is a time series (Recurrent NN)
• Good at predicting the
most popular or frequent
sequences
• Only as good as the
volume and variety of the
training data
• Diagram shows given the
“start state” of the prior
word is “I”, the next
word is most frequently
“went”
• PROMPT ENGINEERING
in current LLMs
Friday, September 29, 2023 Understanding Hallucinations in LLMs - Greg Makowski of Cybernator 10
https://towardsdatascience.com/deconstructing-bert-distilling-6-patterns-from-100-million-parameters-b49113672f77#:~:text=BERT%20is%20a%20(multi%2Dheaded)%20beast&text=Since%20model%20weights%20are%20not,16%20%3D%20384%20different%20attention%20mechanisms
Hallucinations are just “next probable text”
temperature = 0
 Choose the
max prob. Use
for “most
repeatable
results”
Temp = 0.8 or 1.0
 Choose a
weighted next
likely item in the
sequence. For
“more creativity”
What does ChatGPT use for embeddings?
• Input text is broken into small chunks or “tokens”. A word or parts of the word, combined in the LMM seq.
• A conversation or “context length” may be 2k, 4k, 32k or 100k (Anthropic’s Claude 2)
• https://platform.openai.com/tokenizer
• 1536 dimensions in embedding space q) Is this a good representation of numbers for math?
• May be an average of 4 characters or ¾ of a word
• Represents a lookup table of ~50,000 tokens
• Tokens are combined together to make words
• """what <about> delimiters?"""
• How to represent Spanish?
• Byte Pair Encoding (BPE) https://en.wikipedia.org/wiki/Byte_pair_encoding
• Combine letters that frequently occur next to each other, to determine what tokens are used to create input embeddings
• Space between words connects to the beginning of the next word
• Keep “compressing” the “training sample text” until you end up with N (i.e. 50k) tokens.
• aaabdaaabac (input sample text). See many pairs of “aa”. Replace with a code letter “aa”  “Z”
• ZabdZabac observe frequent “ab” pairs. Now use “ab”  “Y”
• ZYdZYac observe frequent “ZY”. Now use “ZY”  “X”
• XdXac This is how BPE figures out what tokens to encode in an embedding space.
Friday, September 29, 2023 Understanding Hallucinations in LLMs - Greg Makowski of Cybernator 11
• ¿Cómo representar al
español?
q) Why use these groupings of
letters to define a token?
Ans) See BPE
Ans) Scales to a large, multi-lingual
vocabulary, proper nouns (names)
Solutions to Hallucinations
Friday, September 29, 2023 Understanding Hallucinations in LLMs - Greg Makowski of Cybernator 12
• Use LLMs for reasoning, NOT a corporate knowledge base
• Good for most common knowledge “Tuesday follows Monday” and “head of the long-tail”
• LLMs are NOT good for
• detecting their own Hallucinations
• data changing quarterly or daily (LLM’s are static),
• long tail, very detailed knowledge, that passes regression testing
• for a specific company and vertical application
• can try Supervised Fine Tuning (SFT) with Quantized Low Ranked Adaption (Q-LoRA)
• Retrieval Augmented Generation (RAG) (today’s solution)
• Objective Driven AI, by Yan LeCun (better solution in the future)
• Benefits
• LLM application can query your internal unstructured data (web, docs, …) or structured data (SQL, Snowflake, …)
• As your data updates from one day to the next, the LLM query results will access the updated data
• Gives answer citations! Therefore NOT a hallucination. The reader can investigate further.
• All “data quality control” your organization has, will be in place
• Once you “connect” the LLM application, you don’t have to repeat any expensive SFT or training update every day or week
• To query unstructured data, use embedding DB:
• Setup
• Break your text into paragraphs or chunks, 500-1000 characters. Text chunks may overlap
• Add to the chunk any questions, the chunk answers, for better matching to queries
• Encode with an embedding, save in the EMBEDDING DATABASE
• May save with structured attributes, to narrow down queries
• Query time
• LLM application takes the user text or query, and converts it to a query embedding q) [.02, .06, … .72]
• Use the query embedding to find the best match among document embeddings b) [.03, .05, … .65] (closest Euclidean distance)
low, low, high q)  b)
• Hands on Training, using LangChain and ChatGPT with Python
• SF bay ACM has an upcoming class, Sat, Nov 4, Building Enterprise LLM Applications
Friday, September 29, 2023 Understanding Hallucinations in LLMs - Greg Makowski of Cybernator 13
Retrieval Augmented Generation (RAG)
Vec DB search over
all dimensions at
once
a) [.43, .01, … .04]
b) [.03, .05, … .65]
c) [.01, .42, … .02]
Friday, September 29, 2023 Understanding Hallucinations in LLMs - Greg Makowski of Cybernator 14
Retrieval Augmented Generation (RAG)
https://arxiv.org/abs/2305.06983 Active Retrieval Augmented Generation – 2023 May
Traditional SQL index
• On “last_name + first_name”
• Binary tree, B+ tree
Embedding database index
• On all 300 or 1536 fields at
once, independent of order
• Hash function and other
technologies
Reading
• “Semantic Search with
Embeddings: Index anything” by
Romain Beaumount
https://rom1504.medium.com/semantic-
search-with-embeddings-index-anything-
8fb18556443c
Friday, September 29, 2023 Understanding Hallucinations in LLMs - Greg Makowski of Cybernator 15
RAG: Embedding Database Vendors
https://www.graft.com/blog/top-vector-databases-for-ai-projects
Friday, September 29, 2023 Understanding Hallucinations in LLMs - Greg Makowski of Cybernator 16
Objective Driven AI
“Objective-Driven AI, Towards AI Systems that can learn, remember, reason, plan, have common sense,
yet are steerable and safe”
https://drive.google.com/file/d/1wzHohvoSgKGZvzOWqZybjm4M4veKR6t3/view
Yann LeCun, 2023-07-21, New York University and Meta – Fundamental AI Research
Friday, September 29, 2023 Understanding Hallucinations in LLMs - Greg Makowski of Cybernator 17
Objective Driven AI
Greg Makowski
Head of Data Science Solutions
Cybernator.Net
Friday, September 29, 2023, 10:10 am
Global AI Conference
https://www.globalbigdataconference.com/virtual/global-artificial-intelligence-
conference/schedule-139.html Conference Schedule
https://www.slideshare.net/gregmakowski Slides
www.LinkedIn.com/in/GregMakowski Connect on LinkedIn
QUESTIONS?
Understanding Hallucinations
in LLMs, and Why Retrieval
Augmented Generation (RAG)
Reduces the Issue
“Building Enterprise LLM Applications”,
a class for the day, Sat, Nov 4th
GLOBAL20 for 20% off
Through the local ACM chapter
(non-profit)

More Related Content

What's hot

LLMs in Production: Tooling, Process, and Team Structure
LLMs in Production: Tooling, Process, and Team StructureLLMs in Production: Tooling, Process, and Team Structure
LLMs in Production: Tooling, Process, and Team StructureAggregage
 
Large Language Models Bootcamp
Large Language Models BootcampLarge Language Models Bootcamp
Large Language Models BootcampData Science Dojo
 
Customizing LLMs
Customizing LLMsCustomizing LLMs
Customizing LLMsJim Steele
 
Responsible Generative AI
Responsible Generative AIResponsible Generative AI
Responsible Generative AICMassociates
 
Unlocking the Power of Generative AI An Executive's Guide.pdf
Unlocking the Power of Generative AI An Executive's Guide.pdfUnlocking the Power of Generative AI An Executive's Guide.pdf
Unlocking the Power of Generative AI An Executive's Guide.pdfPremNaraindas1
 
Using the power of Generative AI at scale
Using the power of Generative AI at scaleUsing the power of Generative AI at scale
Using the power of Generative AI at scaleMaxim Salnikov
 
Generative-AI-in-enterprise-20230615.pdf
Generative-AI-in-enterprise-20230615.pdfGenerative-AI-in-enterprise-20230615.pdf
Generative-AI-in-enterprise-20230615.pdfLiming Zhu
 
stackconf 2021 | Weaviate Vector Search Engine – Introduction
stackconf 2021 | Weaviate Vector Search Engine – Introductionstackconf 2021 | Weaviate Vector Search Engine – Introduction
stackconf 2021 | Weaviate Vector Search Engine – IntroductionNETWAYS
 
An Introduction to Generative AI
An Introduction  to Generative AIAn Introduction  to Generative AI
An Introduction to Generative AICori Faklaris
 
Data pipelines from zero to solid
Data pipelines from zero to solidData pipelines from zero to solid
Data pipelines from zero to solidLars Albertsson
 
Understanding GenAI/LLM and What is Google Offering - Felix Goh
Understanding GenAI/LLM and What is Google Offering - Felix GohUnderstanding GenAI/LLM and What is Google Offering - Felix Goh
Understanding GenAI/LLM and What is Google Offering - Felix GohNUS-ISS
 
How Does Generative AI Actually Work? (a quick semi-technical introduction to...
How Does Generative AI Actually Work? (a quick semi-technical introduction to...How Does Generative AI Actually Work? (a quick semi-technical introduction to...
How Does Generative AI Actually Work? (a quick semi-technical introduction to...ssuser4edc93
 
OpenAI GPT in Depth - Questions and Misconceptions
OpenAI GPT in Depth - Questions and MisconceptionsOpenAI GPT in Depth - Questions and Misconceptions
OpenAI GPT in Depth - Questions and MisconceptionsIvo Andreev
 
Airbyte - Series-A deck
Airbyte - Series-A deckAirbyte - Series-A deck
Airbyte - Series-A deckAirbyte
 
Retrieval Augmented Generation in Practice: Scalable GenAI platforms with k8s...
Retrieval Augmented Generation in Practice: Scalable GenAI platforms with k8s...Retrieval Augmented Generation in Practice: Scalable GenAI platforms with k8s...
Retrieval Augmented Generation in Practice: Scalable GenAI platforms with k8s...Mihai Criveti
 
Graphs for Finance - AML with Neo4j Graph Data Science
Graphs for Finance - AML with Neo4j Graph Data Science Graphs for Finance - AML with Neo4j Graph Data Science
Graphs for Finance - AML with Neo4j Graph Data Science Neo4j
 
LLMOps for Your Data: Best Practices to Ensure Safety, Quality, and Cost
LLMOps for Your Data: Best Practices to Ensure Safety, Quality, and CostLLMOps for Your Data: Best Practices to Ensure Safety, Quality, and Cost
LLMOps for Your Data: Best Practices to Ensure Safety, Quality, and CostAggregage
 
Graphs for Data Science and Machine Learning
Graphs for Data Science and Machine LearningGraphs for Data Science and Machine Learning
Graphs for Data Science and Machine LearningNeo4j
 
Unleashing the Power of OpenAI GPT-3 in FME Data Integration Workflows
Unleashing the Power of OpenAI GPT-3 in FME Data Integration WorkflowsUnleashing the Power of OpenAI GPT-3 in FME Data Integration Workflows
Unleashing the Power of OpenAI GPT-3 in FME Data Integration WorkflowsSafe Software
 

What's hot (20)

LLMs in Production: Tooling, Process, and Team Structure
LLMs in Production: Tooling, Process, and Team StructureLLMs in Production: Tooling, Process, and Team Structure
LLMs in Production: Tooling, Process, and Team Structure
 
Large Language Models Bootcamp
Large Language Models BootcampLarge Language Models Bootcamp
Large Language Models Bootcamp
 
Customizing LLMs
Customizing LLMsCustomizing LLMs
Customizing LLMs
 
Responsible Generative AI
Responsible Generative AIResponsible Generative AI
Responsible Generative AI
 
Unlocking the Power of Generative AI An Executive's Guide.pdf
Unlocking the Power of Generative AI An Executive's Guide.pdfUnlocking the Power of Generative AI An Executive's Guide.pdf
Unlocking the Power of Generative AI An Executive's Guide.pdf
 
Using the power of Generative AI at scale
Using the power of Generative AI at scaleUsing the power of Generative AI at scale
Using the power of Generative AI at scale
 
Generative-AI-in-enterprise-20230615.pdf
Generative-AI-in-enterprise-20230615.pdfGenerative-AI-in-enterprise-20230615.pdf
Generative-AI-in-enterprise-20230615.pdf
 
stackconf 2021 | Weaviate Vector Search Engine – Introduction
stackconf 2021 | Weaviate Vector Search Engine – Introductionstackconf 2021 | Weaviate Vector Search Engine – Introduction
stackconf 2021 | Weaviate Vector Search Engine – Introduction
 
An Introduction to Generative AI
An Introduction  to Generative AIAn Introduction  to Generative AI
An Introduction to Generative AI
 
Data pipelines from zero to solid
Data pipelines from zero to solidData pipelines from zero to solid
Data pipelines from zero to solid
 
Understanding GenAI/LLM and What is Google Offering - Felix Goh
Understanding GenAI/LLM and What is Google Offering - Felix GohUnderstanding GenAI/LLM and What is Google Offering - Felix Goh
Understanding GenAI/LLM and What is Google Offering - Felix Goh
 
How Does Generative AI Actually Work? (a quick semi-technical introduction to...
How Does Generative AI Actually Work? (a quick semi-technical introduction to...How Does Generative AI Actually Work? (a quick semi-technical introduction to...
How Does Generative AI Actually Work? (a quick semi-technical introduction to...
 
OpenAI GPT in Depth - Questions and Misconceptions
OpenAI GPT in Depth - Questions and MisconceptionsOpenAI GPT in Depth - Questions and Misconceptions
OpenAI GPT in Depth - Questions and Misconceptions
 
Airbyte - Series-A deck
Airbyte - Series-A deckAirbyte - Series-A deck
Airbyte - Series-A deck
 
Retrieval Augmented Generation in Practice: Scalable GenAI platforms with k8s...
Retrieval Augmented Generation in Practice: Scalable GenAI platforms with k8s...Retrieval Augmented Generation in Practice: Scalable GenAI platforms with k8s...
Retrieval Augmented Generation in Practice: Scalable GenAI platforms with k8s...
 
Graphs for Finance - AML with Neo4j Graph Data Science
Graphs for Finance - AML with Neo4j Graph Data Science Graphs for Finance - AML with Neo4j Graph Data Science
Graphs for Finance - AML with Neo4j Graph Data Science
 
Graph and Amazon Neptune
Graph and Amazon NeptuneGraph and Amazon Neptune
Graph and Amazon Neptune
 
LLMOps for Your Data: Best Practices to Ensure Safety, Quality, and Cost
LLMOps for Your Data: Best Practices to Ensure Safety, Quality, and CostLLMOps for Your Data: Best Practices to Ensure Safety, Quality, and Cost
LLMOps for Your Data: Best Practices to Ensure Safety, Quality, and Cost
 
Graphs for Data Science and Machine Learning
Graphs for Data Science and Machine LearningGraphs for Data Science and Machine Learning
Graphs for Data Science and Machine Learning
 
Unleashing the Power of OpenAI GPT-3 in FME Data Integration Workflows
Unleashing the Power of OpenAI GPT-3 in FME Data Integration WorkflowsUnleashing the Power of OpenAI GPT-3 in FME Data Integration Workflows
Unleashing the Power of OpenAI GPT-3 in FME Data Integration Workflows
 

Similar to Understanding Hallucinations in LLMs - 2023 09 29.pptx

Basics of Generative AI: Models, Tokenization, Embeddings, Text Similarity, V...
Basics of Generative AI: Models, Tokenization, Embeddings, Text Similarity, V...Basics of Generative AI: Models, Tokenization, Embeddings, Text Similarity, V...
Basics of Generative AI: Models, Tokenization, Embeddings, Text Similarity, V...Robert McDermott
 
Basics of Generative AI: Models, Tokenization, Embeddings, Text Similarity, V...
Basics of Generative AI: Models, Tokenization, Embeddings, Text Similarity, V...Basics of Generative AI: Models, Tokenization, Embeddings, Text Similarity, V...
Basics of Generative AI: Models, Tokenization, Embeddings, Text Similarity, V...Robert McDermott
 
ChatGPT-and-Generative-AI-Landscape Working of generative ai search
ChatGPT-and-Generative-AI-Landscape Working of generative ai searchChatGPT-and-Generative-AI-Landscape Working of generative ai search
ChatGPT-and-Generative-AI-Landscape Working of generative ai searchrohitcse52
 
All in AI: LLM Landscape & RAG in 2024 with Mark Ryan (Google) & Jerry Liu (L...
All in AI: LLM Landscape & RAG in 2024 with Mark Ryan (Google) & Jerry Liu (L...All in AI: LLM Landscape & RAG in 2024 with Mark Ryan (Google) & Jerry Liu (L...
All in AI: LLM Landscape & RAG in 2024 with Mark Ryan (Google) & Jerry Liu (L...Daniel Zivkovic
 
Making Software Secure by Design
Making Software Secure by DesignMaking Software Secure by Design
Making Software Secure by DesignOmegapoint Academy
 
BSidesLV 2013 - Using Machine Learning to Support Information Security
BSidesLV 2013 - Using Machine Learning to Support Information SecurityBSidesLV 2013 - Using Machine Learning to Support Information Security
BSidesLV 2013 - Using Machine Learning to Support Information SecurityAlex Pinto
 
And Then There Are Algorithms
And Then There Are AlgorithmsAnd Then There Are Algorithms
And Then There Are AlgorithmsInfluxData
 
2007 Mark Logic User Conference Keynote
2007 Mark Logic User Conference Keynote2007 Mark Logic User Conference Keynote
2007 Mark Logic User Conference KeynoteDave Kellogg
 
Effective Semantics for Engineering NLP Systems
Effective Semantics for Engineering NLP SystemsEffective Semantics for Engineering NLP Systems
Effective Semantics for Engineering NLP SystemsAndre Freitas
 
Conversational AI with Rasa - PyData Workshop
Conversational AI with Rasa - PyData WorkshopConversational AI with Rasa - PyData Workshop
Conversational AI with Rasa - PyData WorkshopTom Bocklisch
 
The Semantic Knowledge Graph
The Semantic Knowledge GraphThe Semantic Knowledge Graph
The Semantic Knowledge GraphTrey Grainger
 
Introduction to Graph databases and Neo4j (by Stefan Armbruster)
Introduction to Graph databases and Neo4j (by Stefan Armbruster)Introduction to Graph databases and Neo4j (by Stefan Armbruster)
Introduction to Graph databases and Neo4j (by Stefan Armbruster)barcelonajug
 
But is it Art(ificial Intelligence)?
But is it Art(ificial Intelligence)? But is it Art(ificial Intelligence)?
But is it Art(ificial Intelligence)? Alan Sardella
 
The CIOs Guide to NoSQL
The CIOs Guide to NoSQLThe CIOs Guide to NoSQL
The CIOs Guide to NoSQLDATAVERSITY
 
NoSQL and MongoDB Introdction
NoSQL and MongoDB IntrodctionNoSQL and MongoDB Introdction
NoSQL and MongoDB IntrodctionBrian Enochson
 
Foundation Models in Recommender Systems
Foundation Models in Recommender SystemsFoundation Models in Recommender Systems
Foundation Models in Recommender SystemsAnoop Deoras
 
Software engineering the genesis
Software engineering  the genesisSoftware engineering  the genesis
Software engineering the genesisPawel Szulc
 
Hacking Predictive Modeling - RoadSec 2018
Hacking Predictive Modeling - RoadSec 2018Hacking Predictive Modeling - RoadSec 2018
Hacking Predictive Modeling - RoadSec 2018HJ van Veen
 
NoSQL Now! Webinar Series: Innovations in NoSQL Query Languages
NoSQL Now! Webinar Series: Innovations in NoSQL Query Languages  NoSQL Now! Webinar Series: Innovations in NoSQL Query Languages
NoSQL Now! Webinar Series: Innovations in NoSQL Query Languages DATAVERSITY
 

Similar to Understanding Hallucinations in LLMs - 2023 09 29.pptx (20)

Basics of Generative AI: Models, Tokenization, Embeddings, Text Similarity, V...
Basics of Generative AI: Models, Tokenization, Embeddings, Text Similarity, V...Basics of Generative AI: Models, Tokenization, Embeddings, Text Similarity, V...
Basics of Generative AI: Models, Tokenization, Embeddings, Text Similarity, V...
 
Basics of Generative AI: Models, Tokenization, Embeddings, Text Similarity, V...
Basics of Generative AI: Models, Tokenization, Embeddings, Text Similarity, V...Basics of Generative AI: Models, Tokenization, Embeddings, Text Similarity, V...
Basics of Generative AI: Models, Tokenization, Embeddings, Text Similarity, V...
 
ChatGPT-and-Generative-AI-Landscape Working of generative ai search
ChatGPT-and-Generative-AI-Landscape Working of generative ai searchChatGPT-and-Generative-AI-Landscape Working of generative ai search
ChatGPT-and-Generative-AI-Landscape Working of generative ai search
 
All in AI: LLM Landscape & RAG in 2024 with Mark Ryan (Google) & Jerry Liu (L...
All in AI: LLM Landscape & RAG in 2024 with Mark Ryan (Google) & Jerry Liu (L...All in AI: LLM Landscape & RAG in 2024 with Mark Ryan (Google) & Jerry Liu (L...
All in AI: LLM Landscape & RAG in 2024 with Mark Ryan (Google) & Jerry Liu (L...
 
Making Software Secure by Design
Making Software Secure by DesignMaking Software Secure by Design
Making Software Secure by Design
 
BSidesLV 2013 - Using Machine Learning to Support Information Security
BSidesLV 2013 - Using Machine Learning to Support Information SecurityBSidesLV 2013 - Using Machine Learning to Support Information Security
BSidesLV 2013 - Using Machine Learning to Support Information Security
 
And Then There Are Algorithms
And Then There Are AlgorithmsAnd Then There Are Algorithms
And Then There Are Algorithms
 
2007 Mark Logic User Conference Keynote
2007 Mark Logic User Conference Keynote2007 Mark Logic User Conference Keynote
2007 Mark Logic User Conference Keynote
 
Effective Semantics for Engineering NLP Systems
Effective Semantics for Engineering NLP SystemsEffective Semantics for Engineering NLP Systems
Effective Semantics for Engineering NLP Systems
 
Conversational AI with Rasa - PyData Workshop
Conversational AI with Rasa - PyData WorkshopConversational AI with Rasa - PyData Workshop
Conversational AI with Rasa - PyData Workshop
 
The Semantic Knowledge Graph
The Semantic Knowledge GraphThe Semantic Knowledge Graph
The Semantic Knowledge Graph
 
Introduction to Graph databases and Neo4j (by Stefan Armbruster)
Introduction to Graph databases and Neo4j (by Stefan Armbruster)Introduction to Graph databases and Neo4j (by Stefan Armbruster)
Introduction to Graph databases and Neo4j (by Stefan Armbruster)
 
But is it Art(ificial Intelligence)?
But is it Art(ificial Intelligence)? But is it Art(ificial Intelligence)?
But is it Art(ificial Intelligence)?
 
The CIOs Guide to NoSQL
The CIOs Guide to NoSQLThe CIOs Guide to NoSQL
The CIOs Guide to NoSQL
 
NOSQL
NOSQLNOSQL
NOSQL
 
NoSQL and MongoDB Introdction
NoSQL and MongoDB IntrodctionNoSQL and MongoDB Introdction
NoSQL and MongoDB Introdction
 
Foundation Models in Recommender Systems
Foundation Models in Recommender SystemsFoundation Models in Recommender Systems
Foundation Models in Recommender Systems
 
Software engineering the genesis
Software engineering  the genesisSoftware engineering  the genesis
Software engineering the genesis
 
Hacking Predictive Modeling - RoadSec 2018
Hacking Predictive Modeling - RoadSec 2018Hacking Predictive Modeling - RoadSec 2018
Hacking Predictive Modeling - RoadSec 2018
 
NoSQL Now! Webinar Series: Innovations in NoSQL Query Languages
NoSQL Now! Webinar Series: Innovations in NoSQL Query Languages  NoSQL Now! Webinar Series: Innovations in NoSQL Query Languages
NoSQL Now! Webinar Series: Innovations in NoSQL Query Languages
 

More from Greg Makowski

A Successful Hiring Process for Data Scientists
A Successful Hiring Process for Data ScientistsA Successful Hiring Process for Data Scientists
A Successful Hiring Process for Data ScientistsGreg Makowski
 
Kdd 2019: Standardizing Data Science to Help Hiring
Kdd 2019:  Standardizing Data Science to Help HiringKdd 2019:  Standardizing Data Science to Help Hiring
Kdd 2019: Standardizing Data Science to Help HiringGreg Makowski
 
Tales from an ip worker in consulting and software
Tales from an ip worker in consulting and softwareTales from an ip worker in consulting and software
Tales from an ip worker in consulting and softwareGreg Makowski
 
Predictive Model and Record Description with Segmented Sensitivity Analysis (...
Predictive Model and Record Description with Segmented Sensitivity Analysis (...Predictive Model and Record Description with Segmented Sensitivity Analysis (...
Predictive Model and Record Description with Segmented Sensitivity Analysis (...Greg Makowski
 
Production model lifecycle management 2016 09
Production model lifecycle management 2016 09Production model lifecycle management 2016 09
Production model lifecycle management 2016 09Greg Makowski
 
Using Deep Learning to do Real-Time Scoring in Practical Applications
Using Deep Learning to do Real-Time Scoring in Practical ApplicationsUsing Deep Learning to do Real-Time Scoring in Practical Applications
Using Deep Learning to do Real-Time Scoring in Practical ApplicationsGreg Makowski
 
Using Deep Learning to do Real-Time Scoring in Practical Applications - 2015-...
Using Deep Learning to do Real-Time Scoring in Practical Applications - 2015-...Using Deep Learning to do Real-Time Scoring in Practical Applications - 2015-...
Using Deep Learning to do Real-Time Scoring in Practical Applications - 2015-...Greg Makowski
 
SFbayACM ACM Data Science Camp 2015 10 24
SFbayACM ACM Data Science Camp 2015 10 24SFbayACM ACM Data Science Camp 2015 10 24
SFbayACM ACM Data Science Camp 2015 10 24Greg Makowski
 
How to Create 80% of a Big Data Pilot Project
How to Create 80% of a Big Data Pilot ProjectHow to Create 80% of a Big Data Pilot Project
How to Create 80% of a Big Data Pilot ProjectGreg Makowski
 
Powering Real­time Decision Engines in Finance and Healthcare using Open Sour...
Powering Real­time Decision Engines in Finance and Healthcare using Open Sour...Powering Real­time Decision Engines in Finance and Healthcare using Open Sour...
Powering Real­time Decision Engines in Finance and Healthcare using Open Sour...Greg Makowski
 
Kamanja: Driving Business Value through Real-Time Decisioning Solutions
Kamanja: Driving Business Value through Real-Time Decisioning SolutionsKamanja: Driving Business Value through Real-Time Decisioning Solutions
Kamanja: Driving Business Value through Real-Time Decisioning SolutionsGreg Makowski
 
Heuristic design of experiments w meta gradient search
Heuristic design of experiments w meta gradient searchHeuristic design of experiments w meta gradient search
Heuristic design of experiments w meta gradient searchGreg Makowski
 
Three case studies deploying cluster analysis
Three case studies deploying cluster analysisThree case studies deploying cluster analysis
Three case studies deploying cluster analysisGreg Makowski
 
Linked In Slides 2009 02 24 B
Linked In Slides 2009 02 24 BLinked In Slides 2009 02 24 B
Linked In Slides 2009 02 24 BGreg Makowski
 
The 360º Leader (Section 2 of 6)
The 360º Leader (Section 2 of 6)The 360º Leader (Section 2 of 6)
The 360º Leader (Section 2 of 6)Greg Makowski
 
The 360º Leader (Section 1 of 6)
The 360º Leader (Section 1 of 6)The 360º Leader (Section 1 of 6)
The 360º Leader (Section 1 of 6)Greg Makowski
 

More from Greg Makowski (16)

A Successful Hiring Process for Data Scientists
A Successful Hiring Process for Data ScientistsA Successful Hiring Process for Data Scientists
A Successful Hiring Process for Data Scientists
 
Kdd 2019: Standardizing Data Science to Help Hiring
Kdd 2019:  Standardizing Data Science to Help HiringKdd 2019:  Standardizing Data Science to Help Hiring
Kdd 2019: Standardizing Data Science to Help Hiring
 
Tales from an ip worker in consulting and software
Tales from an ip worker in consulting and softwareTales from an ip worker in consulting and software
Tales from an ip worker in consulting and software
 
Predictive Model and Record Description with Segmented Sensitivity Analysis (...
Predictive Model and Record Description with Segmented Sensitivity Analysis (...Predictive Model and Record Description with Segmented Sensitivity Analysis (...
Predictive Model and Record Description with Segmented Sensitivity Analysis (...
 
Production model lifecycle management 2016 09
Production model lifecycle management 2016 09Production model lifecycle management 2016 09
Production model lifecycle management 2016 09
 
Using Deep Learning to do Real-Time Scoring in Practical Applications
Using Deep Learning to do Real-Time Scoring in Practical ApplicationsUsing Deep Learning to do Real-Time Scoring in Practical Applications
Using Deep Learning to do Real-Time Scoring in Practical Applications
 
Using Deep Learning to do Real-Time Scoring in Practical Applications - 2015-...
Using Deep Learning to do Real-Time Scoring in Practical Applications - 2015-...Using Deep Learning to do Real-Time Scoring in Practical Applications - 2015-...
Using Deep Learning to do Real-Time Scoring in Practical Applications - 2015-...
 
SFbayACM ACM Data Science Camp 2015 10 24
SFbayACM ACM Data Science Camp 2015 10 24SFbayACM ACM Data Science Camp 2015 10 24
SFbayACM ACM Data Science Camp 2015 10 24
 
How to Create 80% of a Big Data Pilot Project
How to Create 80% of a Big Data Pilot ProjectHow to Create 80% of a Big Data Pilot Project
How to Create 80% of a Big Data Pilot Project
 
Powering Real­time Decision Engines in Finance and Healthcare using Open Sour...
Powering Real­time Decision Engines in Finance and Healthcare using Open Sour...Powering Real­time Decision Engines in Finance and Healthcare using Open Sour...
Powering Real­time Decision Engines in Finance and Healthcare using Open Sour...
 
Kamanja: Driving Business Value through Real-Time Decisioning Solutions
Kamanja: Driving Business Value through Real-Time Decisioning SolutionsKamanja: Driving Business Value through Real-Time Decisioning Solutions
Kamanja: Driving Business Value through Real-Time Decisioning Solutions
 
Heuristic design of experiments w meta gradient search
Heuristic design of experiments w meta gradient searchHeuristic design of experiments w meta gradient search
Heuristic design of experiments w meta gradient search
 
Three case studies deploying cluster analysis
Three case studies deploying cluster analysisThree case studies deploying cluster analysis
Three case studies deploying cluster analysis
 
Linked In Slides 2009 02 24 B
Linked In Slides 2009 02 24 BLinked In Slides 2009 02 24 B
Linked In Slides 2009 02 24 B
 
The 360º Leader (Section 2 of 6)
The 360º Leader (Section 2 of 6)The 360º Leader (Section 2 of 6)
The 360º Leader (Section 2 of 6)
 
The 360º Leader (Section 1 of 6)
The 360º Leader (Section 1 of 6)The 360º Leader (Section 1 of 6)
The 360º Leader (Section 1 of 6)
 

Recently uploaded

RadioAdProWritingCinderellabyButleri.pdf
RadioAdProWritingCinderellabyButleri.pdfRadioAdProWritingCinderellabyButleri.pdf
RadioAdProWritingCinderellabyButleri.pdfgstagge
 
Full night 🥵 Call Girls Delhi New Friends Colony {9711199171} Sanya Reddy ✌️o...
Full night 🥵 Call Girls Delhi New Friends Colony {9711199171} Sanya Reddy ✌️o...Full night 🥵 Call Girls Delhi New Friends Colony {9711199171} Sanya Reddy ✌️o...
Full night 🥵 Call Girls Delhi New Friends Colony {9711199171} Sanya Reddy ✌️o...shivangimorya083
 
Ukraine War presentation: KNOW THE BASICS
Ukraine War presentation: KNOW THE BASICSUkraine War presentation: KNOW THE BASICS
Ukraine War presentation: KNOW THE BASICSAishani27
 
Market Analysis in the 5 Largest Economic Countries in Southeast Asia.pdf
Market Analysis in the 5 Largest Economic Countries in Southeast Asia.pdfMarket Analysis in the 5 Largest Economic Countries in Southeast Asia.pdf
Market Analysis in the 5 Largest Economic Countries in Southeast Asia.pdfRachmat Ramadhan H
 
dokumen.tips_chapter-4-transient-heat-conduction-mehmet-kanoglu.ppt
dokumen.tips_chapter-4-transient-heat-conduction-mehmet-kanoglu.pptdokumen.tips_chapter-4-transient-heat-conduction-mehmet-kanoglu.ppt
dokumen.tips_chapter-4-transient-heat-conduction-mehmet-kanoglu.pptSonatrach
 
Data Science Project: Advancements in Fetal Health Classification
Data Science Project: Advancements in Fetal Health ClassificationData Science Project: Advancements in Fetal Health Classification
Data Science Project: Advancements in Fetal Health ClassificationBoston Institute of Analytics
 
꧁❤ Greater Noida Call Girls Delhi ❤꧂ 9711199171 ☎️ Hard And Sexy Vip Call
꧁❤ Greater Noida Call Girls Delhi ❤꧂ 9711199171 ☎️ Hard And Sexy Vip Call꧁❤ Greater Noida Call Girls Delhi ❤꧂ 9711199171 ☎️ Hard And Sexy Vip Call
꧁❤ Greater Noida Call Girls Delhi ❤꧂ 9711199171 ☎️ Hard And Sexy Vip Callshivangimorya083
 
Unveiling Insights: The Role of a Data Analyst
Unveiling Insights: The Role of a Data AnalystUnveiling Insights: The Role of a Data Analyst
Unveiling Insights: The Role of a Data AnalystSamantha Rae Coolbeth
 
Brighton SEO | April 2024 | Data Storytelling
Brighton SEO | April 2024 | Data StorytellingBrighton SEO | April 2024 | Data Storytelling
Brighton SEO | April 2024 | Data StorytellingNeil Barnes
 
From idea to production in a day – Leveraging Azure ML and Streamlit to build...
From idea to production in a day – Leveraging Azure ML and Streamlit to build...From idea to production in a day – Leveraging Azure ML and Streamlit to build...
From idea to production in a day – Leveraging Azure ML and Streamlit to build...Florian Roscheck
 
Data Science Jobs and Salaries Analysis.pptx
Data Science Jobs and Salaries Analysis.pptxData Science Jobs and Salaries Analysis.pptx
Data Science Jobs and Salaries Analysis.pptxFurkanTasci3
 
Delhi Call Girls Punjabi Bagh 9711199171 ☎✔👌✔ Whatsapp Hard And Sexy Vip Call
Delhi Call Girls Punjabi Bagh 9711199171 ☎✔👌✔ Whatsapp Hard And Sexy Vip CallDelhi Call Girls Punjabi Bagh 9711199171 ☎✔👌✔ Whatsapp Hard And Sexy Vip Call
Delhi Call Girls Punjabi Bagh 9711199171 ☎✔👌✔ Whatsapp Hard And Sexy Vip Callshivangimorya083
 
Building on a FAIRly Strong Foundation to Connect Academic Research to Transl...
Building on a FAIRly Strong Foundation to Connect Academic Research to Transl...Building on a FAIRly Strong Foundation to Connect Academic Research to Transl...
Building on a FAIRly Strong Foundation to Connect Academic Research to Transl...Jack DiGiovanna
 
Dubai Call Girls Wifey O52&786472 Call Girls Dubai
Dubai Call Girls Wifey O52&786472 Call Girls DubaiDubai Call Girls Wifey O52&786472 Call Girls Dubai
Dubai Call Girls Wifey O52&786472 Call Girls Dubaihf8803863
 
RA-11058_IRR-COMPRESS Do 198 series of 1998
RA-11058_IRR-COMPRESS Do 198 series of 1998RA-11058_IRR-COMPRESS Do 198 series of 1998
RA-11058_IRR-COMPRESS Do 198 series of 1998YohFuh
 
Schema on read is obsolete. Welcome metaprogramming..pdf
Schema on read is obsolete. Welcome metaprogramming..pdfSchema on read is obsolete. Welcome metaprogramming..pdf
Schema on read is obsolete. Welcome metaprogramming..pdfLars Albertsson
 
Industrialised data - the key to AI success.pdf
Industrialised data - the key to AI success.pdfIndustrialised data - the key to AI success.pdf
Industrialised data - the key to AI success.pdfLars Albertsson
 
Indian Call Girls in Abu Dhabi O5286O24O8 Call Girls in Abu Dhabi By Independ...
Indian Call Girls in Abu Dhabi O5286O24O8 Call Girls in Abu Dhabi By Independ...Indian Call Girls in Abu Dhabi O5286O24O8 Call Girls in Abu Dhabi By Independ...
Indian Call Girls in Abu Dhabi O5286O24O8 Call Girls in Abu Dhabi By Independ...dajasot375
 

Recently uploaded (20)

RadioAdProWritingCinderellabyButleri.pdf
RadioAdProWritingCinderellabyButleri.pdfRadioAdProWritingCinderellabyButleri.pdf
RadioAdProWritingCinderellabyButleri.pdf
 
Full night 🥵 Call Girls Delhi New Friends Colony {9711199171} Sanya Reddy ✌️o...
Full night 🥵 Call Girls Delhi New Friends Colony {9711199171} Sanya Reddy ✌️o...Full night 🥵 Call Girls Delhi New Friends Colony {9711199171} Sanya Reddy ✌️o...
Full night 🥵 Call Girls Delhi New Friends Colony {9711199171} Sanya Reddy ✌️o...
 
Ukraine War presentation: KNOW THE BASICS
Ukraine War presentation: KNOW THE BASICSUkraine War presentation: KNOW THE BASICS
Ukraine War presentation: KNOW THE BASICS
 
Market Analysis in the 5 Largest Economic Countries in Southeast Asia.pdf
Market Analysis in the 5 Largest Economic Countries in Southeast Asia.pdfMarket Analysis in the 5 Largest Economic Countries in Southeast Asia.pdf
Market Analysis in the 5 Largest Economic Countries in Southeast Asia.pdf
 
VIP Call Girls Service Charbagh { Lucknow Call Girls Service 9548273370 } Boo...
VIP Call Girls Service Charbagh { Lucknow Call Girls Service 9548273370 } Boo...VIP Call Girls Service Charbagh { Lucknow Call Girls Service 9548273370 } Boo...
VIP Call Girls Service Charbagh { Lucknow Call Girls Service 9548273370 } Boo...
 
dokumen.tips_chapter-4-transient-heat-conduction-mehmet-kanoglu.ppt
dokumen.tips_chapter-4-transient-heat-conduction-mehmet-kanoglu.pptdokumen.tips_chapter-4-transient-heat-conduction-mehmet-kanoglu.ppt
dokumen.tips_chapter-4-transient-heat-conduction-mehmet-kanoglu.ppt
 
Data Science Project: Advancements in Fetal Health Classification
Data Science Project: Advancements in Fetal Health ClassificationData Science Project: Advancements in Fetal Health Classification
Data Science Project: Advancements in Fetal Health Classification
 
꧁❤ Greater Noida Call Girls Delhi ❤꧂ 9711199171 ☎️ Hard And Sexy Vip Call
꧁❤ Greater Noida Call Girls Delhi ❤꧂ 9711199171 ☎️ Hard And Sexy Vip Call꧁❤ Greater Noida Call Girls Delhi ❤꧂ 9711199171 ☎️ Hard And Sexy Vip Call
꧁❤ Greater Noida Call Girls Delhi ❤꧂ 9711199171 ☎️ Hard And Sexy Vip Call
 
Unveiling Insights: The Role of a Data Analyst
Unveiling Insights: The Role of a Data AnalystUnveiling Insights: The Role of a Data Analyst
Unveiling Insights: The Role of a Data Analyst
 
Brighton SEO | April 2024 | Data Storytelling
Brighton SEO | April 2024 | Data StorytellingBrighton SEO | April 2024 | Data Storytelling
Brighton SEO | April 2024 | Data Storytelling
 
From idea to production in a day – Leveraging Azure ML and Streamlit to build...
From idea to production in a day – Leveraging Azure ML and Streamlit to build...From idea to production in a day – Leveraging Azure ML and Streamlit to build...
From idea to production in a day – Leveraging Azure ML and Streamlit to build...
 
Data Science Jobs and Salaries Analysis.pptx
Data Science Jobs and Salaries Analysis.pptxData Science Jobs and Salaries Analysis.pptx
Data Science Jobs and Salaries Analysis.pptx
 
Delhi Call Girls Punjabi Bagh 9711199171 ☎✔👌✔ Whatsapp Hard And Sexy Vip Call
Delhi Call Girls Punjabi Bagh 9711199171 ☎✔👌✔ Whatsapp Hard And Sexy Vip CallDelhi Call Girls Punjabi Bagh 9711199171 ☎✔👌✔ Whatsapp Hard And Sexy Vip Call
Delhi Call Girls Punjabi Bagh 9711199171 ☎✔👌✔ Whatsapp Hard And Sexy Vip Call
 
Building on a FAIRly Strong Foundation to Connect Academic Research to Transl...
Building on a FAIRly Strong Foundation to Connect Academic Research to Transl...Building on a FAIRly Strong Foundation to Connect Academic Research to Transl...
Building on a FAIRly Strong Foundation to Connect Academic Research to Transl...
 
Dubai Call Girls Wifey O52&786472 Call Girls Dubai
Dubai Call Girls Wifey O52&786472 Call Girls DubaiDubai Call Girls Wifey O52&786472 Call Girls Dubai
Dubai Call Girls Wifey O52&786472 Call Girls Dubai
 
RA-11058_IRR-COMPRESS Do 198 series of 1998
RA-11058_IRR-COMPRESS Do 198 series of 1998RA-11058_IRR-COMPRESS Do 198 series of 1998
RA-11058_IRR-COMPRESS Do 198 series of 1998
 
Schema on read is obsolete. Welcome metaprogramming..pdf
Schema on read is obsolete. Welcome metaprogramming..pdfSchema on read is obsolete. Welcome metaprogramming..pdf
Schema on read is obsolete. Welcome metaprogramming..pdf
 
Deep Generative Learning for All - The Gen AI Hype (Spring 2024)
Deep Generative Learning for All - The Gen AI Hype (Spring 2024)Deep Generative Learning for All - The Gen AI Hype (Spring 2024)
Deep Generative Learning for All - The Gen AI Hype (Spring 2024)
 
Industrialised data - the key to AI success.pdf
Industrialised data - the key to AI success.pdfIndustrialised data - the key to AI success.pdf
Industrialised data - the key to AI success.pdf
 
Indian Call Girls in Abu Dhabi O5286O24O8 Call Girls in Abu Dhabi By Independ...
Indian Call Girls in Abu Dhabi O5286O24O8 Call Girls in Abu Dhabi By Independ...Indian Call Girls in Abu Dhabi O5286O24O8 Call Girls in Abu Dhabi By Independ...
Indian Call Girls in Abu Dhabi O5286O24O8 Call Girls in Abu Dhabi By Independ...
 

Understanding Hallucinations in LLMs - 2023 09 29.pptx

  • 1. Greg Makowski Head of Data Science Solutions Cybernator.Net Friday, September 29, 2023, 10:10 am Global AI Conference https://www.globalbigdataconference.com/virtual/global-artificial-intelligence- conference/schedule-139.html Conference Schedule https://www.slideshare.net/gregmakowski Slides www.LinkedIn.com/in/GregMakowski Connect on LinkedIn Understanding Hallucinations in LLMs, and Why Retrieval Augmented Generation (RAG) Reduces the Issue
  • 2. Greg Makowski Friday, September 29, 2023 Understanding Hallucinations in LLMs - Greg Makowski of Cybernator 2 • Goal since high school was “Applied Science Fiction” • Deploying Data Science and Artificial Intelligence since 1992 • Worked for American Express, then 6 startups • Been through 4 acquisitions or startup exits • Deployed ~96 models for clients • 10 Enterprise AI Applications • Growing DS teams since 2010 • Applied for 9 DS patents since Jan 2022
  • 3. Friday, September 29, 2023 Understanding Hallucinations in LLMs - Greg Makowski of Cybernator 3 Example Hallucination Problem Understanding Fundamentals • Word2Vec – early embedding • Representing books in embedding • Recurrent NN feed outputs back into the next time step • Byte Pair Encoding (about 4 char) embedding for GPT • Hallucination is a point between training data points Solutions • Use LLMs for reasoning, not a corporate knowledge base • Retrieval Augmented Generation (RAG, for the short term) • Dr. Yann LeCun’s Objective-Driven AI (long-term) Agenda
  • 4. Q) How could this happen? Q) Is this limited to AI in the Law? NO Q) Why don’t AI people just use factual training data? Would that fix it? NO Q) What if I used another LLM – would it still be an issue? YES Q) Could it happen to you, in your company? YES Q) Will this talk help you avoid this? YES !! Example Hallucination Problem New York Lawyers Sanctioned for Using Fake ChatGPT Cases in Legal Brief https://www.cnbc.com/2023/06/22/judge-sanctions-lawyers-whose-ai-written-filing- contained-fake-citations.html Judge P. Kevin Castel said that the attorneys, Peter LoDuca and Steven Schwartz (pictured), “abandoned their responsibilities” when they submitted the A.I.-written brief in their client’s lawsuit… in March, and “then continued to stand by the fake opinions after judicial orders called their existence into question” Friday, September 29, 2023 Understanding Hallucinations in LLMs - Greg Makowski of Cybernator 4
  • 5. Understanding Fundamentals Word2Vec – an early embedding • Before, represented one word with one column, with 0/1 val • Represent a sentence or paragraph • 10k or 50k words determines the number of inputs to a model • Problems • Order of words does not matter • Same representation for “bank” in “river bank”, “plane banks left”, “financial bank” • After, advantages of Word2Vec • May “compress” 10k sparse columns to 300 columns, with words as “points” • Based on context of words around “bank”, it discovers different meanings • Once created, save as a lookup table “word x”  “embedding vector x” • Embedding spaces are used for • Words, paragraphs, Face recognition, Speaker recognition, Social Networks Friday, September 29, 2023 Understanding Hallucinations in LLMs - Greg Makowski of Cybernator 5 https://arxiv.org/pdf/1310.4546.pdf Distributed Representations of Words and Phrases and their Compositionality – 2013 https://medium.com/@zafaralibagh6/a-simple-word2vec-tutorial-61e64e38a6a1 https://github.com/tmikolov/word2vec https://github.com/loretoparisi/word2vec 10k context 300 inputs compressed The plane banks left before
  • 6. Embedding of Books – to encode concepts • In the chart on the right, book embeddings • Non-Fiction – top right, green • Science Fiction – left, blue • Fiction – Orange, middle to lower right • Starting state setup by LLM PROMPT ENGINEERING • This sets the “starting place” to run the time series dialog with the LLM, i.e. start: • Non-fiction • Respectful Friday, September 29, 2023 Understanding Hallucinations in LLMs - Greg Makowski of Cybernator 6 https://towardsdatascience.com/neural-network-embeddings-explained-4d028e6f0526 T-Distributed Stochastic Neighbor Embedding (TSNE) Non-fiction. Next slide, drill down
  • 7. New Data Points in Embedding Space Cause New Text to be Generated (Hallucinations) • HALLUCINATIONS • New LLM conversations, between existing training points, which all may be factual • LLM is not 300 dimensions, but 7B to 500B+ • A new location data point in N dimensions is some interpolation of surrounding concepts, like the neighboring COMPRESSED training data points (i.e. existing legal cases) • NOT a web search • NOT information retrieval! • IT IS Text generation Friday, September 29, 2023 Understanding Hallucinations in LLMs - Greg Makowski of Cybernator 7
  • 8. ChatGPT GPT = Generated Pretrained Transformers Generation is a type of Hallucination Friday, September 29, 2023 Understanding Hallucinations in LLMs - Greg Makowski of Cybernator 8
  • 9. Embedding: close neighbors can be close concepts • Local, very close neighbors in the embedding space, are • Related meanings are used in similar conversations • Word embeddings  a word is a “point” in 300 dimension embedding space • LLM weight activations  answer paragraphs are a “point” in 70B LLM neural network weight embedding space • Legal cases group close together, and have a similar format and structure (prosecution, defense, judgment) • A new HALLUCINATED case in this embedding space will have a similar structure but may have new person names in the generated case. This could be helpful if you are writing a legal thriller. • EVEN IF only trained on factual legal cases (excluded legal thriller fiction) Friday, September 29, 2023 Understanding Hallucinations in LLMs - Greg Makowski of Cybernator 9 https://serokell.io/blog/word2vec Going from embedding concept points to NEW IMAGES is good and creative. NOT used to retrieve exact images.
  • 10. How LLM is a time series (Recurrent NN) • Good at predicting the most popular or frequent sequences • Only as good as the volume and variety of the training data • Diagram shows given the “start state” of the prior word is “I”, the next word is most frequently “went” • PROMPT ENGINEERING in current LLMs Friday, September 29, 2023 Understanding Hallucinations in LLMs - Greg Makowski of Cybernator 10 https://towardsdatascience.com/deconstructing-bert-distilling-6-patterns-from-100-million-parameters-b49113672f77#:~:text=BERT%20is%20a%20(multi%2Dheaded)%20beast&text=Since%20model%20weights%20are%20not,16%20%3D%20384%20different%20attention%20mechanisms Hallucinations are just “next probable text” temperature = 0  Choose the max prob. Use for “most repeatable results” Temp = 0.8 or 1.0  Choose a weighted next likely item in the sequence. For “more creativity”
  • 11. What does ChatGPT use for embeddings? • Input text is broken into small chunks or “tokens”. A word or parts of the word, combined in the LMM seq. • A conversation or “context length” may be 2k, 4k, 32k or 100k (Anthropic’s Claude 2) • https://platform.openai.com/tokenizer • 1536 dimensions in embedding space q) Is this a good representation of numbers for math? • May be an average of 4 characters or ¾ of a word • Represents a lookup table of ~50,000 tokens • Tokens are combined together to make words • """what <about> delimiters?""" • How to represent Spanish? • Byte Pair Encoding (BPE) https://en.wikipedia.org/wiki/Byte_pair_encoding • Combine letters that frequently occur next to each other, to determine what tokens are used to create input embeddings • Space between words connects to the beginning of the next word • Keep “compressing” the “training sample text” until you end up with N (i.e. 50k) tokens. • aaabdaaabac (input sample text). See many pairs of “aa”. Replace with a code letter “aa”  “Z” • ZabdZabac observe frequent “ab” pairs. Now use “ab”  “Y” • ZYdZYac observe frequent “ZY”. Now use “ZY”  “X” • XdXac This is how BPE figures out what tokens to encode in an embedding space. Friday, September 29, 2023 Understanding Hallucinations in LLMs - Greg Makowski of Cybernator 11 • ¿Cómo representar al español? q) Why use these groupings of letters to define a token? Ans) See BPE Ans) Scales to a large, multi-lingual vocabulary, proper nouns (names)
  • 12. Solutions to Hallucinations Friday, September 29, 2023 Understanding Hallucinations in LLMs - Greg Makowski of Cybernator 12 • Use LLMs for reasoning, NOT a corporate knowledge base • Good for most common knowledge “Tuesday follows Monday” and “head of the long-tail” • LLMs are NOT good for • detecting their own Hallucinations • data changing quarterly or daily (LLM’s are static), • long tail, very detailed knowledge, that passes regression testing • for a specific company and vertical application • can try Supervised Fine Tuning (SFT) with Quantized Low Ranked Adaption (Q-LoRA) • Retrieval Augmented Generation (RAG) (today’s solution) • Objective Driven AI, by Yan LeCun (better solution in the future)
  • 13. • Benefits • LLM application can query your internal unstructured data (web, docs, …) or structured data (SQL, Snowflake, …) • As your data updates from one day to the next, the LLM query results will access the updated data • Gives answer citations! Therefore NOT a hallucination. The reader can investigate further. • All “data quality control” your organization has, will be in place • Once you “connect” the LLM application, you don’t have to repeat any expensive SFT or training update every day or week • To query unstructured data, use embedding DB: • Setup • Break your text into paragraphs or chunks, 500-1000 characters. Text chunks may overlap • Add to the chunk any questions, the chunk answers, for better matching to queries • Encode with an embedding, save in the EMBEDDING DATABASE • May save with structured attributes, to narrow down queries • Query time • LLM application takes the user text or query, and converts it to a query embedding q) [.02, .06, … .72] • Use the query embedding to find the best match among document embeddings b) [.03, .05, … .65] (closest Euclidean distance) low, low, high q)  b) • Hands on Training, using LangChain and ChatGPT with Python • SF bay ACM has an upcoming class, Sat, Nov 4, Building Enterprise LLM Applications Friday, September 29, 2023 Understanding Hallucinations in LLMs - Greg Makowski of Cybernator 13 Retrieval Augmented Generation (RAG) Vec DB search over all dimensions at once a) [.43, .01, … .04] b) [.03, .05, … .65] c) [.01, .42, … .02]
  • 14. Friday, September 29, 2023 Understanding Hallucinations in LLMs - Greg Makowski of Cybernator 14 Retrieval Augmented Generation (RAG) https://arxiv.org/abs/2305.06983 Active Retrieval Augmented Generation – 2023 May
  • 15. Traditional SQL index • On “last_name + first_name” • Binary tree, B+ tree Embedding database index • On all 300 or 1536 fields at once, independent of order • Hash function and other technologies Reading • “Semantic Search with Embeddings: Index anything” by Romain Beaumount https://rom1504.medium.com/semantic- search-with-embeddings-index-anything- 8fb18556443c Friday, September 29, 2023 Understanding Hallucinations in LLMs - Greg Makowski of Cybernator 15 RAG: Embedding Database Vendors https://www.graft.com/blog/top-vector-databases-for-ai-projects
  • 16. Friday, September 29, 2023 Understanding Hallucinations in LLMs - Greg Makowski of Cybernator 16 Objective Driven AI “Objective-Driven AI, Towards AI Systems that can learn, remember, reason, plan, have common sense, yet are steerable and safe” https://drive.google.com/file/d/1wzHohvoSgKGZvzOWqZybjm4M4veKR6t3/view Yann LeCun, 2023-07-21, New York University and Meta – Fundamental AI Research
  • 17. Friday, September 29, 2023 Understanding Hallucinations in LLMs - Greg Makowski of Cybernator 17 Objective Driven AI
  • 18. Greg Makowski Head of Data Science Solutions Cybernator.Net Friday, September 29, 2023, 10:10 am Global AI Conference https://www.globalbigdataconference.com/virtual/global-artificial-intelligence- conference/schedule-139.html Conference Schedule https://www.slideshare.net/gregmakowski Slides www.LinkedIn.com/in/GregMakowski Connect on LinkedIn QUESTIONS? Understanding Hallucinations in LLMs, and Why Retrieval Augmented Generation (RAG) Reduces the Issue “Building Enterprise LLM Applications”, a class for the day, Sat, Nov 4th GLOBAL20 for 20% off Through the local ACM chapter (non-profit)