190 lines
25 KiB
Markdown
190 lines
25 KiB
Markdown
<!-- WEHUB_ZH_README -->
|
||
> [!NOTE]
|
||
> 本文档由 WeHub 基于上游 README 翻译整理,属于社区翻译,非官方中文文档。
|
||
> [English](./README.en.md) · [原始项目](https://github.com/microsoft/generative-ai-for-beginners) · [上游 README](https://github.com/microsoft/generative-ai-for-beginners/blob/HEAD/README.md)
|
||
> 原作者、版权与许可证归属以原始项目及本仓库 LICENSE 文件为准。
|
||
|
||

|
||
|
||
### 21 节课程,教授你开始构建生成式 AI(Generative 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 提供支持(自动化且始终保持最新)
|
||
|
||
<!-- CO-OP TRANSLATOR LANGUAGES TABLE START -->
|
||
[阿拉伯语](./translations/ar/README.md) | [孟加拉语](./translations/bn/README.md) | [保加利亚语](./translations/bg/README.md) | [缅甸语](./translations/my/README.md) | [中文(简体)](./translations/zh-CN/README.md) | [中文(繁体,香港)](./translations/zh-HK/README.md) | [中文(繁体,澳门)](./translations/zh-MO/README.md) | [中文(繁体,台湾)](./translations/zh-TW/README.md) | [克罗地亚语](./translations/hr/README.md) | [捷克语](./translations/cs/README.md) | [丹麦语](./translations/da/README.md) | [荷兰语](./translations/nl/README.md) | [爱沙尼亚语](./translations/et/README.md) | [芬兰语](./translations/fi/README.md) | [法语](./translations/fr/README.md) | [德语](./translations/de/README.md) | [希腊语](./translations/el/README.md) | [希伯来语](./translations/he/README.md) | [印地语](./translations/hi/README.md) | [匈牙利语](./translations/hu/README.md) | [印尼语](./translations/id/README.md) | [意大利语](./translations/it/README.md) | [日语](./translations/ja/README.md) | [卡纳达语](./translations/kn/README.md) | [高棉语](./translations/km/README.md) | [韩语](./translations/ko/README.md) | [立陶宛语](./translations/lt/README.md) | [马来语](./translations/ms/README.md) | [马拉雅拉姆语](./translations/ml/README.md) | [马拉地语](./translations/mr/README.md) | [尼泊尔语](./translations/ne/README.md) | [尼日利亚皮钦语](./translations/pcm/README.md) | [挪威语](./translations/no/README.md) | [波斯语](./translations/fa/README.md) | [波兰语](./translations/pl/README.md) | [葡萄牙语(巴西)](./translations/pt-BR/README.md) | [葡萄牙语(葡萄牙)](./translations/pt-PT/README.md) | [旁遮普语(古木基文)](./translations/pa/README.md) | [罗马尼亚语](./translations/ro/README.md) | [俄语](./translations/ru/README.md) | [塞尔维亚语(西里尔字母)](./translations/sr/README.md) | [斯洛伐克语](./translations/sk/README.md) | [斯洛文尼亚语](./translations/sl/README.md) | [西班牙语](./translations/es/README.md) | [斯瓦希里语](./translations/sw/README.md) | [瑞典语](./translations/sv/README.md) | [他加禄语(菲律宾语)](./translations/tl/README.md) | [泰米尔语](./translations/ta/README.md) | [泰卢固语](./translations/te/README.md) | [泰语](./translations/th/README.md) | [土耳其语](./translations/tr/README.md) | [乌克兰语](./translations/uk/README.md) | [乌尔都语](./translations/ur/README.md) | [越南语](./translations/vi/README.md)
|
||
|
||
> **希望克隆到本地?**
|
||
>
|
||
> 本仓库包含 50 多种语言翻译,这会显著增加下载体积。如需克隆时不包含翻译文件,请使用稀疏检出(sparse checkout):
|
||
>
|
||
> **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"
|
||
> ```
|
||
>
|
||
> 这将为你提供完成课程所需的全部内容,且下载速度大幅提升。
|
||
<!-- CO-OP TRANSLATOR LANGUAGES TABLE END -->
|
||
|
||
# 面向初学者的生成式 AI(第 3 版)— 课程
|
||
|
||
通过 Microsoft Cloud Advocates 提供的 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)!
|
||
|
||
每节课还包含"继续学习"(Keep Learning)部分,提供额外的学习工具。
|
||
|
||
## 你需要什么
|
||
### 要运行本课程的代码,你可以使用以下任一服务:
|
||
- [Azure OpenAI 服务](https://aka.ms/genai-beginners/azure-open-ai?WT.mc_id=academic-105485-koreyst) - **相关课程:** "aoai-assignment"
|
||
- [Microsoft Foundry 模型](https://ai.azure.com/catalog/models?WT.mc_id=academic-105485-koreyst) - **相关课程:** "githubmodels"(GitHub Models 将于 2026 年 7 月底退役 — 请改用 Microsoft Foundry 模型)
|
||
- [OpenAI API](https://aka.ms/genai-beginners/open-ai?WT.mc_id=academic-105485-koreyst) - **相关课程:** "oai-assignment"
|
||
- [Foundry Local](https://foundrylocal.ai?WT.mc_id=academic-105485-koreyst) - 在你自己的设备上完全离线运行模型,无需云订阅
|
||
|
||
- 具备 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))到你自己的 GitHub 账号
|
||
|
||
我们创建了一节 **[课程设置](./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)),方便以后查找。
|
||
|
||
## 🧠 准备部署了吗?
|
||
|
||
如果你正在寻找更高级的代码示例,请查看我们的 [生成式 AI 代码示例合集](https://aka.ms/genai-beg-code?WT.mc_id=academic-105485-koreyst)),包含 **Python** 和 **TypeScript** 两种语言版本。
|
||
|
||
## 🗣️ 结识其他学习者,获取支持
|
||
|
||
加入我们的[官方 Microsoft Foundry Discord 服务器](https://aka.ms/genai-discord?WT.mc_id=academic-105485-koreyst)),与参加本课程的其他学习者交流互动并获得支持。
|
||
|
||
有问题或想分享产品反馈?欢迎访问我们的 [Microsoft Foundry 开发者论坛](https://aka.ms/azureaifoundry/forum)) 在 Github 上提问。
|
||
|
||
## 🚀 正在创业?
|
||
|
||
访问 [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)) 或 [创建 Pull Request](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 与 LLM 简介](./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) | **构建:** 使用 Embeddings 搜索数据的搜索应用 | [视频](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 应用时应用 UX 设计原则 | [视频](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) | **学习:** 管理 LLM 生命周期和 LLMOps 的工具与指标 | [视频](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 框架从向量数据库中检索 Embeddings 的应用 | [视频](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 Agent](./17-ai-agents/README.md?WT.mc_id=academic-105485-koreyst) | **构建:** 使用 AI Agent 框架构建应用 | [视频](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 | [微调 LLM](./18-fine-tuning/README.md?WT.mc_id=academic-105485-koreyst) | **学习:** 微调 LLM 的定义、原因和方法 | [视频](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 | [使用 SLM 构建应用](./19-slm/README.md?WT.mc_id=academic-105485-koreyst) | **学习:** 使用小型语言模型(SLM)构建应用的优势 | 视频即将上线 | [了解更多](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/)) 为每个课程做出了关键贡献,改善了学习者和代码体验。
|
||
|
||
## 🎒 其他课程
|
||
|
||
我们的团队还制作了其他课程!欢迎查看:
|
||
|
||
<!-- CO-OP TRANSLATOR OTHER COURSES START -->
|
||
### 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 / Agents(智能体)
|
||
[](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))
|
||
|
||
---
|
||
|
||
### Generative AI(生成式 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))
|
||
<!-- CO-OP TRANSLATOR OTHER COURSES END -->
|
||
|
||
## 获取帮助
|
||
|
||
如果你遇到困难或对构建 AI 应用有任何疑问,欢迎加入与其他学习者和经验丰富的开发者一起讨论 MCP。这是一个支持性的社区,欢迎提问,知识自由共享。
|
||
|
||
[](https://discord.gg/nTYy5BXMWG))
|
||
|
||
如果你有产品反馈或在构建过程中遇到错误,请访问:
|
||
|
||
[](https://aka.ms/foundry/forum))
|