Understanding Generative AI and Large Language
Models (LLMs)
1
Outline
• Introduction to Generative AI
• How Large Language Models (LLMs) Work
• Text Generation Capabilities
• Summarization Capabilities
• Text to Image Generation
• Text to Video Generation
2
Model
LANGUAGE MODEL
LARGE LANGUAGE MODEL
VERY LARGE LANGUAGE MODEL
Historical Background and
Development
Early Days of Computing
Generative AI has its roots in the early days of
computing, with early pioneers laying the
groundwork for the field.
Recent Advances in Deep Learning
Recent advances in deep learning and neural
networks have driven significant progress in the
field of Generative AI, unlocking new
capabilities and possibilities.
Current State of the Art
Generative AI is currently at the cutting edge of
computer science, with applications in fields
such as art, music, and gaming.
4
Applications and Significance in
Various Fields Natural Language Processing
Generative AI has the potential to revolutionize natural
language processing by enabling machines to generate
human-like language. It can be applied to machine
translation, text summarization, and chatbots.
Computer Vision
Generative AI can be used to create realistic images and
predict missing parts of images. It can be applied to
image and video restoration, super-resolution, and image
synthesis.
Robotics
Generative AI has the potential to create intelligent
robots that can learn and adapt to their environment. It
can be applied to robot navigation, manipulation, and
perception.
5
How Large
Language Models
(LLMs) Work
Attention Is All You Need
The training process for LLMs involves using large datasets
and sophisticated optimization techniques, including pre-
training and fine-tuning, to produce models that can process
and understand natural language.
Encoder and Decoder Stacks
Attention (Multi-Head Attention)
Embeddings
8
https://arxiv.org/abs/1706.03762
10
Lossy Compression
11
12
13
We do not understand fully how all the parts of this neural network work. We know input and output.
Training Data is Large
Quantity but Low Quality
Pre-training is knowledge, Fine tuning is Application
15
Base Model
Instruct Model
16
Fine-Tuning and Optimization
Techniques
Gradient Descent Optimization
Gradient descent is a popular optimization algorithm used
in LLMs to minimize loss during training. It involves
iteratively adjusting the model's parameters to find the
minimum of the loss function.
Weight Initialization
Weight initialization is a technique that initializes the
weights of the model's layers with specific values. Proper
weight initialization can improve the convergence and
generalization of the model during training.
Regularization
Regularization is a technique used to prevent overfitting in
LLMs by adding a penalty term to the loss function during
training. Common regularization techniques include L1 and
L2 regularization.
17
Natural Language Generation
(NLG) Introduction to NLG
NLG stands for Natural Language Generation, an AI-
powered technique that can generate human-like text with
numerous applications in various fields, including content
creation, summarization, chatbots, and more.
Types of NLG Techniques
Various techniques are used in LLMs to generate natural-
language text, including template-based, data-driven, and
hybrid approaches. Different techniques are suited for
different types of applications.
Applications of NLG
NLG has various applications in different fields, such as
content creation, report generation, chatbots,
summarization, and more. NLG can help humans generate
high-quality content in less time and with greater
accuracy.
18
Creative Writing and Content
Creation
Language Models for Creative Writing
Language Models can generate high-quality
text that is indistinguishable from human
writing. This technology is used in creative
writing to generate poetry, novels, and other
forms of creative writing.
Content Creation
LLMs can be used to generate high-quality
content for different applications like social
media, email marketing, and search engine
optimization. This technology helps in
creating content faster and more efficiently.
19
Conversational AI and Chatbots
Large Language Models (LLMs) are being
used to develop conversational AI and
chatbots that can engage in human-like
conversations. These chatbots can be used
in various industries, such as finance,
healthcare, and customer service, to interact
with customers in a more efficient manner.
20
21
RAG – Bird’s Eye View
User Query
Knowledge Base
KB01
KB02
KB03
KB04
KB05
KB06
KB07
User Query
Large Language Model
Retrieval Augment
Generation
KB03
KB06
22
RAG – 101
Document
Loading Splitting Storage Retrieval Augmentation Generation
Chunks
Vector
Database Relevant
Chunks
Query
<user questions>
Relevant
Chunks
Prompt
LLM
Output
1 6
2 3 4 5
23
Advanced RAG Patterns
Enhanced Chunking and Vectorization (Addressing FP1 and FP4 ):
Efficient Chunking: Advanced RAG systems implement intelligent chunking, breaking down large documents
into smaller, semantically meaningful units. This ensures a better representation of content, making it easier for
the system to retrieve and process relevant information.
Sophisticated Vectorization: By employing state-of-the-art embedding models, these systems enhance
their ability to accurately vectorize text chunks. This leads to more precise semantic matching between queries
and document content, addressing issues related to content extraction and missing information.
Upgraded Search Index (Tackling FP2 and FP3):
Vector Store Index: Advanced RAG systems utilize optimized vector indices, enabling efficient and accurate
retrieval from extensive data sets.
Hierarchical Indices: Implementing a two-tiered indexing strategy, where summaries guide initial document
selection followed by detailed chunk retrieval, ensures contextually relevant and comprehensive search results.
Hypothetical Questions and HyDE (Enhancing FP2 and FP3):
Hypothetical Question Embedding:This novel approach involves generating hypothetical questions for
each text chunk and embedding these for retrieval. It improves the semantic search by aligning queries closely
with potential answers, enhancing the contextual relevance of retrieved documents.
Hypothetical Document Embedding (HyDE): Similarly, these systems generate hypothetical responses
based on user queries. This approach enhances the semantic match in the retrieval process, effectively
addressing issues related to context relevance and missing top-ranked documents.
Context Enrichment Strategies (Refining FP3):
Sentence Window Retrieval: By embedding each sentence separately and expanding the context around
the most relevant sentences, the system ensures that the provided context is both accurate and sufficiently
comprehensive.
Auto-merging Retriever: This technique involves retrieving granular information (child chunks) and then
automatically merging them into larger parent chunks, when necessary, thereby enriching the context without
losing specificity.
Advanced Reranking and Filtering (Addressing FP2):
Advanced RAG systems incorporate sophisticated reranking and filtering mechanisms post-retrieval. This
ensures that the final information set fed into the language model is the most relevant, addressing the challenge
of overlooked top-ranked documents.
Query Transformation Techniques (Solving FP6 – Incorrect Specificity):
Query transformations in advanced RAG systems involve decomposing complex queries or reformulating them
for improved retrieval. This directly addresses issues of incorrect specificity by ensuring that queries are optimally
structured for accurate information retrieval.
Comprehensive Response Synthesis (Countering FP7 – Incomplete):
Advanced RAG systems employ refined response synthesis techniques. Whether it’s iteratively refining answers
or summarizing context to fit into the model’s processing capabilities, these techniques ensure comprehensive
and complete responses.
Summarization
Capabilities
Extractive Summarization
What is Extractive Summarization?
Extractive summarization involves selecting the
most important sentences and phrases from a
piece of text to generate a summary. It is used
in various applications such as news articles,
legal documents, and scientific papers.
Techniques used in Extractive
Summarization
There are several techniques used in extractive
summarization such as TF-IDF, TextRank, and
Latent Semantic Analysis. These techniques
use different approaches to select the most
important sentences and phrases.
25
Abstractive Summarization
Abstractive summarization involves
generating summaries that capture the
essence of the original text. Different
techniques are used in abstractive
summarization, including natural language
processing, machine learning, and artificial
intelligence. These techniques help in
generating summaries that are more
informative and concise than extractive
summaries.
26
Applications in News, Research,
and Content Management
News Summarization
News summarization is the process of condensing large volumes of
news articles into concise summaries that can be quickly and easily
read. This saves time and provides readers with an overview of
current events.
Research
Text summarization can help researchers extract useful information
from large volumes of research papers, saving time and improving
productivity. It can also help them identify relevant papers to read.
Content Management
Text summarization can be used in content management to create
summaries of long articles, reports, and other documents. This can
help to make the content more accessible and easier to read for
users.
27
Text to Image
Generation
Overview of Text-to-Image
Models Generative Adversarial Networks
Text-to-Image models are based on
Generative Adversarial Networks (GANs),
which are capable of generating realistic
images. GANs consist of two neural
networks, a generator and discriminator,
that work together to produce images that
are visually indistinguishable from real
images.
Different Architectures and Techniques
There are different architectures and
techniques used in Text-to-Image models,
such as StackGAN, AttnGAN, and DALL-E.
These models vary in their approach and
complexity, but they share the goal of
generating realistic images from textual
input.
29
Examples and Applications (E.g.,
DALL-E, MidJourney)
Art
Text-to-Image generation has various
applications in the field of art, where it can be
used to create visual representations of
literary works or generate novel and creative
images.
Fashion and Design
Text-to-Image generation can be used in
fashion and design to generate realistic
images of clothing and accessories, enabling
designers to visualize and iterate design
concepts quickly.
30
Challenges and Future Prospects
Data Bias
The availability of biased data sets is a major challenge in text-to-image
generation. It can lead to the generation of discriminatory images, and
this problem needs to be addressed before the technology can be used
in commercial applications.
Text Ambiguity
Text-to-image generation algorithms often struggle with text ambiguity,
where a single text input can have multiple interpretations. This can
lead to the generation of incorrect or irrelevant images, and new
techniques need to be developed to address this problem.
Future Prospects
Despite the current challenges, text-to-image generation has enormous
potential for commercial and creative applications. The technology can
be used in fields such as advertising, product design, and creative
writing, and new research is being conducted to improve the accuracy
and efficiency of the algorithms.
31
Text to Video
Generation
Current State of Text-to-Video
Technology
Generative Adversarial Networks (GANs)
Generative Adversarial Networks (GANs)
are a type of neural network architecture
used in text-to-video models that generate
realistic video content from textual
descriptions.
Recurrent Neural Networks (RNNs)
Recurrent Neural Networks (RNNs) are a
type of neural network architecture used in
text-to-video models that process
sequential input data such as text and
generate video content.
33
Use Cases in Media and
Entertainment
Text-to-Video technology has numerous
applications in media and entertainment,
including film and television production,
advertising, and video game development. It
can help reduce production time and costs,
improve the quality of content, and enhance
user engagement.
34
Potential Developments and
Ethical Considerations
Potential Developments
Text-to-Video generation is an evolving field
with numerous potential developments that
could shape the future of the industry, such
as real-time video generation, personalized
video generation, and improved natural
language processing.
Ethical Considerations
Text-to-Video generation raises several
ethical considerations, such as data privacy,
security, and ownership, as well as the
potential impact on employment and society
as a whole.
35
Advantages of Generative AI in
Finance and Insurance
36
Generative AI can improve efficiency and accuracy in
claims processing and risk assessment.
Generative AI can offer personalized solutions to
customers, improving customer satisfaction and
retention.
Generative AI can help financial institutions stay
competitive in a rapidly changing market.

Gen AI Applications in Different Industries.pdf

  • 1.
    Understanding Generative AIand Large Language Models (LLMs) 1
  • 2.
    Outline • Introduction toGenerative AI • How Large Language Models (LLMs) Work • Text Generation Capabilities • Summarization Capabilities • Text to Image Generation • Text to Video Generation 2
  • 3.
    Model LANGUAGE MODEL LARGE LANGUAGEMODEL VERY LARGE LANGUAGE MODEL
  • 4.
    Historical Background and Development EarlyDays of Computing Generative AI has its roots in the early days of computing, with early pioneers laying the groundwork for the field. Recent Advances in Deep Learning Recent advances in deep learning and neural networks have driven significant progress in the field of Generative AI, unlocking new capabilities and possibilities. Current State of the Art Generative AI is currently at the cutting edge of computer science, with applications in fields such as art, music, and gaming. 4
  • 5.
    Applications and Significancein Various Fields Natural Language Processing Generative AI has the potential to revolutionize natural language processing by enabling machines to generate human-like language. It can be applied to machine translation, text summarization, and chatbots. Computer Vision Generative AI can be used to create realistic images and predict missing parts of images. It can be applied to image and video restoration, super-resolution, and image synthesis. Robotics Generative AI has the potential to create intelligent robots that can learn and adapt to their environment. It can be applied to robot navigation, manipulation, and perception. 5
  • 6.
  • 8.
    Attention Is AllYou Need The training process for LLMs involves using large datasets and sophisticated optimization techniques, including pre- training and fine-tuning, to produce models that can process and understand natural language. Encoder and Decoder Stacks Attention (Multi-Head Attention) Embeddings 8 https://arxiv.org/abs/1706.03762
  • 10.
  • 11.
  • 12.
  • 13.
    13 We do notunderstand fully how all the parts of this neural network work. We know input and output.
  • 14.
    Training Data isLarge Quantity but Low Quality Pre-training is knowledge, Fine tuning is Application
  • 15.
  • 16.
  • 17.
    Fine-Tuning and Optimization Techniques GradientDescent Optimization Gradient descent is a popular optimization algorithm used in LLMs to minimize loss during training. It involves iteratively adjusting the model's parameters to find the minimum of the loss function. Weight Initialization Weight initialization is a technique that initializes the weights of the model's layers with specific values. Proper weight initialization can improve the convergence and generalization of the model during training. Regularization Regularization is a technique used to prevent overfitting in LLMs by adding a penalty term to the loss function during training. Common regularization techniques include L1 and L2 regularization. 17
  • 18.
    Natural Language Generation (NLG)Introduction to NLG NLG stands for Natural Language Generation, an AI- powered technique that can generate human-like text with numerous applications in various fields, including content creation, summarization, chatbots, and more. Types of NLG Techniques Various techniques are used in LLMs to generate natural- language text, including template-based, data-driven, and hybrid approaches. Different techniques are suited for different types of applications. Applications of NLG NLG has various applications in different fields, such as content creation, report generation, chatbots, summarization, and more. NLG can help humans generate high-quality content in less time and with greater accuracy. 18
  • 19.
    Creative Writing andContent Creation Language Models for Creative Writing Language Models can generate high-quality text that is indistinguishable from human writing. This technology is used in creative writing to generate poetry, novels, and other forms of creative writing. Content Creation LLMs can be used to generate high-quality content for different applications like social media, email marketing, and search engine optimization. This technology helps in creating content faster and more efficiently. 19
  • 20.
    Conversational AI andChatbots Large Language Models (LLMs) are being used to develop conversational AI and chatbots that can engage in human-like conversations. These chatbots can be used in various industries, such as finance, healthcare, and customer service, to interact with customers in a more efficient manner. 20
  • 21.
    21 RAG – Bird’sEye View User Query Knowledge Base KB01 KB02 KB03 KB04 KB05 KB06 KB07 User Query Large Language Model Retrieval Augment Generation KB03 KB06
  • 22.
    22 RAG – 101 Document LoadingSplitting Storage Retrieval Augmentation Generation Chunks Vector Database Relevant Chunks Query <user questions> Relevant Chunks Prompt LLM Output 1 6 2 3 4 5
  • 23.
    23 Advanced RAG Patterns EnhancedChunking and Vectorization (Addressing FP1 and FP4 ): Efficient Chunking: Advanced RAG systems implement intelligent chunking, breaking down large documents into smaller, semantically meaningful units. This ensures a better representation of content, making it easier for the system to retrieve and process relevant information. Sophisticated Vectorization: By employing state-of-the-art embedding models, these systems enhance their ability to accurately vectorize text chunks. This leads to more precise semantic matching between queries and document content, addressing issues related to content extraction and missing information. Upgraded Search Index (Tackling FP2 and FP3): Vector Store Index: Advanced RAG systems utilize optimized vector indices, enabling efficient and accurate retrieval from extensive data sets. Hierarchical Indices: Implementing a two-tiered indexing strategy, where summaries guide initial document selection followed by detailed chunk retrieval, ensures contextually relevant and comprehensive search results. Hypothetical Questions and HyDE (Enhancing FP2 and FP3): Hypothetical Question Embedding:This novel approach involves generating hypothetical questions for each text chunk and embedding these for retrieval. It improves the semantic search by aligning queries closely with potential answers, enhancing the contextual relevance of retrieved documents. Hypothetical Document Embedding (HyDE): Similarly, these systems generate hypothetical responses based on user queries. This approach enhances the semantic match in the retrieval process, effectively addressing issues related to context relevance and missing top-ranked documents. Context Enrichment Strategies (Refining FP3): Sentence Window Retrieval: By embedding each sentence separately and expanding the context around the most relevant sentences, the system ensures that the provided context is both accurate and sufficiently comprehensive. Auto-merging Retriever: This technique involves retrieving granular information (child chunks) and then automatically merging them into larger parent chunks, when necessary, thereby enriching the context without losing specificity. Advanced Reranking and Filtering (Addressing FP2): Advanced RAG systems incorporate sophisticated reranking and filtering mechanisms post-retrieval. This ensures that the final information set fed into the language model is the most relevant, addressing the challenge of overlooked top-ranked documents. Query Transformation Techniques (Solving FP6 – Incorrect Specificity): Query transformations in advanced RAG systems involve decomposing complex queries or reformulating them for improved retrieval. This directly addresses issues of incorrect specificity by ensuring that queries are optimally structured for accurate information retrieval. Comprehensive Response Synthesis (Countering FP7 – Incomplete): Advanced RAG systems employ refined response synthesis techniques. Whether it’s iteratively refining answers or summarizing context to fit into the model’s processing capabilities, these techniques ensure comprehensive and complete responses.
  • 24.
  • 25.
    Extractive Summarization What isExtractive Summarization? Extractive summarization involves selecting the most important sentences and phrases from a piece of text to generate a summary. It is used in various applications such as news articles, legal documents, and scientific papers. Techniques used in Extractive Summarization There are several techniques used in extractive summarization such as TF-IDF, TextRank, and Latent Semantic Analysis. These techniques use different approaches to select the most important sentences and phrases. 25
  • 26.
    Abstractive Summarization Abstractive summarizationinvolves generating summaries that capture the essence of the original text. Different techniques are used in abstractive summarization, including natural language processing, machine learning, and artificial intelligence. These techniques help in generating summaries that are more informative and concise than extractive summaries. 26
  • 27.
    Applications in News,Research, and Content Management News Summarization News summarization is the process of condensing large volumes of news articles into concise summaries that can be quickly and easily read. This saves time and provides readers with an overview of current events. Research Text summarization can help researchers extract useful information from large volumes of research papers, saving time and improving productivity. It can also help them identify relevant papers to read. Content Management Text summarization can be used in content management to create summaries of long articles, reports, and other documents. This can help to make the content more accessible and easier to read for users. 27
  • 28.
  • 29.
    Overview of Text-to-Image ModelsGenerative Adversarial Networks Text-to-Image models are based on Generative Adversarial Networks (GANs), which are capable of generating realistic images. GANs consist of two neural networks, a generator and discriminator, that work together to produce images that are visually indistinguishable from real images. Different Architectures and Techniques There are different architectures and techniques used in Text-to-Image models, such as StackGAN, AttnGAN, and DALL-E. These models vary in their approach and complexity, but they share the goal of generating realistic images from textual input. 29
  • 30.
    Examples and Applications(E.g., DALL-E, MidJourney) Art Text-to-Image generation has various applications in the field of art, where it can be used to create visual representations of literary works or generate novel and creative images. Fashion and Design Text-to-Image generation can be used in fashion and design to generate realistic images of clothing and accessories, enabling designers to visualize and iterate design concepts quickly. 30
  • 31.
    Challenges and FutureProspects Data Bias The availability of biased data sets is a major challenge in text-to-image generation. It can lead to the generation of discriminatory images, and this problem needs to be addressed before the technology can be used in commercial applications. Text Ambiguity Text-to-image generation algorithms often struggle with text ambiguity, where a single text input can have multiple interpretations. This can lead to the generation of incorrect or irrelevant images, and new techniques need to be developed to address this problem. Future Prospects Despite the current challenges, text-to-image generation has enormous potential for commercial and creative applications. The technology can be used in fields such as advertising, product design, and creative writing, and new research is being conducted to improve the accuracy and efficiency of the algorithms. 31
  • 32.
  • 33.
    Current State ofText-to-Video Technology Generative Adversarial Networks (GANs) Generative Adversarial Networks (GANs) are a type of neural network architecture used in text-to-video models that generate realistic video content from textual descriptions. Recurrent Neural Networks (RNNs) Recurrent Neural Networks (RNNs) are a type of neural network architecture used in text-to-video models that process sequential input data such as text and generate video content. 33
  • 34.
    Use Cases inMedia and Entertainment Text-to-Video technology has numerous applications in media and entertainment, including film and television production, advertising, and video game development. It can help reduce production time and costs, improve the quality of content, and enhance user engagement. 34
  • 35.
    Potential Developments and EthicalConsiderations Potential Developments Text-to-Video generation is an evolving field with numerous potential developments that could shape the future of the industry, such as real-time video generation, personalized video generation, and improved natural language processing. Ethical Considerations Text-to-Video generation raises several ethical considerations, such as data privacy, security, and ownership, as well as the potential impact on employment and society as a whole. 35
  • 36.
    Advantages of GenerativeAI in Finance and Insurance 36 Generative AI can improve efficiency and accuracy in claims processing and risk assessment. Generative AI can offer personalized solutions to customers, improving customer satisfaction and retention. Generative AI can help financial institutions stay competitive in a rapidly changing market.