SlideShare a Scribd company logo
1 of 40
Download to read offline
Session
ChatGPT Box
LED BY
SCOTT STEINBECK
SCOTT STEINBECK
SPEAKER AT ITB2023
● Software Engineer
● 15+ Year of experience
● Father
● Hardware Tinkerer
● Coding on my free time
● Overcommitting myself
● Automating everything
● IOT Development
● Teaching Coding/Electronics
● Contributing to open source
Hobbies
BREIF HISTORY
Thanks to our sponsors
● Traditional language models (e.g., n-gram models) had limitations:
○ Explosion of state space (curse of dimensionality) and sparsity led to inconsistent
output resembling gibberish.
○ Inability to handle novel phrases and lack of coherence in the generated text.
Pre-2000's:
● Advancements in training neural networks by Geoffrey Hinton:
○ Deep neural networks alleviated some language model problems.
○ Nuanced arbitrary concepts were represented in a finite space, but output lacked
coherence relative to the input sequence.
Mid-2000's:
● Rise of Long Short-Term Memory (LSTM) networks:
○ LSTMs enabled processing of arbitrary length sequences.
○ Dynamic alteration of internal state improved language model performance
significantly.
Early-2010's:
● Introduction of Transformer Networks with the "Attention Is All You Need" paper by
Google:
○ Transformers revolutionized natural language processing, achieving tasks like
language translation at human-level or better.
○ Attention mechanisms and parallel processing allowed the model to analyze the entire
input simultaneously.
Late-2010's:
● Emergence of Generative Pre-Trained (GPT) models, notably GPT-3:
○ Large language models could be trained on massive data without specific agendas.
○ Fine-tuning for specific tasks led to state-of-the-art results via text interaction.
2020's
1 petabyte
of training
data
DIGGING IN
Thanks to our sponsors
AI UNDER THE HOOD
AI, or Artificial Intelligence, is a broad
field that encompasses the
development of intelligent systems
capable of performing tasks that
typically require human intelligence.
This works by combining rule-based
modeling of human language—with
statistical, machine learning, and deep
learning models
Natural Language Processing Tasks
Natural Language Understanding (NLU)
deals with the ability of computers to understand
human language.
Natural Language Generation (NLG)
● data to text - text is generated to explain or describe a
structured record or unstructured perceptual input;
● text to text - typically involves fusing information from
multiple linguistic sources into a single coherent
summary;
● dialogue - text is generated as part of an interactive
conversation with one or more human participants.
Machine Learning
● ML techniques play a key
role in AI by enabling
systems to automatically
learn from experience,
adapt to new data, and
improve their
performance over time.
● ML algorithms are used in
various AI applications,
including computer vision,
speech recognition,
recommendation systems,
and, importantly, NLP
tasks.
Machine Learning to Play Hill Climb Racing
Deep Learning
● DL has revolutionized ML
by enabling models to
automatically learn more
abstract and nuanced
features from raw data.
● DL help NLP to understand
natural language, enabling
them to capture
contextual dependencies
and learn complex
representations.
Deep Learning to car attribute classification
WHAT IS AN LLM
Practical AI
A large language model is a
prediction engine that takes a
sequence of words and tries
to predict the most likely
sequence to come after that
sequence.
It does this by assigning a
probability to likely next
sequences and then samples
from those to choose one.
The process repeats until
some stopping criteria is met.
APPLICATIONS AND INFRASTRUCTURE USING ARTIFICIAL INTELLIGENCE TODAY
HOW AI LEARNS NEW ABILITIES
Practical AI
As LLMs are scaled they hit a series of critical scales at which new abilities are suddenly “unlocked”. LLMs are
not directly trained to have these abilities, and they appear in rapid and unpredictable ways as if emerging out
of thin air.
Applications of Large Language Models
Practical AI
ASKING AI A
QUESTION
Thanks to our sponsors
TOKENIZATION
CHATGPT
What are some common mistakes to avoid when writing code?
Tokens can be words, subwords, or characters, depending
on the specific tokenization scheme used.
INPUT ANALYSIS
CHATGPT
1. Informational Questions:
● "What is the capital of France?"
● "Can you explain the concept of relativity?"
2. Procedural Questions:
● "What are the steps to install a software program?"
3. Comparison Questions:
● "Compare the advantages of iOS and Android."
4. Opinion Questions:
● “Do you think technology is making us more connected or disconnected?"
5. Problem-Solving Questions:
● "How can I optimize my website's loading speed?"
6. Request for Advice:
● "Which programming language should I learn as a beginner?"
7. Request for Explanation:
● "What is the significance of the Pythagorean theorem?"
What are some common mistakes to avoid when writing code?
Understanding the Question
CHATGPT
1. Neural Networks turn
tokens into dense vectors
(word embeddings)
● This adds context and
captures complex
relationships between
words
What are some common mistakes to avoid when writing code?
Vectors with shorter distances between them usually share common contexts in
the corpus. This allows us to find distances between words
|cat - dog| = 1.20
|cat - cow| = 1.48
"cat" is closer to "dog" than it is to the "cow".
Monday Vector What Vector
Retrieval/Integration of Knowledge
CHATGPT
_ _ _ _ mistakes _ avoid _ writing code?
Generating the Answer
CHATGPT
_ _ _ _ mistakes _ avoid _ writing code?
Common mistakes to avoid when writing code include:
● Poor code organization and lack of proper indentation.
● Inefficient algorithms or data structures that result in slow performance.
● Lack of proper error handling and exception management.
● Insufficient comments and documentation, making the code difficult to understand and maintain.
● Failure to validate input data, leading to potential security vulnerabilities.
● Hardcoding values instead of using constants or configuration files.
● Ignoring code style conventions, making the codebase inconsistent and harder to read.
● Neglecting to handle edge cases and unexpected scenarios.
● Not using version control, resulting in difficulties in tracking changes and collaborating with
others.
● Overcomplicating solutions instead of keeping the code simple and maintainable.
PROMPT
ENGINEERING
Thanks to our sponsors
WHAT IS A PROMPT
CHATGPT
A prompt, sometimes referred to as context, is the text provided to a model before it begins
generating output. It guides the model to explore a particular area of what it has learned so that the
output is relevant to your goals.
Prompts are the secret sauce of chat agents
MORE DETAILED PROMPTS
CHATGPT
Responses are only as detailed as
focused as the question that is asked.
You can see we explain to the bot the
various roles we get a more concise
answer:
● Give the bot a role
● Give some context on the user
● Give some dynamic data we want
the bot to have access to
● and then guidance on how the bot
should respond.
CHAT GPT IS EXCEPTIONALLY
GOOD AT UNDERSTANDING
MARKDOWN & JSON
GIVING CHATGPT JSON AND ASKING QUESTIONS
CHATGPT
CRAFTING YOUR OWN PROMPTS
CHATGPT
if you were helping a user book
a trip, you could:
● Ask the user their dates and
destination.
● Behind the scenes, search for
flights and hotels.
● Embed the flight and hotel
search results in the hidden
context.
● Also embed the company’s
travel policy in the hidden
context.
CONTEXT PROMPTING https://prompts.chat/
CHATGPT
ONE SHOT PROMPTING
CHATGPT
These types of prompts provide the AI model with one example of what you expect the output
to be. The basic steps are:
Give a quick explanation of what you need,
add a question-answer pair or a template as an example
FEW SHOT PROMPTING
CHATGPT
Large language models are
few-shot learners, meaning that
they can learn a new task by
being provided just a few
examples.
The basic steps are:
Give a quick explanation of
what you need,
add a few question-answer
pairs or templates as an
example.
FEW SHOT PROMPTING
CHATGPT
Large language models are
few-shot learners, meaning that
they can learn a new task by
being provided just a few
examples.
The basic steps are:
Give a quick explanation of
what you need,
add a few question-answer
pairs or templates as an
example.
CHAIN OF THOUGHT PROMPTING
CHATGPT
AUGMENTING
LARGE LANGUAGE
MODELS
Thanks to our sponsors
EXPANDING LLM FUNCTIONALITY
CHATGPT
PROMPT TEMPLATES
CHATGPT
DOCUMENT LOADERS
CHATGPT
VECTOR DATABASES
CHATGPT
Full-text search VS Semantic search
AGENTS
CHATGPT
Build your own chat that
pulls in other services
attach calculator tool for
questions regarding
calculations
TOOLS/UTILS
CHATGPT https://muze.one/
https://www.dailybot.com/
CHATGPT
THANK YOU

More Related Content

More from Ortus Solutions, Corp

BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASEBATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASEOrtus Solutions, Corp
 
Secure your Secrets and Settings in ColdFusion
Secure your Secrets and Settings in ColdFusionSecure your Secrets and Settings in ColdFusion
Secure your Secrets and Settings in ColdFusionOrtus Solutions, Corp
 
Daniel Garcia ContentBox: CFSummit 2023
Daniel Garcia ContentBox: CFSummit 2023Daniel Garcia ContentBox: CFSummit 2023
Daniel Garcia ContentBox: CFSummit 2023Ortus Solutions, Corp
 
ITB_2023_Human-Friendly_Scheduled_Tasks_Giancarlo_Gomez.pdf
ITB_2023_Human-Friendly_Scheduled_Tasks_Giancarlo_Gomez.pdfITB_2023_Human-Friendly_Scheduled_Tasks_Giancarlo_Gomez.pdf
ITB_2023_Human-Friendly_Scheduled_Tasks_Giancarlo_Gomez.pdfOrtus Solutions, Corp
 
ITB_2023_CommandBox_Multi-Server_-_Brad_Wood.pdf
ITB_2023_CommandBox_Multi-Server_-_Brad_Wood.pdfITB_2023_CommandBox_Multi-Server_-_Brad_Wood.pdf
ITB_2023_CommandBox_Multi-Server_-_Brad_Wood.pdfOrtus Solutions, Corp
 
ITB_2023_The_Many_Layers_of_OAuth_Keith_Casey_.pdf
ITB_2023_The_Many_Layers_of_OAuth_Keith_Casey_.pdfITB_2023_The_Many_Layers_of_OAuth_Keith_Casey_.pdf
ITB_2023_The_Many_Layers_of_OAuth_Keith_Casey_.pdfOrtus Solutions, Corp
 
ITB_2023_Relationships_are_Hard_Data_modeling_with_NoSQL_Curt_Gratz.pdf
ITB_2023_Relationships_are_Hard_Data_modeling_with_NoSQL_Curt_Gratz.pdfITB_2023_Relationships_are_Hard_Data_modeling_with_NoSQL_Curt_Gratz.pdf
ITB_2023_Relationships_are_Hard_Data_modeling_with_NoSQL_Curt_Gratz.pdfOrtus Solutions, Corp
 
ITB_2023_Extend_your_contentbox_apps_with_custom_modules_Javier_Quintero.pdf
ITB_2023_Extend_your_contentbox_apps_with_custom_modules_Javier_Quintero.pdfITB_2023_Extend_your_contentbox_apps_with_custom_modules_Javier_Quintero.pdf
ITB_2023_Extend_your_contentbox_apps_with_custom_modules_Javier_Quintero.pdfOrtus Solutions, Corp
 
ITB_2023_25_Most_Dangerous_Software_Weaknesses_Pete_Freitag.pdf
ITB_2023_25_Most_Dangerous_Software_Weaknesses_Pete_Freitag.pdfITB_2023_25_Most_Dangerous_Software_Weaknesses_Pete_Freitag.pdf
ITB_2023_25_Most_Dangerous_Software_Weaknesses_Pete_Freitag.pdfOrtus Solutions, Corp
 
ITB_2023_Practical_AI_with_OpenAI_-_Grant_Copley_.pdf
ITB_2023_Practical_AI_with_OpenAI_-_Grant_Copley_.pdfITB_2023_Practical_AI_with_OpenAI_-_Grant_Copley_.pdf
ITB_2023_Practical_AI_with_OpenAI_-_Grant_Copley_.pdfOrtus Solutions, Corp
 
ITB_2023_When_Your_Applications_Work_As_a_Team_Nathaniel_Francis.pdf
ITB_2023_When_Your_Applications_Work_As_a_Team_Nathaniel_Francis.pdfITB_2023_When_Your_Applications_Work_As_a_Team_Nathaniel_Francis.pdf
ITB_2023_When_Your_Applications_Work_As_a_Team_Nathaniel_Francis.pdfOrtus Solutions, Corp
 
ITB_2023_Faster_Apps_That_Wont_Get_Crushed_Brian_Klaas.pdf
ITB_2023_Faster_Apps_That_Wont_Get_Crushed_Brian_Klaas.pdfITB_2023_Faster_Apps_That_Wont_Get_Crushed_Brian_Klaas.pdf
ITB_2023_Faster_Apps_That_Wont_Get_Crushed_Brian_Klaas.pdfOrtus Solutions, Corp
 
ITB_2023_CommandBox_Task_Runners_Brad_Wood.pdf
ITB_2023_CommandBox_Task_Runners_Brad_Wood.pdfITB_2023_CommandBox_Task_Runners_Brad_Wood.pdf
ITB_2023_CommandBox_Task_Runners_Brad_Wood.pdfOrtus Solutions, Corp
 
ITB_2023_Create_as_many_web_sites_or_web_apps_as_you_want_George_Murphy.pdf
ITB_2023_Create_as_many_web_sites_or_web_apps_as_you_want_George_Murphy.pdfITB_2023_Create_as_many_web_sites_or_web_apps_as_you_want_George_Murphy.pdf
ITB_2023_Create_as_many_web_sites_or_web_apps_as_you_want_George_Murphy.pdfOrtus Solutions, Corp
 
ITB2023 Developing for Performance - Denard Springle.pdf
ITB2023 Developing for Performance - Denard Springle.pdfITB2023 Developing for Performance - Denard Springle.pdf
ITB2023 Developing for Performance - Denard Springle.pdfOrtus Solutions, Corp
 
Enterprise Messaging with RabbitMQ.pdf
Enterprise Messaging with RabbitMQ.pdfEnterprise Messaging with RabbitMQ.pdf
Enterprise Messaging with RabbitMQ.pdfOrtus Solutions, Corp
 

More from Ortus Solutions, Corp (20)

BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASEBATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
 
Ortus Government.pdf
Ortus Government.pdfOrtus Government.pdf
Ortus Government.pdf
 
Luis Majano The Battlefield ORM
Luis Majano The Battlefield ORMLuis Majano The Battlefield ORM
Luis Majano The Battlefield ORM
 
Brad Wood - CommandBox CLI
Brad Wood - CommandBox CLI Brad Wood - CommandBox CLI
Brad Wood - CommandBox CLI
 
Secure your Secrets and Settings in ColdFusion
Secure your Secrets and Settings in ColdFusionSecure your Secrets and Settings in ColdFusion
Secure your Secrets and Settings in ColdFusion
 
Daniel Garcia ContentBox: CFSummit 2023
Daniel Garcia ContentBox: CFSummit 2023Daniel Garcia ContentBox: CFSummit 2023
Daniel Garcia ContentBox: CFSummit 2023
 
ITB_2023_Human-Friendly_Scheduled_Tasks_Giancarlo_Gomez.pdf
ITB_2023_Human-Friendly_Scheduled_Tasks_Giancarlo_Gomez.pdfITB_2023_Human-Friendly_Scheduled_Tasks_Giancarlo_Gomez.pdf
ITB_2023_Human-Friendly_Scheduled_Tasks_Giancarlo_Gomez.pdf
 
ITB_2023_CommandBox_Multi-Server_-_Brad_Wood.pdf
ITB_2023_CommandBox_Multi-Server_-_Brad_Wood.pdfITB_2023_CommandBox_Multi-Server_-_Brad_Wood.pdf
ITB_2023_CommandBox_Multi-Server_-_Brad_Wood.pdf
 
ITB_2023_The_Many_Layers_of_OAuth_Keith_Casey_.pdf
ITB_2023_The_Many_Layers_of_OAuth_Keith_Casey_.pdfITB_2023_The_Many_Layers_of_OAuth_Keith_Casey_.pdf
ITB_2023_The_Many_Layers_of_OAuth_Keith_Casey_.pdf
 
ITB_2023_Relationships_are_Hard_Data_modeling_with_NoSQL_Curt_Gratz.pdf
ITB_2023_Relationships_are_Hard_Data_modeling_with_NoSQL_Curt_Gratz.pdfITB_2023_Relationships_are_Hard_Data_modeling_with_NoSQL_Curt_Gratz.pdf
ITB_2023_Relationships_are_Hard_Data_modeling_with_NoSQL_Curt_Gratz.pdf
 
ITB_2023_Extend_your_contentbox_apps_with_custom_modules_Javier_Quintero.pdf
ITB_2023_Extend_your_contentbox_apps_with_custom_modules_Javier_Quintero.pdfITB_2023_Extend_your_contentbox_apps_with_custom_modules_Javier_Quintero.pdf
ITB_2023_Extend_your_contentbox_apps_with_custom_modules_Javier_Quintero.pdf
 
ITB_2023_25_Most_Dangerous_Software_Weaknesses_Pete_Freitag.pdf
ITB_2023_25_Most_Dangerous_Software_Weaknesses_Pete_Freitag.pdfITB_2023_25_Most_Dangerous_Software_Weaknesses_Pete_Freitag.pdf
ITB_2023_25_Most_Dangerous_Software_Weaknesses_Pete_Freitag.pdf
 
ITB_2023_CBWire_v3_Grant_Copley.pdf
ITB_2023_CBWire_v3_Grant_Copley.pdfITB_2023_CBWire_v3_Grant_Copley.pdf
ITB_2023_CBWire_v3_Grant_Copley.pdf
 
ITB_2023_Practical_AI_with_OpenAI_-_Grant_Copley_.pdf
ITB_2023_Practical_AI_with_OpenAI_-_Grant_Copley_.pdfITB_2023_Practical_AI_with_OpenAI_-_Grant_Copley_.pdf
ITB_2023_Practical_AI_with_OpenAI_-_Grant_Copley_.pdf
 
ITB_2023_When_Your_Applications_Work_As_a_Team_Nathaniel_Francis.pdf
ITB_2023_When_Your_Applications_Work_As_a_Team_Nathaniel_Francis.pdfITB_2023_When_Your_Applications_Work_As_a_Team_Nathaniel_Francis.pdf
ITB_2023_When_Your_Applications_Work_As_a_Team_Nathaniel_Francis.pdf
 
ITB_2023_Faster_Apps_That_Wont_Get_Crushed_Brian_Klaas.pdf
ITB_2023_Faster_Apps_That_Wont_Get_Crushed_Brian_Klaas.pdfITB_2023_Faster_Apps_That_Wont_Get_Crushed_Brian_Klaas.pdf
ITB_2023_Faster_Apps_That_Wont_Get_Crushed_Brian_Klaas.pdf
 
ITB_2023_CommandBox_Task_Runners_Brad_Wood.pdf
ITB_2023_CommandBox_Task_Runners_Brad_Wood.pdfITB_2023_CommandBox_Task_Runners_Brad_Wood.pdf
ITB_2023_CommandBox_Task_Runners_Brad_Wood.pdf
 
ITB_2023_Create_as_many_web_sites_or_web_apps_as_you_want_George_Murphy.pdf
ITB_2023_Create_as_many_web_sites_or_web_apps_as_you_want_George_Murphy.pdfITB_2023_Create_as_many_web_sites_or_web_apps_as_you_want_George_Murphy.pdf
ITB_2023_Create_as_many_web_sites_or_web_apps_as_you_want_George_Murphy.pdf
 
ITB2023 Developing for Performance - Denard Springle.pdf
ITB2023 Developing for Performance - Denard Springle.pdfITB2023 Developing for Performance - Denard Springle.pdf
ITB2023 Developing for Performance - Denard Springle.pdf
 
Enterprise Messaging with RabbitMQ.pdf
Enterprise Messaging with RabbitMQ.pdfEnterprise Messaging with RabbitMQ.pdf
Enterprise Messaging with RabbitMQ.pdf
 

Recently uploaded

Weeding your micro service landscape.pdf
Weeding your micro service landscape.pdfWeeding your micro service landscape.pdf
Weeding your micro service landscape.pdftimtebeek1
 
Reinforcement Learning – a Rewards Based Approach to Machine Learning - Marko...
Reinforcement Learning – a Rewards Based Approach to Machine Learning - Marko...Reinforcement Learning – a Rewards Based Approach to Machine Learning - Marko...
Reinforcement Learning – a Rewards Based Approach to Machine Learning - Marko...Marko Lohert
 
Workshop: Enabling GenAI Breakthroughs with Knowledge Graphs - GraphSummit Milan
Workshop: Enabling GenAI Breakthroughs with Knowledge Graphs - GraphSummit MilanWorkshop: Enabling GenAI Breakthroughs with Knowledge Graphs - GraphSummit Milan
Workshop: Enabling GenAI Breakthroughs with Knowledge Graphs - GraphSummit MilanNeo4j
 
Implementing KPIs and Right Metrics for Agile Delivery Teams.pdf
Implementing KPIs and Right Metrics for Agile Delivery Teams.pdfImplementing KPIs and Right Metrics for Agile Delivery Teams.pdf
Implementing KPIs and Right Metrics for Agile Delivery Teams.pdfVictor Lopez
 
Entropy, Software Quality, and Innovation (presented at Princeton Plasma Phys...
Entropy, Software Quality, and Innovation (presented at Princeton Plasma Phys...Entropy, Software Quality, and Innovation (presented at Princeton Plasma Phys...
Entropy, Software Quality, and Innovation (presented at Princeton Plasma Phys...Andrea Goulet
 
StrimziCon 2024 - Transition to Apache Kafka on Kubernetes with Strimzi.pdf
StrimziCon 2024 - Transition to Apache Kafka on Kubernetes with Strimzi.pdfStrimziCon 2024 - Transition to Apache Kafka on Kubernetes with Strimzi.pdf
StrimziCon 2024 - Transition to Apache Kafka on Kubernetes with Strimzi.pdfsteffenkarlsson2
 
KLARNA - Language Models and Knowledge Graphs: A Systems Approach
KLARNA -  Language Models and Knowledge Graphs: A Systems ApproachKLARNA -  Language Models and Knowledge Graphs: A Systems Approach
KLARNA - Language Models and Knowledge Graphs: A Systems ApproachNeo4j
 
how-to-download-files-safely-from-the-internet.pdf
how-to-download-files-safely-from-the-internet.pdfhow-to-download-files-safely-from-the-internet.pdf
how-to-download-files-safely-from-the-internet.pdfMehmet Akar
 
Lessons Learned from Building a Serverless Notifications System.pdf
Lessons Learned from Building a Serverless Notifications System.pdfLessons Learned from Building a Serverless Notifications System.pdf
Lessons Learned from Building a Serverless Notifications System.pdfSrushith Repakula
 
A Deep Dive into Secure Product Development Frameworks.pdf
A Deep Dive into Secure Product Development Frameworks.pdfA Deep Dive into Secure Product Development Frameworks.pdf
A Deep Dive into Secure Product Development Frameworks.pdfICS
 
How to install and activate eGrabber JobGrabber
How to install and activate eGrabber JobGrabberHow to install and activate eGrabber JobGrabber
How to install and activate eGrabber JobGrabbereGrabber
 
Optimizing Operations by Aligning Resources with Strategic Objectives Using O...
Optimizing Operations by Aligning Resources with Strategic Objectives Using O...Optimizing Operations by Aligning Resources with Strategic Objectives Using O...
Optimizing Operations by Aligning Resources with Strategic Objectives Using O...OnePlan Solutions
 
IT Software Development Resume, Vaibhav jha 2024
IT Software Development Resume, Vaibhav jha 2024IT Software Development Resume, Vaibhav jha 2024
IT Software Development Resume, Vaibhav jha 2024vaibhav130304
 
INGKA DIGITAL: Linked Metadata by Design
INGKA DIGITAL: Linked Metadata by DesignINGKA DIGITAL: Linked Metadata by Design
INGKA DIGITAL: Linked Metadata by DesignNeo4j
 
Malaysia E-Invoice digital signature docpptx
Malaysia E-Invoice digital signature docpptxMalaysia E-Invoice digital signature docpptx
Malaysia E-Invoice digital signature docpptxMok TH
 
Microsoft365_Dev_Security_2024_05_16.pdf
Microsoft365_Dev_Security_2024_05_16.pdfMicrosoft365_Dev_Security_2024_05_16.pdf
Microsoft365_Dev_Security_2024_05_16.pdfMarkus Moeller
 
GraphSummit Stockholm - Neo4j - Knowledge Graphs and Product Updates
GraphSummit Stockholm - Neo4j - Knowledge Graphs and Product UpdatesGraphSummit Stockholm - Neo4j - Knowledge Graphs and Product Updates
GraphSummit Stockholm - Neo4j - Knowledge Graphs and Product UpdatesNeo4j
 
A Guideline to Zendesk to Re:amaze Data Migration
A Guideline to Zendesk to Re:amaze Data MigrationA Guideline to Zendesk to Re:amaze Data Migration
A Guideline to Zendesk to Re:amaze Data MigrationHelp Desk Migration
 
Anypoint Code Builder - Munich MuleSoft Meetup - 16th May 2024
Anypoint Code Builder - Munich MuleSoft Meetup - 16th May 2024Anypoint Code Builder - Munich MuleSoft Meetup - 16th May 2024
Anypoint Code Builder - Munich MuleSoft Meetup - 16th May 2024MulesoftMunichMeetup
 

Recently uploaded (20)

Weeding your micro service landscape.pdf
Weeding your micro service landscape.pdfWeeding your micro service landscape.pdf
Weeding your micro service landscape.pdf
 
Reinforcement Learning – a Rewards Based Approach to Machine Learning - Marko...
Reinforcement Learning – a Rewards Based Approach to Machine Learning - Marko...Reinforcement Learning – a Rewards Based Approach to Machine Learning - Marko...
Reinforcement Learning – a Rewards Based Approach to Machine Learning - Marko...
 
Workshop: Enabling GenAI Breakthroughs with Knowledge Graphs - GraphSummit Milan
Workshop: Enabling GenAI Breakthroughs with Knowledge Graphs - GraphSummit MilanWorkshop: Enabling GenAI Breakthroughs with Knowledge Graphs - GraphSummit Milan
Workshop: Enabling GenAI Breakthroughs with Knowledge Graphs - GraphSummit Milan
 
Implementing KPIs and Right Metrics for Agile Delivery Teams.pdf
Implementing KPIs and Right Metrics for Agile Delivery Teams.pdfImplementing KPIs and Right Metrics for Agile Delivery Teams.pdf
Implementing KPIs and Right Metrics for Agile Delivery Teams.pdf
 
Entropy, Software Quality, and Innovation (presented at Princeton Plasma Phys...
Entropy, Software Quality, and Innovation (presented at Princeton Plasma Phys...Entropy, Software Quality, and Innovation (presented at Princeton Plasma Phys...
Entropy, Software Quality, and Innovation (presented at Princeton Plasma Phys...
 
StrimziCon 2024 - Transition to Apache Kafka on Kubernetes with Strimzi.pdf
StrimziCon 2024 - Transition to Apache Kafka on Kubernetes with Strimzi.pdfStrimziCon 2024 - Transition to Apache Kafka on Kubernetes with Strimzi.pdf
StrimziCon 2024 - Transition to Apache Kafka on Kubernetes with Strimzi.pdf
 
What is an API Development- Definition, Types, Specifications, Documentation.pdf
What is an API Development- Definition, Types, Specifications, Documentation.pdfWhat is an API Development- Definition, Types, Specifications, Documentation.pdf
What is an API Development- Definition, Types, Specifications, Documentation.pdf
 
KLARNA - Language Models and Knowledge Graphs: A Systems Approach
KLARNA -  Language Models and Knowledge Graphs: A Systems ApproachKLARNA -  Language Models and Knowledge Graphs: A Systems Approach
KLARNA - Language Models and Knowledge Graphs: A Systems Approach
 
how-to-download-files-safely-from-the-internet.pdf
how-to-download-files-safely-from-the-internet.pdfhow-to-download-files-safely-from-the-internet.pdf
how-to-download-files-safely-from-the-internet.pdf
 
Lessons Learned from Building a Serverless Notifications System.pdf
Lessons Learned from Building a Serverless Notifications System.pdfLessons Learned from Building a Serverless Notifications System.pdf
Lessons Learned from Building a Serverless Notifications System.pdf
 
A Deep Dive into Secure Product Development Frameworks.pdf
A Deep Dive into Secure Product Development Frameworks.pdfA Deep Dive into Secure Product Development Frameworks.pdf
A Deep Dive into Secure Product Development Frameworks.pdf
 
How to install and activate eGrabber JobGrabber
How to install and activate eGrabber JobGrabberHow to install and activate eGrabber JobGrabber
How to install and activate eGrabber JobGrabber
 
Optimizing Operations by Aligning Resources with Strategic Objectives Using O...
Optimizing Operations by Aligning Resources with Strategic Objectives Using O...Optimizing Operations by Aligning Resources with Strategic Objectives Using O...
Optimizing Operations by Aligning Resources with Strategic Objectives Using O...
 
IT Software Development Resume, Vaibhav jha 2024
IT Software Development Resume, Vaibhav jha 2024IT Software Development Resume, Vaibhav jha 2024
IT Software Development Resume, Vaibhav jha 2024
 
INGKA DIGITAL: Linked Metadata by Design
INGKA DIGITAL: Linked Metadata by DesignINGKA DIGITAL: Linked Metadata by Design
INGKA DIGITAL: Linked Metadata by Design
 
Malaysia E-Invoice digital signature docpptx
Malaysia E-Invoice digital signature docpptxMalaysia E-Invoice digital signature docpptx
Malaysia E-Invoice digital signature docpptx
 
Microsoft365_Dev_Security_2024_05_16.pdf
Microsoft365_Dev_Security_2024_05_16.pdfMicrosoft365_Dev_Security_2024_05_16.pdf
Microsoft365_Dev_Security_2024_05_16.pdf
 
GraphSummit Stockholm - Neo4j - Knowledge Graphs and Product Updates
GraphSummit Stockholm - Neo4j - Knowledge Graphs and Product UpdatesGraphSummit Stockholm - Neo4j - Knowledge Graphs and Product Updates
GraphSummit Stockholm - Neo4j - Knowledge Graphs and Product Updates
 
A Guideline to Zendesk to Re:amaze Data Migration
A Guideline to Zendesk to Re:amaze Data MigrationA Guideline to Zendesk to Re:amaze Data Migration
A Guideline to Zendesk to Re:amaze Data Migration
 
Anypoint Code Builder - Munich MuleSoft Meetup - 16th May 2024
Anypoint Code Builder - Munich MuleSoft Meetup - 16th May 2024Anypoint Code Builder - Munich MuleSoft Meetup - 16th May 2024
Anypoint Code Builder - Munich MuleSoft Meetup - 16th May 2024
 

ITB_2023_Chatgpt_Box_Scott_Steinbeck.pdf

  • 2. SCOTT STEINBECK SPEAKER AT ITB2023 ● Software Engineer ● 15+ Year of experience ● Father ● Hardware Tinkerer ● Coding on my free time ● Overcommitting myself ● Automating everything ● IOT Development ● Teaching Coding/Electronics ● Contributing to open source Hobbies
  • 3. BREIF HISTORY Thanks to our sponsors
  • 4. ● Traditional language models (e.g., n-gram models) had limitations: ○ Explosion of state space (curse of dimensionality) and sparsity led to inconsistent output resembling gibberish. ○ Inability to handle novel phrases and lack of coherence in the generated text. Pre-2000's:
  • 5. ● Advancements in training neural networks by Geoffrey Hinton: ○ Deep neural networks alleviated some language model problems. ○ Nuanced arbitrary concepts were represented in a finite space, but output lacked coherence relative to the input sequence. Mid-2000's:
  • 6. ● Rise of Long Short-Term Memory (LSTM) networks: ○ LSTMs enabled processing of arbitrary length sequences. ○ Dynamic alteration of internal state improved language model performance significantly. Early-2010's:
  • 7. ● Introduction of Transformer Networks with the "Attention Is All You Need" paper by Google: ○ Transformers revolutionized natural language processing, achieving tasks like language translation at human-level or better. ○ Attention mechanisms and parallel processing allowed the model to analyze the entire input simultaneously. Late-2010's:
  • 8. ● Emergence of Generative Pre-Trained (GPT) models, notably GPT-3: ○ Large language models could be trained on massive data without specific agendas. ○ Fine-tuning for specific tasks led to state-of-the-art results via text interaction. 2020's 1 petabyte of training data
  • 9. DIGGING IN Thanks to our sponsors
  • 10. AI UNDER THE HOOD AI, or Artificial Intelligence, is a broad field that encompasses the development of intelligent systems capable of performing tasks that typically require human intelligence. This works by combining rule-based modeling of human language—with statistical, machine learning, and deep learning models
  • 11. Natural Language Processing Tasks Natural Language Understanding (NLU) deals with the ability of computers to understand human language. Natural Language Generation (NLG) ● data to text - text is generated to explain or describe a structured record or unstructured perceptual input; ● text to text - typically involves fusing information from multiple linguistic sources into a single coherent summary; ● dialogue - text is generated as part of an interactive conversation with one or more human participants.
  • 12. Machine Learning ● ML techniques play a key role in AI by enabling systems to automatically learn from experience, adapt to new data, and improve their performance over time. ● ML algorithms are used in various AI applications, including computer vision, speech recognition, recommendation systems, and, importantly, NLP tasks. Machine Learning to Play Hill Climb Racing
  • 13. Deep Learning ● DL has revolutionized ML by enabling models to automatically learn more abstract and nuanced features from raw data. ● DL help NLP to understand natural language, enabling them to capture contextual dependencies and learn complex representations. Deep Learning to car attribute classification
  • 14. WHAT IS AN LLM Practical AI A large language model is a prediction engine that takes a sequence of words and tries to predict the most likely sequence to come after that sequence. It does this by assigning a probability to likely next sequences and then samples from those to choose one. The process repeats until some stopping criteria is met. APPLICATIONS AND INFRASTRUCTURE USING ARTIFICIAL INTELLIGENCE TODAY
  • 15. HOW AI LEARNS NEW ABILITIES Practical AI As LLMs are scaled they hit a series of critical scales at which new abilities are suddenly “unlocked”. LLMs are not directly trained to have these abilities, and they appear in rapid and unpredictable ways as if emerging out of thin air.
  • 16. Applications of Large Language Models Practical AI
  • 17. ASKING AI A QUESTION Thanks to our sponsors
  • 18. TOKENIZATION CHATGPT What are some common mistakes to avoid when writing code? Tokens can be words, subwords, or characters, depending on the specific tokenization scheme used.
  • 19. INPUT ANALYSIS CHATGPT 1. Informational Questions: ● "What is the capital of France?" ● "Can you explain the concept of relativity?" 2. Procedural Questions: ● "What are the steps to install a software program?" 3. Comparison Questions: ● "Compare the advantages of iOS and Android." 4. Opinion Questions: ● “Do you think technology is making us more connected or disconnected?" 5. Problem-Solving Questions: ● "How can I optimize my website's loading speed?" 6. Request for Advice: ● "Which programming language should I learn as a beginner?" 7. Request for Explanation: ● "What is the significance of the Pythagorean theorem?" What are some common mistakes to avoid when writing code?
  • 20. Understanding the Question CHATGPT 1. Neural Networks turn tokens into dense vectors (word embeddings) ● This adds context and captures complex relationships between words What are some common mistakes to avoid when writing code? Vectors with shorter distances between them usually share common contexts in the corpus. This allows us to find distances between words |cat - dog| = 1.20 |cat - cow| = 1.48 "cat" is closer to "dog" than it is to the "cow". Monday Vector What Vector
  • 21. Retrieval/Integration of Knowledge CHATGPT _ _ _ _ mistakes _ avoid _ writing code?
  • 22. Generating the Answer CHATGPT _ _ _ _ mistakes _ avoid _ writing code? Common mistakes to avoid when writing code include: ● Poor code organization and lack of proper indentation. ● Inefficient algorithms or data structures that result in slow performance. ● Lack of proper error handling and exception management. ● Insufficient comments and documentation, making the code difficult to understand and maintain. ● Failure to validate input data, leading to potential security vulnerabilities. ● Hardcoding values instead of using constants or configuration files. ● Ignoring code style conventions, making the codebase inconsistent and harder to read. ● Neglecting to handle edge cases and unexpected scenarios. ● Not using version control, resulting in difficulties in tracking changes and collaborating with others. ● Overcomplicating solutions instead of keeping the code simple and maintainable.
  • 24. WHAT IS A PROMPT CHATGPT A prompt, sometimes referred to as context, is the text provided to a model before it begins generating output. It guides the model to explore a particular area of what it has learned so that the output is relevant to your goals. Prompts are the secret sauce of chat agents
  • 25. MORE DETAILED PROMPTS CHATGPT Responses are only as detailed as focused as the question that is asked. You can see we explain to the bot the various roles we get a more concise answer: ● Give the bot a role ● Give some context on the user ● Give some dynamic data we want the bot to have access to ● and then guidance on how the bot should respond. CHAT GPT IS EXCEPTIONALLY GOOD AT UNDERSTANDING MARKDOWN & JSON
  • 26. GIVING CHATGPT JSON AND ASKING QUESTIONS CHATGPT
  • 27. CRAFTING YOUR OWN PROMPTS CHATGPT if you were helping a user book a trip, you could: ● Ask the user their dates and destination. ● Behind the scenes, search for flights and hotels. ● Embed the flight and hotel search results in the hidden context. ● Also embed the company’s travel policy in the hidden context.
  • 29. ONE SHOT PROMPTING CHATGPT These types of prompts provide the AI model with one example of what you expect the output to be. The basic steps are: Give a quick explanation of what you need, add a question-answer pair or a template as an example
  • 30. FEW SHOT PROMPTING CHATGPT Large language models are few-shot learners, meaning that they can learn a new task by being provided just a few examples. The basic steps are: Give a quick explanation of what you need, add a few question-answer pairs or templates as an example.
  • 31. FEW SHOT PROMPTING CHATGPT Large language models are few-shot learners, meaning that they can learn a new task by being provided just a few examples. The basic steps are: Give a quick explanation of what you need, add a few question-answer pairs or templates as an example.
  • 32. CHAIN OF THOUGHT PROMPTING CHATGPT
  • 38. AGENTS CHATGPT Build your own chat that pulls in other services attach calculator tool for questions regarding calculations