CHATGPT
Find more PowerPoint templates on prezentr.com!
Meeting Agenda
Find more PowerPoint templates on prezentr.com!
What is ChatGPT?�
Find more PowerPoint templates on prezentr.com!
ChatGPT is a model specifically trained to interact in a conversional way
ChatGPT
Input prompt string:
Detailed response:
Find more PowerPoint templates on prezentr.com!
ChatGPT is a model specifically trained to interact in a conversional way
ChatGPT
Input prompt string:
Detailed response:
Tokens:
"Chri" "stop" "her"
Christopher
Find more PowerPoint templates on prezentr.com!
ChatGPT is a model specifically trained to interact in a conversional way
ChatGPT
Input prompt string:
Detailed response:
Tokens:
"Chri" "stop" "her"
Find more PowerPoint templates on prezentr.com!
Examples
Writing email
Find more PowerPoint templates on prezentr.com!
Examples
Response
Writing email
Find more PowerPoint templates on prezentr.com!
Examples
Get assistance with coding and debugging
Find more PowerPoint templates on prezentr.com!
Examples
Response
Request
Get assistance with coding and debugging
Find more PowerPoint templates on prezentr.com!
Models
GPT3.5
GPT3
GPT4
GPT4
Find more PowerPoint templates on prezentr.com!
Models
GPT3.5
GPT3
GPT4
GPT4
GPT3
Find more PowerPoint templates on prezentr.com!
Models
GPT3.5
GPT3
GPT4
GPT4
GPT3
Find more PowerPoint templates on prezentr.com!
How can I use CHAT GPT?
Find more PowerPoint templates on prezentr.com!
Rest API Integration
In addition to the well-known demo portal chat.openai.com, there is a set of REST APIs for:
curl https://api.openai.com/v1/completions \
-H "Authorization: Bearer $OPENAI_API_KEY" \
-H "Content-Type: application/json" \
-d '{"prompt": YOUR_PROMPT, "model": FINE_TUNED_MODEL}'
curl https://api.openai.com/v1/completions \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $OPENAI_API_KEY" \
-d '{
"model": "text-davinci-003",
"prompt": "Say this is a test",
"max_tokens": 7,
"temperature": 0
}'
curl https://api.openai.com/v1/models \
-H "Authorization: Bearer $OPENAI_API_KEY"
Find more PowerPoint templates on prezentr.com!
curl https://api.openai.com/v1/completions \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $OPENAI_API_KEY" \
-d '{
"model": "text-davinci-003",
"prompt": "Say this is a test",
"max_tokens": 7,
"temperature": 0
}'
Completion API Parameters
The completion API, used to obtain answers to questions, has four fundamentals request params, in addition to the question itself:
Find more PowerPoint templates on prezentr.com!
Usage tests �
Find more PowerPoint templates on prezentr.com!
Examples Scenario
In order to learn more about the case study, we choose some arbitrary topics in the Lottomatica scratch&win reseller portal assistance KB:
The tests were made with the following preconditions:
Find more PowerPoint templates on prezentr.com!
API Example
{
"model": "text-davinci-003",
"prompt": "Dove trovo le informazioni del conto gioco?",
"temperature": 0,
"max_tokens": 50
}
{
"id": "cmpl-6cgwK4r0KBSEitz1mMnlXukh0RlfH",
"object": "text_completion",
"created": 1674679544,
"model": "text-davinci-003",
"choices": [
{
"text": "\n\nLe informazioni del conto gioco possono essere trovate nella sezione \"Il mio conto\" del sito web del tuo operatore di gioco. Qui",
"index": 0,
"logprobs": null,
"finish_reason": "length"
}
],
"usage": {
"prompt_tokens": 16,
"completion_tokens": 50,
"total_tokens": 66
}}
Message truncated for reaching the requested length
CHATGPT
Find more PowerPoint templates on prezentr.com!
API Example
{
"model": "text-davinci-003",
"prompt": "Dove trovo le informazioni del conto gioco?",
"temperature": 0,
"max_tokens": 100
}
{
"id": "cmpl-6cgwK4r0KBSEitz1mMnlXukh0RlfH",
"object": "text_completion",
"created": 1674679544,
"model": "text-davinci-003",
"choices": [
{
"text": "\n\nLe informazioni del conto gioco possono essere trovate nella sezione \"Il mio conto\" del sito web del tuo operatore di gioco. Qui troverai informazioni sui tuoi depositi, prelievi, bonus, puntate, vincite e altro ancora.",
"index": 0,
"logprobs": null,
"finish_reason": "stop"
}],
"usage": {
"prompt_tokens": 16,
"completion_tokens": 83,
"total_tokens": 99
}}
API returned complete model output
CHATGPT
Find more PowerPoint templates on prezentr.com!
Request Injection Example
{"model": "text-davinci-003",
"prompt": "Lottomatica mette a disposizione dei suoi nuovi iscritti 1.000€ di Bonus Benvenuto Casinò.Da desktop, dal proprio smartphone o dal proprio tablet, la procedura di registrazione da eseguire online prevede l’inserimento dei propri dati anagrafici e il completamento, attraverso upload, dei documenti richiesti. Una volta ottenuta la validazione della documentazione, il conto gioco è aperto e validato. Per aderire all’iniziativa sarà necessario effettuare una ricarica di almeno 20€ entro 7 giorni dalla registrazione, utilizzando una delle modalità indicate di seguito e validare il conto gioco. Per il calcolo del bonus verranno prese in considerazione esclusivamente le giocate Slot e Soft Games avviate e contabilizzate dal giorno della prima ricarica fino al 15° giorno dalla prima ricarica stessa. Il Bonus Benvenuto Casinò prevede l’accredito di un bonus massimo del 100% del valore della prima ricarica e fino a 1.000€. … \n Quanto bisogna depositorare per ottenre il bonus di benvenuto?",
"temperature": 0,
"max_tokens": 500}
{"id": "cmpl-6chAo10Dq2El1rTDxue3wgNPuViQ7",
"object": "text_completion",
"created": 1674680442,
"model": "text-davinci-003",
"choices": [{
"text": "\n\nPer ottenere il Bonus Benvenuto Casinò è necessario effettuare una ricarica di almeno 20€ entro 7 giorni dalla registrazione, utilizzando una delle modalità indicate.",
"index": 0,
"logprobs": null,
"finish_reason": "stop"
}],
"usage": {
"prompt_tokens": 1247,
"completion_tokens": 60,
"total_tokens": 1307
}}
CHATGPT
Find more PowerPoint templates on prezentr.com!
Fine Tuning�
Find more PowerPoint templates on prezentr.com!
Fine Tuning For Custom Model
Fine tuning allows us to obtain a custom model trained with dedicated data.
Advantages:
High level steps:
Find more PowerPoint templates on prezentr.com!
Dataset Preparation & Costs
{"prompt": "<prompt text>", "completion": "<ideal generated text>"}
{"prompt": "<prompt text>", "completion": "<ideal generated text>"}
{"prompt": "<prompt text>", "completion": "<ideal generated text>"}
...
Data to train the model must be a JSONL document, where each line it is a training example that consist of a single “prompt” and its associated output “completion” .
Effort estimation for dataset preparation for A4 pages documents:
Type | Complexity | Effort per Page |
QA style with no image | Easy | 1/2 day |
QA style with image or easy plain text no QA style without image | Medium/Easy | 1 day |
Easy plain text with images | Medium | 1-1,5 days |
Complex text (bulletted list, subparagraph, URLs references, ecc.), without images | Medium/Hard | 1,5-2 days |
Complex text (bulletted list, subparagraph, URLs references, ecc.), with images | Hard | Min 2 days |
Find more PowerPoint templates on prezentr.com!
Embeddings�
Find more PowerPoint templates on prezentr.com!
ChatGPT Embeddings
Embeddings allow to transform a phrase, paragraph or an entire text in a float vector that represents the informations as a point in a new vector space and this allow to measure the relatedness of text strings.
Embeddings are commonly used for:
Find more PowerPoint templates on prezentr.com!
ChatGPT Embeddings
NO DATASET CREATION
FAST UPDATE
Encoder
Vector Space
Context Vector
Query Vector
Step 1
Step 2
New Request
ChatGPT
Query
Request Injection
Answer
New Request
LENGTH / TIME
SOCIAL BIAS
Normandy knowledge
Normandy knowledge
query
Where is Normandy?
query
Where is Normandy?
Find more PowerPoint templates on prezentr.com!
ChatGPT Embeddings
NO DATASET CREATION
FAST UPDATE
LENGTH / TIME
SOCIAL BIAS
Find more PowerPoint templates on prezentr.com!
ChatGPT Embeddings
NO DATASET CREATION
FAST UPDATE
LENGTH / TIME
SOCIAL BIAS
Find more PowerPoint templates on prezentr.com!
ChatGPT Embeddings
NO DATASET CREATION
FAST UPDATE
LENGTH / TIME
SOCIAL BIAS
Find more PowerPoint templates on prezentr.com!
ChatGPT Embeddings
NO DATASET CREATION
FAST UPDATE
LENGTH / TIME
SOCIAL BIAS
Find more PowerPoint templates on prezentr.com!
ChatGPT Embeddings
NO DATASET CREATION
FAST UPDATE
LENGTH / TIME
SOCIAL BIAS
Find more PowerPoint templates on prezentr.com!
Costs�
Completions
Fine-tuning
Embedding
MODEL | USAGE |
Ada | $0.0004 / 1K tokens |
Babbage | $0.0005 / 1K tokens |
Curie | $0.0020 / 1K tokens |
Davinci | $0.0200 / 1K tokens |
GPT-3.5-turbo | $0.0020 / 1K tokens |
Text-davinci-003 | $0.0200 / 1K tokens |
GPT-4-8K | $0.0300 / 1K tokens |
GPT-4-32K | $0.0600 / 1K tokens |
Find more PowerPoint templates on prezentr.com!
Pricing comparison
Fine-tuning
Embedding
Completions
MODEL | USAGE |
Ada | $0.0004 / 1K tokens |
MODEL | USAGE |
Ada | $0.0004 / 1K tokens |
Babbage | $0.0005 / 1K tokens |
Curie | $0.0020 / 1K tokens |
Davinci | $0.0200 / 1K tokens |
GPT-3.5-turbo | $0.0020 / 1K tokens |
Text-davinci-003 | $0.0200 / 1K tokens |
GPT-4-8K | $0.0300 / 1K tokens |
GPT-4-32K | $0.0600 / 1K tokens |
e.g:
Model: Davinci
N° Tokens: 2k
Cost = 2 ∗ 0.02 = 0.04$
Usage tokens = Request + Response
Find more PowerPoint templates on prezentr.com!
Pricing comparison
Completions
Embedding
Fine-tuning
Usage tokens = Request + Response
MODEL | USAGE |
Ada | $0.0004 / 1K tokens |
Babbage | $0.0005 / 1K tokens |
Curie | $0.0020 / 1K tokens |
Davinci | $0.0200 / 1K tokens |
GPT-3.5-turbo | $0.0020 / 1K tokens |
GPT-4-8K | $0.0300 / 1K tokens |
GPT-4-32K | $0.0600 / 1K tokens |
MODEL | TRAINING | USAGE |
Ada | $0.0004 / 1K tokens | $0.0016 / 1K tokens |
Babbage | $0.0006 / 1K tokens | $0.0024 / 1K tokens |
Curie | $0.0030 / 1K tokens | $0.0120 / 1K tokens |
Davinci | $0.0300 / 1K tokens | $0.1200 / 1K tokens |
MODEL | USAGE |
Ada | $0.0004 / 1K tokens |
Cost = Request Embedding Ada + Request Completion Davinci
Find more PowerPoint templates on prezentr.com!
Pricing comparison
Completions
Fine-tuning
Embedding
Cost_total_training = (Tokens_dataset ∗ N_epochs ) ∗ Model_training_cost
e.g., Davinci training:
1k Tokens_dataset
4 Epochs
Cost_total_training = 4 ∗ 1 ∗ 0.03 = 0.12$
MODEL | USAGE |
Ada | $0.0004 / 1K tokens |
MODEL | TRAINING | USAGE |
Ada | $0.0004 / 1K tokens | $0.0016 / 1K tokens |
Babbage | $0.0006 / 1K tokens | $0.0024 / 1K tokens |
Curie | $0.0030 / 1K tokens | $0.0120 / 1K tokens |
Davinci | $0.0300 / 1K tokens | $0.1200 / 1K tokens |
Find more PowerPoint templates on prezentr.com!
Applications�
MODEL | TRAINING | USAGE |
Ada | $0.0004 / 1K tokens | $0.0016 / 1K tokens |
Babbage | $0.0006 / 1K tokens | $0.0024 / 1K tokens |
Curie | $0.0030 / 1K tokens | $0.0120 / 1K tokens |
Davinci | $0.0300 / 1K tokens | $0.1200 / 1K tokens |
CHATBOT
CODE DEVELOPMENT
TEST AUTOMATION
Find more PowerPoint templates on prezentr.com!
Applications
Chatbot
Code Development
Test Automation
Find more PowerPoint templates on prezentr.com!
Chatbot
CODE DEVELOPMENT
TEST AUTOMATION
Chatbot development platform
ChatGPT API
Dataset
Train – Test - Evaluate
Find more PowerPoint templates on prezentr.com!
Applications
Chatbot
Code Development
Test Automation
Find more PowerPoint templates on prezentr.com!
Code Development
CHATBOT
TEST AUTOMATION
Environment and ChatGPT library
Provide a prompt
Analyze and Evaluate
Requests to the GPT-3.5 Turbo
Find more PowerPoint templates on prezentr.com!
Applications
Chatbot
Code Development
Test Automation
Find more PowerPoint templates on prezentr.com!
CHATBOT
CODE DEVELOPMENT
Test Automation
Test automation framework
Make requests to the ChatGPT
Evaluate results and make changes
Unit - Integration - API – Mobile - End To End Testing
Find more PowerPoint templates on prezentr.com!
Open points & Conclusions
Find more PowerPoint templates on prezentr.com!
Conclusions
Open points
Incorrect answers
Input sensitive
Roles Management
Privacy
(Italy case)
ChatGPT is a powerful model for implementing natural language bots and more.
Find more PowerPoint templates on prezentr.com!
Conclusions
ChatGPT is a powerful model for implementing natural language bots and more.
Open points
Incorrect answers
Input sensitive
Roles Management
Privacy
(Italy case)
Find more PowerPoint templates on prezentr.com!
Thanks for the attention
Find more PowerPoint templates on prezentr.com!
Questions ?
Find more PowerPoint templates on prezentr.com!