Skip to content

Commit d354f7b

Browse files
committed
fix: images names and paths
1 parent 552e479 commit d354f7b

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

43 files changed

+59
-60
lines changed
Binary file not shown.

02-exploring-and-comparing-different-llms/images/README.md

-1
This file was deleted.

03-using-generative-ai-responsibly/README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Using Generative AI Responsibly
22

3-
[![Using Generative AI Responsibly](./images/genai_course_3[77].png?WT.mc_id=academic-105485-koreyst)]()
3+
[![Using Generative AI Responsibly](./images/03-lesson-banner.png?WT.mc_id=academic-105485-koreyst)]()
44

55
> **Video Coming Soon**
66
@@ -44,7 +44,7 @@ Let's take for example we build a feature for our startup that allows students t
4444

4545
The model produces a response like the one below:
4646

47-
![Prompt saying "Who was the sole survivor of the Titanic"](../03-using-generative-ai-responsibly/images/2135-ChatGPT(1)_11zon.webp?WT.mc_id=academic-105485-koreyst)
47+
![Prompt saying "Who was the sole survivor of the Titanic"](../03-using-generative-ai-responsibly/images/ChatGPT-titanic-survivor-prompt.webp?WT.mc_id=academic-105485-koreyst)
4848

4949
> *(Source: [Flying bisons](https://flyingbisons.com?WT.mc_id=academic-105485-koreyst))*
5050

03-using-generative-ai-responsibly/translations/cn/README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# 第三章 : 负责任地使用生成式人工智能
22

3-
[![Using Generative AI Responsibly](../../images/genai_course_3[77].png?WT.mc_id=academic-105485-koreyst)]()
3+
[![Using Generative AI Responsibly](../../images/03-lesson-banner.png?WT.mc_id=academic-105485-koreyst)]()
44

55
> **导学视频即将上架,敬请期待**
66
@@ -44,7 +44,7 @@
4444

4545
该模型产生如下响应:
4646

47-
![提示说“谁是泰坦尼克号的唯一幸存者”](../../../03-using-generative-ai-responsibly/images/2135-ChatGPT(1)_11zon.webp)
47+
![提示说“谁是泰坦尼克号的唯一幸存者”](../../../03-using-generative-ai-responsibly/images/ChatGPT-titanic-survivor-prompt.webp?WT.mc_id=academic-105485-koreyst)
4848

4949
> *(来源:[飞翔的野牛](https://flyingbisons.com?WT.mc_id=academic-105485-koreyst))*
5050

04-prompt-engineering-fundamentals/README.md

+7-7
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Prompt Engineering Fundamentals
22

3-
[![Prompt Engineering Fundamentals](./img/04-lesson-banner.png?WT.mc_id=academic-105485-koreyst)](https://youtu.be/r2ItK3UMVTk?WT.mc_id=academic-105485-koreyst)
3+
[![Prompt Engineering Fundamentals](./images/04-lesson-banner.png?WT.mc_id=academic-105485-koreyst)](https://youtu.be/r2ItK3UMVTk?WT.mc_id=academic-105485-koreyst)
44

55

66
How you write your prompt to the LLM matters, a carefully crafted prompt can achieve achieve a better result than one that isn't. But what even are these concepts, prompt, prompt engineering and how do I improve what I send to the LLM? Questions like these are what this chapter and the upcoming chapter are looking to answer.
@@ -77,7 +77,7 @@ An LLM sees prompts as a _sequence of tokens_ where different models (or version
7777

7878
To get an intuition for how tokenization works, try tools like the [OpenAI Tokenizer](https://platform.openai.com/tokenizer?WT.mc_id=academic-105485-koreyst) shown below. Copy in your prompt - and see how that gets converted into tokens, paying attention to how whitespace characters and punctuation marks are handled. Note that this example shows an older LLM (GPT-3) - so trying this with a newer model may produce a different result.
7979

80-
![Tokenization](./img/4.0-tokenizer-example.png?WT.mc_id=academic-105485-koreyst)
80+
![Tokenization](./images/04-tokenizer-example.png?WT.mc_id=academic-105485-koreyst)
8181

8282
### Concept: Foundation Models
8383

@@ -87,7 +87,7 @@ Want to see how prompt-based completion works? Enter the above prompt into the A
8787

8888
But what if the user wanted to see something specific that met some criteria or task objective? This is where _instruction-tuned_ LLMs come into the picture.
8989

90-
![Base LLM Chat Completion](./img/4.0-playground-chat-base.png?WT.mc_id=academic-105485-koreyst)
90+
![Base LLM Chat Completion](./images/04-playground-chat-base.png?WT.mc_id=academic-105485-koreyst)
9191

9292
### Concept: Instruction Tuned LLMs
9393

@@ -101,7 +101,7 @@ Let's try it out - revisit the prompt above but now change the _system message_
101101
102102
See how the result is now tuned to reflect the desired goal and format? An educator can now directly use this response in their slides for that class.
103103

104-
![Instruction Tuned LLM Chat Completion](./img/4.0-playground-chat-instructions.png?WT.mc_id=academic-105485-koreyst)
104+
![Instruction Tuned LLM Chat Completion](./images/04-playground-chat-instructions.png?WT.mc_id=academic-105485-koreyst)
105105

106106
## Why do we need Prompt Engineering?
107107

@@ -129,15 +129,15 @@ So what happens when we run this prompt with different LLM providers?
129129

130130
> **Response 1**: OpenAI Playground (GPT-35)
131131
132-
![Response 1](./img/4.0-hallucination-oai.png?WT.mc_id=academic-105485-koreyst)
132+
![Response 1](./images/04-hallucination-oai.png?WT.mc_id=academic-105485-koreyst)
133133

134134
> **Response 2**: Azure OpenAI Playground (GPT-35)
135135
136-
![Response 2](./img/4.0-hallucination-aoai.png?WT.mc_id=academic-105485-koreyst)
136+
![Response 2](./images/04-hallucination-aoai.png?WT.mc_id=academic-105485-koreyst)
137137

138138
> **Response 3**: : Hugging Face Chat Playground (LLama-2)
139139
140-
![Response 3](./img/4.0-hallucination-huggingchat.png?WT.mc_id=academic-105485-koreyst)
140+
![Response 3](./images/04-hallucination-huggingchat.png?WT.mc_id=academic-105485-koreyst)
141141

142142
As expected, each model (or model version) produces slightly different responses thanks to stochastic behavior and model capability variations. For instance, one model targets an 8th grade audience while the other assumes a high-school student. But all three models did generate responses that could convince an uninformed user that the event was real
143143

04-prompt-engineering-fundamentals/translations/cn/README.md

+7-7
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# 第四章:提示工程基础
22

3-
[![Prompt Engineering Fundamentals](../../img/04-lesson-banner.png?WT.mc_id=academic-105485-koreyst)](https://youtu.be/r2ItK3UMVTk?WT.mc_id=academic-105485-koreyst)
3+
[![Prompt Engineering Fundamentals](../../images/04-lesson-banner.png?WT.mc_id=academic-105485-koreyst)](https://youtu.be/r2ItK3UMVTk?WT.mc_id=academic-105485-koreyst)
44

55

66
如何撰写 LLM 的提示很重要,精心设计的提示可以比不精心设计的提示取得更好的结果。 但这些概念到底是什么,提示、提示工程以及我如何改进我发送给 LLMs 的内容? 诸如此类的问题正是本章和下一章想要解答的。
@@ -79,7 +79,7 @@ LLM 将提示视为标记序列,其中不同的模型(或模型的版本)
7979

8080
要直观地了解标记化的工作原理,请尝试使用如下所示的 [OpenAI Tokenizer](https://platform.openai.com/tokenizer?WT.mc_id=academic-105485-koreyst) 等工具。 复制您的提示 - 并查看如何将其转换为标记,注意空白字符和标点符号的处理方式。 请注意,此例子显示的是较旧的 LLM (GPT-3) - 因此使用较新的模型尝试此操作可能会产生不同的结果。
8181

82-
![Tokenization](../../img/4.0-tokenizer-example.png?WT.mc_id=academic-105485-koreyst)
82+
![Tokenization](../../images/04-tokenizer-example.png?WT.mc_id=academic-105485-koreyst)
8383

8484
### 概念: 基础模型
8585

@@ -95,7 +95,7 @@ But what if the user wanted to see something specific that met some criteria or
9595

9696
但是,如果用户想要查看满足某些标准或任务目标的特定内容怎么办? 这就是通过 LLMs 进行指令调整发挥作用的地方。
9797

98-
![Base LLM Chat Completion](../../img/4.0-playground-chat-base.png?WT.mc_id=academic-105485-koreyst)
98+
![Base LLM Chat Completion](../../images/04-playground-chat-base.png?WT.mc_id=academic-105485-koreyst)
9999

100100
### 概念: LLMs 中的指令调整
101101

@@ -109,7 +109,7 @@ But what if the user wanted to see something specific that met some criteria or
109109
110110
看看现在如何调整结果以反映所需的目标和格式? 教育工作者现在可以直接在该课程的 ppt 中使用此结果。
111111

112-
![Instruction Tuned LLM Chat Completion](../../img/4.0-playground-chat-instructions.png?WT.mc_id=academic-105485-koreyst)
112+
![Instruction Tuned LLM Chat Completion](../../images/04-playground-chat-instructions.png?WT.mc_id=academic-105485-koreyst)
113113

114114
## 为什么我们需要提示工程
115115

@@ -138,15 +138,15 @@ But what if the user wanted to see something specific that met some criteria or
138138

139139
> **响应 1**: OpenAI Playground (GPT-35)
140140
141-
![Response 1](../../img/4.0-hallucination-oai.png?WT.mc_id=academic-105485-koreyst)
141+
![Response 1](../../images/04-hallucination-oai.png?WT.mc_id=academic-105485-koreyst)
142142

143143
> **响应 2**: Azure OpenAI Playground (GPT-35)
144144
145-
![Response 2](../../img/4.0-hallucination-aoai.png?WT.mc_id=academic-105485-koreyst)
145+
![Response 2](../../images/04-hallucination-aoai.png?WT.mc_id=academic-105485-koreyst)
146146

147147
> **响应 3**: : Hugging Face Chat Playground (LLama-2)
148148
149-
![Response 3](../../img/4.0-hallucination-huggingchat.png?WT.mc_id=academic-105485-koreyst)
149+
![Response 3](../../images/04-hallucination-huggingchat.png?WT.mc_id=academic-105485-koreyst)
150150

151151
正如预期的那样,由于随机行为和模型能力变化,每个模型(或模型版本)都会产生略有不同的响应。 例如,一个模型针对八年级受众,而另一个模型则假设高中生。 但所有三个模型确实生成了可以让不知情的用户相信该事件是真实的响应
152152

07-building-chat-applications/README.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Building Generative AI-Powered Chat Applications
22

3-
[![Building Generative AI-Powered Chat Applications](./img/07-lesson-banner.png?WT.mc_id=academic-105485-koreyst)](https://youtu.be/Kw4i-tlKMrQ?WT.mc_id=academic-105485-koreyst)
3+
[![Building Generative AI-Powered Chat Applications](./images/07-lesson-banner.png?WT.mc_id=academic-105485-koreyst)](https://youtu.be/Kw4i-tlKMrQ?WT.mc_id=academic-105485-koreyst)
44

55
> *(Click the image above to view video of this lesson)*
66
@@ -60,7 +60,7 @@ When building a chat application, a great first step is to assess what is alread
6060
- **Easier maintenance**: Updates and improvements are easier to manage as most APIs and SDKs simply require an update to a library when a newer version is released.
6161
- **Access to cutting edge technology**: Leveraging models that have been fined tuned and trained on extensive datasets provides your application with natural language capabilities.
6262

63-
Accessing functionality of an SDK or API typically involves obtaining permission to use the provided services, which is often through the use of a unique key or authentication token. We'll use the OpenAI Python Library to explore what this looks like. You can also try it out on your own in the [notebook](notebook.ipynb) for this lesson.
63+
Accessing functionality of an SDK or API typically involves obtaining permission to use the provided services, which is often through the use of a unique key or authentication token. We'll use the OpenAI Python Library to explore what this looks like. You can also try it out on your own in the [notebook](./notebook.ipynb?WT.mc_id=academic-105485-koreyst) for this lesson.
6464

6565
```python
6666
import os
@@ -87,11 +87,11 @@ General UX principles apply to chat applications, but here are some additional c
8787

8888
One such example of personalization is the "Custom instructions" settings in OpenAI's ChatGPT. It allows you to provide information about yourself that may be important context for your prompts. Here's an example of a custom instruction.
8989

90-
![Custom Instructions Settings in ChatGPT](img/custom_instructions.png)
90+
![Custom Instructions Settings in ChatGPT](./images/custom-instructions.png?WT.mc_id=academic-105485-koreyst)
9191

9292
This "profile" prompts ChatGPT to create a lesson plan on linked lists. Notice that ChatGPT takes into account that the user may want a more in depth lesson plan based on her experience.
9393

94-
![A prompt in ChatGPT for a lesson plan about linked lists](img/lesson_plan_prompt.png)
94+
![A prompt in ChatGPT for a lesson plan about linked lists](./images/lesson-plan-prompt.png?WT.mc_id=academic-105485-koreyst)
9595

9696
### Microsoft's System Message Framework for Large Language Models
9797

07-building-chat-applications/translations/cn/README.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# 第七章:创建聊天应用
22

3-
[![Building Generative AI-Powered Chat Applications](../../img/07-lesson-banner.png?WT.mc_id=academic-105485-koreyst)](https://youtu.be/Kw4i-tlKMrQ?WT.mc_id=academic-105485-koreyst)
3+
[![Building Generative AI-Powered Chat Applications](../../images/07-lesson-banner.png?WT.mc_id=academic-105485-koreyst)](https://youtu.be/Kw4i-tlKMrQ?WT.mc_id=academic-105485-koreyst)
44

55
> *(点击该图片看本章导学视频)*
66
@@ -62,7 +62,7 @@
6262
- **更容易维护**:更新和改进更易于管理,因为大多数 API 和 SDK 在发布新版本时只需要更新库。
6363
- **获得尖端技术**:利用经过微调和在广泛数据集上训练的模型为您的应用程序提供自然语言功能。
6464

65-
访问 SDK 或 API 的功能通常涉及获取使用所提供服务的许可,这通常是通过使用唯一 kwy 或身份验证 token 来实现的。 我们将使用 OpenAI Python library 来探索它是什么样子。 您也可以在本章的[notebook](notebook.ipynb) 中自行尝试。
65+
访问 SDK 或 API 的功能通常涉及获取使用所提供服务的许可,这通常是通过使用唯一 kwy 或身份验证 token 来实现的。 我们将使用 OpenAI Python library 来探索它是什么样子。 您也可以在本章的[notebook](./notebook.ipynb?WT.mc_id=academic-105485-koreyst) 中自行尝试。
6666

6767

6868
```python
@@ -90,11 +90,11 @@ AuthenticationError: No API key provided. You can set your API key in code using
9090

9191
个性化的一个例子是 OpenAI 的 ChatGPT 中的“自定义指令”设置。 它允许您提供有关您自己的信息,这些信息可能是您的提示的重要背景。 以下是自定义指令的示例。
9292

93-
![Custom Instructions Settings in ChatGPT](../../img/custom_instructions.png?WT.mc_id=academic-105485-koreyst)
93+
![Custom Instructions Settings in ChatGPT](../../images/custom-instructions.png?WT.mc_id=academic-105485-koreyst)
9494

9595
“配置文件”提示 ChatGPT 在链接列表上创建课程计划。 请注意,ChatGPT 可以按照用户的特点获得更深入的课程计划。
9696

97-
![A prompt in ChatGPT for a lesson plan about linked lists](../../img/lesson_plan_prompt.png?WT.mc_id=academic-105485-koreyst)
97+
![A prompt in ChatGPT for a lesson plan about linked lists](../../images/lesson-plan-prompt.png?WT.mc_id=academic-105485-koreyst)
9898

9999
### 微软的 LLMs 系统消息框架
100100

08-building-search-applications/README.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Building a Search Applications
22

3-
[![Introduction to Generative AI and Large Language Models](./media/genai_course_8[80].png?WT.mc_id=academic-105485-koreyst)](TBD)
3+
[![Introduction to Generative AI and Large Language Models](./images/08-lesson-banner.png?WT.mc_id=academic-105485-koreyst)](TBD)
44

55
> **Video Coming Soon**
66
@@ -35,7 +35,7 @@ The lesson includes an Embedding Index of the YouTube transcripts for the Micros
3535

3636
The following is an example of a semantic query for the question 'can you use rstudio with azure ml?'. Check out the YouTube url, you'll see the url contains a timestamp that takes you to the place in the video where the answer to the question is located.
3737

38-
![Semantic query for the question "can you use rstudio with Azure ML"](./media/query_results.png?WT.mc_id=academic-105485-koreyst)
38+
![Semantic query for the question "can you use rstudio with Azure ML"](./images/query-results.png?WT.mc_id=academic-105485-koreyst)
3939

4040
## What is semantic search?
4141

@@ -154,7 +154,7 @@ Open the [solution notebook](./solution.ipynb?WT.mc_id=academic-105485-koreyst)
154154

155155
When you run the notebook, you'll be prompted to enter a query. The input box will look like this:
156156

157-
![Input box for the user to input a query](./media/notebook_search.png?WT.mc_id=academic-105485-koreyst)
157+
![Input box for the user to input a query](./images/notebook-search.png?WT.mc_id=academic-105485-koreyst)
158158

159159
## Great Work! Continue Your Learning
160160

08-building-search-applications/translations/cn/README.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# 第八章:创建搜索应用
22

3-
[![Introduction to Generative AI and Large Language Models](../../media/genai_course_8[80].png?WT.mc_id=academic-105485-koreyst)](TBD)
3+
[![Introduction to Generative AI and Large Language Models](../../images/08-lesson-banner.png?WT.mc_id=academic-105485-koreyst)](TBD)
44

55
> **导学视频敬请期待**
66
@@ -35,7 +35,7 @@ LLMs 应用场景不仅仅是聊天机器人和文本生成。 还可以使用
3535

3636
以下是问题“can you use rstudio with azure ml?”的语义查询示例。 查看 YouTube 网址,您会看到该网址包含一个时间戳,可将您带到视频中问题答案所在的位置。
3737

38-
![Semantic query for the question "can you use rstudio with Azure ML"](../../media/query_results.png?WT.mc_id=academic-105485-koreyst)
38+
![Semantic query for the question "can you use rstudio with Azure ML"](../../images/query-results.png?WT.mc_id=academic-105485-koreyst)
3939

4040
## 什么是语义搜索?
4141

@@ -158,7 +158,7 @@ az cognitiveservices account deployment create \
158158

159159
当您运行 notebook 时,系统将提示您输入查询。 输入框将如下所示:
160160

161-
![Input box for the user to input a query](../../media/notebook_search.png?WT.mc_id=academic-105485-koreyst)
161+
![Input box for the user to input a query](../../images/notebook-search.png?WT.mc_id=academic-105485-koreyst)
162162

163163
## 继续学习
164164

09-building-image-applications/README.md

+7-7
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Building Image Generation Applications
22

3-
[![Building Image Generation Applications](./images/genai_course_9[70].png?WT.mc_id=academic-105485-koreyst)](TBD)
3+
[![Building Image Generation Applications](./images/09-lesson-banner.png?WT.mc_id=academic-105485-koreyst)](TBD)
44

55
> **Video Coming Soon**
66
@@ -150,7 +150,7 @@ So what does it take to build an image generation application? You need the foll
150150
os.mkdir(image_dir)
151151
152152
# Initialize the image path (note the filetype should be png)
153-
image_path = os.path.join(image_dir, 'generated_image.png')
153+
image_path = os.path.join(image_dir, 'generated-image.png')
154154
155155
# Retrieve the generated image
156156
image_url = generation_response["data"][0]["url"] # extract image URL from response
@@ -282,11 +282,11 @@ Let's look at an example of how temperature works, by running this prompt twice:
282282

283283
> Prompt : "Bunny on horse, holding a lollipop, on a foggy meadow where it grows daffodils"
284284

285-
![Bunny on a horse holding a lollipop, version 1](./images/v1-generated_image.png?WT.mc_id=academic-105485-koreyst)
285+
![Bunny on a horse holding a lollipop, version 1](./images/v1-generated-image.png?WT.mc_id=academic-105485-koreyst)
286286

287287
Now let's run that same prompt just to see that we won't get the same image twice:
288288

289-
![Generated image of bunny on horse](./images/v2-generated_image.png?WT.mc_id=academic-105485-koreyst)
289+
![Generated image of bunny on horse](./images/v2-generated-image.png?WT.mc_id=academic-105485-koreyst)
290290

291291
As you can see, the images are similar, but not the same. Let's try changing the temperature value to 0.1 and see what happens:
292292

@@ -315,8 +315,8 @@ generation_response = openai.Image.create(
315315

316316
Now when you run this code, you get these two images:
317317

318-
- ![Temperature 0, v1](./images/v1-0temp-generated_image.png?WT.mc_id=academic-105485-koreyst)
319-
- ![Temperature 0 , v2](./images/v2-0temp-generated_image.png?WT.mc_id=academic-105485-koreyst)
318+
- ![Temperature 0, v1](./images/v1-temp-generated-image.png?WT.mc_id=academic-105485-koreyst)
319+
- ![Temperature 0 , v2](./images/v2-temp-generated-image.png?WT.mc_id=academic-105485-koreyst)
320320

321321
Here you can clearly see how the images resemble each other more.
322322

@@ -443,7 +443,7 @@ try:
443443
os.mkdir(image_dir)
444444

445445
# Initialize the image path (note the filetype should be png)
446-
image_path = os.path.join(image_dir, 'generated_image.png')
446+
image_path = os.path.join(image_dir, 'generated-image.png')
447447

448448
# Retrieve the generated image
449449
image_url = generation_response["data"][0]["url"] # extract image URL from response

09-building-image-applications/app-variation.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -18,13 +18,13 @@
1818
image_dir = os.path.join(os.curdir, 'images')
1919

2020
# Initialize the image path (note the filetype should be png)
21-
image_path = os.path.join(image_dir, 'generated_image.png')
21+
image_path = os.path.join(image_dir, 'generated-image.png')
2222

2323
# ---creating variation below---
2424
try:
2525
print("LOG creating variation")
2626
response = openai.Image.create_variation(
27-
image=open("generated_image.png", "rb"),
27+
image=open("generated-image.png", "rb"),
2828
n=1,
2929
size="1024x1024"
3030
)

09-building-image-applications/app.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
os.mkdir(image_dir)
3333

3434
# Initialize the image path (note the filetype should be png)
35-
image_path = os.path.join(image_dir, 'generated_image.png')
35+
image_path = os.path.join(image_dir, 'generated-image.png')
3636

3737
# Retrieve the generated image
3838
image_url = generation_response["data"][0]["url"] # extract image URL from response

0 commit comments

Comments
 (0)