3 minute newsletter Gen AI course - Part 3
Transform Your Mid Career with Gen AI,Prompts are not just better English
Dear Readers,
Welcome to the 3rd part of the newsletter course on Generative AI. In this part - we will focus on “Prompts” & address some concepts as why Prompts is not just about writing better English.
Incase you have missed the previous parts you can read them below.
Course 1 - Click here for part 1
Course 2 - Click here for part 2
In the third part- we look into prompts in Gen AI and types of prompting as one shot, few shot prompting.
Happy learning!
Regards,
Anirban.
What is a Prompt in the Context of Generative AI?
Definition: A prompt is an input given to a generative AI model to elicit a response or generate specific content. It can be a question, a statement, or any form of text that guides the model on what output is expected.
Function: Prompts serve as the starting point for the AI's generation process. The AI uses the prompt to understand the context and generate a relevant response based on its training data.
Key Parts of LLM Chat:
Prompt: The initial input or question provided by the user.
Model (LLM): The AI system that processes the prompt to generate a response.
Inference Process: The method through which the model interprets the prompt and determines the appropriate response.
Completion: The final output or answer generated by the model in response to the prompt.
Example as seen above:
The slide illustrates the process of how a Large Language Model (LLM) generates responses to prompts.
Prompt:
Text: "What is the capital of India?"
Function: This is the input given to the model, asking a specific question.
Model:
Component: LLM (Large Language Model)
Function: The core AI model that processes the prompt. It uses its extensive training data to infer the most appropriate response.
Inference:
Process: The model processes the prompt through its context window, analyzing the input to generate a response.
Context Window: The scope within which the model understands and processes the prompt.
Completion:
Response: "New Delhi"
Function: The output generated by the model, answering the initial prompt.
Ok - so how we define Generative AI?
Source: Deeplearning.ai
According to google documentation -
Generative AI or generative artificial intelligence refers to the use of AI to create new content, like text, images, music, audio, and videos.
Generative AI is powered by foundation models (large AI models) that can multi-task and perform out-of-the-box tasks, including summarization, Q&A, classification, and more. Plus, with minimal training required, foundation models can be adapted for targeted use cases with very little example data.
(Source: https://cloud.google.com/use-cases/generative-ai)
The key fact to note that Gen AI is used to text production like writing an essay, to provide summary of a text/document or even do translation.
Is Prompt engineering all about writing better English - No and Yes
The natural language instruction in which we interact with an LLM is called a Prompt. The construction of prompts is called Prompt Engineering.
The inferencing that an LLM does and completes the instruction given in the prompt is called 'incontext learning’
The ability of the LLM to respond to the instruction in the prompt without any example is called 'ZeroShot Learning’
When a single example is provided, it's called 'One Shot Learning’
If more than one examples in provided, it's called 'Few Shot Learning’
Context Window, or the maximum number of tokens that an LLM can provide and inference on, is critical in the Zero/One/Few Shot Learning
So, writing better english helps but it is not everything. The key is to provide examples.
One shot learning is(one example):
Few shot learning is(few examples - generally 5):
Although, the question was very easy here but it does sail the concepts of one and few shot prompting well.
Updates from Purple Slingshot:
Book one-one call with me on how to learn machine learning with me?
I am now running a 6 weeks machine learning coaching track where you will get to work on your own project and get personally guided by me over weekly sprints.
To talk more - schedule a free one-one call with me here.
Connect with me over Linkedin here.