diff --git a/README.md b/README.md
index 2748da0..d43d1a1 100644
--- a/README.md
+++ b/README.md
@@ -50,7 +50,7 @@ Throughout this course you'll find many code examples and exercises, so we encou
1. Select the **Fork** button in the upper right-hand corner of the repository or select this button:
[](https://github.com/microsoft/generative-ai-with-javascript/fork)
-2. Click the **Code** button in your forked repository, go to the **Codespaces** tab, and then choose **Create codespace**.
+2. Click the **Code** button in your forked repository, go to the **Codespaces** tab, and then choose **Create codespace**.
This will create a preconfigured online environment for you. You'll then be able to use [GitHub Models](https://github.com/marketplace/models) to run the code examples and interact with AI models for free, without any additional setup.
@@ -60,7 +60,7 @@ Throughout this course you'll find many code examples and exercises, so we encou
>
> Learn more about [GitHub Codespaces and GitHub Models concepts here](/docs/setup/README.md).
-### Lesson description
+### Lesson description
đŚ Each lesson includes:
@@ -69,7 +69,7 @@ Throughout this course you'll find many code examples and exercises, so we encou
- **Solutions** for each assignment and quiz.
- **Characters** you can interact with using our [companion app](./app), demonstrating Generative AI.
-## Lessons
+## Lessons
đď¸ Table of contents
@@ -84,7 +84,7 @@ Throughout this course you'll find many code examples and exercises, so we encou
New lessons will be added to the course over time, so stay tuned!
-## Keep learning
+## Keep learning
đ After completing this course, you can continue learning by exploring our additional resources.
diff --git a/docs/additional-resources.md b/docs/additional-resources.md
index 9ca76f9..840ed0a 100644
--- a/docs/additional-resources.md
+++ b/docs/additional-resources.md
@@ -45,4 +45,4 @@ The following code samples are available to help you get started with building y
If you're looking to connect with others, we have a community of AI enthusiasts, developers, and experts who are passionate about AI and are always willing to help.
-There's even a dedicated [#JavaScript channel](https://discordapp.com/channels/1113626258182504448/1237357005555892225) where you can ask questions, share your projects, and discuss your about your favorite topics.
+There's even a dedicated [#JavaScript channel](https://discordapp.com/channels/1113626258182504448/1237357005555892225) where you can ask questions, share your projects, and discuss about your favorite topics.
diff --git a/lessons/01-intro-to-genai/README.md b/lessons/01-intro-to-genai/README.md
index a34ccd5..5c27473 100644
--- a/lessons/01-intro-to-genai/README.md
+++ b/lessons/01-intro-to-genai/README.md
@@ -38,7 +38,7 @@ Your journey begins in 1860s London, where you assume the role of a skilled mech
### Into the maelstrom - London 1860
-In the heart of 1860s London, you are recognized as one of the most skilled mechanics of your time. Your workshop is tucked away in a narrow alley. The walls are lined with shelves overflowing with mechanical parts, blueprints, and half-finished projects.
+In the heart of 1860s London, you are recognized as one of the most skilled mechanics of your time. Your workshop is tucked away in a narrow alley. The walls are lined with shelves overflowing with mechanical parts, blueprints, and half-finished projects.
Your workbench, the heart of your workshop, is an organized mess.
@@ -68,7 +68,7 @@ Charles Babbage, the great mathematician and inventor of the difference engine,
After a 20-minute walk along the Thames, you finally arrive at the library where you find the door slightly open.
-It's dark and gloomy inside, the only light filtering through the grimy windows, casting eerie shadows on the walls.
+It's dark and gloomy inside, the only light filtering through the grimy windows, casting eerie shadows on the walls.
**You:** "Hello? Mr. Babbage?"
@@ -82,11 +82,11 @@ As your eyes adjust to the dim light, you notice a figure in the distance, wavin
Just as you step closer, a blinding flash erupts, and he vanishes.
-Left behind is a small metallic device spinning on the floor. You pick it up, its cool, smooth surface humming softly. It's unlike anything you've ever seen and yet strangely familiar, you feel a sense of power emanating from it.
+Left behind is a small metallic device spinning on the floor. You pick it up, its cool, smooth surface humming softly. It's unlike anything you've ever seen and yet strangely familiar, you feel a sense of power emanating from it.
-It resembles a tiny beetle, intricately designed, with three buttons: an up arrow, a down arrow, and a glowing red button. From its back, a small antenna extends, pulsing with energy.
+It resembles a tiny beetle, intricately designed, with three buttons: an up arrow, a down arrow, and a glowing red button. From its back, a small antenna extends, pulsing with energy.
-Compelled by curiosity, your fingers drift toward the red button. The moment you press it, the world around you shimmers, and colors swirl violently around you.
+Compelled by curiosity, your fingers drift toward the red button. The moment you press it, the world around you shimmers, and colors swirl violently around you.
Then, blackness, and a sense of falling.
@@ -96,7 +96,7 @@ Then, blackness, and a sense of falling.
### Alexandria 300 BC
-You awaken, disoriented. As your vision clears, an ancient city unfolds before youâbustling, vibrant, and alive.
+You awaken, disoriented. As your vision clears, an ancient city unfolds before youâbustling, vibrant, and alive.
People in togas move through the streets, their voices blending into a symphony of ancient dialects, air filled with the scent of exotic spices and the distant sound of merchants hawking their wares.
@@ -169,12 +169,12 @@ If you want to interact with Dinocrates, run the [Characters](/app/README.md) ap
-**Steps**:
+**Steps**:
1. Start a [](https://codespaces.new/microsoft/generative-ai-with-javascript)
2. Navigate to _/app_ in the repo root.
3. Locate the console and run `npm install` followed by `npm start`.
-4. Once it appears, select the "Open in Browser" button.
+4. Once it appears, select the "Open in Browser" button.
5. Chat with Dinocrates.
> [!NOTE]
@@ -260,13 +260,13 @@ Dinocrates overhears your conversation and adds:
- **Assistants and Agents** Assistants and agents can carry out more advanced instructions like leveraging tools to call APIs, run code, generate images and more. Advanced agents can carry out goals and carry out tasks autonomously.
-- **A content creation tool**:. A tool to generate blog posts and social media posts. Imagine creating campaigns in minutes instead of hours when an e-commerce site has a black Friday sale.
+- **A content creation tool**:. A tool to generate blog posts and social media posts. Imagine creating campaigns in minutes instead of hours when an e-commerce site has a black Friday sale.
-- **Code completion**: A code completion tool that can generate code snippets based on user input. This can be a huge time saver for developers, especially when working on repetitive tasks.
+- **Code completion**: A code completion tool that can generate code snippets based on user input. This can be a huge time saver for developers, especially when working on repetitive tasks.
- **Translation** â Translate text between languages with high accuracy.
-As you can see, these improvements can both help the front office and the back office of your app and company.
+As you can see, these improvements can both help the front office and the back office of your app and company.
Here's an example of a "chatbot application" in action:
@@ -294,7 +294,7 @@ Here's an example of a "chatbot application" in action:
### JavaScript ecosystem
-**You:** So ecosystems you said, I'm just taking notes here, what about JavaScript and how is it different from other ecosystems?
+**You:** So ecosystems you said, I'm just taking notes here, what about JavaScript and how is it different from other ecosystems?
**Time Beetle:** JavaScript is one of the most popular programming languages in the world in the 21st century. Here are a few reasons why it's so popular:
@@ -321,7 +321,7 @@ Here's an example of a "chatbot application" in action:
## Assignment â Helping Dinocrates
-To use a Large Language Model (LLM) to help Dinocrates with the lighthouse that we mentioned earlier in our story, weâll use something called prompts, a sentence to describe what you want. You can specify both the information you need and how you want it presented.
+To use a Large Language Model (LLM) to help Dinocrates with the lighthouse that we mentioned earlier in our story, weâll use something called prompts, a sentence to describe what you want. You can specify both the information you need and how you want it presented.
**Time Beetle:** Let's get started, let's use an LLM to research how you can build a lighthouse to help Dinocrates.
@@ -333,7 +333,7 @@ To use a Large Language Model (LLM) to help Dinocrates with the lighthouse that
**Time Beetle:** You probably want to ask me in a better way, so I can give you a better answer, about you know *cough* *cough* Light houses, Alexandria, 300 BC, Dinocrates, Lighthouse of Alexandria, etc.
-**You:** Got it, add more context to the prompt and then ask you.
+**You:** Got it, add more context to the prompt and then ask you.
**Time Beetle:** Yes, I'm waiting...
@@ -349,9 +349,9 @@ Visit [Microsoft Copilot](https://copilot.microsoft.com), [ChatGPT](https://chat
**Question:** Which of the following statements about Generative AI and JavaScript are true?
-A. JavaScript powered Generative AI apps can only generate text.
-B. JavaScript can be used to build AI-powered applications, including chatbots, text generation tools, and more.
-C. Python is the only language used for AI development.
+A. JavaScript powered Generative AI apps can only generate text.
+B. JavaScript can be used to build AI-powered applications, including chatbots, text generation tools, and more.
+C. Python is the only language used for AI development.
[Quiz solution](./solution/solution-quiz.md)
diff --git a/lessons/02-first-ai-app/README.md b/lessons/02-first-ai-app/README.md
index d767cfb..fe05146 100644
--- a/lessons/02-first-ai-app/README.md
+++ b/lessons/02-first-ai-app/README.md
@@ -31,15 +31,15 @@ _This video gives you an introduction to AI models called "large language models
> [!NOTE]
> While we recommend going through the story (it's fun!), [click here](#interact-with-leonardo) if you'd prefer to jump straight to the technical content.
-Together with Dinocrates, you put the finishing touches on the lighthouse at Alexandria. The towering structure gleams in the sunlight, its polished stone reflecting the Mediterranean Sea.
+Together with Dinocrates, you put the finishing touches on the lighthouse at Alexandria. The towering structure gleams in the sunlight, its polished stone reflecting the Mediterranean Sea.
-You look down at the Time Beetle in your hand, its metallic surface cool against your palm. Clenching your fist around it, you whisper, "Take me home." The beetle begins to glow, emitting a soft, warm light and the world around you dissolves into a whirlwind of colors.
+You look down at the Time Beetle in your hand, its metallic surface cool against your palm. Clenching your fist around it, you whisper, "Take me home." The beetle begins to glow, emitting a soft, warm light and the world around you dissolves into a whirlwind of colors.
### A new adventure
When you open your eyes, the world has shifted. As you manage to get up, you realize you're in a boat on a river. You look around, in the distance, you see buildings, their outlines blurred by the morning mist.
-Looking around the boat, you find a long oar resting against the side. Grasping it, you begin to row towards the distant buildings. As you get closer, the buildings come into sharper focus, they are old, their architecture reminiscent of a Renaissance painting.
+Looking around the boat, you find a long oar resting against the side. Grasping it, you begin to row towards the distant buildings. As you get closer, the buildings come into sharper focus, they are old, their architecture reminiscent of a Renaissance painting.

@@ -57,7 +57,7 @@ As you walk, you notice a man with a long beard and a hat, digging through a cra
### Help me, Leonardo
-**You:** "Excuse me, sir, where am I?" He looks up at you, confusion evident in his eyes. Realizing you've been speaking in English, you quickly use the device in your hand and ask it to translate.
+**You:** "Excuse me, sir, where am I?" He looks up at you, confusion evident in his eyes. Realizing you've been speaking in English, you quickly use the device in your hand and ask it to translate.
**Time Beetle:** "Of course, I'll translate into 15th century Italian. 'Dove sono?'"
@@ -105,7 +105,7 @@ The Time Beetle translates.
**You:** "Well, I was working on a project, and I ended up here."
-You show him the Time Beetle, and his eyes light up with fascination. He examines it closely as you explain how it works and how you ended up in Florence.
+You show him the Time Beetle, and his eyes light up with fascination. He examines it closely as you explain how it works and how you ended up in Florence.
Leonardo looks at you with excitement.
@@ -133,7 +133,7 @@ If you want to interact with Leonardo, run the [Characters](/app/README.md) app.
1. Start a [](https://codespaces.new/microsoft/generative-ai-with-javascript)
2. Navigate to _/app/README.md_ in the repo root.
3. Locate the console and run `npm install` followed by `npm start`.
-4. Once it appears, select the "Open in Browser" button.
+4. Once it appears, select the "Open in Browser" button.
5. Chat with Leonardo.
For a more detailed explanation of the app, see [Detailed app explanation](../01-intro-to-genai/README.md#interact-with-dinocrates).
@@ -149,9 +149,9 @@ Before you can assist Leonardo with his project, you should first think about th
**Time Beetle:** I'm compatible with most machines running in the 21st century, see the following list for a set of essential tools and libraries.
-- **Text editor**, for example Visual Studio Code.
-- **Terminal**, for running commands.
-- **Browser for testing your app**. It's also a good idea to have a tool like curl or some other HTTP client to test your app's API endpoints.
+- **Text editor**, for example Visual Studio Code.
+- **Terminal**, for running commands.
+- **Browser for testing your app**. It's also a good idea to have a tool like curl or some other HTTP client to test your app's API endpoints.
- **Node.js**. You also need to install Node.js and npm, which are tools that help you run JavaScript code on your computer.
@@ -268,7 +268,7 @@ AI: Rome is known for its ancient ruins, art, and vibrant culture. You can visit
```
-**Time Beetle:** Imagine if a sentence like "Tell me more about it" were taken out of context, the AI wouldn't know what "it" refers to. This is where context is important, and this context is something we can provide to the AI model through the prompt.
+**Time Beetle:** Imagine if a sentence like "Tell me more about it" were taken out of context, the AI wouldn't know what "it" refers to. This is where context is important, and this context is something we can provide to the AI model through the prompt.
**You:** I think I get it, how do I construct a conversation with the AI using this JavaScript language you speak of?
@@ -327,13 +327,13 @@ Now the AI will provide a list of chat messages as context, and the AI will gene
**You:** Ok, so if I understand the conversation correctly, the AI will now have the following context: _I'm going to Rome next month_, so based on that it should filter out irrelevant information and provide a more relevant response?
-**Time Beetle:** Exactly, the AI will use the context to generate a response that is more relevant to the conversation.
+**Time Beetle:** Exactly, the AI will use the context to generate a response that is more relevant to the conversation.
## Improving the chat conversation with a system message
**You:** I see, but is there a way to improve this further?
-**Time Beetle:** Yes, you can add a system message to the conversation. A system message creates a "personality" for the AI and can be used to provide additional context.
+**Time Beetle:** Yes, you can add a system message to the conversation. A system message creates a "personality" for the AI and can be used to provide additional context.
**You:** Ok, so in the context of the conversation we've been having, what would a system message look like?
@@ -473,11 +473,11 @@ Leonardo suddenly asked to inspect the Time Beetle closer, he looked at it from
> Despite its impracticality, the aerial screw remains a testament to Leonardo's genius and his relentless pursuit of innovation. It laid the groundwork for future developments in aviation and continues to inspire engineers and inventors to this day.
> [Read more](https://en.wikipedia.org/wiki/Leonardo%27s_aerial_screw)
-Your assignment is to build an engineering assistant that can help Leonardo with the calculations and design of the aerial screw.
+Your assignment is to build an engineering assistant that can help Leonardo with the calculations and design of the aerial screw.
-- It should be able to generate text based on user input.
+- It should be able to generate text based on user input.
-- You should set a system message to introduce the assistant.
+- You should set a system message to introduce the assistant.
Check out [Sample app](./sample-app/) to get started.
@@ -491,9 +491,9 @@ Check out [Sample app](./sample-app/) to get started.
**Question:** What is the purpose of the context window in generative AI models? Select all that apply.
-A. The context window allows the AI to consider more context and generate more coherent responses.
+A. The context window allows the AI to consider more context and generate more coherent responses.
-B. The context window is the number of previous messages that the AI uses to generate a response.
+B. The context window is the number of previous messages that the AI uses to generate a response.
C. The context window determines how creative the AI's responses are.
diff --git a/lessons/03-prompt-engineering/README.md b/lessons/03-prompt-engineering/README.md
index 300e65b..573f22d 100644
--- a/lessons/03-prompt-engineering/README.md
+++ b/lessons/03-prompt-engineering/README.md
@@ -2,9 +2,9 @@
In this chapter you will learn:
-- What prompt engineering is and how knowing the basics can help you get better results.
-- Different prompt engineering techniques and how they can help provide better results for different scenarios.
-- What meta prompts are and how they will help restrict the output, ensure it's accessible, and provide a better user experience.
+- What prompt engineering is and how knowing the basics can help you get better results.
+- Different prompt engineering techniques and how they can help provide better results for different scenarios.
+- What meta prompts are and how they will help restrict the output, ensure it's accessible, and provide a better user experience.
## Setup
@@ -124,7 +124,7 @@ If you want to interact with Sforza, run the [Characters](/app/README.md) app.
1. Start a [](https://codespaces.new/microsoft/generative-ai-with-javascript)
2. Navigate to _/app_ in the repo root.
-3. Locate the console and run `npm install` followed by `npm start`.
+3. Locate the console and run `npm install` followed by `npm start`.
4. Once it appears, select the "Open in Browser" button.
5. Chat with Sforza.
@@ -139,7 +139,7 @@ For a more detailed explanation of the app, see [Detailed app explanation](../01
**You:** We do? What's that?
-**Time Beetle:** Prompt engineering despite its name is not about building bridges or roads, but rather about crafting the right "prompts" to get the desired output from a Generative AI language model.
+**Time Beetle:** Prompt engineering despite its name is not about building bridges or roads, but rather about crafting the right "prompts" to get the desired output from a Generative AI language model.
**You:** Ok, but why is it important that I know this?
@@ -147,7 +147,7 @@ For a more detailed explanation of the app, see [Detailed app explanation](../01
**You:** Yes, preferably in one piece. :-)
-**Time Beetle:** I thought so, now listen up! Prompt engineering is about crafting the right prompts to get the desired output from a language model.
+**Time Beetle:** I thought so, now listen up! Prompt engineering is about crafting the right prompts to get the desired output from a language model.
**Time Beetle** Large language models have what's called _emergent properties_, which means these are features that aren't explicitly programmed into the model but arise from the way it's trained on vast amounts of text data. By studying these emergent properties, you can draw conclusions and discover patterns that can help you get better results from the model.
@@ -165,9 +165,9 @@ For a more detailed explanation of the app, see [Detailed app explanation](../01
Looking at it from the perspective of a developer, you can use prompt engineering to:
-- **Get more accurate results** from your language model and ultimately improve the user experience of your application.
+- **Get more accurate results** from your language model and ultimately improve the user experience of your application.
-- **Control the output** of the model to ensure it's relevant and appropriate for your users. This is especially important when dealing with sensitive topics and also to protect your brand reputation.
+- **Control the output** of the model to ensure it's relevant and appropriate for your users. This is especially important when dealing with sensitive topics and also to protect your brand reputation.
- **Format the output** in a way that's easy to understand and consume. We will look more into this aspect in the next chapter.
@@ -203,106 +203,106 @@ Few-shot prompting gives an AI model a few examples to guide its output. Imagine
### Chain-of-Thought Prompting: Show step-by-step reasoning
-**Time Beetle:** This technique guides the AI by showing it step-by-step reasoning to solve a problem. Imagine landing the aerial screw. You could break it down like this:
-- Youâre 100 meters up.
-- Gravity pulls at 9.8 m/s².
-- Formula: height = ½ * g * t².
-- Solve: t â 4.5 seconds to land.
+**Time Beetle:** This technique guides the AI by showing it step-by-step reasoning to solve a problem. Imagine landing the aerial screw. You could break it down like this:
+- Youâre 100 meters up.
+- Gravity pulls at 9.8 m/s².
+- Formula: height = ½ * g * t².
+- Solve: t â 4.5 seconds to land.
-Your prompt becomes:
+Your prompt becomes:
> - 100 meters above ground
> - Gravity: 9.8 m/s²
> - How many seconds to land?
-**Answer: 4.5 seconds**
+**Answer: 4.5 seconds**
-**You:** Thatâs quickâhope the numbers work out!
+**You:** Thatâs quickâhope the numbers work out!
-**Time Beetle:** It teaches the AI to think step-by-step.
+**Time Beetle:** It teaches the AI to think step-by-step.
-**You:** So itâs about breaking problems down for accurate answers?
+**You:** So itâs about breaking problems down for accurate answers?
**Time Beetle:** Yep, perfect for complex tasks like a math tutor app!
### Maieutic Prompting: Question the output to verify accuracy
-**Time Beetle:** This technique uses questions to check the AIâs output for accuracy. You ask about each step to ensure consistent reasoning.
+**Time Beetle:** This technique uses questions to check the AIâs output for accuracy. You ask about each step to ensure consistent reasoning.
**You:** So, question everything it says? Sounds fun. ;)
-**Time Beetle:** Letâs test our aerial screw landing:
-- 100 meters up
-- Gravity: 9.8 m/s²
-- How many seconds to land? (Answer: 4.5s)
+**Time Beetle:** Letâs test our aerial screw landing:
+- 100 meters up
+- Gravity: 9.8 m/s²
+- How many seconds to land? (Answer: 4.5s)
-Ask: âWhy 4.5 seconds?â
+Ask: âWhy 4.5 seconds?â
-> **Response:**
-> - Height = 100m, initial vertical speed = 0 m/s, gravity = 9.8 m/s².
-> - Use: height = ½ * g * t².
+> **Response:**
+> - Height = 100m, initial vertical speed = 0 m/s, gravity = 9.8 m/s².
+> - Use: height = ½ * g * t².
> - Solve: 100 = ½ * 9.8 * t² â t â 4.5s.
-**Time Beetle:** Itâs about verifying AI answers with follow-up questions.
+**Time Beetle:** Itâs about verifying AI answers with follow-up questions.
**You:** So, donât trust itâprobe it with questions instead?
-**Time Beetle:** Exactly! Ensures solid reasoning.
+**Time Beetle:** Exactly! Ensures solid reasoning.
## Meta Prompts: Add extra instructions for precision
-**Time Beetle:** Next up, meta prompts.
+**Time Beetle:** Next up, meta prompts.
-**You:** Ugh, tea first?
+**You:** Ugh, tea first?
-**Time Beetle:** _Sigh_. They add guidance to prompts for better outputâgreat for sensitive, customer-facing apps.
+**Time Beetle:** _Sigh_. They add guidance to prompts for better outputâgreat for sensitive, customer-facing apps.
-Hereâs an example:
-> **Meta Prompt:** Use only Contoso Inc. products (basketballs, soccer balls, tennis rackets). Keep it accurate and user-friendly.
-> **Prompt:** Best sports products for beginners?
-> **Response:** Basketballs, soccer balls, and tennis racketsâperfect for coordination and agility.
+Hereâs an example:
+> **Meta Prompt:** Use only Contoso Inc. products (basketballs, soccer balls, tennis rackets). Keep it accurate and user-friendly.
+> **Prompt:** Best sports products for beginners?
+> **Response:** Basketballs, soccer balls, and tennis racketsâperfect for coordination and agility.
-It ensures accuracy and sticks to Contosoâs products. Without it:
-> **Prompt:** Best sports products for beginners?
-> **Response:** Basketballs, soccer balls, tennis rackets, plus footballsâ_not all Contoso items_.
+It ensures accuracy and sticks to Contosoâs products. Without it:
+> **Prompt:** Best sports products for beginners?
+> **Response:** Basketballs, soccer balls, tennis rackets, plus footballsâ_not all Contoso items_.
**You:** Handy! Keeps responses on track, like laws for my automaton.
-**Time Beetle:** Youâd know, _"Frankenstein"_âer, nothing!
+**Time Beetle:** Youâd know, _"Frankenstein"_âer, nothing!
-**You:** What?
+**You:** What?
-**Time Beetle:** Never mind.
+**Time Beetle:** Never mind.
-> Mary Shelleyâs *Frankenstein*â1818, 42 years before your time travels. [Read more](https://en.wikipedia.org/wiki/Mary_Shelley)
+> Mary Shelleyâs *Frankenstein*â1818, 42 years before your time travels. [Read more](https://en.wikipedia.org/wiki/Mary_Shelley)
-**You:** So, no meta prompt means chaos?
+**You:** So, no meta prompt means chaos?
-**Time Beetle:** Yep, youâd get off-brand answers.
+**Time Beetle:** Yep, youâd get off-brand answers.
-**You:** Got it, precision matters!
+**You:** Got it, precision matters!
-## Assignment - Let's help our heroes land the aerial screw
+## Assignment - Let's help our heroes land the aerial screw
**You:** This is the part where you show me how to land the aerial screw, right?
-**Time Beetle:** Yes, let's get to it. The hill is roughly 100 meters away from our current position. Here's how we can set up the prompt:
+**Time Beetle:** Yes, let's get to it. The hill is roughly 100 meters away from our current position. Here's how we can set up the prompt:
-- Current height above the ground: 100 meters
-- Moving forward at: 10 meters per second
-- Gravity: 9.8 meters per second squared
-- Wind upwards at: 0.7 meters per second
+- Current height above the ground: 100 meters
+- Moving forward at: 10 meters per second
+- Gravity: 9.8 meters per second squared
+- Wind upwards at: 0.7 meters per second
-**Leonardo:** Can your AI gizmo help in calculating to see if we will make it or if we need to make another time jump?
+**Leonardo:** Can your AI gizmo help in calculating to see if we will make it or if we need to make another time jump?
**Time Beetle:** I can yes, my name is George though, I prefer that over Gizmo. I'm actually going to leave it to the two of you to figure out how to set up the prompt. âşď¸
-Build an app that asks for:
+Build an app that asks for:
-- Height
-- Forward speed
-- Gravity
+- Height
+- Forward speed
+- Gravity
- Upward wind
-- Distance to hill
+- Distance to hill
Use the chain-of-though technique to arrive at a response.
@@ -318,7 +318,7 @@ Build an app in JavaScript that asks for the following inputs:
- Upward wind in meters per second
- Distance to the hill
-Then use the LLM to incorporate these inputs and leverage the chain of thought prompting technique to guide the model to the right answer.
+Then use the LLM to incorporate these inputs and leverage the chain of thought prompting technique to guide the model to the right answer.
[Solution](./solution/solution.md)
@@ -326,11 +326,11 @@ Then use the LLM to incorporate these inputs and leverage the chain of thought p
**Question:** What is prompt engineering? Select all that apply.
-A. Prompt engineering is about building bridges and roads.
+A. Prompt engineering is about building bridges and roads.
-B. Prompt engineering is about crafting the right prompts to get the desired output from a language model.
+B. Prompt engineering is about crafting the right prompts to get the desired output from a language model.
-C. Prompt engineering is about training a model to recognize patterns in data.
+C. Prompt engineering is about training a model to recognize patterns in data.
[Quiz solution](./solution/solution-quiz.md)
diff --git a/lessons/04-structured-output/README.md b/lessons/04-structured-output/README.md
index 619c9c4..ce81652 100644
--- a/lessons/04-structured-output/README.md
+++ b/lessons/04-structured-output/README.md
@@ -2,8 +2,8 @@
In this chapter you will learn:
-- What _structured output_ is and how to leverage it effectively.
-- How to extract information from prompts and incorporate it into the output.
+- What _structured output_ is and how to leverage it effectively.
+- How to extract information from prompts and incorporate it into the output.
- Generate different types of output formats, such as JSON, for easy consumption by services.
## Setup
@@ -32,7 +32,7 @@ _This video offers an introduction to improving your "prompting" skills, teachin
> [!NOTE]
> While we recommend going through the story (it's fun!), [click here](#interact-with-montezuma) if you'd prefer to jump straight to the technical content.
-The wind whips around you as you and Leonardo da Vinci ascend in his aerial screw, the wooden frame creaking under the strain.
+The wind whips around you as you and Leonardo da Vinci ascend in his aerial screw, the wooden frame creaking under the strain.
**You:** "Leonardo, we need to find a way out of this!" you shout over the roar of the wind.
@@ -42,7 +42,7 @@ The wind whips around you as you and Leonardo da Vinci ascend in his aerial scre
### The Aztec Empire
-The bright light from the Time Beetle fades, and you find yourself standing at the base of a massive stone pyramid. As you look around, you realize that you've landed in the heart of the Aztec Empire.
+The bright light from the Time Beetle fades, and you find yourself standing at the base of a massive stone pyramid. As you look around, you realize that you've landed in the heart of the Aztec Empire.
The aerial screw, rests awkwardly on a large, intricately carved stone, with markings that look like a calendar
@@ -62,13 +62,13 @@ Before you can react, a group of Aztec soldiers approaches.
-**Soldier leader:** "Who are you, and what have you done?" he demands in Nahuatl.
+**Soldier leader:** "Who are you, and what have you done?" he demands in Nahuatl.
You take a deep breath, trying to steady your nerves.
**You:** "We are travelers from a distant land," you begin, hoping your knowledge of ancient languages will serve you well. "This is a flying machine, a gift from the gods to help us reach you.
-The warrior's eyes widen in surprise, but he remains cautious.
+The warrior's eyes widen in surprise, but he remains cautious.
**Soldier leader:** "You will come with us to meet the ruler Montezuma. He will decide your fate.
@@ -90,13 +90,13 @@ The game begins, and the room falls silent, save for the sound of beans being ro
Montezuma wins the first game, his skill and experience evident. Leonardo, studies the board carefully, his mind working through the strategies and probabilities.
-The second game is a close contest, but Leonardo manages to secure a victory, evening the score.
+The second game is a close contest, but Leonardo manages to secure a victory, evening the score.
**Leonardo:** "One more game," he whispers, George (Time Beetle), we need to win this one, give me the right moves.
**Time Beetle:** Very well, calculating... Here you go...
-With a final, decisive move, Leonardo wins the game. The room erupts in cheers and applause, the Aztecs clearly impressed by his skill and composure. Montezuma, though disappointed, nods in respect.
+With a final, decisive move, Leonardo wins the game. The room erupts in cheers and applause, the Aztecs clearly impressed by his skill and composure. Montezuma, though disappointed, nods in respect.
**Montezuma:** "You have won fairly," Montezuma says, his voice carrying a note of admiration. "You are free to go, and you may keep your device. But know that you are always welcome here, should you wish to return."
@@ -153,7 +153,7 @@ For a more detailed explanation of the app, see [Detailed app explanation](../01
**Time Beetle:** Oh right, sorry, yea so structured output is how. You asked for the right moves and I gave them to you in a structured way.
-Structured output uses specific data formats to organize information clearly. Common formats like JSON, XML, and CSV make it easier for services to process and use the data
+Structured output uses specific data formats to organize information clearly. Common formats like JSON, XML, and CSV make it easier for services to process and use the data.
Generative AI models can output data in various formats. However, output of unstructured text can make it difficult to extract information and hand it over to other services. Structured output can help in this regard.
@@ -250,7 +250,7 @@ Another way of getting structured output is to present an output template. It ca
> Description: [Brief Explanation]
> Resources Needed: [List of Required Materials]
> Effort: [Estimated Difficulty or Labor Required]
-Generate ideas for inventions I can build given 15th century technology, please let me know for each what resources I need and how much effort there would be to build each invention, for each idea present it with the following output template:
+Generate ideas for inventions I can build given 15th century technology, please let me know for each what resources I need and how much effort there would be to build each invention, for each idea present it with the following output template:
```text
diff --git a/lessons/05-rag/README.md b/lessons/05-rag/README.md
index 30d1f15..980fffc 100644
--- a/lessons/05-rag/README.md
+++ b/lessons/05-rag/README.md
@@ -32,7 +32,7 @@ _This video explains Retrieval Augmented Generation (RAG), a method that helps t
**You**: "Leonardo, it's time to go," you said, pressing the button. The device whirred to life, and a mechanical voice echoed, "It's time to go home, it's time for 'genesis'."
-**Leonardo:** "Genesis? Che cosa significa?" Leonardo asked, confused. Before you could respond, the world dissolved into a blur of colors and sounds, the temple fading away as you were pulled through time
+**Leonardo:** "Genesis? Che cosa significa?" Leonardo asked, confused. Before you could respond, the world dissolved into a blur of colors and sounds, the temple fading away as you were pulled through time.
You land in the garden, it's late at night with a thick fog and eerie lights are flickering in the distance. The mansion looms before you. Leonardo looks around, his eyes wide with wonder.
@@ -117,7 +117,7 @@ This makes it difficult to tell if the information generated by an LLM is correc
**Ada:** Yes, that's the idea. By combining the strengths of retrieval-based methods and generative models, we get a better AI system.
-## Retrieval augmented generation, RAG core concepts
+## Retrieval-Augmented generation, RAG core concepts
**Ada:** Ah yes, time to discuss RAG specifically. Let's start with some basics:
@@ -304,7 +304,7 @@ Found 1 matches:
## Assignment - Helping Ada and Charles
-Having learned about RAG, you're now ready to help Ada and Charles with their device. However, upon closer inspection the device is looking familiar.
+Having learned about RAG, you're now ready to help Ada and Charles with their device. However, upon closer inspection the device is looking familiar.
**You:** Time Beetle, do you know what this is?