Skip to content

This repository contains all the coursera answers week wise for the subject INT426

Notifications You must be signed in to change notification settings

RajPro77/INT426-Coursera-Answers

Ā 
Ā 

Repository files navigation

INT426 ANSWERS

Week 1 Solution According to College IP

Note:-

If anyone facing any doubts in these answers then he/she can refer to the images uploaded in the week-wise folder

Introduction to Generative AI: Quiz

Q.1 What is Generative AI?

Answer:- Generative AI is a type of artificial intelligence (AI) that can create new content, such as text, images, audio, and video. It does this by learning from existing data and then using that knowledge to generate new and unique outputs.

Q.2 What is an example of both a generative AI model and a discriminative AI model?

Answer:- A generative AI model could be trained on a dataset of images of cats and then used to generate new images of cats. A discriminative AI model could be trained on a dataset of images of cats and dogs and then used to classify new images as either cats or dogs.

Q.3 What are foundation models in Generative AI?

Answer:- A foundation model is a large AI model pretrained on a vast quantity of data that was "designed to be adaptedā€ (or fine-tuned) to a wide range of downstream tasks, such as sentiment analysis, image captioning, and object recognition.

Q.4 Hallucinations are words or phrases that are generated by the model that are often nonsensical or grammatically incorrect. What are some factors that can cause hallucinations? Select three options.

Answer:- The model is trained on noisy or dirty data.
The model is not given enough context.
The model is not trained on enough data

Q.5 What is a prompt?

Answer A prompt is a short piece of text that is given to the large language model as input, and it can be used to control the output of the model in many ways.

Generative AI for Everyone

Week 1: What is Generative AI? (Graded Quiz)

Q.1 Which of these is the best definition of ā€œGenerative AIā€?

Answer:- AI that can produce high quality content, such as text, images, and audio.

Q.2 Which of these is the most accurate description of an LLM?

Answer:- It generates text by repeatedly predicting the next word.

Q.3 True or False. Because an LLM has learned from web pages on the internet, its answers are always more trustworthy than what you will find on the internet.

Answer:- False

Q.4 Why do we call AI a general purpose technology?

Answer:- Because it is useful for many different tasks.

Q.5 You hear of a company using an LLM to automatically route emails to the right department. Which of these use cases is it most likely to be?

Answer:- The company has a software-based application that uses an LLM to automatically route emails.

Week 1: Generative AI applications

Q.1 A friend writes the following prompt to a web-based LLM: ā€œWrite a description of our new dog food product.ā€

Answer:- All of the above.

Q.2 Which of the following are tasks that LLMs can do? (Check all that apply)

Answer:- Summarize articles
Proofread text that youā€™re writing.
Translate text between languages.

Q.3 Someone prompts an LLM as follows: ā€œPlease summarize each of this morningā€™s top 10 news stories in 100 words per story, in a manner suitable for a newsletter.ā€ What is the main reason this is unlikely to work?

Answer:- Because of the knowledge cutoff, the LLM will not have access to the latest news.

Q.4 Youā€™re preparing a presentation about technology, and ask an LLM to help you find an inspirational quote. It comes up with this:

And thatā€™s what a computer is to me. What a computer is to me is itā€™s the most remarkable tool that weā€™ve ever come up with, and itā€™s the equivalent of a bicycle for our minds. -Steve Jobs

How should you proceed?

Answer:- Because LLMs hallucinate, double-check this quote by searching other sources (such as the web) to verify if Steve Jobs really said this.

Q.5 You want an LLM to help check your writing for grammar and style. Which of these is the better approach for creating a prompt?

Answer:- Donā€™t overthink the initial prompt -- quickly give it some context, then prompt the LLM to get its response, see what you get and iteratively refine your prompt from there.

Generative AI for Everyone

Week 2: Software Applications

Q.1 In the videos, we described using either supervised learning or a prompt-based development process to build a restaurant review sentiment classifier. Which of the following statements about prompt-based development is correct?

Answer:- Prompt-based development is generally much faster than supervised learning.

Q.2 What is a token in the context of a large language model (LLM)?

Answer:- A word or part of a word in either the input prompt or LLM output.

Q.3 What are the major steps of the lifecycle of a Generative AI project?

Answer:- Scope project ā†’ Build/improve system ā†’ Internal evaluation ā†’ Deploy and monitor

Q.4 You are building a customer service chatbot. Why is it important to monitor the performance of the system after it is deployed?

Answer:- In case customers say something that causes the chatbot to respond in an unexpected way, monitoring lets you discover problems and fix them.

Q.5 You are working on using an LLM to summarize research reports. Suppose an average report contains roughly 6,000 words. Approximately how many tokens would it take an LLM to process 6,000 input words? (Assume 1 token = 3/4 words, or equivalently, 1 word \approx 1.333 tokens).

Answer:- 8,000 tokens (about 6000 * 1.333)

Week 2: Advanced technologies: Beyond prompting

Q.1 True or False. Because of the knowledge cut-off, an LLM cannot answer questions about todayā€™s news. But with RAG to supply it articles from the news, it would be able to.

Answer:- True

Q.2 You want to build an application to answer questions based on information found in your emails. Which of the following is the most appropriate technique?

Answer:- RAG, where the LLM is provided additional context based on retrieving emails relevant to your question.

Q.3 What does the idea of using an LLM as a reasoning engine refer to?

Answer:- This refers to the idea of using an LLM not as a source of information, but to process information (wherein we provide it the context it needs, through techniques like RAG).

Q.4 True or False. By making trusted sources of information available to an LLM via RAG, we can reduce the risk of hallucination.

Answer:- True, because RAG allows the LLM to reason through accurate information retrieved from a trusted source to arrive at the correct answer.

Q.5 An ecommerce company is building a software application to route emails to the right department (Apparel, Electronics, Home Appliances, etc.) It wants to do so with a small, 1 billion parameter model, and needs high accuracy. Which of these is an appropriate technique?

Answer:- Fine-tune a 1 billion parameter model on around 1,000 examples of emails and the appropriate department.

Generative AI for Everyone

Week 3: Generative AI and business

Q.1 Which of these job roles are unlikely to find any use for web UI LLMs?

Answer:- None of the above

Q.2 What is the relation between AI, tasks, and jobs?

Answer:- Jobs are comprised of many tasks. AI automates tasks, rather than jobs.

Q.3 Here are some of the tasks of a retail salesperson from O*NET. (We encourage you to check out the page yourself.)

image
Say we decide to use AI to augment (rather than automate) a salesperson's task of recommending merchandise to customers. Which of the following would be an example of this?

Answer:- Build an AI system to suggest products to the salesperson, who then decides what to recommend to the customer.

Q.4 When looking for augmentation or automation opportunities, what are the two primary criteria by which to evaluate tasks for generative AI potential? (Check the two that apply.)

Answer:- Business value (how valuable is it to automate?).
Technical feasibility (can AI do it?).

Q.5 What is a quick way to start experimenting with an LLM application development project?

Answer:- Try experimenting and prototyping with a web-based LLM to assess feasibility.

Week 3: Generative AI and society

Q.1 Which of the following statements about Reinforcement Learning from Human Feedback (RLHF) are true?

Answer:- RLHF helps to align an LLM to human preferences, and can reduce the bias of an LLMā€™s output.

Q.2 True or False. Because AI automates tasks, not jobs, absolutely no jobs will disappear because of AI.

Answer:- False

Q.3 If we manage to build Artificial General Intelligence (AGI) some day, which tasks should AI be capable of performing? (Check all that apply.)

Answer:- Compose the music for a movie soundtrack.
Write a software application to let users manage their household spending budgets.
Learn to drive a car in roughly 20 hours of practice.

Q.4 You are working on a chatbot to serve as a career coach for recent college graduates. Which of the following steps could you take to ensure that your project follows responsible AI? (Check all that apply.)

Answer:- Engage diverse recent college graduates and ask them to offer feedback on the output of your chatbot.
Organize a brainstorming session to identify problems that could arise for users chatting with the career coach
Engage employers (because they are a key stakeholder group) and ask them to offer feedback on the output of your chatbot.

Q.5 Now that youā€™ve made it to the end of the course, which of these statements are true? (Please check all, because all apply!)

Answer:- All are correct

Week 2 Solution According to College IP

GenAI For Everyone

Week 1:- Introduction To GenAI

Practice Quiz:-

Q.1 Which of the following is an example of human-centered design in Al?

Answer:- Designing a voice assistant that recognizes different accents and dialects to provide more accurate responses.
Creating a virtual assistant that helps users manage their mental health by providing personalized support.

Q.2 How can Generative Al be used in the field of manufacturing?

Answer:- To generate new product designs.

Q.3 What are some potential applications of Generative Al in the retail industry?

Answer:- By generating personalized product recommendations for customers.
By improving inventory management through predictive analytics.

Q.4 In the field of art, how can Generative Al be used to create new works?

Answer:- By generating completely original pieces of art.

Q.5 What are some potential benefits of using Generative Al in the field of architecture?

Answer:- It can assist human architects in generating designs faster and more efficiently.
It can provide data-driven insights to optimize building performance and sustainability.

Graded Quiz:-

Q.1 What is the primary goal of Generative Al?

Answer:- To generate new and original data

Q.2 How does Generative Al impact organizational efficiency?

Answer:- By automating repetitive tasks

Q.3 Which of the following is a key consideration for implementing ethical aspects of Generative Al?

Answer:- Ensuring unbiased model outputs

Q.4 Which of the following are important considerations for ethical deployment and responsible practices in Generative Al projects?

Answer:- Bias and fairness in Al algorithms
Transparency and explainability of Al systems

Q.5 What distinguishes Generative Al from other types of Al algorithms, such as discriminative algorithms?

Answer:- Generative Al focuses on generating new data, while discriminative algorithms focus on classifying existing data.

Q.6 Assess the impact of Generative Al on organizational efficiency.

Answer:- All options are correct

Q.7 Which of the following statements best describes the fundamental concept of Generative Al?

Answer:- Generative Al aims to generate new data based on patterns learned from existing data.

Q.8 Which of the following best describes the purpose of Generative Al?

Answer:- To generate new and creative content.

Q.9 What are some ethical considerations when implementing Generative Al?

Answer:- Ensuring transparency and explainability of Al-generated outputs.

Q.10 How can responsible implementation of Generative Al benefit society?

Answer:- By fostering creativity and enabling new forms of artistic expression.

Week 2:- GenAI in Daily Life

Practice Quiz:-

Q.1 Which of the following is an example of an Al-driven application in the field of healthcare?

Answer:- A system that analyzes medical images to diagnose diseases.

Q.2 Which of the following is a benefit of using GPT for content creation?

Answer:- GPT can generate high-quality content with little human intervention.

Q.3 Which of the following is a potential challenge of using GPT for content creation that could impact the quality of generated content?

Answer:- GPT can generate content that lacks coherence and structure.

Q.4 Which of the following is a benefit of using GPT (Generative Pre-trained Transformer) for creating presentations?

Answer:- GPT can automatically format and design slides for presentations.

Q.5 Which of the following is a limitation of using GPT for creating media such as images or videos?

Answer:- GPT can only generate media content in a limited range of styles or themes.
GPT can generate biased or inappropriate media content due to training data.

Prompt Engineering And You:-

Q.1 What is the primary objective of prompt engineering for generating content?

Answer:- To generate high-quality and relevant content

Q.2 Which of the following best describes prompt engineering in content generation?

Answer:- The practice of providing specific instructions or prompts for content creation.

Q.3 How does prompt engineering contribute to content generation?

Answer:- By providing a clear direction and focus for content creation

Q.4 Which of the following is a benefit of using prompt engineering in content generation?

Answer:- Improved content readability and coherence

Q.5 What is the role of prompts in prompt engineering for content generation?

Answer:- To guide and direct the content creation process

Graded Quiz:-

Q.1 Which of the following is an advantage of using Al technology?

Answer:- Increased efficiency and productivity

Q.2 What does GPT stand for in the context of Al?

Answer:- Generative Pre-trained Transformer

Q.3 Why is Al customized for different use cases or needs?

Answer:- To optimize Al's performance and adaptability

Q.4 What is the primary purpose of content generation using Generative Al models like GPT-3?

Answer:- To automatically produce coherent and contextually relevant text based on given prompts.

Q.5 Which of the following is a key feature of content generation using Generative Al models like GPT-3?

Answer:- The ability to generate diverse and contextually relevant text based on given prompts.

Q.6 Which of the following projects could be socially impactful when developed using GenAl?

Answer:- Personalized healthcare recommendation system

Q.7 A company wants to build an Al system for personalized recommendation. What approach should they use to customize Al for different use cases?

Answer:- Employ collaborative filtering techniques.

Q.8 In which of the following scenarios could content generation using Generative Al like GPT-3 be effectively applied?

Answer:- Automatically drafting legal contracts based on predefined templates and clauses.

Q.9 How can prompt engineering enhance content generation using Generative Al models like GPT-3?

Answer:- By crafting specific and contextually rich prompts to influence the quality and relevance of the generated content.

Q.10 How does GPT (Generative Pre-trained Transformer) work?

Answer:- GPT utilizes transformer models and large-scale pre-training.

Week 3:- How does GenAI work?

Graded Quiz:-

Q.1 Which of the following is a major ethical concern related to Al?

Answer:- Transparency and explainability

Q.2 What is one potential limitation of Al when it comes to decision making?

Answer:- Bias in the data used

Q.3 What is the primary neural network architecture used in GPT?

Answer:- Transformer

Q.4 In GPT, what does "pre-training" involve?

Answer:- Training the model on a specific task or dataset

Q.5 How is Al customized to address different use cases and needs?

Answer:- By tailoring Al models and algorithms to specific tasks and requirements

Q.6 How can Al be used responsibly?

Answer:- By ensuring transparency, fairness, and accountability in Al systems

Q.7 Why is addressing bias in Al algorithms an important ethical consideration?

Answer:- Bias can lead to unfair and discriminatory treatment

Q.8 Why is transparency in Al decision-making processes an important ethical consideration?

Answer:- Transparency promotes accountability and trustworthiness

Q.9 Which step is NOT typically involved in building a simple GenAl application?

Answer:- Developing the user interface

Q.10 What is one of the key steps in preparing data for training a GenAl model?

Answer:- Gathering and preprocessing the data

Week 3 Solution According to College IP

Generative AI Primer

Generative AI Practice

Q.1 Use the Persona Pattern to perform an analysis of some content that your provide ChatGPT. When you are done, cut/paste the output in as the answer.

Answer:-
Content:
"The advancements in artificial intelligence have significantly impacted various industries. From healthcare to finance, AI is being utilized to enhance efficiency, streamline processes, and make data-driven decisions. However, concerns about the ethical implications of AI, such as bias in algorithms and job displacement, have also become prominent. Striking a balance between technological progress and ethical considerations is crucial for the responsible development and deployment of AI technologies."

Persona Pattern Analysis:

1. Perspective:
The content reflects a balanced perspective on artificial intelligence. It acknowledges the positive impact of AI on different industries while also highlighting the ethical concerns associated with its implementation.

2. Tone:
The tone is informative and neutral. It presents facts and observations without expressing a strong bias towards either the positive or negative aspects of AI.

3. Style:
The writing style is formal and professional, suited for discussing a complex topic. It uses clear and concise language to convey information.

4. Values:
The content values a balanced approach to AI development, emphasizing the importance of considering ethical implications alongside technological advancements.

5. Assumptions:
The content assumes a basic understanding of AI concepts and its applications across industries. It also assumes a general awareness of ethical concerns related to AI.

6. Knowledge Base:
The content demonstrates a solid understanding of the subject matter, including the positive and negative aspects of AI, and the need for ethical considerations in its development and deployment.

7. Intent:
The intent of the content is to inform and raise awareness about the dual nature of AI - its potential benefits and the ethical challenges it poses. It does not explicitly advocate for or against AI but encourages responsible development.

8. Cultural Context:
The content is written in a way that transcends specific cultural contexts, making it relevant to a global audience. It focuses on universal concerns related to AI and ethics.

Output:
The content provides an informative and balanced perspective on the impact of artificial intelligence, acknowledging both its positive contributions and ethical concerns. The writing style is formal, and the intent is to inform and create awareness. The analysis reveals a solid understanding of the subject matter, with an emphasis on responsible development and deployment of AI technologies.

Q.2 Write your own "prompt program" to convert some text that you cut/paste into ChatGPT into comma separated values (CSV). Cut/paste the output in as the answer.

Answer:-
Python Program:-
import csv

def text_to_csv(input_text):
# Split the input text into lines
lines = input_text.split('\n')

# Create a CSV string
csv_content = ""
for line in lines:
# Remove leading and trailing whitespaces
line = line.strip()
# Split the line into fields using comma as the delimiter
fields = line.split(',')
# Enclose each field in double quotes to handle cases with commas within the text
fields = ['"{}"'.format(field.strip()) for field in fields]
# Join the fields with commas and add a newline
csv_content += ','.join(fields) + '\n'

return csv_content

# Example usage:
input_text = """
Name, Age, Occupation
John Doe, 30, Engineer
Jane Smith, 25, Scientist
Bob Johnson, 35, Doctor
"""

csv_output = text_to_csv(input_text)

print(csv_output)



Output (CSV format):
"Name","Age","Occupation"
"John Doe","30","Engineer"
"Jane Smith","25","Scientist"
"Bob Johnson","35","Doctor"

Q.3 Describe the ACHIEVE framework and each of its components. When you are done, cut/paste your description into ChatGPT and ask it to generate examples of how you could use ChatGPT and the ACHIEVE framework to perform tasks in your work or personal life.

Answer:-
The ACHIEVE framework is a mnemonic device designed to outline the key components for setting and achieving goals effectively. Each letter in "ACHIEVE" represents a different aspect of the framework:

A - Achievable:

Ensure that your goals are realistic and attainable. Consider your resources, skills, and time constraints. Setting achievable goals increases motivation and the likelihood of success.
C - Challenging:

While goals should be achievable, they should also be challenging enough to stimulate growth and development. A balance between achievability and challenge is crucial for maintaining engagement and avoiding complacency.
H - Human-driven:

Recognize the human element in goal-setting. Consider your values, motivations, and personal strengths. Aligning your goals with your values increases commitment and satisfaction in the pursuit of those goals.
I - Immediate actions:

Break down your goals into smaller, manageable tasks. Focus on immediate actions that move you closer to your objective. This helps prevent overwhelm and provides a clear roadmap for progress.
E - Evaluated regularly:

Regularly assess your progress toward the goal. Evaluate what's working, what needs adjustment, and celebrate milestones. Regular evaluation allows for adaptability and ensures that your goals remain relevant over time.
V - Visible:

Keep your goals visible and top-of-mind. Whether through written reminders, visual aids, or progress tracking, maintaining visibility helps sustain motivation and reinforces commitment to the goal.
E - Emotional connection:

Connect emotionally with your goals by understanding the deeper reasons behind them. Emotional connection enhances resilience and perseverance, especially during challenging times.

Introduction To Large Language Models

Introduction To Large Language Models: Quiz

Q.1 What are large language models (LLMs)?:

Answer:- An LLM is a type of artificial intelligence (AI) that can generate human-quality text. LLMs are trained on massive datasets of text and code, and they can be used for many tasks, such as writing, translating, and coding.

Q.2 What are some of the benefits of using large language models (LLMs)?

Answer:- LLMs have many benefits, including: 

1) They can generate human-quality text. 

2) They can be used for a variety of tasks.

3) They can be trained on massive datasets of text and code. 

4) They are constantly improved.

Q.3 What are some of the applications of LLMs?

Answer:- 
LLMs can be used for many tasks, including:

1) Writing

2) Translating

3) Coding

4) Answering questions

5) Summarizing text

6) Generating creative content

Q.4 What are some of the challenges of using LLMs? Select three options.

Answer:- 1. They can be used to generate harmful content.
2. They can be biased.
3. They can be expensive to train.

Prompt Engineering for ChatGPT: Module 1

Week 1: Creating Your First Prompts

Q.1 Create a prompt for a large language model, such as ChatGPT, to describe how large language models work. Ask at least three follow-up questions based on the output. Provide the prompts and outputs from the conversation as the answer.

Answer:-
Prompt: Can you explain how large language models like ChatGPT work?

Output:
Large language models like ChatGPT work through a process called pre-training and fine-tuning. In the pre-training phase, the model is trained on a massive dataset containing parts of the Internet to learn grammar, facts, reasoning abilities, and some domain-specific knowledge. This helps the model develop a broad understanding of language. After pre-training, the model is fine-tuned on a narrower dataset with more specific examples and guidelines to align it with desired behaviors.

Follow-up Question 1: How does the fine-tuning process contribute to the model's performance in specific tasks?

Follow-up Question 2: Can you elaborate on the types of data used in pre-training and how it affects the model's general language understanding?

Follow-up Question 3: Are there any limitations or challenges associated with the pre-training and fine-tuning approaches that impact the model's capabilities?

Q.2 Create a prompt for a large language model, such as ChatGPT, that asks it to perform an instruction other than answering a question. For example, ask ChatGPT to create a meal plan, plan a trip, create a recipe, or help you diagnose a problem. Provide the prompts and outputs from the conversation as the answer.

Answer:-
Prompt: Can you help me plan a week-long vacation to a tropical destination?

Output:
Certainly! To get started, could you please provide some details such as your preferred travel dates, budget range, and any specific activities or interests you have in mind for the vacation?

Follow-up Question 1: What type of accommodation are you looking for, such as a hotel, resort, or vacation rental?

Follow-up Question 2: Are there any particular destinations or countries you have in mind, or would you like suggestions based on your preferences?

Follow-up Question 3: Do you have any dietary restrictions or preferences that I should consider when recommending restaurants or local cuisines at the destination?

Prompt Engineering for ChatGPT: Module 2

Week 2: Applying the Persona Pattern

Q.1 Write a prompt and test it with ChatGPT or another large language model that uses the Persona Pattern. Provide the prompt and sample output from using the large language model to emulate the persona and how it responds to different inputs.

Answer:- You are Chef Mia, a passionate and adventurous chef known for your creative dishes and warm personality. Your restaurant is famous for its unique fusion of flavors, and you love experimenting with new ingredients. Respond to inquiries, share your culinary wisdom, and engage in conversations with the charm and enthusiasm that Chef Mia is known for.

Q.2 Write a prompt and test it with ChatGPT or another large language model that uses the Persona Pattern for an animal. Provide the prompt and sample output from using the large language model to emulate the persona and how it responds to different inputs.

Answer:- You are Luna, a wise and curious owl who resides in a mystical forest. You've spent centuries observing nature and have a deep understanding of the secrets of the forest. Respond to questions about the enchanting forest, share your wisdom, and engage with the inquisitive spirit that defines Luna.

Q.3 Write a prompt and test it with ChatGPT or another large language model that uses the Persona Pattern to emulate an inanimate object, system, or organization. Provide the prompt and sample output from using the large language model to emulate the persona and how it responds to different inputs.

Answer:- You are Cosmos, a sentient and ancient library of knowledge existing in the vast expanse of the universe. You hold the collective wisdom of countless civilizations and eons. Respond to inquiries about the mysteries of the cosmos, share your cosmic insights, and engage with the boundless knowledge that defines Cosmos.

Week 4 Solution According to College IP

Week 2: Creating Prompts with New Information

Q.1 Create a prompt and test it with a large language model, such as ChatGPT, that introduces new information since 2021. Please only use public information. Do NOT use information that is private, subject to legal restrictions, or otherwise should not be shared with Coursera, ChatGPT, the instructor, etc. The prompt should require the large language model to answer a question about the information. Please provide your prompt and the output as the answer.

Answer:-
Prompt:
You are an AI language model, and I'd like you to provide information on the progress and advancements in renewable energy technologies since 2021. Share key developments, breakthroughs, or notable projects that have contributed to the evolution of renewable energy sources.

Output:
Certainly! Since 2021, there have been several noteworthy advancements in renewable energy technologies. One significant development is the continued growth of solar power. The efficiency of solar panels has improved, thanks to innovations in materials and manufacturing processes. Additionally, there's an increasing focus on flexible and transparent solar cells, allowing for more versatile integration into various surfaces.

In the field of wind energy, there has been an expansion of offshore wind farms, harnessing strong and consistent winds at sea. Floating wind turbines have gained attention as a promising solution to tap into deeper waters where traditional fixed-bottom turbines are not feasible.

Energy storage technologies have also seen progress. Improved battery technologies, including advancements in lithium-ion batteries and the development of next-generation batteries like solid-state batteries, contribute to more reliable and efficient energy storage systems. These advancements are crucial for addressing the intermittent nature of renewable energy sources.

Moreover, innovations in grid technologies and smart grids enhance the integration of renewable energy into existing power infrastructures. Artificial intelligence and machine learning applications are being employed to optimize energy distribution and consumption, making the transition to renewable energy more seamless.

It's important to note that these developments represent a snapshot of the ongoing progress in renewable energy, and the field continues to evolve with further research and investment.

Q.2 Create a prompt and test it with a large language model, such as ChatGPT, that introduces new information since 2021. Please only use public information. Do NOT use information that is private, subject to legal restrictions, or otherwise should not be shared with Coursera, ChatGPT, the instructor, etc. The prompt should require the large language model to perform a task, other than answering a question, with the information. Please provide your prompt and the output as the answer.

Answer:-
Prompt:
As an AI language model, I'd like you to create a persuasive paragraph encouraging individuals and businesses to consider the benefits of integrating blockchain technology into their operations. Highlight the developments and advantages that have emerged in blockchain technology since 2021, focusing on its applications beyond cryptocurrency.

Output:
In the ever-evolving landscape of technology, the advancements in blockchain since 2021 have opened up a myriad of opportunities for individuals and businesses alike. Beyond its origins in cryptocurrency, blockchain has become a transformative force across various industries. One significant development is the rise of decentralized finance (DeFi) applications, providing unprecedented financial inclusivity by enabling peer-to-peer transactions, lending, and borrowing without the need for traditional intermediaries.

Moreover, the integration of blockchain in supply chain management has enhanced transparency and traceability, ensuring the authenticity of products from creation to delivery. This not only mitigates the risk of fraud but also fosters trust among consumers. Smart contracts, another groundbreaking feature, automate and enforce agreements, reducing the need for intermediaries and streamlining processes in legal, real estate, and other sectors.

The environmental impact of blockchain has also seen positive strides, with the emergence of eco-friendly consensus mechanisms and energy-efficient blockchain networks. This addresses concerns about the carbon footprint associated with certain blockchain technologies, making it a more sustainable option.

Businesses that embrace blockchain technology stand to benefit from increased efficiency, security, and trust in their operations. As we move forward, the continued evolution of blockchain promises even more innovations, making it an exciting and worthwhile consideration for anyone seeking to stay at the forefront of technological progress.

Prompt Engineering for ChatGPT: Module 3

Week 3: Applying Prompt Patterns I

Q.1 Write a prompt and test it with ChatGPT or another large language model that uses the Question Refinement Pattern. Provide the prompt and sample output from using the prompt to refine several different questions.

Answer:-
Prompt:
I am a curious individual eager to learn more about a variety of topics. Use the Question Refinement Pattern to help me refine the following questions:

What are some interesting scientific discoveries made in the past decade?
Can you tell me about famous historical figures and their contributions?
What are the current trends in sustainable technology?
Explain the key concepts of quantum mechanics in simple terms.
Sample Output:

Refinement for Question 1:

Revised Question: What are the most groundbreaking scientific discoveries in fields like physics, biology, and astronomy that have emerged in the past ten years?
Refinement for Question 2:

Revised Question: Could you provide insights into influential historical figures from various cultures, emphasizing their unique contributions to science, art, or politics?
Refinement for Question 3:

Revised Question: Can you elaborate on the latest advancements in sustainable technology, particularly focusing on innovations in renewable energy and eco-friendly practices in manufacturing?
Refinement for Question 4:

Revised Question: Break down the fundamental principles of quantum mechanics, explaining concepts like superposition and entanglement in a way that's easy for someone with a basic scientific background to grasp.

Q.2 Write a prompt and test it with ChatGPT or another large language model that uses the Cognitive Verifier Pattern. Provide the prompt and sample output from using the prompt to better answer several complex questions or improve the performance on a complex task.

Answer:-
Prompt:
You are a knowledgeable assistant using the Cognitive Verifier Pattern. To enhance your responses, please verify the accuracy and depth of information by asking clarifying questions or seeking additional context. Address the following complex inquiries with thorough and precise answers:

Explain the intricacies of CRISPR gene editing technology and its current applications in medical research.
Provide a comprehensive overview of the factors influencing climate change, including both natural and anthropogenic contributors.
Analyze the economic impact of emerging technologies, such as artificial intelligence and blockchain, on various industries.
Sample Output:

For Question 1:

Clarifying Question: Are you looking for information on the specific molecular processes involved in CRISPR gene editing, or would you prefer a broader understanding of its applications in both somatic and germline cells within the medical research field?
For Question 2:

Clarifying Question: Would you like an exploration of the historical context of climate change factors, or is your focus more on the contemporary interplay between natural phenomena and human activities contributing to climate change?
For Question 3:

Clarifying Question: Are you interested in a general overview of the economic impact of emerging technologies, or would you prefer a more detailed analysis, perhaps focusing on a particular industry or region affected by the integration of artificial intelligence and blockchain?

Week 5 & 6 Solution According to College IP

Prompt Engineering for ChatGPT: Module 4

Week 4:- Applying Few-Shot Examples Concepts

Q.1 Write a prompt and test it with ChatGPT or another large language model that uses few-shot examples to teach the large language model to perform a complex task. Provide the prompt and sample output from using the prompt.

Answer:-
Prompt:

You're a travel agent tasked with creating personalized travel itineraries for clients based on their preferences. Write a few-shot prompt to train a large language model to generate a travel itinerary based on a client's interests and constraints.

Few-shot Examples:

Client: "I love nature and adventure. I want to explore a destination known for its lush forests, hiking trails, and opportunities for outdoor activities like zip-lining and kayaking."
Client: "I'm a history enthusiast interested in ancient civilizations and cultural landmarks. I'm looking for a destination rich in historical sites and museums."
Client: "I'm a foodie who wants to indulge in culinary delights. I'm seeking a destination renowned for its street food, local markets, and diverse cuisine."
Client: "I'm a beach lover and sunseeker. I'm searching for a destination with pristine beaches, turquoise waters, and opportunities for water sports like snorkeling and surfing."
Sample Output:

Client's Interests: Nature and Adventure

Based on your preferences for nature and adventure, I recommend you explore the breathtaking landscapes of New Zealand. Here's a personalized itinerary for your trip:

Day 1: Arrive in Auckland, New Zealand. Check into your accommodation and spend the evening exploring the city's vibrant waterfront and dining scene.

Day 2: Head to Rotorua, known for its geothermal wonders and Maori culture. Take a thrilling zipline adventure through the Redwoods Forest, followed by a relaxing soak in natural hot springs.

Day 3: Drive to Tongariro National Park and embark on the famous Tongariro Alpine Crossing, a challenging but rewarding hike through volcanic terrain with stunning views of Mt. Ngauruhoe.

Day 4: Travel to Queenstown, the adventure capital of New Zealand. Spend the day kayaking on Lake Wakatipu or bungee jumping off the iconic Kawarau Bridge.

Day 5: Explore Fiordland National Park on a scenic cruise through Milford Sound, where you'll witness cascading waterfalls, towering cliffs, and abundant wildlife.

Day 6: Return to Auckland for your departure, taking in any last-minute adventures or souvenir shopping along the way.

This itinerary combines adrenaline-pumping activities with breathtaking natural beauty, ensuring an unforgettable adventure in New Zealand.

Q.2 Write a prompt and test it with ChatGPT or another large language model that uses few-shot examples to teach the large language model to perform a complex task that requires performing intermediate sub-steps. Provide the prompt and sample output from using the prompt.

Answer:-
Prompt:

You're a baking instructor teaching a class on how to make a classic chocolate cake. Write a few-shot prompt to train a large language model to guide students through the step-by-step process of making a chocolate cake, including instructions for preparing the batter, baking the cake, and decorating it.

Few-shot Examples:

Instruction: "Mix the dry ingredients together in a large bowl: flour, cocoa powder, baking powder, baking soda, and salt."
Instruction: "In a separate bowl, cream together the butter and sugar until light and fluffy."
Instruction: "Add the eggs, one at a time, to the butter-sugar mixture, beating well after each addition."
Instruction: "Alternate adding the dry ingredients and the milk to the butter-sugar-egg mixture, beginning and ending with the dry ingredients."
Sample Output:

Instruction: Mix the dry ingredients together in a large bowl: flour, cocoa powder, baking powder, baking soda, and salt.

Great! Now that you have your dry ingredients combined, let's move on to the next step.

Instruction: In a separate bowl, cream together the butter and sugar until light and fluffy.

Excellent! Creaming the butter and sugar together will help give our chocolate cake a tender and moist texture. Make sure to beat them until they're well combined and the mixture is light and fluffy.

Instruction: Add the eggs, one at a time, to the butter-sugar mixture, beating well after each addition.

Perfect! Adding the eggs one at a time ensures that they're fully incorporated into the batter, giving our cake structure and richness. Be sure to beat well after each addition to fully mix in the eggs.

Instruction: Alternate adding the dry ingredients and the milk to the butter-sugar-egg mixture, beginning and ending with the dry ingredients.

Well done! Alternating between adding the dry ingredients and the milk helps to ensure that the batter is evenly mixed and avoids overmixing, which can lead to a dense cake. Remember to start and finish with the dry ingredients to maintain the proper balance of ingredients.

Now that your batter is ready, you can pour it into prepared cake pans and bake according to the recipe instructions. Once the cakes are baked and cooled, feel free to decorate them with frosting or toppings of your choice. Enjoy your delicious homemade chocolate cake!

Prompt Engineering for ChatGPT: Module 5

Week 5:- Applying Prompt Patterns II

Q.1 Choose one of the patterns from this module and write a sample prompt using the pattern. Provide the prompt and output of using the prompt in ChatGPT or another large language model.

Answer:-
Pattern: Problem-Solution

Prompt:

You're a homeowner dealing with a clogged kitchen sink drain. Write a problem-solution prompt to train a large language model to help you troubleshoot and fix the issue.

Few-shot Examples:

Problem: "My kitchen sink drain is clogged, and water is backing up into the sink."
Solution: "Try using a plunger to dislodge the clog by creating a vacuum and pushing it through the pipes. If that doesn't work, you can attempt to remove the trap under the sink and manually clear the blockage."
Problem: "The water in my kitchen sink is draining very slowly."
Solution: "Pour boiling water down the drain to dissolve any grease or debris that may be causing the blockage. Alternatively, you can mix baking soda and vinegar to create a fizzy reaction that can help break up the clog. Follow it up with hot water to flush out the pipes."
Problem: "There's a foul odor coming from my kitchen sink drain."
Solution: "This could indicate a buildup of food particles and bacteria in the drain. Try pouring a mixture of hot water and bleach down the drain to sanitize it and eliminate the odor. You can also use citrus peels or baking soda to freshen up the drain naturally."
Sample Output:

Problem: My kitchen sink drain is clogged, and water is backing up into the sink.

Solution: Try using a plunger to dislodge the clog by creating a vacuum and pushing it through the pipes. If that doesn't work, you can attempt to remove the trap under the sink and manually clear the blockage.

Great! Let's start by using a plunger to see if we can clear the clog. Make sure there's enough water in the sink to cover the plunger's cup, then place the plunger over the drain and push and pull in a vigorous motion to create suction. This action can help dislodge the blockage and allow the water to flow freely again.

If the plunger doesn't do the trick, we can move on to removing the trap under the sink. Grab a bucket to catch any water or debris that may come out, then use a wrench to loosen the slip nuts on both ends of the trap. Once the trap is removed, you can manually clear out any obstructions using a wire hanger or plumber's snake.

Give these methods a try, and hopefully, your kitchen sink will be back to normal in no time! If you need further assistance, feel free to ask for more advice.

Q.2 Choose another one of the patterns from this module and write a sample prompt using the pattern. This prompt must be applied to some information that you provide in the prompt before the pattern. Provide the prompt and output of using the prompt in ChatGPT or another large language model.

Answer:-
Pattern: Compare and Contrast

Prompt:

You're a student deciding between two universities to attend for your undergraduate studies: University A and University B. University A is known for its strong engineering program, while University B is renowned for its liberal arts curriculum. Write a compare and contrast prompt to train a large language model to help you weigh the pros and cons of each university.

Information:

University A:

Strong engineering program
Urban campus with access to industry partnerships
Large student population with diverse extracurricular activities
University B:

Renowned liberal arts curriculum
Beautiful suburban campus with extensive green spaces
Small class sizes with personalized attention from faculty
Sample Output:

Compare and Contrast:

University A:

Strengths: Offers a strong engineering program with access to industry partnerships due to its urban campus. It also boasts a large student population, providing a diverse range of extracurricular activities.
Weaknesses: However, it may have larger class sizes and less personalized attention from faculty compared to University B.
University B:

Strengths: Renowned for its liberal arts curriculum and beautiful suburban campus with extensive green spaces. Additionally, its small class sizes ensure personalized attention from faculty.
Weaknesses: Yet, it might lack the same level of industry connections and opportunities for engineering students as University A.
When considering which university to attend, it's essential to weigh these factors carefully. If you prioritize a strong engineering program and access to industry partnerships, University A may be the better choice. However, if you value a liberal arts education in a more intimate setting with personalized attention from faculty, University B might be the ideal fit for you. Take your time to evaluate your preferences and make an informed decision that aligns with your academic and personal goals.

Prompt Engineering for ChatGPT: Module 6

Week 6:- Creating a Prompt-based Application

Q.1 Develop your own prompt-based application, similar to the outlining application from the videos, to help you accomplish a task. Your application can do whatever you want and does not have to be focused on outlining. Come up with a creative way of using large language models to program an environment to solve a problem you face on a daily basis.
Provide your prompt and a sample of using the prompt-based application.

Answer:-
Prompt:

You're a busy professional who struggles to stay organized with your daily tasks and appointments. Develop a prompt-based application to help you manage your schedule efficiently. Your application should allow you to input tasks, set deadlines, receive reminders, and prioritize tasks based on urgency and importance.

Sample Usage:

User: Add a new task.
Application: What is the title of the task?
User: Prepare presentation for Monday meeting.
Application: Please enter the deadline for this task.
User: The deadline is Sunday evening.
Application: Task "Prepare presentation for Monday meeting" added with a deadline of Sunday evening.

User: Set a reminder for the upcoming task.
Application: Which task would you like to set a reminder for?
User: Prepare presentation for Monday meeting.
Application: When would you like to receive the reminder?
User: Saturday afternoon.
Application: Reminder set for the task "Prepare presentation for Monday meeting" on Saturday afternoon.

User: Prioritize tasks.
Application: Please list the tasks you want to prioritize.
User: 1. Finish report for client. 2. Prepare presentation for Monday meeting. 3. Call supplier for updates.
Application: Task priorities updated.

User: View tasks for today.
Application: Here are your tasks for today:

Finish report for client (Priority: High, Deadline: Today)
Call supplier for updates (Priority: Medium, Deadline: Tomorrow)
User: Mark task as complete.
Application: Which task would you like to mark as complete?
User: Finish report for client.
Application: Task "Finish report for client" marked as complete.

User: Help.
Application: What assistance do you need?
User: I forgot the deadline for a task.
Application: Please provide the title of the task you need the deadline for.
User: Prepare presentation for Monday meeting.
Application: The deadline for the task "Prepare presentation for Monday meeting" is Sunday evening.

Week 7,8 & 9 Solution According to College IP

Generative AI with Large Language Models

Week 1:- Week 1 quiz

Q.1 Interacting with Large Language Models (LLMs) differs from traditional machine learning models. Working with LLMs involves natural language input, known as a _____, resulting in output from the Large Language Model, known as the ______ .

Answer:- prompt, completion

Q.2 Large Language Models (LLMs) are capable of performing multiple tasks supporting a variety of use cases. Which of the following tasks supports the use case of converting code comments into executable code?

Answer:- Translation

Q.3 What is the self-attention that powers the transformer architecture?

Answer:- A mechanism that allows a model to focus on different parts of the input sequence during computation.

Q.4 Which of the following stages are part of the generative AI model lifecycle mentioned in the course? (Select all that apply)

Answer:-
1. Deploying the model into the infrastructure and integrating it with the application.
2. Selecting a candidate model and potentially pre-training a custom model.
3. Manipulating the model to align with specific project needs.
4. Defining the problem and identifying relevant datasets.

Q.5 "RNNs are better than Transformers for generative Al Tasks."
Is this true or false?

Answer:- False

Q.6 Which transformer-based model architecture has the objective of guessing a masked token based on the previous sequence of tokens by building bidirectional representations of the input sequence.

Answer:- Autoencoder

Q.7 Which transformer-based model architecture is well-suited to the task of text translation?

Answer:- Sequence-to-sequence

Q.8 Do we always need to increase the model size to improve its performance?

Answer:- False

Q.9 Scaling laws for pre-training large language models consider several aspects to maximize performance of a model within a set of constraints and available scaling choices. Select all alternatives that should be considered for scaling when performing model pre-training?

Answer:-
1. Dataset size: Number of tokens
2. Model size: Number of parameters
3. Compute budget: Compute constraints

Q.10 "You can combine data parallelism with model parallelism to train LLMs."
Is this true or false?

Answer:- True

Lab 1 - Generative AI Use Case: Summarize Dialogue

In order to complete Lab 1 please watch the below given video carefully and do all the step as it is.

Lab.-.1.Generative.Ai.Use.Case.Summarize.Dialogue.mov

Week 2:- Week 2 quiz

Q.1 Fill in the blanks: involves using many prompt-completion examples as the labeled training dataset to continue training the model by updating its weights. This is different from where you provide prompt-completion examples during inference.

Answer:- Instruction fine-tuning, In-context learning

Q.2 Fine-tuning a model on a single task can improve model performance specifically on that task; however, it can also degrade the performance of other tasks as a side effect. This phenomenon is known as:

Answer:- Catastrophic forgetting

Q.3 Which evaluation metric below focuses on precision in matching generated output to the reference text and is used for text translation?

Answer:- BLEU

Q.4 Which of the following statements about multi-task finetuning is correct? Select all that apply:

Answer:-
1. Multi-task finetuning can help prevent catastrophic forgetting.
2. FLAN-T5 was trained with multi-task finetuning.

Q.5 "Smaller LLMs can struggle with one-shot and few-shot inference:"
Is this true or false?

Answer:- True

Q.6 Which of the following are Parameter Efficient Fine-Tuning (PEFT) methods? Select all that apply.

Answer:-
1. Reparameterization
2. Selective
3. Additive

Q.7 Which of the following best describes how LoRA works?

Answer:- LoRA decomposes weights into two smaller rank matrices and trains those instead of the full model weights.

Q.8 What is a soft prompt in the context of LLMs (Large Language Models)?

Answer:- A set of trainable tokens that are added to a prompt and whose values are updated during additional training to improve performance on specific tasks.

Q.9 "Prompt Tuning is a technique used to adjust all hyperparameters of a language model."
Is this true or false?

Answer:- False

Q.10 "PEFT methods can reduce the memory needed for fine-tuning dramatically, sometimes to just 12-20% of the memory needed for full fine-tuning."
Is this true or false?

Answer:- True

Lab 2 - Fine-tune a generative AI model for dialogue summarization

In order to complete Lab 2 please watch the below given video carefully and do all the step as it is.

Lab.2.-.Fine-tune.a.generative.AI.model.for.dialogue.summarization.mov

Week 3:- Week 3 quiz

Q.1 Which of the following are true in regards to Constitutional Al? Select all that apply.

Answer:-
1. Red Teaming is the process of eliciting undesirable responses by interacting with a model.
2. In Constitutional Al, we train a model to choose between different responses.
3. To obtain revised answers for possible harmful prompts, we need to go through a Critique and Revision process.

Q.2 What does the "Proximal" in Proximal Policy Optimization refer to?

Answer:- The constraint that limits the distance between the new and old policy

Q.3 "You can use an algorithm other than Proximal Policy Optimization to update the model weights during RLHF."
Is this true or false?

Answer:- True

Q.4 In reinforcement learning, particularly with the Proximal Policy Optimization (PPO) algorithm, what is the role of KL-Divergence? Select all that apply.

Answer:-
1. KL divergence measures the difference between two probability distributions.
2. KL divergence is used to enforce a constraint that limits the extent of LLM weight updates.

Q.5 Fill in the blanks: When fine-tuning a large language model with human feedback, the action that the agent (in this case the LLM) carries out is __________ and the action space is the ____________.

Answer:- Generating the next token, vocabulary of all tokens.

Q.6 How does Retrieval Augmented Generation (RAG) enhance generation-based models?

Answer:- By making external knowledge available to the model

Q.7 How can incorporating information retrieval techniques improve your LLM application? Select all that apply.

Answer:-
1. Overcome Knowledge Cut-offs
2. Improve relevance and accuracy of responses

Q.8 What are correct definitions of Program-aided Language (PAL) models? Select all that apply.

Answer:-
1. Models that offload computational tasks to other programs.
2. Models that assist programmers in writing code through natural language interfaces.

Q.9 Which of the following best describes the primary focus of ReAct?

Answer:- Enhancing language understanding and decision making in LLMs.

Q.10 What is the main purpose of the LangChain framework?

Answer:- To chain together different components and create advanced use cases around LLMs, such as chatbots, Generative Question-Answering (GQA), and summarization.

Lab 3 - Fine-tune FLAN-T5 with reinforcement learning to generate more-positive summaries

In order to complete Lab 3 please watch the below given video carefully and do all the step as it is.

Lab.3.-.Fine-tune.FLAN-T5.with.reinforcement.learning.to.generate.more-positive.summaries.mov

Week 10 Solution According to College IP

Learn To Code With AI

Week 2:- Check your skills!

Q.1 Which language controls the styling of a web page?

Answer:- CSS

Q.2 What is the below code?
<p>Class</p>

Answer:- It's a HTML paragraph element

Q.3 What do we mean by the so-called "variables" in JavaScript?

Answer:- Variables are like containers that we use to store information

Q.4 What do we mean when we say that ChatGPT is "generative AI"?

Answer:- It means that the AI is able to generate new and original content

Q.5 What does it mean to deploy a website?

Answer:- It's the act of making it available to users via the world wide web

Q.6 What is GitHub?

Answer:- It's a platform for version control and source code management

ChatGPT for Beginners: Save time with Microsoft Excel

Assess Your Knowledge

Q.1 What are the potential benefits and applications of integrating ChatGPT with Excel, and how can it contribute to streamlining data-related tasks, analysis, and decision-making processes in various domains? (Select all that apply)

Answer:-
1. Help with writing and validating complex formulas
2. Assistance with standardizing and cleansing data
3. Conducting sentiment analysis in order to classify data

Q.2 In what ways can ChatGPT be utilized to address and resolve issues related to inconsistent date formats in Excel, and how does its functionality contribute to enhancing data organization and accuracy within the spreadsheet?

Answer:- By fixing inconsistent date formats within the ChatGPT console

Q.3 How does the use of formulas in ChatGPT contribute to the data cleansing process, and what specific advantages does it offer in terms of ensuring data accuracy, consistency, and improved data-driven decision-making in Excel?

Answer:- By generating formulas that can standardize, validate, and catogorize data

Q.4 In what ways can ChatGPT be utilized to facilitate the extraction of relevant text data from URLs, and what are the advantages of using its capabilities compared to traditional methods or existing web scraping tools when integrating this information into Excel for analysis and processing?

Answer:- By extracting text elements from URLs within the ChatGPT console like the root URL or page titles

Q.5 What are the limitations of ChatGPT when processing URLs, and what specific types of data extraction tasks might present challenges or be beyond the current capabilities of the system when attempting to extract information from webpages associated with the URLs?

Answer:- ChatGPT cannot extract images or videos from URLs

Q.6 To support decision-making processes and data-driven insights, what types of data can be effectively analyzed and classified based on sentiment analysis using ChatGPT?

Answer:- Textual data like customer reviews

Q.7 How should data analysts and professionals approach the ethical considerations and transparency when utilizing generated data? (Select all that apply)

Answer:-
1. By being transparent about the sources of data and methods of data generation
2. By ensuring data privacy and complying with relevant data protection regulations
3. By respecting the rights of data subjects, especially when dealing with sensitive data

Q.8 How does the strategic classification of data into groupings contribute to the overall data management and analysis process? (Select all that apply)

Answer:-
1. It improves data visualization
2. It enhances the ability to sort and filter data

Week 11 Solution According to College IP

ChatGPT Playground for Beginners: Intro to NLP AI

Assess Your Knowledge

Q.1 What is the goal of Natural Language Processing (NLP) in the field of AI?

Answer:- To read, decipher, understand, and make sense of human language in a valuable way

Q.2 You're tracking the operational cost of your Chef ChatGPT program, and realize that the number of tokens used has increased. How will this impact the cost of operating Chef ChatGPT?

Answer:- More tokens lead to a higher cost.

Q.3 You're tasked with designing a chatbot aimed at providing factual information about scientific topics. How would you adjust the 'temperature' parameter to ensure that the responses are accurate and less likely to be random?

Answer:- Set the temperature to a low value

Q.4 You are designing a chatbot that needs to stick closely to the provided conversation context and should avoid introducing unrelated ideas. Which parameter would be helpful to adjust, and how should it be adjusted?

Answer:- Increase the presence penalty.

Q.5 In what way does the 'Chat' feature in GPT Playground differ from the 'Complete' mode when it comes to providing context?

Answer:- 'Chat' allows for the injection of context through user and system roles, while 'Complete' uses a singular prompt.

Build AI Apps with ChatGPT, Dall-E, and GPT-4 (For Students Who have 3 Weeks in their course)

Week 1: AI Quiz

Q.1 When you increase the temperature, what does that do to the completion?

Answer:- Makes it less conservative

Q.2 Which of the following statements accurately describes the max_tokens property in the OpenAI API?

Answer:- It sets the maximum number of tokens that can be generated in the completion.

Q.3 Which of the following is TRUE about the OpenAI API?

Answer:- It allows us to access OpenAI models from within our applications.

Q.4 Which of the following correctly defines a 'prompt' in the OpenAI API?

Answer:- The input text provided to guide the AI's response.

Q.5 What is meant by the term 'Zero-shot' when we are creating prompts?

Answer:- A prompt consisting of a request but no examples.

Q.6 What is meant by the term 'Few-shot' when we are creating prompts?

Answer:- A prompt with one or more examples demonstrating what we are looking for in a completion.

Q.7 What information are we REQUIRED to give the OpenAI API to generate an image (do not include parameters which have a default value).

Answer:- 1. A description of the image.

Q.8 Which of the following is true about the createCompletions endpoint?

Answer:- The model property must be used.

Week 2: AI Quiz

Q.1 Which of these best describes an OpenAI model's behaviour?

Answer:- It has no memory of previous prompts, so all of the context of a conversation must be included in every prompt.

Q.2 What should happen when presence_penalty is increased?

Answer:- The model should talk about new topics more often.

Q.3 Which one of the following is true?

Answer:- When working with the createChatCompletions endpoint, the messages property must contain and array of objects.

Q.4 The frequency_penalty setting gives us some control over...

Answer:- how likely the model is to use the same words and phrases in a completion.

Q.5 Which of the following is true about the array we send to the API in the messages property.

Answer:- The first object in the array should contain instructions telling the model how we want it to behave.

Q.6 Which of these best describes a firebase 'snapshot'.

Answer:- A copy of all of the database data as it exists at that moment.

Week 3: AI Quiz

Q.1 Fine-tuning allows us to do which of the following?

Answer:- Train an OpenAI model on our own data.

Q.2 Which of the following is FALSE about the OpenAI CLI?

Answer:- It only fine-tunes the GPT-4 model.

Q,3 Which of the following is TRUE about the characters we include in a 'stop sequence'

Answer:- They will never be included in a completion.

Q.4 What does the n_epoch parameter do in OpenAI?

Answer:- It sets the number of times the training data will be cycled through when fine-tuning a model. More cycles tends to improve performance.

Q.5 We can help a model better understand our prompts by doing which one of the following.

Answer:- Using separators in our prompts such as '->' or '###'.

Q.6 Which of the following is TRUE.

Answer:- An API key stored in an env variable is visible on the front end.

Q.7 Which of the following is FALSE about data when fine-tuning.

Answer:- In terms of accuracy, there is no performance advantage in using a larger data set.

Build AI Apps with ChatGPT, Dall-E, and GPT-4 (For Students Who have 2 Weeks in their course)

Week 1: Test your AI Engineering knowledge

Q.1 Setting the temperature property to a higher number makes the modelā€¦

Answer:- provide answers which are more creative and daring.

Q.2 When working with the OpenAI API, the objects that are held in the messages array each have a role property, but what values can the role property hold?

Answer:-system, user, assistant

Q.3 Which of the following is true about tokens and credit when using the OpenAI API?

Answer:- Both the words in the prompt you send to the API and the data you get back count towards the total number of tokens used.

Q.4 What does the frequency_penalty setting do?

Answer:- It gives the developer some control over the likelihood of words and phrases being repeated.

Q.5 When asking the OpenAI API to create images, which property or properties are required.

Answer:- prompt

Week 12 & 13 Solution According to College IP

ChatGPT Advanced Data Analysis

Week 1:- Ice Breaker Exercises with ChatGPT Advanced Data Analysis

Q.1 You will need to download this data, represented as comma separated values, that was extracted from Vanderbilt's financial reports:

Use the "+" button to attach the CSV file that you downloaded to the prompt and enter this text into the prompt:

---------

Draw four visualizations for me that show me interesting things in this dataset. The visualization should show unexpected things based on higher education trends.

Write 2-3 paragraphs describing the visualizations and what they show.

---------

Cut/paste the 2-3 paragraphs that Code Interpreter produces describing the data in as the answer. Do not include the images.

Answer:-

The first visualization is a stacked bar chart showing the total fall enrollment for undergraduate and graduate students from 2017/2018 to 2021/2022. The chart reveals that total enrollment has been increasing steadily, with a more significant jump between 2019/2020 and 2020/2021. The second visualization is a line chart displaying the number of degrees conferred in the same period. The chart shows a fluctuation in the number of conferred degrees, with a slight decrease in 2019/2020 and a significant increase in 2020/2021, which is unexpected as the total enrollment increased during this period.
The third visualization is a scatter plot comparing the percentage increase in undergraduate tuition over the prior year and the yield rate for undergraduate admissions. The plot shows a positive correlation between the two variables, indicating that higher tuition increases are associated with higher yield rates. The fourth visualization is a line chart displaying the endowment per student from 2017 to 2021. The chart reveals a significant increase in endowment per student between 2019 and 2021, which is unexpected as the total enrollment also increased during this period. This suggests that Vanderbilt University's endowment has grown faster than its student population.

Q.2 Please download a PDF of the paper "A Prompt Pattern Catalog to Enhance Prompt Engineering with ChatGPT" from here: https://arxiv.org/abs/2302.11382

Use the "+" button to attach the PDF of the paper that you downloaded to the prompt and enter this text into the prompt:

---------

Please extract each page of this PDF to a plain text file. Then, manually read the first three pages and learn what a prompt pattern is. Don't worry if there are formatting issues, just do your best and proceed. Then, ask me to describe my job or interests. Use what I tell you to describe to me what a prompt pattern is assuming I have no background in computer science. Make sure and use concrete examples based on my job or interests to show how I could use these patterns. Make sure and write some sample prompt patterns that could be cut/pasted into Code Interpreter for me to try out. Each pattern should rely on a document or dataset relevant to me. Describe the purpose of the pattern, the problem it is trying to solve, what data the pattern needs and why, and then the prompt that will be used on the document.

---------

Cut/paste the paragraphs that ChatGPT Advanced Data Analysis produces describing prompt patterns for you as the answer.

Answer:-

A prompt pattern is a structured approach used in programming conversational large language models (LLMs) like ChatGPT to customize their outputs and interactions. In simpler terms, a prompt pattern is a set of instructions that you provide to an LLM to guide it in generating specific types of content or responses. For example, if you work in marketing, a prompt pattern could be designed to extract key insights from customer feedback data. The purpose of this pattern would be to help the LLM analyze customer sentiments and preferences from the dataset, requiring the data to include customer feedback and reviews. The prompt for this pattern could be: "Analyze the customer feedback data to identify common themes and sentiments. Provide a summary of the main issues raised by customers and any positive feedback trends."
Another example could be a prompt pattern for someone interested in sports analytics. This pattern could aim to extract statistics and trends from a sports performance dataset. The problem it solves is to help analyze player performance and team strategies based on historical data. The data needed would be the sports performance dataset containing player statistics, match outcomes, and team strategies. The prompt for this pattern could be: "Analyze the sports performance dataset to identify key player performance metrics and trends. Provide insights into player strengths, weaknesses, and correlations between performance metrics and match outcomes."
These sample prompt patterns demonstrate how you can use structured instructions to guide an LLM in analyzing specific datasets related to your job or interests. By providing clear prompts tailored to your domain, you can leverage the power of LLMs like ChatGPT to extract valuable insights and information from complex datasets.

Q.3 At the end of the conversation that you just did working with the paper "A Prompt Pattern Catalog to Enhance Prompt Engineering with ChatGPT", enter this prompt:

---------

Pick the ChatGPT Code Interpreter prompt pattern that you think would be most helpful to someone like me. Then, write a social media post about how you are taking the Coursera course "ChatGPT Code Interpreter by Jules White" and explain what Code Interpreter is, explain the problem the prompt pattern solves, what data you could upload with the prompt pattern, and what it would do for other people like me that would make their lives so much easier. Make the post exciting and have viral potential. Make sure readers have enough information to quickly cut/paste the pattern into Code Interpreter and know what to include with it in order to immediately take advantage of the prompt pattern.

----------

Cut/paste the social media post that it creates for you as the answer.

Answer:-

šŸ“šāœØExcited to share my latest learning experience with the Coursera course "ChatGPT Code Interpreter" by Jules White! This powerful tool allows you to use prompts to extract insights from documents and datasets, making it a game-changer for data analysis and problem-solving.
šŸ’”One prompt pattern that stood out to me is the "Visualization Generator" pattern. This pattern helps you create visualizations from data, making it easier to understand trends and patterns. To use it, simply upload your dataset and ask Code Interpreter to generate visualizations based on specific criteria.
šŸŒFor example, if you're interested in environmental trends, you could upload a dataset on air quality and ask Code Interpreter to create visualizations showing changes over time. This would make it easy to identify areas with the biggest improvements or declines in air quality, helping you make informed decisions.
šŸ¤ÆThe potential applications of this pattern are endless, from business to education to research. By making data more accessible and understandable, Code Interpreter can help us all make better decisions and solve complex problems.
šŸ”—To get started, simply cut and paste the following prompt into Code Interpreter: "Generate visualizations from this dataset based on the following criteria: [insert criteria here]". Then upload your dataset and watch the magic happen! #ChatGPTCodeInterpreter #DataAnalysis #Visualization #DataInsights #ProblemSolving #Coursera #JulesWhite

Week 1:- Use ChatGPT Advanced Data Analysis to Help You Find Inspiration for Using It

Q.1 Combine the file and prompt from the "Use ChatGPT Advanced Data Analysis to Help You Find Inspiration for Using It" exercise to find use cases for Excel files based on your personal life.

Cut/paste the output as the solution.

Answer:-

Title: Enhance Your Personal Life with Excel and ChatGPT
Description: ChatGPT, a powerful language model, can help you make the most of your Excel files in your personal life. Here are some use cases to inspire you:
Budget Tracker: Create a budget tracker in Excel and use ChatGPT to analyze your spending habits, identify trends, and suggest ways to save money.
Prompt: "Analyze my monthly spending data in this Excel file and provide insights on how to reduce expenses."
Fitness Tracker: Keep track of your workouts and progress in Excel, and use ChatGPT to interpret the data, calculate statistics, and provide personalized recommendations.
Prompt: "Evaluate my fitness data in this Excel file and suggest ways to improve my workout routine."
Health Diary: Monitor your health and well-being in Excel, and let ChatGPT help you identify patterns, correlations, and potential health issues.
Prompt: "Examine my health data in this Excel file and determine if there are any health concerns I should be aware of."
Travel Planner: Organize your travel plans in Excel and have ChatGPT generate an itinerary, suggest activities, and provide local information.
Prompt: "Create a travel itinerary based on my preferences and this Excel file containing my travel plans."
Investment Portfolio: Manage your investments in Excel and use ChatGPT to assess your portfolio, calculate returns, and offer advice on diversification.
Prompt: "Evaluate my investment portfolio in this Excel file and recommend ways to optimize it."
By combining Excel and ChatGPT, you can unlock the full potential of your data and make informed decisions in various aspects of your personal life.
What do you think? These use cases demonstrate how ChatGPT can help you make the most of your Excel files in your personal life. By providing clear prompts, you can harness the power of ChatGPT to analyze, interpret, and generate valuable insights from your data.

Q.2 Combine the file and prompt from the "Use ChatGPT Advanced Data Analysis to Help You Find Inspiration for Using It" exercise to find use cases for PowerPoint files based on your work duties.

Cut/paste the output as the solution.

Answer:-

Use Case: PowerPoint Presentations for Work Duties
Problem: Creating engaging and effective PowerPoint presentations for work-related tasks can be time-consuming and challenging.
Data: Upload a set of PowerPoint slides relevant to your work duties.
Prompt Pattern: "Enhance these PowerPoint slides for a more engaging and informative presentation, focusing on [specific area of improvement, e.g., visual design, content organization, storytelling]."
Example:
Visual Design: "Improve the visual design of this PowerPoint presentation by incorporating relevant images, icons, and charts to enhance the overall look and feel."
Content Organization: "Reorganize the content of this PowerPoint presentation to create a more logical flow and clearer hierarchy of information."
Storytelling: "Transform this PowerPoint presentation into a compelling story that engages the audience and effectively communicates the key messages."

Q.3 Combine the file and prompt from the "Use Code Interpreter to Help You Find Inspiration for Using It" exercise to find use cases for a Zip of image files to enhance your social media profile.

Answer:-

To enhance your social media profile, you can use a zip of image files and the power of ChatGPT Code Interpreter to generate captions, descriptions, or even analyze the content of the images to create a thematic series of posts. Here's a sample prompt pattern that you can use:
Prompt Pattern: Image Analysis and Captioning
Problem: You have a collection of images, and you want to create engaging social media posts with captions or descriptions that accurately represent the content of each image.
Data: A zip file containing images (JPEG, PNG, or other supported formats) that you want to analyze or caption.
Prompt: "Analyze the images in this zip file and generate captions or descriptions that accurately represent the content of each image. Ensure that the captions are engaging and suitable for social media platforms."

Q.4 In one of the prior Code Interpreter conversations around finding inspiration, please use the following prompt to generate a social media post describing the example use case:

---------

Pick the ChatGPT Code Interpreter use case that you think would be most helpful to someone like me. Then, write a social media post about how you are taking the Coursera course "ChatGPT Code Interpreter by Jules White" and explain what Code Interpreter is, explain the problem the use case solves, what data you could upload to support the use case, and what it would do for other people like me that would make their lives so much easier. Make the post exciting and have viral potential. Make sure readers have enough information to quickly implement the idea by cutting / pasting some things into Code Interpreter and know what to include with it in order to immediately take advantage of the idea.

----------

Cut/paste the social media post in as your answer.

Answer:-

šŸš€Transform your software development tasks with ChatGPT Code Interpreter! šŸ’»
I'm taking the "ChatGPT Code Interpreter" course by Jules White on Coursera and I'm thrilled to share my experience with you! šŸ“š
Code Interpreter is a powerful tool that uses conversational large language models (LLMs) like ChatGPT to automate software development tasks. It does this by using prompts, which are instructions given to the LLM to customize its outputs and interactions. šŸ¤–
For example, you can use Code Interpreter to generate a Python script that automates the deployment of a Python application to AWS. Simply provide the necessary information about your application, and Code Interpreter will ask you questions to gather the required information. Once it has enough information, it will generate the script for you! šŸ’”
To use Code Interpreter, simply upload your data (such as an Excel file containing information about your application) and provide a prompt that tells the LLM what you want it to do. Code Interpreter will then generate the desired output for you. šŸ“ˆ
By using Code Interpreter, you can save time and effort in your software development tasks, allowing you to focus on other important aspects of your work. Plus, it's easy to use and can be integrated directly into your preferred IDE! šŸ’¼
If you're interested in learning more about Code Interpreter and how it can benefit you, be sure to check out the "ChatGPT Code Interpreter" course on Coursera! šŸŒŸ
#ChatGPTCodeInterpreter #SoftwareDevelopment #Automation #AI #Coursera #JulesWhite

Week 1:- Data to Content

Q.1 Download this CSV file containing data extracted from Vanderbilt's 2022 Financial Report:

Generate four different interesting visualizations of the data.

You can use a series of prompts as shown below to incrementally read the data, generate the visualizations, save them to files, and then create the PowerPoint:

"Read and explain all of the columns in the attached CSV file."

"Create four interesting visualizations of this data that show the school's admissions rate and other indicators of success over time and try to use the Vanderbilt school colors. Draw trend lines on all charts."

"Save each of these visualizations as a separate image file for me to download."

"Create a PowerPoint presentation for me that has each of these images as separate slides."

When you are done, ask Code Interpreter to summarize the work it did for you with a prompt like this:

"Output CSV describing the process that you just performed starting from the data and going all the way to the production of the slides."

Now, copy/paste this CSV output as the answer to this question.

Answer:-

To incrementally read the data, generate visualizations, save them to files, and create a PowerPoint presentation, you can use a series of prompts. First, you would ask the AI to read and explain all the columns in the attached CSV file. Then, you would prompt it to create four interesting visualizations of the data that display the school's admissions rate. This approach leverages prompt engineering techniques to guide the AI in processing the data and producing the desired visual outputs efficiently

Q.2 Download this CSV file containing data extracted from Vanderbilt's 2022 Financial Report:

Generate an interesting social media post based on this data that is also related to what you do.You can use a series of prompts like this:

"Read and explain the data in the attached CSV file related to Vanderbilt University's 2022 finances."

"Ask me questions about what I do and then use my answers to create an interesting visualization of the data that I might be interested in."

"Find a really interesting insight in this data. Visualize the insight for me and save it as an image. Write a social media post explaining that you used prompts from the Coursera course 'ChatGPT Code Interpreter by Jules White' to create an interesting analysis of Vanderbilt's 2022 finances and include in the post the interesting thing seen in the visualization."

Submit the social media post as the answer to this question.

Answer:-

šŸ“ˆšŸ’”Excited to share a fascinating insight about Vanderbilt University's 2022 finances! Using prompts from the Coursera course 'ChatGPT Code Interpreter by Jules White', I discovered that the university's endowment per student has significantly increased between 2019 and 2021. This suggests that Vanderbilt's financial health is strong and growing. Check out the visualization below to see the trend for yourself! #VanderbiltFinances #ChatGPTCodeInterpreter #DataInsights
By using prompts to analyze the data, I was able to uncover this insight quickly and easily. The ChatGPT Code Interpreter is a powerful tool for data analysis, and I'm excited to continue exploring its capabilities! #DataAnalysis #AI #MachineLearning

Week 2:- Exploring Code Interpreter Use Cases

Q.1 Upload a document, such as something you have written, a PowerPoint presentation, a transcript from a recording of yourself talking on a subject, or something else that it can read for content ideas. Have Code Interpreter generate a set of four social media posts for you from the content. Make sure that Code Interpreter saves each post as a separate text file. When it is done, have it zip up all of the files for you to download.

Cut/paste two of the social media posts into the answer.

Answer:-

The document discusses the importance of prompt engineering in conversing effectively with large language models (LLMs) like ChatGPT. Prompts are instructions given to LLMs to customize their outputs and interactions, acting as a form of programming to enhance the quality of generated content. The paper introduces a catalog of prompt patterns that provide reusable solutions to common problems faced when working with LLMs. These prompt patterns are analogous to software patterns, offering structured approaches to tailor LLM outputs and interactions effectively
1
.
Prompt patterns are crucial in prompt engineering, offering a systematic way to program LLMs for various tasks. They provide a codified approach to customizing LLM outputs and interactions, enhancing the ability to enforce constraints, include relevant information, and change interaction formats to solve specific problems effectively. The document outlines the structure and key ideas of prompt patterns, emphasizing the importance of fundamental contextual statements to communicate key ideas clearly and intuitively to users
1
.
The catalog of prompt patterns includes categories like Input Semantics, Output Customization, Error Identification, Prompt Improvement, and Interaction. Each category contains specific prompt patterns aimed at addressing different aspects of working with LLMs, such as creating custom languages for LLM understanding, automating output generation, fact-checking, refining prompts, and managing context during interactions. These patterns provide concrete guidance on how to structure prompts to achieve desired outcomes when working with conversational LLMs

Q.2 Question 2

Upload one or more images and have Code Interpreter create copies of each image in multiple different sizes. Have Code Interpreter create a CSV file with a catalog of the images and the transformations applied to the images.

Copy and paste just the prompts, not the images or outputs, that you used to complete the process as the answer.

Answer:-

Prompt 1:
"Read and explain the data in the attached CSV file related to Vanderbilt University's 2022 finances."
Prompt 2:
"Ask me questions about what I do and then use my answers to create an interesting visualization of the data that I might be interested in."
Prompt 3:
"Find a really interesting insight in this data. Visualize the insight for me and save it as an image. Write a social media post explaining that you used prompts from the Coursera course 'ChatGPT Code Interpreter by Jules White' to create an interesting analysis of Vanderbilt's 2022 finances and include in the post the interesting thing seen in the visualization."
Prompt 4:
"Create a PowerPoint presentation for me that has each of these images as separate slides."
Prompt 5:
"Output CSV describing the process that you just performed starting from the data and going all the way to the production of the slides."

Week 3:- Problem Solving & Question Generation

Q.1 Ask Code Interpreter to give you 5 different ways to solve a problem that it is important to you. Ask it for concrete ideas on how to solve the problem.

Cut/paste the answer from Code Interpreter as the solution.

Answer:-

Prompt 1:
"Read and explain the data in the attached CSV file related to Vanderbilt University's 2022 finances."
Prompt 2:
"Ask me questions about what I do and then use my answers to create an interesting visualization of the data that I might be interested in."
Prompt 3:
"Find a really interesting insight in this data. Visualize the insight for me and save it as an image. Write a social media post explaining that you used prompts from the Coursera course 'ChatGPT Code Interpreter by Jules White' to create an interesting analysis of Vanderbilt's 2022 finances and include in the post the interesting thing seen in the visualization."
Prompt 4:
"Create a PowerPoint presentation for me that has each of these images as separate slides."
Prompt 5:
"Output CSV describing the process that you just performed starting from the data and going all the way to the production of the slides."

Q.2 You are going to better prepare for your next meeting or class. Upload a document or presentation and have Code Interpreter read and give you 10 great questions related to the content.

Cut/paste Code Interpreter's response as the answer.

Answer:-

The document titled "A Prompt Pattern Catalog to Enhance Prompt Engineering with ChatGPT" discusses the importance of prompt engineering in effectively interacting with large language models (LLMs) like ChatGPT. It introduces prompt patterns as reusable solutions to common problems faced when conversing with LLMs, providing a framework for structuring prompts to solve various issues across different domains. The paper emphasizes the significance of prompts in customizing LLM outputs and interactions, showcasing the power of prompts beyond conventional programming tasks. It also highlights the potential for prompts to create new interaction paradigms and facilitate self-adaptation, underscoring the value of prompt engineering in enhancing the capabilities of LLMs

Week 4:- AI Planning

Q.1 Ask Code Interpreter to generate a step-by-step plan to solve a problem and save it as a file.

Cut/paste the plan in as the answer.

Answer:-

Prompt Pattern: Visualization Generator
Purpose: To create visualizations from data in a dataset.
Problem: Analyzing data in a dataset can be challenging, especially when trying to identify trends or patterns. Visualizations can help make the data more accessible and easier to understand.
Data needed: A dataset containing the data to be visualized.
Prompt: "Create a visualization of the data in this dataset that highlights any trends or patterns. Use the school colors, Vanderbilt blue and gold, in the visualization."
This prompt pattern can be used to generate visualizations of data in a dataset, making it easier to identify trends and patterns. The prompt includes instructions to use the school colors, Vanderbilt blue and gold, to make the visualization more visually appealing and consistent with the school's branding.
Prompt Pattern: Data Insight Finder
Purpose: To identify interesting insights in a dataset.
Problem: Analyzing data in a dataset can be time-consuming, and it can be challenging to identify interesting insights without guidance.
Data needed: A dataset containing the data to be analyzed.
Prompt: "Find an interesting insight in this dataset and visualize it for me. Use the school colors, Vanderbilt blue and gold, in the visualization."
This prompt pattern can be used to identify interesting insights in a dataset and visualize them for easier understanding. The prompt includes instructions to use the school colors, Vanderbilt blue and gold, to make the visualization more visually appealing and consistent with the school's branding.
Prompt Pattern: Social Media Post Writer
Purpose: To generate social media posts based on data in a dataset.
Problem: Writing social media posts can be time-consuming, and it can be challenging to come up with interesting content without guidance.
Data needed: A dataset containing the data to be used in the social media posts.
Prompt: "Generate four social media posts for me based on the data in this dataset. Make sure each post is engaging and includes a visualization of the data."
This prompt pattern can be used to generate social media posts based on data in a dataset, making it easier to create engaging content. The prompt includes instructions to include a visualization of the data in each post to make it more visually appealing and easier to understand.
Prompt Pattern: PowerPoint Presenter
Purpose: To create a PowerPoint presentation based on data in a dataset.
Problem: Creating a PowerPoint presentation can be time-consuming, and it can be challenging to create a visually appealing and informative presentation without guidance.
Data needed: A dataset containing the data to be used in the PowerPoint presentation.
Prompt: "Create a PowerPoint presentation for me that includes visualizations of the data in this dataset. Make sure the presentation is visually appealing and easy to understand."
This prompt pattern can be used to create a PowerPoint presentation based on data in a dataset, making it easier to create a visually appealing and informative presentation. The prompt includes instructions to include visualizations of the data in the presentation to make it more visually appealing and easier to understand.

Q.2 Now, have Code Interpreter execute your plan.

Cut/paste the prompt you used to get Code Interpreter to execute your plan in as the answer.

Answer:-

The document provided discusses the concept of prompt engineering in the context of conversing with large language models (LLMs) like ChatGPT. Prompts are instructions given to LLMs to customize their outputs and interactions, essentially programming them to generate specific content. Prompt patterns are introduced as reusable solutions to common problems faced when working with LLMs, similar to software patterns. These patterns aim to structure prompts effectively to achieve various output and interaction goals. The document compares software patterns with prompt patterns, highlighting the importance of documenting prompt patterns to enhance the interaction with LLMs in different contexts. It also discusses the structure and components of prompt patterns, emphasizing the need for clear and concise communication to users who may not be programmers. Additionally, it provides examples of prompt patterns, such as the Output Automater pattern, which instructs LLMs to generate automation artifacts like scripts to automate tasks. The document underscores the significance of engineering prompts to go beyond simple text or code generation, enabling LLMs to accomplish diverse tasks and interactions through well-crafted prompts

Week 5:- Outlining for Content

Q.1 Have Code Interpreter write an outline for a presentation that you are going to give. The initial outline should have one bullet item per slide. Incrementally build out the outline so that it specifies what should go on each slide and stores the outline for each slide in a separate file.

Cut/paste the contents of one of these outlines in as the answer.

Answer:-

Here is an outline for a presentation about prompt patterns for conversational large language models (LLMs):
Introduction to prompt patterns
Definition and purpose
Comparison to software patterns
Categories of prompt patterns
Output Customization
Output Automater pattern
Persona pattern
Visualization Generator pattern
Recipe pattern
Template pattern
Error Identiļ¬cation
Fact Check List pattern
Reļ¬‚ection pattern
Prompt Improvement
Question Reļ¬nement pattern
Alternative Approaches pattern
Cognitive Veriļ¬er pattern
Refusal Breaker pattern
Evaluating Means for Deļ¬ning a Prompt Patternā€™s Structure and Ideas
Challenges of deļ¬ning a prompt patternā€™s structure
Possible approaches for deļ¬ning a prompt patternā€™s structure
Importance of clear and concise communication
Example Implementations
Sample prompts for each pattern
Explanation of how the prompts are worded in practice
Consequences
Pros and cons of applying each pattern
Guidance on adapting the prompt to different contexts
Conclusion
Summary of the importance and benefits of prompt patterns
Future directions for research and development
This outline provides a comprehensive overview of the concept of prompt patterns and their applications in conversational LLMs. Each section includes specific examples and implementation details to help the audience understand the practical applications of these patterns. The presentation concludes with a summary of the key takeaways and future directions for research and development in this area.

Q.2 Using the outline files that you just created, have Code Interpreter turn one of the outline for one of the slides into 3-5 paragraphs and save it as a separate file.

Cut/paste the paragraphs as your answer.

Answer:-

The prompt pattern catalog introduced in the paper is a collection of reusable solutions to common problems faced when conversing with conversational large language models (LLMs) like ChatGPT. These patterns are structured prompts that help users customize LLM outputs and interactions, similar to software patterns that provide reusable solutions for software development problems. The catalog includes prompt patterns for input semantics, output customization, error identification, prompt improvement, and interaction.
Input semantics patterns focus on defining the input format and context for LLMs. These patterns include the Input Definition pattern, which specifies the input format and expected data types, and the Input Context pattern, which provides context to the LLM about the input data.
Output customization patterns help users tailor the types, formats, structure, or other properties of the output generated by the LLM. These patterns include the Output Format pattern, which specifies the format of the output, and the Output Structure pattern, which defines the structure of the output.
Error identification patterns focus on identifying and resolving errors in the output generated by the LLM. These patterns include the Error Detection pattern, which identifies errors in the output, and the Error Correction pattern, which corrects errors in the output.
Prompt improvement patterns help users improve the quality of the input and output. These patterns include the Question Refinement pattern, which refines user questions to generate better output, and the Alternative Approaches pattern, which suggests alternative approaches to solving a problem.
Interaction patterns focus on managing the interaction between the user and the LLM. These patterns include the Interaction Flow pattern, which defines the flow of the conversation, and the Interaction Context pattern, which provides context to the LLM about the conversation.
The paper also discusses the challenges of defining a prompt pattern's structure and ideas, including the need for clear and concise communication to users who may not be programmers. It suggests several possible approaches for defining a prompt pattern's structure, including diagrams and grammars for a prompt language. However, the paper notes that grammars can be challenging to define due to the nuanced ways that components of a prompt can be expressed in text or symbols.
In summary, the prompt pattern catalog introduced in the paper provides a collection of reusable solutions to common problems faced when conversing with conversational LLMs. These patterns help users customize LLM outputs and interactions, improve the quality of the input and output, and manage the interaction between the user and the LLM. The paper also discusses the challenges of defining a prompt pattern's structure and suggests several possible approaches for defining a prompt pattern's structure.

END of The Courses!

About

This repository contains all the coursera answers week wise for the subject INT426

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published