
### 21 课教你构建生成式 AI 应用所需的一切知识
[](https://github.com/microsoft/Generative-AI-For-Beginners/blob/master/LICENSE?WT.mc_id=academic-105485-koreyst)
[](https://GitHub.com/microsoft/Generative-AI-For-Beginners/graphs/contributors/?WT.mc_id=academic-105485-koreyst)
[](https://GitHub.com/microsoft/Generative-AI-For-Beginners/issues/?WT.mc_id=academic-105485-koreyst)
[](https://GitHub.com/microsoft/Generative-AI-For-Beginners/pulls/?WT.mc_id=academic-105485-koreyst)
[](http://makeapullrequest.com?WT.mc_id=academic-105485-koreyst)
[](https://GitHub.com/microsoft/Generative-AI-For-Beginners/watchers/?WT.mc_id=academic-105485-koreyst)
[](https://GitHub.com/microsoft/Generative-AI-For-Beginners/network/?WT.mc_id=academic-105485-koreyst)
[](https://GitHub.com/microsoft/Generative-AI-For-Beginners/stargazers/?WT.mc_id=academic-105485-koreyst)
[](https://discord.gg/nTYy5BXMWG)
### 🌐 多语言支持
#### 通过 GitHub Action 支持(自动且始终保持最新)
[阿拉伯语](../ar/README.md) | [孟加拉语](../bn/README.md) | [保加利亚语](../bg/README.md) | [缅甸语 (Myanmar)](../my/README.md) | [中文(简体)](./README.md) | [中文(繁体,香港)](../zh-HK/README.md) | [中文(繁体,澳门)](../zh-MO/README.md) | [中文(繁体,台湾)](../zh-TW/README.md) | [克罗地亚语](../hr/README.md) | [捷克语](../cs/README.md) | [丹麦语](../da/README.md) | [荷兰语](../nl/README.md) | [爱沙尼亚语](../et/README.md) | [芬兰语](../fi/README.md) | [法语](../fr/README.md) | [德语](../de/README.md) | [希腊语](../el/README.md) | [希伯来语](../he/README.md) | [印地语](../hi/README.md) | [匈牙利语](../hu/README.md) | [印尼语](../id/README.md) | [意大利语](../it/README.md) | [日语](../ja/README.md) | [卡纳达语](../kn/README.md) | [高棉语](../km/README.md) | [韩语](../ko/README.md) | [立陶宛语](../lt/README.md) | [马来语](../ms/README.md) | [马拉雅拉姆语](../ml/README.md) | [马拉地语](../mr/README.md) | [尼泊尔语](../ne/README.md) | [奈及利亚皮钦语](../pcm/README.md) | [挪威语](../no/README.md) | [波斯语 (Farsi)](../fa/README.md) | [波兰语](../pl/README.md) | [葡萄牙语(巴西)](../pt-BR/README.md) | [葡萄牙语(葡萄牙)](../pt-PT/README.md) | [旁遮普语(古鲁姆克希)](../pa/README.md) | [罗马尼亚语](../ro/README.md) | [俄语](../ru/README.md) | [塞尔维亚语(西里尔字母)](../sr/README.md) | [斯洛伐克语](../sk/README.md) | [斯洛文尼亚语](../sl/README.md) | [西班牙语](../es/README.md) | [斯瓦希里语](../sw/README.md) | [瑞典语](../sv/README.md) | [他加禄语(菲律宾语)](../tl/README.md) | [泰米尔语](../ta/README.md) | [泰卢固语](../te/README.md) | [泰语](../th/README.md) | [土耳其语](../tr/README.md) | [乌克兰语](../uk/README.md) | [乌尔都语](../ur/README.md) | [越南语](../vi/README.md)
> **想本地克隆仓库?**
>
> 本仓库包含 50 多种语言翻译,下载体积显著增加。若想不包含翻译内容克隆,请使用稀疏检出:
>
> **Bash / macOS / Linux:**
> ```bash
> git clone --filter=blob:none --sparse https://github.com/microsoft/generative-ai-for-beginners.git
> cd generative-ai-for-beginners
> git sparse-checkout set --no-cone '/*' '!translations' '!translated_images'
> ```
>
> **CMD (Windows):**
> ```cmd
> git clone --filter=blob:none --sparse https://github.com/microsoft/generative-ai-for-beginners.git
> cd generative-ai-for-beginners
> git sparse-checkout set --no-cone "/*" "!translations" "!translated_images"
> ```
>
> 这样可以获得完成课程所需的一切文件,下载速度更快。
# 面向初学者的生成式 AI(版本 3) - 课程
通过微软云倡导者的 21 课全面课程,学习构建生成式 AI 应用的基础知识。
## 🌱 入门
本课程共有 21 课。每课涵盖不同主题,可任意选择开始!
课程分为 “Learn” 课,讲解生成式 AI 概念,和 “Build” 课,既讲解概念,也提供 **Python** 和 **TypeScript** 的代码示例(如适用)。
.NET 开发者可以查看 [面向初学者的生成式 AI(.NET 版)](https://github.com/microsoft/Generative-AI-for-beginners-dotnet?WT.mc_id=academic-105485-koreyst)!
每课还包括 “继续学习” 部分,提供更多学习工具。
## 你需要什么
### 要运行本课程代码,你可以使用:
- [Azure OpenAI 服务](https://aka.ms/genai-beginners/azure-open-ai?WT.mc_id=academic-105485-koreyst) - 课程:“aoai-assignment”
- [GitHub Marketplace 模型目录](https://aka.ms/genai-beginners/gh-models?WT.mc_id=academic-105485-koreyst) - 课程:“githubmodels”
- [OpenAI API](https://aka.ms/genai-beginners/open-ai?WT.mc_id=academic-105485-koreyst) - 课程:“oai-assignment”
- 具备基础 Python 或 TypeScript 知识更佳 - \*零基础可查看这些 [Python](https://aka.ms/genai-beginners/python?WT.mc_id=academic-105485-koreyst) 和 [TypeScript](https://aka.ms/genai-beginners/typescript?WT.mc_id=academic-105485-koreyst) 课程
- 一个 GitHub 账号,可将本仓库[整体 Fork](https://aka.ms/genai-beginners/github?WT.mc_id=academic-105485-koreyst) 到你的账号
我们已制作了[课程设置](./00-course-setup/README.md?WT.mc_id=academic-105485-koreyst)课程帮助你配置开发环境。
别忘了给本仓库[点星 (🌟)](https://docs.github.com/en/get-started/exploring-projects-on-github/saving-repositories-with-stars?WT.mc_id=academic-105485-koreyst),方便以后查找。
## 🧠 准备部署了吗?
若你想获取更高级的代码示例,请查看我们同时支持 **Python** 和 **TypeScript** 的[生成式 AI 代码示例合集](https://aka.ms/genai-beg-code?WT.mc_id=academic-105485-koreyst)。
## 🗣️ 结识其他学习者,获取支持
加入我们的[官方 Azure AI Foundry Discord 服务器](https://aka.ms/genai-discord?WT.mc_id=academic-105485-koreyst),与其他学习本课程的人交流、获取支持。
在我们的 [Azure AI Foundry 开发者论坛](https://aka.ms/azureaifoundry/forum) 上提问或分享产品反馈。
## 🚀 创业中?
访问 [Microsoft for Startups](https://www.microsoft.com/startups) 了解如何使用 Azure 额度开始构建。
## 🙏 想贡献帮助吗?
有建议或发现拼写、代码错误?[提 issue](https://github.com/microsoft/generative-ai-for-beginners/issues?WT.mc_id=academic-105485-koreyst) 或 [创建拉取请求](https://github.com/microsoft/generative-ai-for-beginners/pulls?WT.mc_id=academic-105485-koreyst)
## 📂 每课包含:
- 主题简介短视频
- README 中的文本课程内容
- 支持 Azure OpenAI 和 OpenAI API 的 Python 和 TypeScript 代码示例
- 继续学习的额外资源链接
## 🗃️ 课程列表
| # | 课程链接 | 描述 | 视频 | 额外学习 |
| --- | ----------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------- | -------------------------------------------------------------------------- |
| 00 | [课程设置](./00-course-setup/README.md?WT.mc_id=academic-105485-koreyst) | **学习:** 如何设置开发环境 | 视频即将发布 | [了解更多](https://aka.ms/genai-collection?WT.mc_id=academic-105485-koreyst) |
| 01 | [生成式 AI 与大型语言模型简介](./01-introduction-to-genai/README.md?WT.mc_id=academic-105485-koreyst) | **学习:** 理解什么是生成式 AI 以及大型语言模型(LLM)如何工作 | [视频](https://aka.ms/gen-ai-lesson-1-gh?WT.mc_id=academic-105485-koreyst) | [了解更多](https://aka.ms/genai-collection?WT.mc_id=academic-105485-koreyst) |
| 02 | [探索与比较不同的 LLM](./02-exploring-and-comparing-different-llms/README.md?WT.mc_id=academic-105485-koreyst) | **学习:** 如何为你的使用场景选择合适的模型 | [视频](https://aka.ms/gen-ai-lesson2-gh?WT.mc_id=academic-105485-koreyst) | [了解更多](https://aka.ms/genai-collection?WT.mc_id=academic-105485-koreyst) |
| 03 | [负责任地使用生成式 AI](./03-using-generative-ai-responsibly/README.md?WT.mc_id=academic-105485-koreyst) | **学习:** 如何负责任地构建生成式 AI 应用 | [视频](https://aka.ms/gen-ai-lesson3-gh?WT.mc_id=academic-105485-koreyst) | [了解更多](https://aka.ms/genai-collection?WT.mc_id=academic-105485-koreyst) |
| 04 | [理解提示工程基础](./04-prompt-engineering-fundamentals/README.md?WT.mc_id=academic-105485-koreyst) | **学习:** 实践提示工程最佳实践 | [视频](https://aka.ms/gen-ai-lesson4-gh?WT.mc_id=academic-105485-koreyst) | [了解更多](https://aka.ms/genai-collection?WT.mc_id=academic-105485-koreyst) |
| 05 | [创建高级提示](./05-advanced-prompts/README.md?WT.mc_id=academic-105485-koreyst) | **学习:** 如何应用提示工程技术以提升提示效果 | [视频](https://aka.ms/gen-ai-lesson5-gh?WT.mc_id=academic-105485-koreyst) | [了解更多](https://aka.ms/genai-collection?WT.mc_id=academic-105485-koreyst) |
| 06 | [构建文本生成应用](./06-text-generation-apps/README.md?WT.mc_id=academic-105485-koreyst) | **构建:** 使用 Azure OpenAI / OpenAI API 构建文本生成应用 | [视频](https://aka.ms/gen-ai-lesson6-gh?WT.mc_id=academic-105485-koreyst) | [了解更多](https://aka.ms/genai-collection?WT.mc_id=academic-105485-koreyst) |
| 07 | [构建聊天应用](./07-building-chat-applications/README.md?WT.mc_id=academic-105485-koreyst) | **构建:** 高效构建和集成聊天应用的技巧 | [视频](https://aka.ms/gen-ai-lessons7-gh?WT.mc_id=academic-105485-koreyst) | [了解更多](https://aka.ms/genai-collection?WT.mc_id=academic-105485-koreyst) |
| 08 | [构建搜索和向量数据库应用](./08-building-search-applications/README.md?WT.mc_id=academic-105485-koreyst) | **构建:** 使用嵌入向量进行数据搜索的搜索应用 | [视频](https://aka.ms/gen-ai-lesson8-gh?WT.mc_id=academic-105485-koreyst) | [了解更多](https://aka.ms/genai-collection?WT.mc_id=academic-105485-koreyst) |
| 09 | [构建图像生成应用](./09-building-image-applications/README.md?WT.mc_id=academic-105485-koreyst) | **构建:** 图像生成应用 | [视频](https://aka.ms/gen-ai-lesson9-gh?WT.mc_id=academic-105485-koreyst) | [了解更多](https://aka.ms/genai-collection?WT.mc_id=academic-105485-koreyst) |
| 10 | [构建低代码 AI 应用](./10-building-low-code-ai-applications/README.md?WT.mc_id=academic-105485-koreyst) | **构建:** 使用低代码工具构建生成式 AI 应用 | [视频](https://aka.ms/gen-ai-lesson10-gh?WT.mc_id=academic-105485-koreyst) | [了解更多](https://aka.ms/genai-collection?WT.mc_id=academic-105485-koreyst) |
| 11 | [使用函数调用集成外部应用](./11-integrating-with-function-calling/README.md?WT.mc_id=academic-105485-koreyst) | **构建:** 什么是函数调用及其在应用中的使用场景 | [视频](https://aka.ms/gen-ai-lesson11-gh?WT.mc_id=academic-105485-koreyst) | [了解更多](https://aka.ms/genai-collection?WT.mc_id=academic-105485-koreyst) |
| 12 | [设计 AI 应用的用户体验](./12-designing-ux-for-ai-applications/README.md?WT.mc_id=academic-105485-koreyst) | **学习:** 开发生成式 AI 应用时如何应用用户体验设计原则 | [视频](https://aka.ms/gen-ai-lesson12-gh?WT.mc_id=academic-105485-koreyst) | [了解更多](https://aka.ms/genai-collection?WT.mc_id=academic-105485-koreyst) |
| 13 | [保障生成式 AI 应用安全](./13-securing-ai-applications/README.md?WT.mc_id=academic-105485-koreyst) | **学习:** AI 系统面临的威胁与风险以及保障这些系统的方法 | [视频](https://aka.ms/gen-ai-lesson13-gh?WT.mc_id=academic-105485-koreyst) | [了解更多](https://aka.ms/genai-collection?WT.mc_id=academic-105485-koreyst) |
| 14 | [生成式 AI 应用生命周期](./14-the-generative-ai-application-lifecycle/README.md?WT.mc_id=academic-105485-koreyst) | **学习:** 管理大型语言模型生命周期和模型运维的工具与指标 | [视频](https://aka.ms/gen-ai-lesson14-gh?WT.mc_id=academic-105485-koreyst) | [了解更多](https://aka.ms/genai-collection?WT.mc_id=academic-105485-koreyst) |
| 15 | [检索增强生成(RAG)与向量数据库](./15-rag-and-vector-databases/README.md?WT.mc_id=academic-105485-koreyst) | **构建:** 使用 RAG 框架从向量数据库中检索嵌入的应用 | [视频](https://aka.ms/gen-ai-lesson15-gh?WT.mc_id=academic-105485-koreyst) | [了解更多](https://aka.ms/genai-collection?WT.mc_id=academic-105485-koreyst) |
| 16 | [开源模型与 Hugging Face](./16-open-source-models/README.md?WT.mc_id=academic-105485-koreyst) | **构建:** 使用 Hugging Face 上的开源模型构建应用 | [视频](https://aka.ms/gen-ai-lesson16-gh?WT.mc_id=academic-105485-koreyst) | [了解更多](https://aka.ms/genai-collection?WT.mc_id=academic-105485-koreyst) |
| 17 | [AI 代理](./17-ai-agents/README.md?WT.mc_id=academic-105485-koreyst) | **构建:** 使用 AI 代理框架构建应用 | [视频](https://aka.ms/gen-ai-lesson17-gh?WT.mc_id=academic-105485-koreyst) | [了解更多](https://aka.ms/genai-collection?WT.mc_id=academic-105485-koreyst) |
| 18 | [微调大型语言模型](./18-fine-tuning/README.md?WT.mc_id=academic-105485-koreyst) | **学习:** 微调大型语言模型的内容、原因及方法 | [视频](https://aka.ms/gen-ai-lesson18-gh?WT.mc_id=academic-105485-koreyst) | [了解更多](https://aka.ms/genai-collection?WT.mc_id=academic-105485-koreyst) |
| 19 | [使用小型语言模型构建](./19-slm/README.md?WT.mc_id=academic-105485-koreyst) | **学习:** 使用小型语言模型构建的优势 | 视频即将上线 | [了解更多](https://aka.ms/genai-collection?WT.mc_id=academic-105485-koreyst) |
| 20 | [使用 Mistral 模型构建](./20-mistral/README.md?WT.mc_id=academic-105485-koreyst) | **学习:** Mistral 系列模型的特色与差异 | 视频即将上线 | [了解更多](https://aka.ms/genai-collection?WT.mc_id=academic-105485-koreyst) |
| 21 | [使用 Meta 模型构建](./21-meta/README.md?WT.mc_id=academic-105485-koreyst) | **学习:** Meta 系列模型的特色与差异 | 视频即将上线 | [了解更多](https://aka.ms/genai-collection?WT.mc_id=academic-105485-koreyst) |
### 🌟 特别致谢
特别感谢 [**John Aziz**](https://www.linkedin.com/in/john0isaac/) 创建所有 GitHub Actions 和工作流
[**Bernhard Merkle**](https://www.linkedin.com/in/bernhard-merkle-738b73/) 对每节课程做出关键贡献,以提升学习者和代码体验。
## 🎒 其他课程
我们的团队还制作了其他课程!请查看:
### LangChain
[](https://aka.ms/langchain4j-for-beginners)
[](https://aka.ms/langchainjs-for-beginners?WT.mc_id=m365-94501-dwahlin)
[](https://github.com/microsoft/langchain-for-beginners?WT.mc_id=m365-94501-dwahlin)
---
### Azure / Edge / MCP / 代理
[](https://github.com/microsoft/AZD-for-beginners?WT.mc_id=academic-105485-koreyst)
[](https://github.com/microsoft/edgeai-for-beginners?WT.mc_id=academic-105485-koreyst)
[](https://github.com/microsoft/mcp-for-beginners?WT.mc_id=academic-105485-koreyst)
[](https://github.com/microsoft/ai-agents-for-beginners?WT.mc_id=academic-105485-koreyst)
---
### 生成式 AI 系列
[](https://github.com/microsoft/generative-ai-for-beginners?WT.mc_id=academic-105485-koreyst)
[-9333EA?style=for-the-badge&labelColor=E5E7EB&color=9333EA)](https://github.com/microsoft/Generative-AI-for-beginners-dotnet?WT.mc_id=academic-105485-koreyst)
[-C084FC?style=for-the-badge&labelColor=E5E7EB&color=C084FC)](https://github.com/microsoft/generative-ai-for-beginners-java?WT.mc_id=academic-105485-koreyst)
[-E879F9?style=for-the-badge&labelColor=E5E7EB&color=E879F9)](https://github.com/microsoft/generative-ai-with-javascript?WT.mc_id=academic-105485-koreyst)
---
### 核心学习
[](https://aka.ms/ml-beginners?WT.mc_id=academic-105485-koreyst)
[](https://aka.ms/datascience-beginners?WT.mc_id=academic-105485-koreyst)
[](https://aka.ms/ai-beginners?WT.mc_id=academic-105485-koreyst)
[](https://github.com/microsoft/Security-101?WT.mc_id=academic-96948-sayoung)
[](https://aka.ms/webdev-beginners?WT.mc_id=academic-105485-koreyst)
[](https://aka.ms/iot-beginners?WT.mc_id=academic-105485-koreyst)
[](https://github.com/microsoft/xr-development-for-beginners?WT.mc_id=academic-105485-koreyst)
---
### Copilot 系列
[](https://aka.ms/GitHubCopilotAI?WT.mc_id=academic-105485-koreyst)
[](https://github.com/microsoft/mastering-github-copilot-for-dotnet-csharp-developers?WT.mc_id=academic-105485-koreyst)
[](https://github.com/microsoft/CopilotAdventures?WT.mc_id=academic-105485-koreyst)
## 获取帮助
如果您遇到困难或对构建 AI 应用有任何疑问,请加入学习者和经验丰富的开发者们的讨论。这里是一个支持性的社区,欢迎提出问题并自由共享知识。
[](https://discord.gg/nTYy5BXMWG)
如果您在构建过程中有产品反馈或遇到错误,请访问:
[](https://aka.ms/foundry/forum)
---
**免责声明**:
本文档使用 AI 翻译服务 [Co-op Translator](https://github.com/Azure/co-op-translator) 进行翻译。虽然我们力求准确,但请注意,自动翻译可能包含错误或不准确之处。原始语言的文档应被视为权威来源。对于重要信息,建议使用专业人工翻译。我们不对因使用本翻译而产生的任何误解或误读承担责任。