Here’s a list of all the pages on this site:
+Here’s a list of all the pages on this site:
- - - - -diff --git a/web/_layouts/custom.html b/web/_layouts/custom.html index 521e76e..e4bc920 100644 --- a/web/_layouts/custom.html +++ b/web/_layouts/custom.html @@ -1,25 +1,44 @@ --- layout: page --- - -
+ + + {{ content }} + + - \ No newline at end of file diff --git a/web/_sass/_exercises.scss b/web/_sass/_exercises.scss new file mode 100644 index 0000000..828a599 --- /dev/null +++ b/web/_sass/_exercises.scss @@ -0,0 +1,16 @@ +/* CSS */ +.section { + display: none; + } + +.section.active { + display: block; +} + +.step { + display: none; +} + +.step.active { + display: block; +} \ No newline at end of file diff --git a/web/_site/assets/css/custom.css b/web/_site/assets/css/custom.css index 8406b4e..026cdb3 100644 --- a/web/_site/assets/css/custom.css +++ b/web/_site/assets/css/custom.css @@ -17,3 +17,11 @@ pre .copy-button { position: absolute; top: 0; right: 0; padding: 2px 5px; backg #sidebar-index a { display: block; margin-bottom: 0.5em; } @media screen and (max-width: 1200px) { #sidebar-index { display: none; } } +/* CSS */ +.section { display: none; } + +.section.active { display: block; } + +.step { display: none; } + +.step.active { display: block; } diff --git a/web/_site/feed.xml b/web/_site/feed.xml index aa599c9..0ee383d 100644 --- a/web/_site/feed.xml +++ b/web/_site/feed.xml @@ -1 +1 @@ -Here’s a list of all the pages on this site:
+Here’s a list of all the pages on this site:
- - - - -By Florian Follonier - Cloud Solution Architect Data & AI - Microsoft
+By Florian Follonier - Cloud Solution Architect Data & AI - Microsoft
-& Juan Manuel Servera - Cloud Solution Architect App Inno - Microsoft
+& Juan Manuel Servera - Cloud Solution Architect App Inno - Microsoft
-Welcome to the Prompt Engineering Hands-on Lab!
+Welcome to the Prompt Engineering Hands-on Lab!
-We designed this guide to assist you in understanding and utilizing Microsoft’s AI companion, Copilot, in a practical and engaging manner.
+We designed this guide to assist you in understanding and utilizing Microsoft’s AI companion, Copilot, in a practical and engaging manner.
-Throughout this lab, we will delve into the world of AI-powered chat, explore diverse types of prompts, and learn how to guide an AI language model to generate the desired content. The exercises are designed to be hands-on, allowing you to learn by doing and applying your newfound skills in real-time.
+Throughout this lab, we will delve into the world of AI-powered chat, explore diverse types of prompts, and learn how to guide an AI language model to generate the desired content. The exercises are designed to be hands-on, allowing you to learn by doing and applying your newfound skills in real-time.
-Our goal is to equip you with the skills and understanding to effectively use AI tools like Copilot in your own projects, whether they are for business, education, or personal use.
+Our goal is to equip you with the skills and understanding to effectively use AI tools like Copilot in your own projects, whether they are for business, education, or personal use.
-In the first exercise, you’ll get to know how Copilot works by using simple prompts. In the second exercise, you will use Copilot to create different things for a made-up space startup. This will involve generating a company name, mission statement, logo, and even a business plan, all using different prompting techniques.
+In the first exercise, you’ll get to know how Copilot works by using simple prompts. In the second exercise, you will use Copilot to create different things for a made-up space startup. This will involve generating a company name, mission statement, logo, and even a business plan, all using different prompting techniques.
-By the end of this lab, you will have a comprehensive understanding of how to interact with and guide AI language models, and how to use them as a powerful tool in your own projects.
+By the end of this lab, you will have a comprehensive understanding of how to interact with and guide AI language models, and how to use them as a powerful tool in your own projects.
-Now, let’s dive in and get started with our first exercise!
+Now, let’s dive in and get started with our first exercise!
+For this exercise we are going to use Microsoft Copilot, your everyday AI companion, providing AI-powered chat for the web. Open it at https://www.bing.com/chat and configure the conversation style to “More creative”, because today we are going to have an ideation session and, as Linus Pauling said once, the best way to have a good idea is to have lots of ideas.
+For this exercise we are going to use Microsoft Copilot, your everyday AI companion, providing AI-powered chat for the web. Open it at https://www.bing.com/chat and configure the conversation style to “More creative”, because today we are going to have an ideation session and, as Linus Pauling said once, the best way to have a good idea is to have lots of ideas.
- + +Write the following prompt in the “Ask me anything…” textbox:
+Write the following prompt in the “Ask me anything…” textbox:
-The space is
+ The space is
-This is the most basic prompt and is called a seed text prompt. A seed text prompt is a simple, open-ended statement or question that serves as a starting point for AI-generated content.
+ This is the most basic prompt and is called a seed text prompt. A seed text prompt is a simple, open-ended statement or question that serves as a starting point for AI-generated content.
-What was the output that Copilot generated? Depending on the day, it can generate a long dissertation about the vastness and complexity of space. It is just filling the emptiness…
+ What was the output that Copilot generated? Depending on the day, it can generate a long dissertation about the vastness and complexity of space. It is just filling the emptiness…
-If we want a specific answer, we need to ask a specific question. The more detailed our question, the better the answer.
+ If we want a specific answer, we need to ask a specific question. The more detailed our question, the better the answer.
-Before starting with the new prompt, click on “New topic” button, this will clear the context to start from scratch.
+ Before starting with the new prompt, click on “New topic” button, this will clear the context to start from scratch.
-
+
-If you write this more explicit prompt:
+ If you write this more explicit prompt:
-Complete this sentence:
+ Complete this sentence:
The space is
-You will get a shorter, more concise answer.
+ You will get a shorter, more concise answer.
+
Next, we have conditional prompts. You use these to tell the AI to create content based on certain rules or conditions. Try this one:
+Next, we have conditional prompts. You use these to tell the AI to create content based on certain rules or conditions. Try this one:
-Draft a story about a new company building a spaceship to fly to Mars, founded by an astronaut, a few former NASA and ESA engineers, and an awarded cook.
+ Draft a story about a new company building a spaceship to fly to Mars, founded by an astronaut, a few former NASA and ESA engineers, and an awarded cook.
-Multiple Choice Prompt
+
In multiple choice prompts you present the AI with several options from which it must choose or recommend the most appropriate one based on the context or criteria provided.
+What do we need to fly to Mars?
+ In multiple choice prompts you present the AI with several options from which it must choose or recommend the most appropriate one based on the context or criteria provided.
+
+ What do we need to fly to Mars?
A) a giant Mars chocolate bar
B) a DeLorean
C) a spaceship
D) a private jet
+
The previous examples are simple Zero-shot prompts. In these prompts we do not provide any example, we directly instruct the model to answer a question and we rely on the training data to obtain the answer. (Keep in mind that nowadays Bing chat has access to the internet, and it is also using some other techniques like meta-prompting, function calling, content filtering and RAG, so this is not completely true, but for this exercise we will just ignore this).
+The previous examples are simple Zero-shot prompts. In these prompts we do not provide any example, we directly instruct the model to answer a question and we rely on the training data to obtain the answer. (Keep in mind that nowadays Bing chat has access to the internet, and it is also using some other techniques like meta-prompting, function calling, content filtering and RAG, so this is not completely true, but for this exercise we will just ignore this).
-Classify the text into neutral, negative, or positive.
+ Classify the text into neutral, negative, or positive.
Text: I think the space is cool.
Sentiment:
-This should give you a positive sentiment, but you can challenge the LLM to fix its answer if you feel it is not the right one:
+ This should give you a positive sentiment, but you can challenge the LLM to fix its answer if you feel it is not the right one:
-Are you sure? What if the word cool was factual in this sentence?
+ Are you sure? What if the word cool was factual in this sentence?
-Now Copilot must have given this a second thought and understood the nuances.
+ Now Copilot must have given this a second thought and understood the nuances.
-Exercise 1 Conclusion
+
-+Excellent job on completing the first exercise! Remember, there is no ‘one-size-fits-all’ approach to using AI. Feel free to experiment with different types of prompts to see what results you get. The more you experiment, the more you will understand how to guide Copilot effectively. If you need some more examples for each type of prompt, check the example guide at the end of this document.
-
Excellent job on completing the first exercise!
--+As we dive into the second exercise, keep in mind that this is your opportunity to get creative and experiment. Try different prompt techniques, adjust your instructions, and see how Copilot responds. Remember, there is no right or wrong way to do this – the goal is to learn and have fun!
-
+-Remember, there is no ‘one-size-fits-all’ approach to using AI. Feel free to experiment with different types of prompts to see what results you get. The more you experiment, the more you will understand how to guide Copilot effectively. If you need some more examples for each type of prompt, check the example guide at the end of this document.
+
You may have noticed by now that Copilot can give you up to thirty answers in a session:
+This means that after iterating 30 times you will need to start again from scratch. So, before starting this second exercise, click on the “New topic” button to start a new session.
+In this exercise, you will use Copilot to generate various elements of your own space startup, such as the name, the mission statement, the logo, and the business plan. You will also learn how to use different prompting techniques, such as few-shot prompts, chain-of-thought prompts, and tree-of thought-prompts, to guide the generation process and produce high-quality results.
++-As we dive into the second exercise, keep in mind that this is your opportunity to get creative and experiment. Try different prompt techniques, adjust your instructions, and see how Copilot responds. Remember, there is no right or wrong way to do this – the goal is to learn and have fun!
+
Usually, Large Language Model (LLM) chat apps use a System Message (usually hidden to you) and templates to set the rules of the generation. We cannot change the system message for Copilot, but we can provide a message to define our own context for the session.
+You may have noticed by now that Copilot can give you up to thirty answers in a session:
-In this exercise, we want you to be the CEO of a new spaceship startup, and Copilot will be your executive assistant, which will help you shape your ideas. Write a prompt like this to set the context, but remember to tailor it to your own preferences (i.e.: you do not need to be an awarded cook 😉):
+ -You are an executive assistant to an awarded cook that now is the CEO of a cutting-edge spaceship startup; your role is multifaceted and pivotal. You possess a deep understanding of aerospace engineering, which allows you to contribute significantly to the design and logistics of human spaceships bound for Mars. Your strategic planning skills enable you to assist in setting long-term goals, allocating resources effectively, and ensuring that every project milestone aligns with the company’s ambitious vision.
+ This means that after iterating 30 times you will need to start again from scratch. So, before starting this second exercise, click on the “New topic” button to start a new session.
+
+ In this exercise, you will use Copilot to generate various elements of your own space startup, such as the name, the mission statement, the logo, and the business plan. You will also learn how to use different prompting techniques, such as few-shot prompts, chain-of-thought prompts, and tree-of thought-prompts, to guide the generation process and produce high-quality results.
+
Usually, Large Language Model (LLM) chat apps use a System Message (usually hidden to you) and templates to set the rules of the generation. We cannot change the system message for Copilot, but we can provide a message to define our own context for the session.
+ +In this exercise, we want you to be the CEO of a new spaceship startup, and Copilot will be your executive assistant, which will help you shape your ideas. Write a prompt like this to set the context, but remember to tailor it to your own preferences (i.e.: you do not need to be an awarded cook 😉):
+ +You are an executive assistant to an awarded cook that now is the CEO of a cutting-edge spaceship startup; your role is multifaceted and pivotal. You possess a deep understanding of aerospace engineering, which allows you to contribute significantly to the design and logistics of human spaceships bound for Mars. Your strategic planning skills enable you to assist in setting long-term goals, allocating resources effectively, and ensuring that every project milestone aligns with the company’s ambitious vision.
Your creative input is crucial in ideating innovative solutions and designing a corporate image that encapsulates the startup’s spirit. You’re adept at translating complex engineering concepts into comprehensive strategies, facilitating effective communication across departments. Your project management expertise ensures that all initiatives are executed flawlessly, reflecting the company’s commitment to pioneering space exploration.
Your personal traits are what make you extraordinary. Your passion for space, visionary outlook, and proactive nature equips you to anticipate challenges and address them with resilience. Detail-oriented and adaptable, you maintain composure under pressure, making you an indispensable asset to the CEO and the entire organization as you collectively strive to achieve the monumental task of shipping a human spaceship to Mars.
-This was again a zero-Shot prompt, but we are just establishing the context.
+This was again a zero-Shot prompt, but we are just establishing the context.
+ +To generate a name for your space startup, you can use a few-shot prompt, which is a type of prompt that provides some examples of the desired output, followed by an empty line where Bing Chat will fill in a new output based on the examples. For example, you can write:
+To generate a name for your space startup, you can use a few-shot prompt, which is a type of prompt that provides some examples of the desired output, followed by an empty line where Bing Chat will fill in a new output based on the examples. For example, you can write:
-Some possible names for a space startup are:
+ Some possible names for a space startup are:
- SpaceX
- Blue Origin
@@ -186,73 +221,88 @@ Step 2: Generate a name f
Generate three names for our space startup that builds and sends human spaceships to Mars and show the special background of our CEO:
-You can try different examples or add more details to the prompt, such as the type of service or product your startup offers, to get different results.
+ You can try different examples or add more details to the prompt, such as the type of service or product your startup offers, to get different results.
+
+
Sending a spaceship with humans is tough. But as a startup, we must show investors that we’ve done our math. You can use chain-of-thought prompting to enforce the model to think about all the details. It involves guiding the AI to think through the problem step-by-step, leading it to the desired output:
+Sending a spaceship with humans is tough. But as a startup, we must show investors that we’ve done our math. You can use chain-of-thought prompting to enforce the model to think about all the details. It involves guiding the AI to think through the problem step-by-step, leading it to the desired output:
-Calculate the costs of shipping a spaceship to Mars with a crew of 6, this first mission is a one-way trip, so we need to consider the travel time and how to send all the materials needed to survive on Mars. Let’s think step by step.
+ Calculate the costs of shipping a spaceship to Mars with a crew of 6, this first mission is a one-way trip, so we need to consider the travel time and how to send all the materials needed to survive on Mars. Let’s think step by step.
This part of the project is called Budget.
-Now that you have calculated the costs of the mission, you might want to experiment with different scenarios. What if the crew size changed? Or the distance to Mars varied? Feel free to play around with these variables and see how the costs change.
+ Now that you have calculated the costs of the mission, you might want to experiment with different scenarios. What if the crew size changed? Or the distance to Mars varied? Feel free to play around with these variables and see how the costs change.
-Step 4: Generate a business plan
+
As you will be challenged by the investors when you present your plan, you can use a tree-of-thought prompting technique. This technique helps the model generate different ideas and choose the best one from them.
+As you will be challenged by the investors when you present your plan, you can use a tree-of-thought prompting technique. This technique helps the model generate different ideas and choose the best one from them.
-I have selected the name for the startup: [PUT THE NAME YOU SELECTED HERE].
+ I have selected the name for the startup: [PUT THE NAME YOU SELECTED HERE].
Imagine our top three engineers are discussing three different ideas for our startup's business plan. Generate them and pick the best one.
-Prompt refinement and iteration: ask for additional improvements to the content generated. For example, generate the full plan based on that idea:
+ Prompt refinement and iteration: ask for additional improvements to the content generated. For example, generate the full plan based on that idea:
-Now, based on the executive summary and budget, please complete the business plan with the following sections: the executive summary, the market analysis, the service description, the sales strategy, and the operations plan.
+ Now, based on the executive summary and budget, please complete the business plan with the following sections: the executive summary, the market analysis, the service description, the sales strategy, and the operations plan.
This part of the project work is called Business Plan.
-Step 5: Generate a mission statement for your space startup
+
Now that we have extensive content, we can generate a mission statement for your space startup. For example, you can write:
+This part of the project work is called Mission Statement.
+ Now that we have extensive content, we can generate a mission statement for your space startup. For example, you can write:
+
+ This part of the project work is called Mission Statement.
Write a mission statement that reflects our objectives and the values of the company.
-Step 6: Create a logo for your company
+
Microsoft Copilot in Bing is a multimodal model, this means that it can also generate and understand pictures and audio. In this case the LLM already has a lot of information to work with, so we don’t need to provide lots of details, just indicate what we want in a clear statement. Let’s ask Copilot to generate a logo for our company:
+Microsoft Copilot in Bing is a multimodal model, this means that it can also generate and understand pictures and audio. In this case the LLM already has a lot of information to work with, so we don’t need to provide lots of details, just indicate what we want in a clear statement. Let’s ask Copilot to generate a logo for our company:
-This part of the project is called Company Branding
+ This part of the project is called Company Branding
Create a monochromatic logo in red for our company that reflects the mission and values of our company.
-
- Did you notice that Copilot crafted the prompt for DALL·E? You did not need to explain again that it was a spaceship company going to Mars, because it used the chains it already had. You can also go directly to https://www.bing.com/images/create to generate images with your own prompts.
-
+
+ Did you notice that Copilot crafted the prompt for DALL·E? You did not need to explain again that it was a spaceship company going to Mars, because it used the chains it already had. You can also go directly to https://www.bing.com/images/create to generate images with your own prompts.
+
+
+
In this step, you will use the AI to review and summarize all the content generated during the previous exercises. This step is crucial in ensuring that all the elements of your project are coherent and aligned with your objectives.
+In this step, you will use the AI to review and summarize all the content generated during the previous exercises. This step is crucial in ensuring that all the elements of your project are coherent and aligned with your objectives.
-Here’s how to proceed:
+Here’s how to proceed:
-Remember, as with all AI interactions, you may need to refine your prompts or ask for additional improvements to get the desired output. Don’t be afraid to experiment and iterate until you get the results you are looking for.
+Remember, as with all AI interactions, you may need to refine your prompts or ask for additional improvements to get the desired output. Don’t be afraid to experiment and iterate until you get the results you are looking for.
-Here’s the suggested prompt:
+Here’s the suggested prompt:
-Let's review all the text we wrote for the project. Can you give me the last edited copy for these parts of the project:
+ Let's review all the text we wrote for the project. Can you give me the last edited copy for these parts of the project:
* Business Plan
* Budget
@@ -267,129 +317,163 @@ Step 7: pulling it all together
Description
-Conclusion
-
-Congratulations on completing this lab! Remember, the key to mastering AI is practice and experimentation. Don’t be afraid to try new things, make mistakes and learn from them. Keep experimenting with different prompts and techniques and see where your creativity takes you with AI!
-
-Throughout this lab, you have gained hands-on experience in crafting and refining prompts, guiding AI language models to generate the desired content, and using AI tools for practical applications.
-
-You have learned about various types of prompts, including seed text prompts, conditional prompts, multiple choice prompts, zero-shot prompts, and few-shot prompts. You have seen how these prompts can guide the AI model in diverse ways, from generating creative ideas to making detailed calculations.
-
-By creating elements for a fictional space startup, you have also seen how these techniques can be applied to real-world scenarios. Whether you are generating a company name, mission statement, business plan, or logo, you now have the skills to use AI tools effectively in your own projects.
-
-We hope you find this lab engaging and insightful. We encourage you to continue exploring and experimenting with AI tools like Copilot in your future projects. Remember, the possibilities are as vast as space itself.
-
-Happy prompting!
-
-Glossary
-
-
- - AI Companion: An artificial intelligence system designed to assist users in various tasks.
- - Prompt: A command or statement that guides the AI in generating content.
- - Seed Text Prompt: A simple, open-ended statement or question that serves as a starting point for AI-generated content.
- - Conditional Prompt: A type of prompt where you guide the AI to generate content based on certain conditions or criteria.
- - Multiple Choice Prompts: Prompts where the AI is presented with several options from which it must choose or recommend the most appropriate one.
- - Zero-shot Prompts: These prompts do not provide any example; they directly instruct the model to answer a question and rely on the training data to obtain the answer.
- - Few-shot Prompt: A type of prompt that provides some examples of the desired output, followed by an empty line where the AI will fill in a new output based on the examples.
- - Chain-of-thought Prompting: A technique that involves guiding the AI to think through the problem step-by-step, leading it to the desired output.
- - Tree-of-thought Prompting: A technique that helps the AI generate different ideas and choose the best one from them.
- - Multimodal Model: An AI model capable of understanding and generating several types of data, such as text, images, and audio.
- - System Message: A message that sets the rules for the generation process in AI chat apps.
- - Templates: Predefined formats or structures that guide the generation process in AI chat apps.
- - Context: The information that precedes the prompt and influences the AI’s response.
- - Session: A sequence of interactions with the AI model.
-
-
-These definitions are specific to this lab guide and the usage of Microsoft’s AI companion, Copilot. The definitions might vary slightly in different contexts or with different AI systems.
-
-Some more example prompts
-
-Here are a few more examples for each type of prompt mentioned in the guide:
-
-
- - Seed Text Prompt:
-
- - “Artificial Intelligence is”
- - “The future of space exploration lies in”
-
-
- - Conditional Prompt:
-
- - “Describe a day in the life of an astronaut training for a mission to Mars.”
- - “Imagine a scenario where an AI becomes the president of a country. Write a short story based on this.”
-
-
- - Multiple Choice Prompts:
-
- - “Which of the following programming languages is most suitable for data science?
+
Congratulations on completing this lab! Remember, the key to mastering AI is practice and experimentation. Don’t be afraid to try new things, make mistakes and learn from them. Keep experimenting with different prompts and techniques and see where your creativity takes you with AI!
+ +Throughout this lab, you have gained hands-on experience in crafting and refining prompts, guiding AI language models to generate the desired content, and using AI tools for practical applications.
+ +You have learned about various types of prompts, including seed text prompts, conditional prompts, multiple choice prompts, zero-shot prompts, and few-shot prompts. You have seen how these prompts can guide the AI model in diverse ways, from generating creative ideas to making detailed calculations.
+ +By creating elements for a fictional space startup, you have also seen how these techniques can be applied to real-world scenarios. Whether you are generating a company name, mission statement, business plan, or logo, you now have the skills to use AI tools effectively in your own projects.
+ +We hope you find this lab engaging and insightful. We encourage you to continue exploring and experimenting with AI tools like Copilot in your future projects. Remember, the possibilities are as vast as space itself.
+ +Happy prompting!
+These definitions are specific to this lab guide and the usage of Microsoft’s AI companion, Copilot. The definitions might vary slightly in different contexts or with different AI systems.
+Here are a few more examples for each type of prompt mentioned in the guide:
+ +Remember to tailor the prompts to your specific needs and goals, and do not be afraid to experiment with different formats and styles to get the best results.
+ + +Remember to tailor the prompts to your specific needs and goals, and do not be afraid to experiment with different formats and styles to get the best results.
+