ChatGPT: In-context Retrieval-Augmented Learning (IC-RALM) | In-context Learning (ICL) Examples

Discover AI · Beginner ·🧠 Large Language Models ·3y ago

Key Takeaways

The video demonstrates In-context Retrieval-Augmented Learning (IC-RALM) for teaching ChatGPT new information without fine-tuning, using a simple source sequence of question and answer, and applying the methodology from a research paper by AI 21 Labs.

Full Transcript

how can we teach chat GPT new information new knowledge since we know that after 2021 it has a very limited knowledge amount so very easy before chat gbt4 comes out you can ask it and it tells you well fine-tuning is done pre-training is done so there's no way you can provide me further information but you know chat GPT is cheating here a little bit so let's have a look how we can teach jet GPT new information last week I showed you here crash course on AI prompt here's the YouTube video and we discussed very shortly that there is now a paradigma shift from our pre-training Like a Bird model and a defined tuning for each specific Downstream task with another data set we have now the option with those huge allenzymes of free training prompt and predict and from prompting I showed it a minimum 20 methods available so what we are then discussed very shortly fine-tuning or the alternative is prefix tuning where you have only a small amount of parameter with prefix tuning that you really train on and as I told you if we'll want to learn how we can do this this was the example I've given you you will have a source sequence and you have a Target sequence and with the source sequence we have question then we have some context to the question and an answer to the question it consists of sentences the target sequence we wanted to predict the answer give me our answer here to the question giving here the question here given the context the overall context and I told you this is for example a chapter in your biotechnology book is yes so this is for example how Microsoft trained bio GPT and we are gonna Focus today on a very simple Source sequence just question an answer and if you want to see the research paper for this here from January 2023 from AI 21 Labs there's a beautiful research paper uh it's about in context retrieval augmented language model or large language model and they come up with a new alternative and they call it in context retrieval augmented language model what it is they have an llm and they add some outside information set for example from the internet some up-to-date information and they discuss the mechanism how they can do this in particular they leave the pre-trained language model without any modification or even without an API access and this is exactly what we're gonna do we leave our chat GPT as it is and we will apply this in context retrieval augmented language modeling methodology January 2023 uh you can have different uh architectures you they work with an off-the-shelf Frozen broad retriever I do it manually you can do whatever argumentation or whatever architecture we would like to just want to show you how easy it is so they give you the framework for in context ROM they show you here the aggress the auto regressive model this is whatever you know and then they just say add some documents from an external Corpus and the external Corpus is simply the information I copied personally from the internet and I provide to them and I would just want to show you how easy it is look this is here where they say this is an example of in context one we simply prepend the retrieve document so this here is a sentence that they retrieve from the internet so you can do it automatically from your browser from an AI system or you just type it in like I did and then you you put we simply prepared to retrieve document before the input prefix then you have your prefix the World Cup 2022 was the last Rift 32 teams before the increase too and this is now the open Word and as you can see with the retrieved evidence now pre-pended before the prefix and your feet is in the language model the language model is able to give you an answer that before the increase to 48 in the 2026 tournaments so here we go now with our free chat GPT and you see I have exactly here this this structure of my prompt let's have a look at this oh yes just the second gives me an answer what I want to show you the prompt design so here you see I have a question and I have an answer and this question is simply what new information about Quantum error correction is available this is a question chat CPT will know but it will not know the answer because the answer I have taken here as you can see from Google here from February 2022 2023 this is an article about the latest development in Quantum Corrections and what I'm particularly looking for I'm looking for an uh a clear event and here we have it here we have a logical qubit that were made from 49 fizzle qubit was able to outperform one that we made from 17 Cubit so we have very clearly two integer numbers that we can now ask the system for and this is exactly what I do I provide it with the information in here now as you can see some few short learning yes we will have further questions and then I just ask my question and you see chat GPT answers yes beautiful in the research mentioned in the previous answer in Google's Quantum I demonstrated a logical qubit made from 49 physical qubits important to note that the number may change continue to develop in an improved Quantum Computing correction technology so we achieved our goal our 49 physical qubits we learned this to the chat GPT without having access to the sandbox or to an API where you have to pay for this this is now a very simple and efficient model and this is just one piece of information you can go on and more and more and more so you can ask in a different way and it still gives you the correct information as you can see here it is the particular research has 49 instead of the Formerly Known 17 qubits so this information is now part of it now as we are scientists researcher we do another experiment and here take something from February eight I am looking here from some unique information and here we have it lenses now used more than 10 billion times per month this is an information about 2023 so you can imagine what we do now I just exchange here the block of new information we have the same prompt engineering the same prompt design and this is the way we go so here we have now the answer and we just have to modify the question a little bit the question was what new information about Google lens is available yes this is what I inserted in information this is the retrieved document if you want from the internet and now we can learn that GPT here lenses now used 10 million times and the answer by GPT as you can see is now 10 billion times per month so you see this is the method if you have external knowledge if you write it or you absorb it from the internet with your web browser this is how you can integrate new knowledge into chat GPT without fine tuning it which is very expensive so just to be clear in the free chat GPT version this works only as long as you have your session if you want to save all these new information that you provided to in context learning you have to have or buy from opmei and API so you have your model that you then can it's not fine-tuning it is tune within context learning for new data and this is the beauty so you can experience this on the free chat GPT version and when you feel comfortable you go and you take a license from the new chat gbt4 or whatever comes up and then you know that your knowledge that you insert in the system is available so thank you for watching I hope you enjoyed it a little bit see you in my next video

Original Description

From ICL to In-Context Retrieval-Augmented Language Models (in-context RALM). Tune your ChatGPT, let it learn new stuff! I show you how. Even without paying for OpenAI's API. Fine-tuning is too expensive? And by the way, even if you pay for OpenAI's API, you can't currently fine-tune GPT-3.5-Turbo! No way! ..... So? ICL! For the time of your free session on ChatGPT, I show you how you can provide new content to ChatGPT, from one-shot prompting and data extracted in real-time from the internet (RALM). What is ICL? During in-context learning (ICL), we give the LLM a prompt that consists of a list of input-output pairs that demonstrate a task. At the end of the prompt, we append a test input and allow the LLM to make a prediction just by conditioning on the prompt and predicting the next tokens. ( “few-shot learning”, or "in-context learning" where we allow as many demonstrations as will fit into the model’s context window) In-context learning (ICL) allows users to quickly build models for a new use case without worrying about fine-tuning and storing new parameters for each task. It typically requires very few training examples to get a prototype working, and the natural language interface is intuitive even for non-experts. Nice: https://ai.stanford.edu/blog/understanding-incontext/#wrapping-up FINE-TUNING large language models is becoming ever more impractical due to their rapidly-growing scale. This motivates instead the use of 1. parameter-efficient adaptation methods such as prompt tuning (PT), which adds a small number of tunable embeddings to an otherwise frozen model, and 2. in-context learning (ICL), in which demonstrations of the task are provided to the model in natural language 8eg English) without any additional training of the system parameters. Shout out to @OpenAI for providing the free ChatGPT access. Literature: In-Context Retrieval-Augmented Language Models https://arxiv.org/pdf/2302.00083.pdf How Does In-Context Learning Help Prompt
Watch on YouTube ↗ (saves to browser)
Sign in to unlock AI tutor explanation · ⚡30

Playlist

Uploads from Discover AI · Discover AI · 56 of 60

1 Step Into the Unknown (by YouChat) - May 2023 be your best year yet
Step Into the Unknown (by YouChat) - May 2023 be your best year yet
Discover AI
2 Wishing you all an amazing 2023 filled with Love, Laughter, and Happiness!
Wishing you all an amazing 2023 filled with Love, Laughter, and Happiness!
Discover AI
3 Create a Smarter Future!
Create a Smarter Future!
Discover AI
4 The Art of Text to Vector Transformation: A Comprehensive Look at AI and NLP Transformers
The Art of Text to Vector Transformation: A Comprehensive Look at AI and NLP Transformers
Discover AI
5 Feature Vectors: The Key to Unlocking the Power of BERT and SBERT Transformer Models
Feature Vectors: The Key to Unlocking the Power of BERT and SBERT Transformer Models
Discover AI
6 Domain-Specific AI Models: How to Create Customized BERT and SBERT Models for Your Business
Domain-Specific AI Models: How to Create Customized BERT and SBERT Models for Your Business
Discover AI
7 Achieve Unimaginable Levels of Domain Knowledge through SBERT Extreme in 3D   (SBERT 48)
Achieve Unimaginable Levels of Domain Knowledge through SBERT Extreme in 3D (SBERT 48)
Discover AI
8 Unlocking Scientific Domain Knowledge w/ BPE Tokenizer: An Amazing Journey!  (SBERT 49)
Unlocking Scientific Domain Knowledge w/ BPE Tokenizer: An Amazing Journey! (SBERT 49)
Discover AI
9 SBERT Extreme 3D: Train a BERT Tokenizer  on your (scientific) Domain Knowledge  (SBERT 50)
SBERT Extreme 3D: Train a BERT Tokenizer on your (scientific) Domain Knowledge (SBERT 50)
Discover AI
10 Discover Vision Transformer (ViT) Tech in 2023
Discover Vision Transformer (ViT) Tech in 2023
Discover AI
11 Pre-Train BERT from scratch: Solution for Company Domain Knowledge Data | PyTorch (SBERT 51)
Pre-Train BERT from scratch: Solution for Company Domain Knowledge Data | PyTorch (SBERT 51)
Discover AI
12 Flan-T5-XL model on a free COLAB | A free LLM - that explains itself w/ reasoning /write essay | AI
Flan-T5-XL model on a free COLAB | A free LLM - that explains itself w/ reasoning /write essay | AI
Discover AI
13 BERT and GPT in Language Models like ChatGPT or BLOOM |  EASY Tutorial on Large Language Models LLM
BERT and GPT in Language Models like ChatGPT or BLOOM | EASY Tutorial on Large Language Models LLM
Discover AI
14 Free Alternative to ChatGPT: Flan-T5-XL GUI (open-source)  #shorts
Free Alternative to ChatGPT: Flan-T5-XL GUI (open-source) #shorts
Discover AI
15 From T5 to T5X: A Game-Changing Evolution with JAX & FLAX
From T5 to T5X: A Game-Changing Evolution with JAX & FLAX
Discover AI
16 How to start with ChatGPT?  | Short Introduction to OpenAI API #shorts
How to start with ChatGPT? | Short Introduction to OpenAI API #shorts
Discover AI
17 The Future of Conversational AI? Google's PaLM w/ RLHF  | LLM ChatGPT Competitor
The Future of Conversational AI? Google's PaLM w/ RLHF | LLM ChatGPT Competitor
Discover AI
18 Microsoft and ChatGPU
Microsoft and ChatGPU
Discover AI
19 From Zero to FLAN-T5 XL Model GUI with Gradio: A Step-by-Step Guide on Free COLAB Notebook PyTorch
From Zero to FLAN-T5 XL Model GUI with Gradio: A Step-by-Step Guide on Free COLAB Notebook PyTorch
Discover AI
20 Google's 2nd Answer to "BING ChatGPT":  Sparrow | after BARD w/ LaMDA | 2nd Gen Conversational AI
Google's 2nd Answer to "BING ChatGPT": Sparrow | after BARD w/ LaMDA | 2nd Gen Conversational AI
Discover AI
21 TF2: Pre-Train BERT from scratch (a Transformer), fine-tune & run inference on text | KERAS NLP
TF2: Pre-Train BERT from scratch (a Transformer), fine-tune & run inference on text | KERAS NLP
Discover AI
22 3D Visualization for BERT: How to Pre-Train with a New Layer & Fine-Tune with Downstream Task Layer
3D Visualization for BERT: How to Pre-Train with a New Layer & Fine-Tune with Downstream Task Layer
Discover AI
23 FLAN-T5-XXL on NVIDIA A100 GPU w/ HF Inference Endpoints, let's explore 11b models!
FLAN-T5-XXL on NVIDIA A100 GPU w/ HF Inference Endpoints, let's explore 11b models!
Discover AI
24 ChatGPT - Can it Lie to you?
ChatGPT - Can it Lie to you?
Discover AI
25 ChatGPT Alternative: Perplexity by Perplexity.AI
ChatGPT Alternative: Perplexity by Perplexity.AI
Discover AI
26 2023 KerasNLP Tutorial: Explore Latest KERAS Toolbox & NLP Processing Library for BERT - TF2
2023 KerasNLP Tutorial: Explore Latest KERAS Toolbox & NLP Processing Library for BERT - TF2
Discover AI
27 Self-aware AI: You.com/chat vs Perplexity.ai | Live Demo, LLMs show Future of ChatGPT w/ BING
Self-aware AI: You.com/chat vs Perplexity.ai | Live Demo, LLMs show Future of ChatGPT w/ BING
Discover AI
28 BLOOM 176B Inference on AWS  | Bigger than GPT-3 for more Power!
BLOOM 176B Inference on AWS | Bigger than GPT-3 for more Power!
Discover AI
29 Fine-tune ChatGPT? Buy Embeddings /OpenAI? What are Embeddings?  My own ChatGPT? | Visual Q+A
Fine-tune ChatGPT? Buy Embeddings /OpenAI? What are Embeddings? My own ChatGPT? | Visual Q+A
Discover AI
30 Unleashing the Power of BLOOM 176B with AWS ml.p4de.24xlarge, DJL & DeepSpeed: The Ultimate Boost!
Unleashing the Power of BLOOM 176B with AWS ml.p4de.24xlarge, DJL & DeepSpeed: The Ultimate Boost!
Discover AI
31 After ChatGPT: NEW BioGPT by Microsoft | Do YOU trust Microsoft for your Medication?
After ChatGPT: NEW BioGPT by Microsoft | Do YOU trust Microsoft for your Medication?
Discover AI
32 Improve ChatGPT: Modular, Adaptive, Smart LLM | Inside ChatGPT
Improve ChatGPT: Modular, Adaptive, Smart LLM | Inside ChatGPT
Discover AI
33 Fine-tune ChatGPT w/  in-context learning ICL - Chain of Thought, AMA, reasoning & acting: ReAct
Fine-tune ChatGPT w/ in-context learning ICL - Chain of Thought, AMA, reasoning & acting: ReAct
Discover AI
34 The Intersection of Copyright Law and Human Faces: Exploring Virtual K-Pop with MAVE
The Intersection of Copyright Law and Human Faces: Exploring Virtual K-Pop with MAVE
Discover AI
35 New TECH: Vision Transformer 2023 on Image Classification | AI
New TECH: Vision Transformer 2023 on Image Classification | AI
Discover AI
36 PyTorch code Vision Transformer: Apply ViT models pre-trained and fine-tuned  | AI  Tech
PyTorch code Vision Transformer: Apply ViT models pre-trained and fine-tuned | AI Tech
Discover AI
37 New BING ChatGPT: Unlock the Power of Emotions in your Search Engine!
New BING ChatGPT: Unlock the Power of Emotions in your Search Engine!
Discover AI
38 New BING ChatGPT loses its mind
New BING ChatGPT loses its mind
Discover AI
39 Self-Attention Heads of last Layer of Vision Transformer (ViT) visualized (pre-trained with DINO)
Self-Attention Heads of last Layer of Vision Transformer (ViT) visualized (pre-trained with DINO)
Discover AI
40 Visualizing the Self-Attention Head of the Last Layer in DINO ViT: A Unique Perspective on Vision AI
Visualizing the Self-Attention Head of the Last Layer in DINO ViT: A Unique Perspective on Vision AI
Discover AI
41 Microsoft strongly restricts access to ChatGPT on new BING - WHY?
Microsoft strongly restricts access to ChatGPT on new BING - WHY?
Discover AI
42 PyTorch ViT: The Ultimate Guide to Fine-Tuning for Object Identification (COLAB)
PyTorch ViT: The Ultimate Guide to Fine-Tuning for Object Identification (COLAB)
Discover AI
43 New BING Chat AGGRESSIVE
New BING Chat AGGRESSIVE
Discover AI
44 Panoptic Image Segmentation: Mask2Former explained | Identify all objects!
Panoptic Image Segmentation: Mask2Former explained | Identify all objects!
Discover AI
45 Code Panoptic Image Segmentation w/ Vision Transformer & Mask2Former - A PyTorch tutorial
Code Panoptic Image Segmentation w/ Vision Transformer & Mask2Former - A PyTorch tutorial
Discover AI
46 Dream Job Alert: AI Prompt Engineer - $335K  |  AI Prompt Design: A Crash Course
Dream Job Alert: AI Prompt Engineer - $335K | AI Prompt Design: A Crash Course
Discover AI
47 Streamlining Similar Image Detection with ViT in PyTorch: A Step-by-Step Guide
Streamlining Similar Image Detection with ViT in PyTorch: A Step-by-Step Guide
Discover AI
48 Microsoft's CEO in Trouble   #shorts
Microsoft's CEO in Trouble #shorts
Discover AI
49 Why wait for KOSMOS-1? Code a VISION - LLM w/ ViT, Flan-T5 LLM and BLIP-2: Multimodal LLMs (MLLM)
Why wait for KOSMOS-1? Code a VISION - LLM w/ ViT, Flan-T5 LLM and BLIP-2: Multimodal LLMs (MLLM)
Discover AI
50 OpenAI's ChatGPT can NOW summarize external Sources on the Internet?
OpenAI's ChatGPT can NOW summarize external Sources on the Internet?
Discover AI
51 ChatGPT polarizes
ChatGPT polarizes
Discover AI
52 Hospital /Clinic AI Decision Models: Performance of 12 AI LLM Systems (incl $$) Radiology, Biomed
Hospital /Clinic AI Decision Models: Performance of 12 AI LLM Systems (incl $$) Radiology, Biomed
Discover AI
53 ChatGPT Prompt Engineering w/ in-context learning (ICL)  - 7 Examples | Tutorial
ChatGPT Prompt Engineering w/ in-context learning (ICL) - 7 Examples | Tutorial
Discover AI
54 Chat with your Image!  BLIP-2 connects Q-Former w/ VISION-LANGUAGE models (ViT & T5 LLM)
Chat with your Image! BLIP-2 connects Q-Former w/ VISION-LANGUAGE models (ViT & T5 LLM)
Discover AI
55 ChatGPT:  Multidimensional Prompts
ChatGPT: Multidimensional Prompts
Discover AI
ChatGPT:  In-context Retrieval-Augmented Learning (IC-RALM) | In-context Learning (ICL) Examples
ChatGPT: In-context Retrieval-Augmented Learning (IC-RALM) | In-context Learning (ICL) Examples
Discover AI
57 Code your BLIP-2 APP: VISION Transformer (ViT) + Chat LLM (Flan-T5) = MLLM
Code your BLIP-2 APP: VISION Transformer (ViT) + Chat LLM (Flan-T5) = MLLM
Discover AI
58 Buy Microsoft "Azure OpenAI Service" or buy from OpenAI its API for ChatGPT access & tuning?
Buy Microsoft "Azure OpenAI Service" or buy from OpenAI its API for ChatGPT access & tuning?
Discover AI
59 Pretraining vs Fine-tuning vs In-context Learning of LLM (GPT-x) EXPLAINED | Ultimate Guide ($)
Pretraining vs Fine-tuning vs In-context Learning of LLM (GPT-x) EXPLAINED | Ultimate Guide ($)
Discover AI
60 Reversible Transformer: ReFORMER for GPU Memory Optimization! Reversible Residual Layers?
Reversible Transformer: ReFORMER for GPU Memory Optimization! Reversible Residual Layers?
Discover AI

This video shows how to teach ChatGPT new information using In-context Retrieval-Augmented Learning (IC-RALM) without fine-tuning, by applying a simple source sequence of question and answer and using prompt engineering to integrate new knowledge.

Key Takeaways
  1. Understand the limitations of ChatGPT's knowledge
  2. Learn about In-context Retrieval-Augmented Learning (IC-RALM)
  3. Apply the IC-RALM methodology using a simple source sequence of question and answer
  4. Use prompt engineering to integrate new knowledge into ChatGPT
  5. Test the new knowledge by asking follow-up questions
💡 In-context Retrieval-Augmented Learning (IC-RALM) allows users to teach ChatGPT new information without fine-tuning, by using a simple source sequence of question and answer and applying prompt engineering to integrate new knowledge.

Related AI Lessons

Up next
5 Levels of AI Agents - From Simple LLM Calls to Multi-Agent Systems
Dave Ebbelaar (LLM Eng)
Watch →