├── units ├── en │ ├── unit3 │ │ ├── README.md │ │ └── agentic-rag │ │ │ ├── conclusion.mdx │ │ │ └── agentic-rag.mdx │ ├── unit4 │ │ ├── conclusion.mdx │ │ ├── get-your-certificate.mdx │ │ ├── introduction.mdx │ │ └── additional-readings.mdx │ ├── communication │ │ └── live1.mdx │ ├── unit2 │ │ ├── smolagents │ │ │ ├── conclusion.mdx │ │ │ └── final_quiz.mdx │ │ ├── llama-index │ │ │ ├── conclusion.mdx │ │ │ ├── README.md │ │ │ ├── llama-hub.mdx │ │ │ └── introduction.mdx │ │ ├── langgraph │ │ │ ├── conclusion.mdx │ │ │ └── introduction.mdx │ │ └── introduction.mdx │ ├── bonus-unit1 │ │ └── conclusion.mdx │ ├── bonus-unit3 │ │ ├── conclusion.mdx │ │ └── introduction.mdx │ ├── unit1 │ │ ├── conclusion.mdx │ │ ├── README.md │ │ ├── final-quiz.mdx │ │ ├── introduction.mdx │ │ └── observations.mdx │ └── bonus-unit2 │ │ └── introduction.mdx ├── es │ ├── unit3 │ │ ├── README.md │ │ └── agentic-rag │ │ │ ├── conclusion.mdx │ │ │ └── agentic-rag.mdx │ ├── unit4 │ │ ├── README.md │ │ ├── conclusion.mdx │ │ ├── get-your-certificate.mdx │ │ ├── introduction.mdx │ │ └── additional-readings.mdx │ ├── unit2 │ │ ├── smolagents │ │ │ ├── conclusion.mdx │ │ │ └── final_quiz.mdx │ │ ├── llama-index │ │ │ ├── conclusion.mdx │ │ │ ├── README.md │ │ │ └── llama-hub.mdx │ │ ├── langgraph │ │ │ ├── conclusion.mdx │ │ │ └── introduction.mdx │ │ └── introduction.mdx │ ├── communication │ │ └── live1.mdx │ ├── bonus-unit1 │ │ └── conclusion.mdx │ ├── bonus-unit3 │ │ ├── conclusion.mdx │ │ └── introduction.mdx │ ├── unit1 │ │ ├── conclusion.mdx │ │ ├── README.md │ │ ├── final-quiz.mdx │ │ └── introduction.mdx │ └── bonus-unit2 │ │ └── introduction.mdx ├── fr │ ├── unit3 │ │ ├── README.md │ │ └── agentic-rag │ │ │ ├── conclusion.mdx │ │ │ └── agentic-rag.mdx │ ├── unit4 │ │ ├── conclusion.mdx │ │ ├── get-your-certificate.mdx │ │ ├── introduction.mdx │ │ └── additional-readings.mdx │ ├── unit2 │ │ ├── smolagents │ │ │ ├── conclusion.mdx │ │ │ └── final_quiz.mdx │ │ ├── llama-index │ │ │ ├── conclusion.mdx │ │ │ ├── README.md │ │ │ └── llama-hub.mdx │ │ └── langgraph │ │ │ ├── conclusion.mdx │ │ │ └── introduction.mdx │ ├── communication │ │ └── live1.mdx │ ├── bonus-unit1 │ │ └── conclusion.mdx │ ├── bonus-unit3 │ │ ├── conclusion.mdx │ │ └── introduction.mdx │ ├── unit1 │ │ ├── conclusion.mdx │ │ ├── README.md │ │ ├── final-quiz.mdx │ │ └── introduction.mdx │ └── bonus-unit2 │ │ └── introduction.mdx ├── vi │ ├── unit2 │ │ └── README.md │ ├── unit3 │ │ └── README.md │ ├── unit4 │ │ └── README.md │ ├── communication │ │ ├── next-units.mdx │ │ └── live1.mdx │ ├── bonus-unit1 │ │ └── conclusion.mdx │ ├── unit1 │ │ ├── conclusion.mdx │ │ ├── final-quiz.mdx │ │ ├── introduction.mdx │ │ └── observations.mdx │ ├── _toctree.yml │ └── unit0 │ │ └── discord101.mdx ├── zh-CN │ ├── unit3 │ │ ├── README.md │ │ └── agentic-rag │ │ │ ├── conclusion.mdx │ │ │ ├── agentic-rag.mdx │ │ │ └── introduction.mdx │ ├── unit4 │ │ ├── conclusion.mdx │ │ ├── get-your-certificate.mdx │ │ ├── introduction.mdx │ │ ├── additional-readings.mdx │ │ ├── hands-on.mdx │ │ └── what-is-gaia.mdx │ ├── communication │ │ ├── next-units.mdx │ │ └── live1.mdx │ ├── unit2 │ │ ├── llama-index │ │ │ ├── conclusion.mdx │ │ │ ├── introduction.mdx │ │ │ ├── llama-hub.mdx │ │ │ ├── README.md │ │ │ ├── quiz2.mdx │ │ │ └── quiz1.mdx │ │ ├── smolagents │ │ │ ├── conclusion.mdx │ │ │ └── final_quiz.mdx │ │ ├── langgraph │ │ │ ├── conclusion.mdx │ │ │ ├── introduction.mdx │ │ │ └── when_to_use_langgraph.mdx │ │ └── introduction.mdx │ ├── bonus-unit3 │ │ ├── conclusion.mdx │ │ ├── introduction.mdx │ │ ├── from-llm-to-agents.mdx │ │ ├── launching_agent_battle.mdx │ │ └── state-of-art.mdx │ ├── bonus-unit1 │ │ ├── conclusion.mdx │ │ ├── introduction.mdx │ │ ├── fine-tuning.mdx │ │ └── what-is-function-calling.mdx │ ├── unit1 │ │ ├── conclusion.mdx │ │ ├── final-quiz.mdx │ │ ├── introduction.mdx │ │ ├── observations.mdx │ │ ├── quiz2.mdx │ │ ├── README.md │ │ └── thoughts.mdx │ ├── bonus_unit2 │ │ └── introduction.mdx │ └── unit0 │ │ └── discord101.mdx ├── ru-RU │ ├── communication │ │ ├── next-units.mdx │ │ └── live1.mdx │ ├── bonus-unit1 │ │ └── conclusion.mdx │ ├── unit1 │ │ ├── get-your-certificate.mdx │ │ ├── final-quiz.mdx │ │ ├── conclusion.mdx │ │ ├── README.md │ │ └── introduction.mdx │ └── _toctree.yml └── ko │ ├── unit1 │ ├── conclusion.mdx │ ├── final-quiz.mdx │ ├── README.md │ ├── introduction.mdx │ ├── observations.mdx │ ├── thoughts.mdx │ └── quiz2.mdx │ ├── _toctree.yml │ ├── bonus-unit1 │ └── introduction.mdx │ └── unit0 │ ├── discord101.mdx │ └── onboarding.mdx ├── quiz ├── .python-version ├── README.md ├── pyproject.toml ├── data │ └── unit_1.json └── push_questions.py └── .github ├── ISSUE_TEMPLATE ├── i-have-a-question.md ├── i-have-a-bug-with-a-hands-on.md └── i-want-to-improve-the-course-or-write-a-new-section.md └── workflows ├── build_documentation.yml ├── build_pr_documentation.yml └── upload_pr_documentation.yml /units/en/unit3/README.md: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /units/es/unit3/README.md: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /units/es/unit4/README.md: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /units/fr/unit3/README.md: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /units/vi/unit2/README.md: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /units/vi/unit3/README.md: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /units/vi/unit4/README.md: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /units/zh-CN/unit3/README.md: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /quiz/.python-version: -------------------------------------------------------------------------------- 1 | 3.11 2 | -------------------------------------------------------------------------------- /quiz/README.md: -------------------------------------------------------------------------------- 1 | # Agent Course quiz scripts -------------------------------------------------------------------------------- /units/zh-CN/unit4/conclusion.mdx: -------------------------------------------------------------------------------- 1 | # 结论 2 | 3 | **恭喜你完成Agent课程!** 4 | 5 | 经过不懈坚持和投入,你已经在AI智能体方面打下了坚实的基础。 6 | 7 | 但完成这个课程**并不是你旅程的终点**。这只是一个开始:不要在探索下一个章节方面犹豫,我们在那里分享了更多我们精选的资源,以帮助你继续学习,包括像**MCPs**等进阶资源。 8 | 9 | **谢谢你**参与这个课程。**我们希望您喜欢这门课程,就像我们享受这个课程的编写那样**。 10 | 11 | 別忘了:**持续学习,保持卓越🤗** -------------------------------------------------------------------------------- /quiz/pyproject.toml: -------------------------------------------------------------------------------- 1 | [project] 2 | name = "agents-course" 3 | version = "0.1.0" 4 | description = "Add your description here" 5 | readme = "README.md" 6 | requires-python = ">=3.11" 7 | dependencies = [ 8 | "datasets>=3.2.0", 9 | "huggingface-hub>=0.27.1", 10 | "ipykernel>=6.29.5", 11 | "requests>=2.32.3", 12 | ] 13 | -------------------------------------------------------------------------------- /units/zh-CN/communication/next-units.mdx: -------------------------------------------------------------------------------- 1 | # 后续单元发布时间表及常见问题解答 2 | 3 | 课程单元发布时间安排如下: 4 | 5 | 下一单元 6 | 7 | 请务必 完成课程注册! 完成注册后, **我们将随单元发布进度为您推送专属学习链接,同步更新挑战任务详情及课程动态**。 8 | 9 | 持续精进,成就卓越 🤗 -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/i-have-a-question.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: I have a question 3 | about: You have a question about a section of the course 4 | title: "[QUESTION]" 5 | labels: question 6 | assignees: '' 7 | 8 | --- 9 | 10 | First, the **best way to get a response fast is to ask the community** in our Discord server: https://www.hf.co/join/discord 11 | 12 | However, if you prefer you can ask here, please **be specific**. 13 | -------------------------------------------------------------------------------- /units/zh-CN/unit2/llama-index/conclusion.mdx: -------------------------------------------------------------------------------- 1 | # 结语 2 | 3 | 恭喜完成第二单元 `llama-index` 模块的学习 🥳 4 | 5 | 您已掌握 `llama-index` 的核心基础,并学会了如何构建自主式工作流! 6 | 现在凭借掌握的 `llama-index` 技能,您可以开始创建解决实际任务的搜索引擎。 7 | 8 | 在本单元的下个模块中,您将学习**如何用 LangGraph 构建智能体**。 9 | 10 | 最后,我们诚挚希望**听取您对课程的评价和改进建议**。 11 | 如有任何反馈,请👉[填写此表单](https://docs.google.com/forms/d/e/1FAIpQLSe9VaONn0eglax0uTwi29rIn4tM7H2sYmmybmG5jJNlE5v0xA/viewform?usp=dialog) 12 | 13 | ### 持续学习,保持热情 🤗 14 | -------------------------------------------------------------------------------- /units/zh-CN/unit2/smolagents/conclusion.mdx: -------------------------------------------------------------------------------- 1 | # 结论 2 | 3 | 恭喜你完成了第二单元的 `smolagents` 模块 🥳 4 | 5 | 你刚刚掌握了 `smolagents` 的基础知识,并且构建了自己的智能体!现在你已经具备了 `smolagents` 的技能,你可以开始创建能够解决你感兴趣任务的智能体。 6 | 7 | 在下一个模块中,你将学习**如何使用 LlamaIndex 构建智能体(Agents)**。 8 | 9 | 最后,我们非常想**听听你对这门课程的看法以及我们如何改进它**。如果你有任何反馈,请👉 [填写这个表格](https://docs.google.com/forms/d/e/1FAIpQLSe9VaONn0eglax0uTwi29rIn4tM7H2sYmmybmG5jJNlE5v0xA/viewform?usp=dialog) 10 | 11 | ### 继续学习,保持优秀 🤗 12 | -------------------------------------------------------------------------------- /units/zh-CN/unit3/agentic-rag/conclusion.mdx: -------------------------------------------------------------------------------- 1 | # 总结 2 | 3 | 在本单元中,我们学习了如何创建智能体增强的检索生成(RAG)系统,帮助我们友好的智能体 Alfred 筹备并管理一场盛大的晚会。 4 | 5 | RAG 与智能体能力的结合展示了当 AI 助手具备以下能力时的强大潜力: 6 | - 访问结构化知识(宾客信息) 7 | - 获取实时信息(网络搜索) 8 | - 领域专用工具(天气信息、Hub 统计) 9 | - 历史交互记忆 10 | 11 | 凭借这些能力,Alfred 现已具备完美主持者的素质,能够回答宾客问题、提供最新信息、确保晚会顺利进行——甚至能精准控制烟花表演的时机! 12 | 13 | > [!TIP] 14 | > 完成智能体构建后,您可以进一步探索: 15 | > 16 | > - 为特定用例创建定制化工具 17 | > - 使用嵌入技术实现更复杂的 RAG 系统 18 | > - 构建可协作的多智能体系统 19 | > - 将智能体部署为可交互的服务 20 | -------------------------------------------------------------------------------- /units/vi/communication/next-units.mdx: -------------------------------------------------------------------------------- 1 | # Khi nào các chương tiếp theo được công bố? 2 | 3 | Đây là lịch công bố: 4 | 5 | Next Units 6 | 7 | Đừng quên đăng ký khóa học! Khi đăng ký, **chúng mình sẽ gửi bạn link từng chương khi chúng được công bố, cùng thông tin cập nhật và chi tiết về các Bài tập lớn sắp tới**. 8 | 9 | Phấn đấu học tập không ngừng 🤗 -------------------------------------------------------------------------------- /quiz/data/unit_1.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "question": "Which of the following best describes a Large Language Model (LLM)?", 4 | "answer_a": "A model specializing in language recognition", 5 | "answer_b": "A massive neural network that understands and generates human language", 6 | "answer_c": "A model exclusively used for language data tasks like summarization or classification", 7 | "answer_d": "A rule-based chatbot used for conversations", 8 | "correct_answer": "B" 9 | } 10 | ] -------------------------------------------------------------------------------- /units/zh-CN/bonus-unit3/conclusion.mdx: -------------------------------------------------------------------------------- 1 | # 结论 2 | 3 | 如果你已经走到这里,恭喜你!🥳 你已经成功构建了你自己的宝可梦战斗智能体!⚔️🎮 4 | 5 | 你已经掌握了**智能体工作流程**的基础,将 **LLM** 连接到游戏环境,并部署了一个准备迎接战斗挑战的智能代理。 6 | 7 | 但旅程并未结束! 8 | 现在你的第一个智能体已经启动并运行,想想你如何进一步改进它: 9 | 10 | - 你能提高它的战略思维吗? 11 | - 记忆机制或反馈循环如何改变它的表现? 12 | - 什么实验能帮助使它在战斗中更具竞争力? 13 | 14 | 我们很想听到你对课程的想法,以及我们如何为未来的学习者做得更好。 15 | 有反馈?👉 [填写此表单](https://docs.google.com/forms/d/e/1FAIpQLSe9VaONn0eglax0uTwi29rIn4tM7H2sYmmybmG5jJNlE5v0xA/viewform?usp=dialog) 16 | 17 | 感谢与我们一起学习,记住: 18 | 19 | **保持学习,保持训练,保持战斗,保持 awesome!** 🤗 20 | -------------------------------------------------------------------------------- /units/zh-CN/communication/live1.mdx: -------------------------------------------------------------------------------- 1 | # 直播第一课:课程体系解读与首次答疑会 2 | 3 | 在本期智能体课程的首场直播中,我们详细解析了课程运行机制(涵盖课程范围、单元结构、实践挑战等核心要素),并针对学员疑问进行现场解答。 4 | 5 | 6 | 7 | 要获取后续直播排期,请关注我们的 **Discord 动态**. 系统也将同步发送邮件提醒。若无法实时参与,学员无需担心,我们**对所有直播课程都会进行全程录制存档**。 -------------------------------------------------------------------------------- /units/ru-RU/communication/next-units.mdx: -------------------------------------------------------------------------------- 1 | # Когда будут опубликованы следующие разделы? 2 | 3 | Вот график публикации: 4 | 5 | Следующие разделы 6 | 7 | Не забудьте записаться на курс! Подписавшись, **мы сможем присылать вам ссылки по мере публикации каждого раздела, а также обновления и подробности о предстоящих соревнованиях**. 8 | 9 | Продолжайте учиться, оставайтесь потрясающими 🤗 -------------------------------------------------------------------------------- /units/zh-CN/bonus-unit1/conclusion.mdx: -------------------------------------------------------------------------------- 1 | # 结论 (Conclusion) [[conclusion]] 2 | 3 | 恭喜你完成第一个附加单元 🥳 4 | 5 | 你已经**掌握了函数调用 (function-calling) 的理解,以及如何微调 (fine-tune) 你的模型来实现函数调用**! 6 | 7 | 如果我们现在有一条建议,那就是尝试**微调 (fine-tune) 不同的模型**。**学习的最好方式就是通过尝试。** 8 | 9 | 在下一个单元中,你将学习如何使用**最先进的框架 (state-of-the-art frameworks),如 `smolagents`、`LlamaIndex` 和 `LangGraph`**。 10 | 11 | 最后,我们很想**听听你对这门课程的看法,以及我们如何改进它**。如果你有任何反馈,请 👉 [填写这个表单](https://docs.google.com/forms/d/e/1FAIpQLSe9VaONn0eglax0uTwi29rIn4tM7H2sYmmybmG5jJNlE5v0xA/viewform?usp=dialog) 12 | 13 | ### 继续学习,保持优秀 🤗 -------------------------------------------------------------------------------- /.github/workflows/build_documentation.yml: -------------------------------------------------------------------------------- 1 | name: Build documentation 2 | 3 | on: 4 | push: 5 | branches: 6 | - main 7 | 8 | jobs: 9 | build: 10 | uses: huggingface/doc-builder/.github/workflows/build_main_documentation.yml@main 11 | with: 12 | commit_sha: ${{ github.sha }} 13 | package: agents-course 14 | package_name: agents-course 15 | path_to_docs: agents-course/units/ 16 | additional_args: --not_python_module 17 | languages: en zh-CN ru-RU vi es ko fr 18 | secrets: 19 | hf_token: ${{ secrets.HF_DOC_BUILD_PUSH }} 20 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/i-have-a-bug-with-a-hands-on.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: I have a bug with a hands-on 3 | about: You have encountered a bug during one of the hands-on 4 | title: "[HANDS-ON BUG]" 5 | labels: hands-on-bug 6 | assignees: '' 7 | 8 | --- 9 | 10 | **Describe the bug** 11 | A clear and concise description of what the bug is. 12 | 13 | **To Reproduce** 14 | Please provide any informations and a **link** to your hands-on so that we can investigate. 15 | 16 | **Screenshots** 17 | If applicable, add screenshots to help explain your problem. 18 | 19 | **Additional context** 20 | Add any other context about the problem here. 21 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/i-want-to-improve-the-course-or-write-a-new-section.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: I want to improve the course or write a new section 3 | about: You found a typo, an error or you want to improve a part of the course or write 4 | a full section/unit 5 | title: "[UPDATE]" 6 | labels: documentation 7 | assignees: '' 8 | 9 | --- 10 | 11 | 1. If you want to add a full section or a new unit, **please describe precisely what you want to add before starting to write it** so that we can review the idea, validate it or not, and guide you through the writing process. 12 | 13 | 2. If there's a typo, you can directly open a PR. 14 | -------------------------------------------------------------------------------- /units/zh-CN/unit2/smolagents/final_quiz.mdx: -------------------------------------------------------------------------------- 1 | # 测验时间! 2 | 3 | 恭喜你完成了 `smolagents` 的学习材料!你已经取得了很多成就。现在,是时候通过一个测验来测试你的知识了。🧠 4 | 5 | ## 说明 6 | 7 | - 测验由代码问题组成。 8 | - 你将得到完成代码片段的指示。 9 | - 仔细阅读指示并相应地完成代码片段。 10 | - 对于每个问题,你将得到结果和一些反馈。 11 | 12 | 🧘 **这个测验不计分也不提供证书**。这是关于你理解 `smolagents` 库,并了解你是否应该在书面材料上花更多时间。在接下来的单元中,你将在用例和项目中测试这些知识。 13 | 14 | 让我们开始吧! 15 | 16 | ## 测验 🚀 17 | 18 | 24 | 25 | 你也可以点击👉 [这里](https://huggingface.co/spaces/agents-course/unit2_smolagents_quiz) 访问测验 26 | -------------------------------------------------------------------------------- /units/en/unit4/conclusion.mdx: -------------------------------------------------------------------------------- 1 | # Conclusion 2 | 3 | **Congratulations on finishing the Agents Course!** 4 | 5 | Through perseverance and dedication, you’ve built a solid foundation in the world of AI Agents. 6 | 7 | But finishing this course is **not the end of your journey**. It’s just the beginning: don’t hesitate to explore the next section where we share curated resources to help you continue learning, including advanced topics like **MCPs** and beyond. 8 | 9 | **Thank you** for being part of this course. **We hope you liked this course as much as we loved writing it**. 10 | 11 | And don’t forget: **Keep Learning, Stay Awesome 🤗** -------------------------------------------------------------------------------- /units/zh-CN/unit4/get-your-certificate.mdx: -------------------------------------------------------------------------------- 1 | # 领取你的证书 🎓 2 | 3 | 如果你得分**高于30%,恭喜你!👏 你现在有资格领取你的官方证书**。 4 | 5 | 你可以按照以下步骤领取: 6 | 7 | 1. 访问[证书页面](https://huggingface.co/spaces/agents-course/Unit4-Final-Certificate)。 8 | 2. 使用提供的按钮**登录**你的 Hugging Face 账户。 9 | 3. **输入你的全名**,这将是显示在你证书上的名字。 10 | 4. 点击“**获取我的证书**”来验证你的分数并下载你的证书。 11 | 12 | Congrats! 13 | 14 | 拿到证书后,你可以随意: 15 | - 将其添加到你的 **LinkedIn个人资料** 🧑‍💼 16 | - 在**X**、**Bluesky**等平台分享 🎉 17 | 18 | **别忘了[@huggingface](https://huggingface.co/huggingface)。我们会为你感到无比自豪,并且很高兴和你庆祝!🤗** 19 | -------------------------------------------------------------------------------- /units/zh-CN/unit2/langgraph/conclusion.mdx: -------------------------------------------------------------------------------- 1 | # 结语 2 | 3 | 祝贺您完成了第二单元的 `LangGraph` 模块!🥳 4 | 5 | 您现在已经掌握了使用 LangGraph 构建结构化工作流的基础知识,这些工作流可以直接投入生产环境。 6 | 7 | 本模块只是您 LangGraph 学习之旅的起点。对于更深入的学习内容,我们推荐: 8 | 9 | - 探索 [LangGraph 官方文档](https://github.com/langchain-ai/langgraph) 10 | - 参加 LangChain Academy 的 [LangGraph 入门课程](https://academy.langchain.com/courses/intro-to-langgraph) 11 | - 亲自构建一些项目! 12 | 13 | 在下一个单元中,您将探索真实的应用场景。是时候将理论付诸实践了! 14 | 15 | 我们非常重视 **您对课程的想法和改进建议**。如果有任何反馈,请👉[填写此表单](https://docs.google.com/forms/d/e/1FAIpQLSe9VaONn0eglax0uTwi29rIn4tM7H2sYmmybmG5jJNlE5v0xA/viewform?usp=dialog) 16 | 17 | ### 持续学习,保持激情!🤗 18 | 19 | 尊敬的先生/女士!🎩🦇 20 | 21 | -Alfred- -------------------------------------------------------------------------------- /units/es/unit4/conclusion.mdx: -------------------------------------------------------------------------------- 1 | # Conclusión 2 | 3 | **¡Felicitaciones por terminar el Curso de Agentes!** 4 | 5 | A través de la perseverancia y la dedicación, has construido una base sólida en el mundo de los Agentes de IA. 6 | 7 | Pero terminar este curso **no es el final de tu viaje**. Es solo el comienzo: no dudes en explorar la siguiente sección donde compartimos recursos seleccionados para ayudarte a continuar aprendiendo, incluyendo temas avanzados como los **MCP** y más allá. 8 | 9 | **Gracias** por ser parte de este curso. **Esperamos que te haya gustado tanto como a nosotros nos encantó escribirlo**. 10 | 11 | Y no lo olvides: **Sigue Aprendiendo, Mantente Genial 🤗** -------------------------------------------------------------------------------- /.github/workflows/build_pr_documentation.yml: -------------------------------------------------------------------------------- 1 | name: Build PR Documentation 2 | 3 | on: 4 | pull_request: 5 | 6 | concurrency: 7 | group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} 8 | cancel-in-progress: true 9 | 10 | jobs: 11 | build: 12 | uses: huggingface/doc-builder/.github/workflows/build_pr_documentation.yml@main 13 | with: 14 | commit_sha: ${{ github.event.pull_request.head.sha }} 15 | pr_number: ${{ github.event.number }} 16 | package: agents-course 17 | package_name: agents-course 18 | path_to_docs: agents-course/units/ 19 | additional_args: --not_python_module 20 | languages: en zh-CN ru-RU vi es ko fr 21 | -------------------------------------------------------------------------------- /.github/workflows/upload_pr_documentation.yml: -------------------------------------------------------------------------------- 1 | name: Upload PR Documentation 2 | 3 | on: 4 | workflow_run: 5 | workflows: ["Build PR Documentation"] 6 | types: 7 | - completed 8 | 9 | permissions: 10 | actions: write 11 | contents: write 12 | deployments: write 13 | pull-requests: write 14 | 15 | 16 | jobs: 17 | build: 18 | uses: huggingface/doc-builder/.github/workflows/upload_pr_documentation.yml@main 19 | with: 20 | package_name: agents-course 21 | hub_base_path: https://moon-ci-docs.huggingface.co/learn 22 | secrets: 23 | hf_token: ${{ secrets.HF_DOC_BUILD_PUSH }} 24 | comment_bot_token: ${{ secrets.COMMENT_BOT_TOKEN }} 25 | -------------------------------------------------------------------------------- /units/fr/unit4/conclusion.mdx: -------------------------------------------------------------------------------- 1 | # Conclusion 2 | 3 | **Félicitations pour avoir terminé le Cours sur les Agents !** 4 | 5 | Grâce à votre persévérance et à votre dévouement, vous avez acquis une base solide dans le monde des agents IA. 6 | 7 | Mais terminer ce cours n'est **pas la fin de votre parcours**. C'est juste le début : n'hésitez pas à explorer la section suivante où nous partageons des ressources sélectionnées pour vous aider à continuer d'apprendre, y compris des sujets avancés comme les ***Protocol de Contexte Modèle (MCP)*** et au-delà. 8 | 9 | **Merci** d'avoir participé à ce cours. **Nous espérons que vous l'avez apprécié autant que nous avons aimé l'écrire**. 10 | 11 | Et n'oubliez pas : **continuez à apprendre, restez géniaux 🤗** -------------------------------------------------------------------------------- /units/en/communication/live1.mdx: -------------------------------------------------------------------------------- 1 | # Live 1: How the Course Works and First Q&A 2 | 3 | In this first live stream of the Agents Course, we explained how the course **works** (scope, units, challenges, and more) and answered your questions. 4 | 5 | 6 | 7 | To know when the next live session is scheduled, check our **Discord server**. We will also send you an email. If you can’t participate, don’t worry, we **record all live sessions**. 8 | -------------------------------------------------------------------------------- /units/en/unit2/smolagents/conclusion.mdx: -------------------------------------------------------------------------------- 1 | # Conclusion 2 | 3 | Congratulations on finishing the `smolagents` module of this second Unit 🥳 4 | 5 | You’ve just mastered the fundamentals of `smolagents` and you’ve built your own Agent! Now that you have skills in `smolagents`, you can now start to create Agents that will solve tasks you're interested about. 6 | 7 | In the next module, you're going to learn **how to build Agents with LlamaIndex**. 8 | 9 | Finally, we would love **to hear what you think of the course and how we can improve it**. If you have some feedback then, please 👉 [fill this form](https://docs.google.com/forms/d/e/1FAIpQLSe9VaONn0eglax0uTwi29rIn4tM7H2sYmmybmG5jJNlE5v0xA/viewform?usp=dialog) 10 | 11 | ### Keep Learning, stay awesome 🤗 12 | -------------------------------------------------------------------------------- /units/es/unit2/smolagents/conclusion.mdx: -------------------------------------------------------------------------------- 1 | # Conclusión 2 | 3 | ¡Felicitaciones por terminar el módulo de `smolagents` de esta segunda Unidad 🥳 4 | 5 | ¡Acabas de dominar los fundamentos de `smolagents` y has construido tu propio Agente! Ahora que tienes habilidades en `smolagents`, puedes comenzar a crear Agentes que resolverán tareas que te interesen. 6 | 7 | En el próximo módulo, vas a aprender **cómo construir Agentes con LlamaIndex**. 8 | 9 | Finalmente, nos encantaría **escuchar lo que piensas del curso y cómo podemos mejorarlo**. Si tienes algún comentario, por favor 👉 [completa este formulario](https://docs.google.com/forms/d/e/1FAIpQLSe9VaONn0eglax0uTwi29rIn4tM7H2sYmmybmG5jJNlE5v0xA/viewform?usp=dialog) 10 | 11 | ### Sigue aprendiendo, mantente increíble 🤗 12 | -------------------------------------------------------------------------------- /units/es/communication/live1.mdx: -------------------------------------------------------------------------------- 1 | # Live 1: Como funciona el curso y preguntas y respuestas 2 | 3 | En esta primera sesión en vivo del Curso de Agentes, explicamos **como funciona el curso** (alcance, unidades, desafios y más) y respondimos tus preguntas. 4 | 5 | 6 | 7 | Para saber cuando se publica la siguiente sesión, consulta nuestro **Servidor de Discord**. Tambien te enviaremos un correo electrónico. Si no puedes participar, no te preocupes, **todas las sesión en vivo están grabadas**. 8 | -------------------------------------------------------------------------------- /units/zh-CN/unit1/conclusion.mdx: -------------------------------------------------------------------------------- 1 | # 总结 [[conclusion]] 2 | 3 | 恭喜你完成第一单元 🥳 4 | 5 | 你刚刚**掌握了智能体 (Agents) 的基础知识**,并且创建了你的第一个 AI 智能体 (AI Agent)! 6 | 7 | 如果你对某些内容仍感到困惑,这是**很正常的**。智能体是一个复杂的主题,需要一定时间才能完全理解所有内容。 8 | 9 | 在继续之前,**请花时间真正掌握这些材料**。在进入有趣的部分之前,掌握这些要素并建立坚实的基础很重要。 10 | 11 | 如果你通过了测验,别忘了在这里获取你的证书 🎓 👉 [点击这里](https://huggingface.co/spaces/agents-course/unit1-certification-app) 12 | 13 | Certificate Example 14 | 15 | 在下一个(额外的)单元中,你将学习**如何微调智能体来进行函数调用 (function calling)(即能够根据用户提示调用工具)**。 16 | 17 | 最后,我们很想**听听你对课程的看法以及我们如何改进它**。如果你有任何反馈,请 👉 [填写此表格](https://docs.google.com/forms/d/e/1FAIpQLSe9VaONn0eglax0uTwi29rIn4tM7H2sYmmybmG5jJNlE5v0xA/viewform?usp=dialog) 18 | 19 | ### 继续学习,保持优秀 🤗 -------------------------------------------------------------------------------- /units/en/unit2/llama-index/conclusion.mdx: -------------------------------------------------------------------------------- 1 | # Conclusion 2 | 3 | Congratulations on finishing the `llama-index` module of this second Unit 🥳 4 | 5 | You’ve just mastered the fundamentals of `llama-index` and you’ve seen how to build your own agentic workflows! 6 | Now that you have skills in `llama-index`, you can start to create search engines that will solve tasks you're interested in. 7 | 8 | In the next module of the unit, you're going to learn **how to build Agents with LangGraph**. 9 | 10 | Finally, we would love **to hear what you think of the course and how we can improve it**. 11 | If you have some feedback then, please 👉 [fill this form](https://docs.google.com/forms/d/e/1FAIpQLSe9VaONn0eglax0uTwi29rIn4tM7H2sYmmybmG5jJNlE5v0xA/viewform?usp=dialog) 12 | 13 | ### Keep Learning, and stay awesome 🤗 14 | -------------------------------------------------------------------------------- /units/ru-RU/communication/live1.mdx: -------------------------------------------------------------------------------- 1 | # Live 1: Как работает курс и первые ответы на вопросы 2 | 3 | В этой первой прямой трансляции курса по Агентам мы рассказали о том, как **работает** курс (объем, разделы, задачи и многое другое), и ответили на ваши вопросы. 4 | 5 | 6 | 7 | Чтобы узнать, когда запланирован следующая прямая трансляция, проверьте наш сервер **Discord**. Мы также отправим вам электронное письмо. Если вы не сможете принять участие, не волнуйтесь, мы **записываем все прямые трансляции**. 8 | -------------------------------------------------------------------------------- /units/vi/bonus-unit1/conclusion.mdx: -------------------------------------------------------------------------------- 1 | # Kết luận [[conclusion]] 2 | 3 | Chúc mừng các bạn đã hoàn thành chương bổ trợ đầu tiên 🥳 4 | 5 | Bạn đã **thành thạo việc hiểu function-calling và cách fine-tune (tinh chỉnh) model để thực hiện function-calling**! 6 | 7 | Nếu có một lời khuyên từ chúng mình lúc này, đó là hãy thử **fine-tune các model khác nhau**. **Cách học tốt nhất chính là thực hành.** 8 | 9 | Ở chương tiếp theo, các bạn sẽ học cách sử dụng **các framework nổi tiếng như `smolagents`, `LlamaIndex` và `LangGraph`**. 10 | 11 | Cuối cùng, chúng mình rất muốn **nghe ý kiến của bạn về khóa học và cách cải thiện nó**. Nếu có phản hồi, hãy 👉 [điền vào form này](https://docs.google.com/forms/d/e/1FAIpQLSe9VaONn0eglax0uTwi29rIn4tM7H2sYmmybmG5jJNlE5v0xA/viewform?usp=dialog) 12 | 13 | ### Hãy tiếp tục không ngừng học hỏi!! 🤗 -------------------------------------------------------------------------------- /units/en/bonus-unit1/conclusion.mdx: -------------------------------------------------------------------------------- 1 | # Conclusion [[conclusion]] 2 | 3 | Congratulations on finishing this first Bonus Unit 🥳 4 | 5 | You've just **mastered understanding function-calling and how to fine-tune your model to do function-calling**! 6 | 7 | If we have one piece of advice now, it’s to try to **fine-tune different models**. The **best way to learn is by trying.** 8 | 9 | In the next Unit, you're going to learn how to use **state-of-the-art frameworks such as `smolagents`, `LlamaIndex` and `LangGraph`**. 10 | 11 | Finally, we would love **to hear what you think of the course and how we can improve it**. If you have some feedback then, please 👉 [fill this form](https://docs.google.com/forms/d/e/1FAIpQLSe9VaONn0eglax0uTwi29rIn4tM7H2sYmmybmG5jJNlE5v0xA/viewform?usp=dialog) 12 | 13 | ### Keep Learning, Stay Awesome 🤗 -------------------------------------------------------------------------------- /units/vi/communication/live1.mdx: -------------------------------------------------------------------------------- 1 | # Live 1: Cách thức hoạt động của khóa học + buổi hỏi và đáp đầu tiên 2 | 3 | Trong buổi Live đầu tiên của khóa học Agents, chúng mình đã giải thích cách thức **hoạt động** của khóa học (phạm vi, các chương, bài tập, v.v.) và trả lời các câu hỏi từ các bạn. 4 | 5 | 6 | 7 | Để biết lịch diễn ra buổi Live tiếp theo, các bạn hãy xem trên **Discord server** của chúng mình. Chúng mình cũng sẽ gửi email thông báo. Nếu không tham gia được, đừng lo, chúng mình **ghi hình lại tất cả các buổi Live**. -------------------------------------------------------------------------------- /units/ru-RU/bonus-unit1/conclusion.mdx: -------------------------------------------------------------------------------- 1 | # Заключение [[conclusion]] 2 | 3 | Поздравляем вас с завершением этого первого бонусного раздела 🥳. 4 | 5 | Вы только что **овладели пониманием вызова функций и тем, как дообучить свою модель вызову функций**! 6 | 7 | Если у нас и есть теперь совет, то это попробовать **дообучить другие модели**. **Лучший способ учиться - это пробовать**. 8 | 9 | В следующем разделе вы узнаете, как использовать **передовые фреймворки, такие как `smolagents`, `LlamaIndex` и `LangGraph`**. 10 | 11 | Наконец, мы хотели бы **узнать, что вы думаете о курсе и как мы можем его улучшить**. Если у вас есть обратная связь, пожалуйста, 👉 [заполните эту форму](https://docs.google.com/forms/d/e/1FAIpQLSe9VaONn0eglax0uTwi29rIn4tM7H2sYmmybmG5jJNlE5v0xA/viewform?usp=dialog) 12 | 13 | ### Продолжайте учиться, оставайтесь потрясающими 🤗 -------------------------------------------------------------------------------- /units/fr/unit2/smolagents/conclusion.mdx: -------------------------------------------------------------------------------- 1 | # Conclusion 2 | 3 | Félicitations d'avoir terminé le module `smolagents` de cette deuxième unité 🥳 4 | 5 | Vous **maîtrisez les fondamentaux** de `smolagents` et vous avez construit votre propre agent ! A présent que vous avez des compétences sur `smolagents`, vous pouvez maintenant commencer à créer des agents qui résoudront des tâches qui vous intéressent. 6 | 7 | Dans le prochain module, vous allez apprendre **comment construire des agents avec LlamaIndex**. 8 | 9 | Enfin, nous serions ravis **d'entendre ce que vous pensez du cours et comment nous pourrions l'améliorer**. Si vous avez des retours, n'hésitez pas à [remplir ce formulaire](https://docs.google.com/forms/d/e/1FAIpQLSe9VaONn0eglax0uTwi29rIn4tM7H2sYmmybmG5jJNlE5v0xA/viewform?usp=dialog). 10 | 11 | ### Continuez à apprendre, restez géniaux 🤗 12 | -------------------------------------------------------------------------------- /quiz/push_questions.py: -------------------------------------------------------------------------------- 1 | import json 2 | from pathlib import Path 3 | from datasets import Dataset 4 | from huggingface_hub import HfApi 5 | 6 | 7 | ORG_NAME = "agents-course" 8 | 9 | 10 | def main(): 11 | """Push quiz questions to the Hugging Face Hub""" 12 | 13 | for file in Path("data").glob("*.json"): 14 | print(f"Processing {file}") 15 | 16 | with open(file, "r") as f: 17 | quiz_data = json.load(f) 18 | 19 | repo_id = f"{ORG_NAME}/{file.stem}_quiz" 20 | 21 | dataset = Dataset.from_list(quiz_data) 22 | 23 | print(f"Pushing {repo_id} to the Hugging Face Hub") 24 | 25 | dataset.push_to_hub( 26 | repo_id, 27 | private=True, 28 | commit_message=f"Update quiz questions for {file.stem}", 29 | ) 30 | 31 | 32 | if __name__ == "__main__": 33 | main() 34 | -------------------------------------------------------------------------------- /units/es/bonus-unit1/conclusion.mdx: -------------------------------------------------------------------------------- 1 | # Conclusión [[conclusion]] 2 | 3 | ¡Felicidades por terminar esta primera Unidad Bonus 🥳 4 | 5 | ¡Acabas de **dominar la comprensión de las llamadas a funciones y cómo hacer fine-tuning de tu modelo para realizar llamadas a funciones**! 6 | 7 | Si tenemos un consejo ahora, es intentar **hacer fine-tuning de diferentes modelos**. La **mejor manera de aprender es intentándolo.** 8 | 9 | En la siguiente Unidad, aprenderás a usar **frameworks de última generación como `smolagents`, `LlamaIndex` y `LangGraph`**. 10 | 11 | Finalmente, nos encantaría **escuchar lo que piensas del curso y cómo podemos mejorarlo**. Si tienes algun comentario, por favor 👉 [completa este formulario](https://docs.google.com/forms/d/e/1FAIpQLSe9VaONn0eglax0uTwi29rIn4tM7H2sYmmybmG5jJNlE5v0xA/viewform?usp=dialog) 12 | 13 | ### Sigue Aprendiendo, Mantente Genial 🤗 -------------------------------------------------------------------------------- /units/fr/communication/live1.mdx: -------------------------------------------------------------------------------- 1 | # Sessions en direct 1 : Comment fonctionne le cours et première session de questions-réponses 2 | 3 | Dans cette première session en direct du cours, nous avons expliqué comment le cours **fonctionne** (périmètre, unités, défis, et plus encore) et avons répondu à vos questions. 4 | 5 | 6 | 7 | Pour savoir quand la prochaine session en direct est prévue, consultez notre **serveur Discord**. Nous vous enverrons également un email. Si vous ne pouvez pas participer, ne vous inquiétez pas, nous **enregistrons toutes les sessions**. -------------------------------------------------------------------------------- /units/fr/bonus-unit1/conclusion.mdx: -------------------------------------------------------------------------------- 1 | # Conclusion [[conclusion]] 2 | 3 | Félicitations pour avoir terminé cette première Unité Bonus 🥳 4 | 5 | Vous **maîtrisez la compréhension de l'appel de fonctions et comment finetuner votre modèle sur cette tâche** ! 6 | 7 | Nous vous conseillons à présent d'essayer de **finetuner différents modèles**. La **meilleure façon d'apprendre est en testant des choses.** 8 | 9 | Dans la prochaine Unité, vous allez apprendre comment utiliser **des *frameworks* de pointe tels que `smolagents`, `LlamaIndex` et `LangGraph`**. 10 | 11 | Enfin, nous serions ravis **d'entendre ce que vous pensez du cours et comment nous pourrions l'améliorer**. Si vous avez des retours, n'hésitez pas à 👉 [remplir ce formulaire](https://docs.google.com/forms/d/e/1FAIpQLSe9VaONn0eglax0uTwi29rIn4tM7H2sYmmybmG5jJNlE5v0xA/viewform?usp=dialog). 12 | 13 | ### Continuez à apprendre, restez géniaux 🤗 -------------------------------------------------------------------------------- /units/zh-CN/unit4/introduction.mdx: -------------------------------------------------------------------------------- 1 | # 欢迎来到最后一个单元 [[介绍]] 2 | 3 | AI Agents Course thumbnail 4 | 5 | 欢迎来到课程的最后一个单元!🎉 6 | 7 | 到目前为止,您已经**在AI智能体方面建立了坚实的基础**,从理解其组件到创建自己的智能体。有了这些知识,您现在可以**构建强大的智能体**并在这个快速发展的领域中赶上潮流。 8 | 9 | 这个单元和应用您所学的知识有关。这是您的**最终动手项目**,完成它是您获得**课程证书**的入场券。 10 | 11 | ## 挑战是什么? 12 | 13 | 您将创建自己的智能体并**使用[GAIA基准](https://huggingface.co/spaces/gaia-benchmark/leaderboard)的一个子集评估其性能**。 14 | 15 | 为了成功完成课程,您的智能体需要在基准测试中得到**30%或更高**的分数。实现这一目标,您将获得**完成证书**,正式认证您的专业知识。🏅 16 | 17 | 此外,您还可以查看自己在所有课程参与者中的表现!我们提供了一个专门的[**学生排行榜**](https://huggingface.co/spaces/agents-course/Students_leaderboard),您可以提交自己的成绩,并查看整个社区的进展情况。 18 | 19 | > 🚨 **提示:更高级的实践单元** 20 | > 21 | > 请注意,这个单元转向更实用的动手方法。在这一部分取得成功需要**更高级的编码知识**,并且与课程的前期部分相比,需要您在**较少明确指导**的情况下完成任务。 22 | 23 | 这听起来很棒,对吧?让我们开始吧!🚀 -------------------------------------------------------------------------------- /units/es/unit2/llama-index/conclusion.mdx: -------------------------------------------------------------------------------- 1 | # Conclusión 2 | 3 | !Felicidades por terminar el módulo `llama-index` de esta segunda Unidad 🥳 4 | 5 | Acabas de dominar los fundamentos de `llama-index` y has visto como construir tus propias flujos de trabajo agentivos! 6 | Ahora que tienes habilidades en `llama-index`, puedes empezar a crear motores de búsqueda que resolveran tareas que te interesen. 7 | 8 | En el próximo módulo de la Unidad, aprenderas **cómo construir Agentes con LangGraph**. 9 | 10 | Finalmente, nos encantar a **saber que te parece el curso y como podemos mejorar**. 11 | Si tienes alguna retroalimentación, por favor 👉 llena este formulario: [https://docs.google.com/forms/d/e/1FAIpQLSe9VaONn0eglax0uTwi29rIn4tM7H2sYmmybmG5jJNlE5v0xA/viewform?usp=dialog](https://docs.google.com/forms/d/e/1FAIpQLSe9VaONn0eglax0uTwi29rIn4tM7H2sYmmybmG5jJNlE5v0xA/viewform?usp=dialog) 12 | 13 | ### Sigue aprendiendo, y sigue siendo increible 🤗 14 | -------------------------------------------------------------------------------- /units/zh-CN/bonus_unit2/introduction.mdx: -------------------------------------------------------------------------------- 1 | # AI 智能体(AI Agent)的可观测性与评估 2 | 3 | ![Bonus Unit 2 Thumbnail](https://langfuse.com/images/cookbook/huggingface-agent-course/agent-observability-and-evaluation.png) 4 | 5 | 欢迎来到 **附加单元 2**!在本章中,你将探索用于观测、评估、并最终提升你的AI智能体性能的高级策略。 6 | 7 | --- 8 | 9 | ## 📚 我应该在什么时候学习这个附加单元? 10 | 11 | 如果你符合以下情况,那么这个附加单元非常适合你: 12 | - **开发和部署 AI 智能体:** 你希望确保你的智能体在生产环境中能够可靠地运行。 13 | - **需要详细的洞察:** 你希望诊断问题、优化性能或理解你的智能体的内部工作原理。 14 | - **旨在减少运营开销:** 通过监控智能体成本、延迟和执行细节,你可以高效地管理资源。 15 | - **寻求持续改进:** 你对将实时用户反馈和自动化评估集成到你的 AI 应用中感兴趣。 16 | 17 | 简而言之,对于每个想要将他们的智能体带到用户面前的人! 18 | 19 | --- 20 | 21 | ## 🤓 你将学到什么 22 | 23 | 在本单元中,你将学习: 24 | - **检测你的智能体:** 学习如何通过 OpenTelemetry 将可观测性工具与 *smolagents* 集成。 25 | - **监控指标:** 追踪性能指标,例如 token 使用量(成本)、延迟和错误追踪。 26 | - **实时评估:** 理解用于实时评估的技术,包括收集用户反馈和利用 LLM 作为评判者。 27 | - **离线分析:** 使用基准数据集(例如 GSM8K)来测试和比较智能体性能。 28 | 29 | --- 30 | 31 | ## 🚀 准备好开始了吗? 32 | 33 | 在下一节中,你将学习智能体可观测性与评估的基础知识。之后,就该看它在实践中的应用了! -------------------------------------------------------------------------------- /units/en/unit2/llama-index/README.md: -------------------------------------------------------------------------------- 1 | # Table of Contents 2 | 3 | This LlamaIndex frame outline is part of unit 2 of the course. You can access the unit 2 about LlamaIndex on hf.co/learn 👉 here 4 | 5 | | Title | Description | 6 | | --- | --- | 7 | | [Introduction](introduction.mdx) | Introduction to LlamaIndex | 8 | | [LlamaHub](llama-hub.mdx) | LlamaHub: a registry of integrations, agents and tools | 9 | | [Components](components.mdx) | Components: the building blocks of workflows | 10 | | [Tools](tools.mdx) | Tools: how to build tools in LlamaIndex | 11 | | [Quiz 1](quiz1.mdx) | Quiz 1 | 12 | | [Agents](agents.mdx) | Agents: how to build agents in LlamaIndex | 13 | | [Workflows](workflows.mdx) | Workflows: a sequence of steps, events made of components that are executed in order | 14 | | [Quiz 2](quiz2.mdx) | Quiz 2 | 15 | | [Conclusion](conclusion.mdx) | Conclusion | 16 | -------------------------------------------------------------------------------- /units/ko/unit1/conclusion.mdx: -------------------------------------------------------------------------------- 1 | # 결론 [[conclusion]] 2 | 3 | 축하합니다! 첫 번째 유닛을 완료하셨네요 🥳 4 | 5 | 이제 **에이전트의 기본 개념을 마스터**하고 첫 AI 에이전트를 만드셨습니다! 6 | 7 | **아직 일부 요소가 혼란스럽게 느껴지는 것은 정상**입니다. 에이전트는 복잡한 주제이며, 모든 것을 이해하는 데 시간이 걸리는 것이 일반적입니다. 8 | 9 | 계속 진행하기 전에 **배운 내용을 제대로 이해하는 시간을 가지세요**. 재미있는 부분으로 넘어가기 전에 이러한 요소들을 숙달하고 탄탄한 기초를 다지는 것이 중요합니다. 10 | 11 | 퀴즈 테스트를 통과하셨다면, 인증서를 받는 것도 잊지 마세요 🎓 👉 [여기를 클릭하세요](https://huggingface.co/spaces/agents-course/unit1-certification-app) 12 | 13 | Certificate Example 14 | 15 | 다음 (보너스) 유닛에서는 **함수 호출을 수행할 수 있도록 에이전트를 미세 조정하는 방법(즉, 사용자 프롬프트에 기반하여 도구를 호출할 수 있게 하는 방법)**을 배우게 됩니다. 16 | 17 | 마지막으로, **여러분이 이 코스에 대해 어떻게 생각하시는지, 그리고 어떻게 개선할 수 있는지 듣고 싶습니다**. 피드백이 있으시면 👉 [이 양식을 작성해 주세요](https://docs.google.com/forms/d/e/1FAIpQLSe9VaONn0eglax0uTwi29rIn4tM7H2sYmmybmG5jJNlE5v0xA/viewform?usp=dialog) 18 | 19 | ### 계속 배우고, 멋진 여정 되세요 🤗 -------------------------------------------------------------------------------- /units/ru-RU/unit1/get-your-certificate.mdx: -------------------------------------------------------------------------------- 1 | # Получите свой сертификат 2 | 3 | Раздел 1 планирование 4 | 5 | Теперь, когда вы успешно прошли этот тест, **вы можете получить свой сертификат 🎓**. 6 | 7 | Чтобы получить этот сертификат, вам необходимо пройти раздел 1 курса Агенты и **сдать на 80% итоговый тест**. 8 | 9 | 10 | 11 | 17 | 18 | Вы также можете ознакомиться с процессом сертификации 👉 [здесь](https://huggingface.co/spaces/agents-course/unit1-certification-app) 19 | 20 | Как только вы получите сертификат, вы можете добавить его в свой LinkedIn 🧑‍💼 или поделиться им в X, Bluesky и т. д. **Мы будем очень горды и с удовольствием поздравим вас, если вы добавите тэг @huggingface**! 🤗 21 | -------------------------------------------------------------------------------- /units/zh-CN/unit4/additional-readings.mdx: -------------------------------------------------------------------------------- 1 | # 那现在呢?我应该学习哪些主题? 2 | 3 | Agentic AI 是一个快速发展的领域,了解基础协议对于构建智能自主系统至关重要。 4 | 5 | 你应该熟悉的两个重要标准是: 6 | 7 | - **模型上下文协议 (MCP)** 8 | - **代理对代理协议 (A2A)** 9 | 10 | ## 🔌 模型上下文协议 (MCP) 11 | 12 | Anthropic 的 **模型上下文协议 (MCP)** 是一个开放标准,使 AI 模型能够安全无缝地**连接外部工具、数据源和应用程序**,从而使代理更加智能和自主。 13 | 14 | 可以将 MCP 想象为一个**通用适配器**,就像 USB-C 接口一样,使 AI 模型能够插入各种数字环境**而无需为每一个进行定制集成**。 15 | 16 | MCP 正在迅速获得行业关注,开始被OpenAI 和谷歌等大公司所采用它。 17 | 18 | 📚 了解更多: 19 | - [Anthropic 的官方公告和文档](https://www.anthropic.com/news/model-context-protocol) 20 | - [MCP - 维基百科](https://en.wikipedia.org/wiki/Model_Context_Protocol) 21 | - [MCP - 博客](https://huggingface.co/blog/Kseniase/mcp) 22 | 23 | ## 🤝 代理对代理 (A2A) 协议 24 | 25 | 谷歌开发了 **代理对代理 (A2A) 协议**,作为 Anthropic 的模型上下文协议 (MCP) 的补充。 26 | 27 | 虽然 MCP 连接代理与外部工具,**A2A 则连接代理之间**,为多智能体系统之间的协作铺平道路,使其能够协同工作以解决复杂问题。 28 | 29 | 📚 深入了解 A2A: 30 | - [谷歌的 A2A 公告](https://developers.googleblog.com/en/a2a-a-new-era-of-agent-interoperability/) -------------------------------------------------------------------------------- /units/fr/unit2/llama-index/conclusion.mdx: -------------------------------------------------------------------------------- 1 | # Conclusion 2 | 3 | Félicitations pour avoir terminé le module `llama-index` de cette deuxième Unité 🥳 4 | 5 | Vous **maîtrisez les fondamentaux** de `llama-index` et avez vu comment construire vos propres *workflows* agentiques ! 6 | Maintenant que vous avez des compétences en `llama-index`, vous pouvez commencer à créer des moteurs de recherche qui résoudront des tâches qui vous intéressent. 7 | 8 | Dans le prochain module de l'unité, vous allez apprendre **comment construire des *agents* avec *LangGraph***. 9 | 10 | Enfin, nous aimerions **entendre ce que vous pensez du cours et comment nous pouvons Enfin, nous serions ravis **d'entendre ce que vous pensez du cours et comment nous pourrions l'améliorer**. Si vous avez des retours, n'hésitez pas à [remplir ce formulaire](https://docs.google.com/forms/d/e/1FAIpQLSe9VaONn0eglax0uTwi29rIn4tM7H2sYmmybmG5jJNlE5v0xA/viewform?usp=dialog). 11 | 12 | ### Continuez à apprendre, restez géniaux 🤗 13 | -------------------------------------------------------------------------------- /units/zh-CN/unit3/agentic-rag/agentic-rag.mdx: -------------------------------------------------------------------------------- 1 | # 智能体增强检索生成(Agentic RAG) 2 | 3 | 在本单元中,我们将探讨如何利用智能体增强检索生成(Agentic RAG)帮助 Alfred 筹备精彩的晚会。 4 | 5 | > [!TIP] 6 | > 提示:我们已在先前单元讨论过检索增强生成(RAG)和智能体增强 RAG,如果您已熟悉这些概念可跳过本节。 7 | 8 | 大语言模型(LLMs)通过海量数据训练获得通用知识。 9 | 但其世界知识模型可能包含过时或不相关信息。 10 | **RAG 通过从您的数据中检索相关信息并传递给大语言模型,有效解决了这个问题。** 11 | 12 | ![RAG 示意图](https://huggingface.co/datasets/agents-course/course-images/resolve/main/en/unit2/llama-index/rag.png) 13 | 14 | 思考 Alfred 的工作流程: 15 | 16 | 1. 我们要求 Alfred 协助策划晚会 17 | 2. Alfred 需要获取最新新闻和天气信息 18 | 3. Alfred 需要整理和检索宾客信息 19 | 20 | 正如 Alfred 需要搜索家庭信息才能提供有效帮助,任何智能体都需要理解和检索相关数据的能力。 21 | **智能体增强 RAG 是帮助智能体解答数据问题的强大工具**,我们可以为 Alfred 提供多种工具来辅助问题解答。 22 | 与传统文档自动问答不同,Alfred 可以自主决定使用任何工具或流程来回答问题。 23 | 24 | ![智能体增强 RAG 架构](https://huggingface.co/datasets/agents-course/course-images/resolve/main/en/unit2/llama-index/agentic-rag.png) 25 | 26 | 现在让我们开始**构建智能体增强 RAG 工作流**! 27 | 28 | 首先创建用于检索最新受邀者详情的 RAG 工具,接着开发网络搜索、天气更新和 Hugging Face Hub 模型下载统计等工具,最终整合所有组件实现我们的智能体增强 RAG 智能体! -------------------------------------------------------------------------------- /units/fr/unit2/llama-index/README.md: -------------------------------------------------------------------------------- 1 | # Table des matières 2 | 3 | Ce plan de chapitre LlamaIndex fait partie de l'unité 2 du cours. Vous pouvez accéder à l'unité 2 sur LlamaIndex sur hf.co/learn 👉 ici 4 | 5 | | Titre | Description | 6 | | --- | --- | 7 | | [Introduction](introduction.mdx) | Introduction à LlamaIndex | 8 | | [LlamaHub](llama-hub.mdx) | LlamaHub : un registre d'intégrations, d'agents et de tools | 9 | | [Components](components.mdx) | Components : les blocs de construction des workflows | 10 | | [Tools](tools.mdx) | Tools : comment construire des tools dans LlamaIndex | 11 | | [Quiz 1](quiz1.mdx) | Quiz 1 | 12 | | [Agents](agents.mdx) | Agents : comment construire des agents dans LlamaIndex | 13 | | [Workflows](workflows.mdx) | Workflows : une séquence d'étapes, d'événements composés de components qui sont exécutés dans l'ordre | 14 | | [Quiz 2](quiz2.mdx) | Quiz 2 | 15 | | [Conclusion](conclusion.mdx) | Conclusion | -------------------------------------------------------------------------------- /units/es/unit2/llama-index/README.md: -------------------------------------------------------------------------------- 1 | # Índice de Contenidos 2 | 3 | Este marco de trabajo de LlamaIndex es parte de la unidad 2 del curso. Puedes acceder a la unidad 2 sobre LlamaIndex en hf.co/learn aquí 4 | 5 | | Título | Descripción | 6 | | --- | --- | 7 | | [Introducción](introduction.mdx) | Introducción a LlamaIndex | 8 | | [LlamaHub](llama-hub.mdx) | LlamaHub: un registro de integraciones, agentes y herramientas | 9 | | [Componentes](components.mdx) | Componentes: los bloques de construcción de workflows | 10 | | [Herramientas](tools.mdx) | Herramientas: cómo construir herramientas en LlamaIndex | 11 | | [Cuestionario 1](quiz1.mdx) | Cuestionario 1 | 12 | | [Agentes](agents.mdx) | Agentes: cómo construir agentes en LlamaIndex | 13 | | [Flujos de Trabajo](workflows.mdx) | Flujos de Trabajo: una secuencia de pasos, eventos compuestos por componentes que se ejecutan en orden | 14 | | [Cuestionario 2](quiz2.mdx) | Cuestionario 2 | 15 | | [Conclusión](conclusion.mdx) | Conclusión | -------------------------------------------------------------------------------- /units/en/bonus-unit3/conclusion.mdx: -------------------------------------------------------------------------------- 1 | # Conclusion 2 | 3 | If you've made it this far, congratulations! 🥳 You've successfully built your very own Pokémon battle agent! ⚔️🎮 4 | 5 | You’ve conquered the fundamentals of **Agentic workflows**, connected an **LLM** to a game environment, and deployed an intelligent Agent ready to face the challenges of battle. 6 | 7 | But the journey doesn't end here! 8 | Now that you have your first Agent up and running, think about how you can evolve it further: 9 | - Can you improve its strategic thinking? 10 | - How would a memory mechanism or feedback loop change its performance? 11 | - What experiments could help make it more competitive in battle? 12 | 13 | We'd love to hear your thoughts on the course and how we can make it even better for future learners. 14 | Got feedback? 👉 [Fill out this form](https://docs.google.com/forms/d/e/1FAIpQLSe9VaONn0eglax0uTwi29rIn4tM7H2sYmmybmG5jJNlE5v0xA/viewform?usp=dialog) 15 | 16 | Thanks for learning with us, and remember: 17 | 18 | **Keep learning, Keep training, keep battling, and stay awesome!** 🤗 19 | -------------------------------------------------------------------------------- /units/es/unit4/get-your-certificate.mdx: -------------------------------------------------------------------------------- 1 | # Reclama tu Certificado 🎓 2 | 3 | Si obtuviste una puntuación **superior al 30%, ¡felicitaciones! 👏 Ahora eres elegible para reclamar tu certificado oficial.** 4 | 5 | Sigue los pasos a continuación para recibirlo: 6 | 7 | 1. Visita la [página del certificado](https://huggingface.co/spaces/agents-course/Unit4-Final-Certificate). 8 | 2. **Inicia sesión** con tu cuenta de Hugging Face usando el botón proporcionado. 9 | 3. **Ingresa tu nombre completo**. Este es el nombre que aparecerá en tu certificado. 10 | 4. Haz clic en **“Obtener Mi Certificado”** para verificar tu puntuación y descargar tu certificado. 11 | 12 | ¡Felicidades! 13 | 14 | Una vez que tengas tu certificado, siéntete libre de: 15 | - Agregarlo a tu **perfil de LinkedIn** 🧑‍💼 16 | - Compartirlo en **X**, **Bluesky**, etc. 🎉 17 | 18 | **No olvides etiquetar a [@huggingface](https://huggingface.co/huggingface). ¡Estaremos súper orgullosos y nos encantaría animarte! 🤗** 19 | -------------------------------------------------------------------------------- /units/zh-CN/unit1/final-quiz.mdx: -------------------------------------------------------------------------------- 1 | # 第一单元测验 (Unit 1 Quiz) 2 | 3 | Unit 1 planning 4 | 5 | 恭喜你完成第一单元的学习!让我们测试一下你对目前所学关键概念的理解。 6 | 7 | 通过测验后,请继续下一部分领取你的证书。 8 | 9 | 祝你好运! 10 | 11 | ## 测验 (Quiz) 12 | 13 | 这是一个交互式测验。测验托管在 Hugging Face Hub 的空间中。你将通过一系列选择题来测试你对本单元所学关键概念的理解。完成测验后,你将能够看到你的分数和正确答案的详细分析。 14 | 15 | 重要提示:**通过测验后不要忘记点击提交 (Submit),否则你的考试分数将不会被保存!** 16 | 17 | 23 | 24 | 你也可以在这里访问测验 👉 [点击这里](https://huggingface.co/spaces/agents-course/unit_1_quiz) 25 | 26 | ## 学习认证 27 | 28 | 恭喜通过测验!**您现在可以获取专属结业证书 🎓** 29 | 30 | 成功完成本单元测评后,系统将为您生成单元结业认证证书。该证书可下载分享,作为课程进度的官方成就证明。 31 | 32 | 第一单元规划示意图 33 | 34 | 获得证书后,您可将其添加至LinkedIn个人档案 🧑‍💼 或分享到X、Bluesky等社交平台。**如果标注@huggingface,我们将非常荣幸并为您送上祝贺**!🤗 35 | -------------------------------------------------------------------------------- /units/en/unit2/smolagents/final_quiz.mdx: -------------------------------------------------------------------------------- 1 | # Exam Time! 2 | 3 | Well done on working through the material on `smolagents`! You've already achieved a lot. Now, it's time to put your knowledge to the test with a quiz. 🧠 4 | 5 | ## Instructions 6 | 7 | - The quiz consists of code questions. 8 | - You will be given instructions to complete the code snippets. 9 | - Read the instructions carefully and complete the code snippets accordingly. 10 | - For each question, you will be given the result and some feedback. 11 | 12 | 🧘 **This quiz is ungraded and uncertified**. It's about you understanding the `smolagents` library and knowing whether you should spend more time on the written material. In the coming units you'll put this knowledge to the test in use cases and projects. 13 | 14 | Let's get started! 15 | 16 | ## Quiz 🚀 17 | 18 | 24 | 25 | You can also access the quiz 👉 [here](https://huggingface.co/spaces/agents-course/unit2_smolagents_quiz) -------------------------------------------------------------------------------- /units/zh-CN/bonus-unit3/introduction.mdx: -------------------------------------------------------------------------------- 1 | # 介绍 2 | 3 | Bonus Unit 3 AI in Games 7 | 8 | 🎶 我想成为最强的...🎶 9 | 10 | 欢迎来到这个**奖励单元**,你将探索** AI 智能体和游戏**的激动人心的交汇点!🎮🤖 11 | 12 | 想象一个游戏,其中非玩家角色(NPC)不仅仅遵循脚本台词,而是进行动态对话,适应你的策略,并随着故事展开而发展。这就是在游戏中结合**LLM 和智能体行为**的力量:它为**前所未有的涌现叙事和游戏玩法**打开了大门。 13 | 14 | 在这个奖励单元中,你将: 15 | 16 | - 学习如何构建一个能够参与**宝可梦风格回合制战斗**的 AI 智能体 17 | - 与它对战,甚至在线挑战其他智能体 18 | 19 | 我们已经从 AI 社区看到了一些使用 LLM 玩宝可梦的[例子](https://www.anthropic.com/research/visible-extended-thinking),在这个单元中,你将学习如何使用你在课程中学到的想法用自己的智能体复制这一点。 20 | 21 | Claude plays Pokémon 25 | 26 | ## 想要更深入? 27 | 28 | - 🎓 **掌握游戏中的 LLM**:通过我们的完整课程[游戏机器学习课程](https://hf.co/learn/ml-games-course)深入游戏开发。 29 | 30 | - 📘 **获取 AI 指南**:在[游戏开发者 AI 指南](https://thomassimonini.substack.com/)中发现见解、想法和实用技巧,在那里探索智能游戏设计的未来。 31 | 32 | 但在我们构建之前,让我们通过**四个鼓舞人心的现实世界例子**来看看 LLM 已经如何在游戏中使用。 33 | -------------------------------------------------------------------------------- /units/en/unit2/langgraph/conclusion.mdx: -------------------------------------------------------------------------------- 1 | # Conclusion 2 | 3 | Congratulations on finishing the `LangGraph` module of this second Unit! 🥳 4 | 5 | You've now mastered the fundamentals of building structured workflows with LangGraph which you will be able to send to production. 6 | 7 | This module is just the beginning of your journey with LangGraph. For more advanced topics, we recommend: 8 | 9 | - Exploring the [official LangGraph documentation](https://github.com/langchain-ai/langgraph) 10 | - Taking the comprehensive [Introduction to LangGraph](https://academy.langchain.com/courses/intro-to-langgraph) course from LangChain Academy 11 | - Build something yourself ! 12 | 13 | In the next Unit, you'll now explore real use cases. It's time to leave theory to get into real action ! 14 | 15 | We would greatly appreciate **your thoughts on the course and suggestions for improvement**. If you have feedback, please 👉 [fill this form](https://docs.google.com/forms/d/e/1FAIpQLSe9VaONn0eglax0uTwi29rIn4tM7H2sYmmybmG5jJNlE5v0xA/viewform?usp=dialog) 16 | 17 | ### Keep Learning, Stay Awesome! 🤗 18 | 19 | Good Sir/Madam! 🎩🦇 20 | 21 | -Alfred- -------------------------------------------------------------------------------- /units/es/unit2/langgraph/conclusion.mdx: -------------------------------------------------------------------------------- 1 | # Conclusión 2 | 3 | ¡Felicidades por terminar el módulo de `LangGraph` de esta segunda Unidad! 🥳 4 | 5 | Ahora has dominado los fundamentos para construir flujos de trabajo estructurados con LangGraph que podrás llevar a producción. 6 | 7 | Este módulo es solo el comienzo de tu viaje con LangGraph. Para temas más avanzados, recomendamos: 8 | 9 | - Explorar la [documentación oficial de LangGraph](https://github.com/langchain-ai/langgraph) 10 | - Tomar el curso completo [Introducción a LangGraph](https://academy.langchain.com/courses/intro-to-langgraph) de LangChain Academy 11 | - ¡Construir algo por ti mismo! 12 | 13 | En la siguiente Unidad, explorarás casos de uso reales. ¡Es hora de dejar la teoría para entrar en acción real! 14 | 15 | Agradeceríamos mucho **tus opiniones sobre el curso y sugerencias para mejorarlo**. Si tienes comentarios, por favor 👉 [completa este formulario](https://docs.google.com/forms/d/e/1FAIpQLSe9VaONn0eglax0uTwi29rIn4tM7H2sYmmybmG5jJNlE5v0xA/viewform?usp=dialog) 16 | 17 | ### ¡Sigue Aprendiendo, Mantente Increíble! 🤗 18 | 19 | ¡Estimado/a Señor/a! 🎩🦇 20 | 21 | -Alfred- -------------------------------------------------------------------------------- /units/es/unit2/smolagents/final_quiz.mdx: -------------------------------------------------------------------------------- 1 | # ¡Hora del Examen! 2 | 3 | ¡Buen trabajo al estudiar el material sobre `smolagents`! Ya has logrado mucho. Ahora, es momento de poner a prueba tus conocimientos con un cuestionario. 🧠 4 | 5 | ## Instrucciones 6 | 7 | - El cuestionario consiste en preguntas de código. 8 | - Se te darán instrucciones para completar fragmentos de código. 9 | - Lee las instrucciones cuidadosamente y completa los fragmentos de código según corresponda. 10 | - Para cada pregunta, recibirás el resultado y algunos comentarios. 11 | 12 | 🧘 **Este cuestionario no está calificado ni certificado**. Se trata de que comprendas la biblioteca `smolagents` y sepas si deberías dedicar más tiempo al material escrito. En las próximas unidades pondrás este conocimiento a prueba en casos de uso y proyectos. 13 | 14 | ¡Comencemos! 15 | 16 | ## Cuestionario 🚀 17 | 18 | 24 | 25 | También puedes acceder al cuestionario 👉 [aquí](https://huggingface.co/spaces/agents-course/unit2_smolagents_quiz) -------------------------------------------------------------------------------- /units/es/bonus-unit3/conclusion.mdx: -------------------------------------------------------------------------------- 1 | # Conclusión 2 | 3 | Si llegaste hasta aquí, ¡felicidades! 🥳 ¡Has construido con éxito tu propio agente de batalla Pokémon! ⚔️🎮 4 | 5 | Has dominado los fundamentos de los **flujos de trabajo agénticos**, conectado un **LLM** a un entorno de juego y desplegado un Agente inteligente listo para enfrentar los desafíos de la batalla. 6 | 7 | ¡Pero el viaje no termina aquí! 8 | Ahora que tienes tu primer Agente en funcionamiento, piensa en cómo puedes evolucionarlo aún más: 9 | - ¿Puedes mejorar su pensamiento estratégico? 10 | - ¿Cómo cambiaría su rendimiento un mecanismo de memoria o un ciclo de retroalimentación? 11 | - ¿Qué experimentos podrían ayudar a hacerlo más competitivo en la batalla? 12 | 13 | Nos encantaría conocer tu opinión sobre el curso y cómo podemos mejorarlo aún más para futuros estudiantes. 14 | ¿Tienes comentarios? 👉 [Llena este formulario](https://docs.google.com/forms/d/e/1FAIpQLSe9VaONn0eglax0uTwi29rIn4tM7H2sYmmybmG5jJNlE5v0xA/viewform?usp=dialog) 15 | 16 | Gracias por aprender con nosotros y recuerda: 17 | 18 | **¡Sigue aprendiendo, sigue entrenando, sigue luchando y sigue siendo increíble!** 🤗 19 | -------------------------------------------------------------------------------- /units/en/unit3/agentic-rag/conclusion.mdx: -------------------------------------------------------------------------------- 1 | # Conclusion 2 | 3 | In this unit, we've learned how to create an agentic RAG system to help Alfred, our friendly neighborhood agent, prepare for and manage an extravagant gala. 4 | 5 | The combination of RAG with agentic capabilities demonstrates how powerful AI assistants can become when they have: 6 | - Access to structured knowledge (guest information) 7 | - Ability to retrieve real-time information (web search) 8 | - Domain-specific tools (weather information, Hub stats) 9 | - Memory of past interactions 10 | 11 | With these capabilities, Alfred is now well-equipped to be the perfect host, able to answer questions about guests, provide up-to-date information, and ensure the gala runs smoothly—even managing the perfect timing for the fireworks display! 12 | 13 | > [!TIP] 14 | > Now that you've built a complete agent, you might want to explore: 15 | > 16 | > - Creating more specialized tools for your own use cases 17 | > - Implementing more sophisticated RAG systems with embeddings 18 | > - Building multi-agent systems where agents can collaborate 19 | > - Deploying your agent as a service that others can interact with 20 | -------------------------------------------------------------------------------- /units/fr/unit2/smolagents/final_quiz.mdx: -------------------------------------------------------------------------------- 1 | # C'est l'heure de l'examen ! 2 | 3 | Bravo d'avoir suivi sur le matériel sur `smolagents` ! Vous en avez déjà fait beaucoup. Maintenant, il est temps de mettre vos connaissances à l'épreuve avec un quiz. 🧠 4 | 5 | ## Instructions 6 | 7 | - Le quiz consiste en des questions de code. 8 | - Vous recevrez des instructions pour compléter les extraits de code. 9 | - Lisez attentivement les instructions et complétez les extraits de code en conséquence. 10 | - Pour chaque question, vous recevrez le résultat et quelques commentaires. 11 | 12 | 🧘 **Ce quiz n'est pas noté et non certifié**. Il s'agit de vous faire comprendre la bibliothèque `smolagents` et de savoir si vous devriez passer plus de temps sur le matériel écrit. Dans les unités à venir, vous mettrez ces connaissances à l'épreuve dans des cas d'usage et des projets. 13 | 14 | Commençons ! 15 | 16 | ## Quiz 🚀 17 | 18 | 24 | 25 | Vous pouvez également accéder au quiz 👉 [ici](https://huggingface.co/spaces/agents-course/unit2_smolagents_quiz) -------------------------------------------------------------------------------- /units/fr/unit2/langgraph/conclusion.mdx: -------------------------------------------------------------------------------- 1 | # Conclusion 2 | 3 | Félicitations pour avoir terminé le module `LangGraph` de cette deuxième unité ! 🥳 4 | 5 | Vous **maîtrisez les fondamentaux** de la construction de *workflows* structurés avec LangGraph que vous pourrez envoyer en production. 6 | 7 | Ce module n'est que le début de votre parcours avec LangGraph. Pour des sujets plus avancés, nous recommandons : 8 | 9 | - D'explorer la [documentation officielle de LangGraph](https://github.com/langchain-ai/langgraph) 10 | - De suivre le cours complet [*Introduction to LangGraph*](https://academy.langchain.com/courses/intro-to-langgraph) de *LangChain Academy* 11 | - De construire quelque chose par vous-même ! 12 | 13 | Dans la prochaine unité, vous explorerez maintenant des cas d'usage réels. Il est temps de quitter la théorie pour passer à la pratique ! 14 | 15 | Enfin, nous serions ravis **d'entendre ce que vous pensez du cours et comment nous pourrions l'améliorer**. Si vous avez des retours, n'hésitez pas à [remplir ce formulaire](https://docs.google.com/forms/d/e/1FAIpQLSe9VaONn0eglax0uTwi29rIn4tM7H2sYmmybmG5jJNlE5v0xA/viewform?usp=dialog). 16 | 17 | ### Continuez à apprendre, restez géniaux 🤗 18 | -------------------------------------------------------------------------------- /units/ru-RU/unit1/final-quiz.mdx: -------------------------------------------------------------------------------- 1 | # Раздел 1 Тест 2 | 3 | Раздел 1 планирование 4 | 5 | Отлично справились с первым разделом! Давайте проверим ваше понимание ключевых понятий, рассмотренных до сих пор. 6 | 7 | Когда вы пройдете этот тест, перейдите к следующему разделу, чтобы получить свой сертификат. 8 | 9 | Удачи! 10 | 11 | ## Тест 12 | 13 | Вот интерактивный тест. Этот тест размещен в пространстве Hugging Face Hub. В ней вам предстоит ответить на ряд вопросов с несколькими вариантами ответов, чтобы проверить ваше понимание ключевых понятий, рассмотренных в этом разделе. После завершения теста вы сможете увидеть свой результат и распределение правильных ответов. 14 | 15 | Один важный момент: **не забудьте нажать на кнопку Submit после прохождения теста, иначе ваша оценка не будет сохранена!** 16 | 17 | 23 | 24 | Вы также можете пройти этот тест 👉 [здесь](https://huggingface.co/spaces/agents-course/unit_1_quiz) 25 | -------------------------------------------------------------------------------- /units/zh-CN/unit2/langgraph/introduction.mdx: -------------------------------------------------------------------------------- 1 | # 欢迎来到 `LangGraph` 的世界 2 | 3 | Unit 2.3 缩略图 4 | 5 | 欢迎来到学习旅程的下一站!在本章节中,您将学习如何使用 [`LangGraph`](https://github.com/langchain-ai/langgraph) 框架来构建应用程序,该框架能帮助您组织和编排复杂的 LLM 工作流。 6 | 7 | `LangGraph` 是一个通过提供对智能体流程的**控制**工具,帮助您构建**生产就绪**应用程序的框架。 8 | 9 | ## 模块概览 10 | 11 | 在本单元中,您将探索: 12 | 13 | ### 1️⃣ [什么是 LangGraph?何时使用它?](./when_to_use_langgraph) 14 | ### 2️⃣ [LangGraph 的构建模块](./building_blocks) 15 | ### 3️⃣ [邮件分拣管家 Alfred](./first_graph) 16 | ### 4️⃣ [文档分析智能体 Alfred](./document_analysis_agent) 17 | ### 5️⃣ [随堂测验](./quizz1) 18 | 19 | > [!WARNING] 20 | > 本节示例需要访问强大的 LLM/VLM 模型。我们使用 GPT-4o API 运行这些示例,因为该模型与 LangGraph 具有最佳兼容性。 21 | 22 | 通过本单元的学习,您将掌握构建健壮、有序且生产就绪的应用程序的能力! 23 | 24 | 需要说明的是,本节只是 LangGraph 的入门介绍,更多高级主题可以通过 LangChain 学院的免费课程学习:[LangGraph 入门指南](https://academy.langchain.com/courses/intro-to-langgraph) 25 | 26 | 让我们即刻启程! 27 | 28 | ## 扩展资源 29 | 30 | - [LangGraph 智能体](https://langchain-ai.github.io/langgraph/) - LangGraph 智能体示例 31 | - [LangChain 学院](https://academy.langchain.com/courses/intro-to-langgraph) - 来自 LangChain 的完整 LangGraph 课程 -------------------------------------------------------------------------------- /units/en/unit4/get-your-certificate.mdx: -------------------------------------------------------------------------------- 1 | # Claim Your Certificate 🎓 2 | 3 | If you scored **above 30%, congratulations! 👏 You're now eligible to claim your official certificate.** 4 | 5 | Follow the steps below to receive it: 6 | 7 | 1. Visit the [certificate page](https://huggingface.co/spaces/agents-course/Unit4-Final-Certificate). 8 | 2. **Sign in** with your Hugging Face account using the button provided. 9 | 3. **Enter your full name**. This is the name that will appear on your certificate. 10 | 4. Click **“Get My Certificate”** to verify your score and download your certificate. 11 | 12 | Congrats! 13 | 14 | Once you’ve got your certificate, feel free to: 15 | - Add it to your **LinkedIn profile** 🧑‍💼 16 | - Share it on **X**, **Bluesky**, etc. 🎉 17 | 18 | **Don’t forget to tag [@huggingface](https://huggingface.co/huggingface). We’d be super proud and we’d love to cheer you on! 🤗** 19 | 20 | > [!TIP] 21 | > If you have any issues with submission please open a discussion item on [The certification community tab](https://huggingface.co/spaces/agents-course/Unit4-Final-Certificate/discussions). 22 | -------------------------------------------------------------------------------- /units/zh-CN/unit2/llama-index/introduction.mdx: -------------------------------------------------------------------------------- 1 | # LlamaIndex 简介 2 | 3 | 欢迎来到本模块,您将学习如何使用 [LlamaIndex](https://www.llamaindex.ai/) 工具包构建基于大语言模型(LLM)的智能体。 4 | 5 | LlamaIndex 是**通过索引和工作流在您的数据上创建 LLM 驱动智能体的完整工具包**。本课程我们将重点关注构建 LlamaIndex 智能体的三个核心部分:**组件**、**智能体与工具**以及**工作流**。 6 | 7 | ![LlamaIndex](https://huggingface.co/datasets/agents-course/course-images/resolve/main/en/unit2/llama-index/thumbnail.png) 8 | 9 | 让我们解析这些核心要素及其对智能体的支持: 10 | 11 | - **组件**是 LlamaIndex 中的基础构建模块,包括提示词、模型和数据库等。组件通常帮助 LlamaIndex 与其他工具和库进行集成。 12 | - **工具**:提供特定功能的组件,如搜索、计算或访问外部服务。它们是支撑智能体执行任务的基础模块。 13 | - **智能体**:能够自主使用工具并做出决策的独立组件,通过协调工具使用来实现复杂目标。 14 | - **工作流**:按步骤处理逻辑的流程。智能体工作流是一种无需显式使用智能体即可构建智能行为的方式。 15 | 16 | 17 | ## LlamaIndex 的独特之处 18 | 19 | 虽然LlamaIndex与其他框架(如 smolagents)有相似之处,但具备以下关键优势: 20 | 21 | - **清晰的工作流系统**。通过事件驱动和异步优先的语法,工作流帮助您逐步分解智能体的决策过程,实现逻辑的清晰组合与组织。 22 | - **基于 LlamaParse 的高级文档解析** 专为 LlamaIndex 打造的文档解析工具,尽管是付费功能,但提供无缝集成体验。 23 | - **丰富的即用组件** 凭借长期的技术积累,LlamaIndex 与众多框架兼容,提供大量经过验证的可靠组件(如 LLM、检索器、索引等)。 24 | - **LlamaHub** 提供了数百个此类组件、智能体和工具的注册中心,方便您在 LlamaIndex 中直接使用。 25 | 26 | 这些概念在不同场景中都是创建实用智能体的必要元素。 27 | 后续章节我们将深入解析每个概念。 28 | 掌握这些知识后,我们将运用所学**通过 Alfred 智能体创建实际应用案例**! 29 | 30 | 准备好探索 LlamaIndex 的精彩世界了吗?让我们立即启程,**通过 LlamaHub 查找并安装所需集成吧!🚀** -------------------------------------------------------------------------------- /units/zh-CN/unit3/agentic-rag/introduction.mdx: -------------------------------------------------------------------------------- 1 | # 代理增强检索生成(Agentic RAG)用例介绍 2 | 3 | ![代理增强 RAG 横幅图](https://huggingface.co/datasets/agents-course/course-images/resolve/main/en/unit3/agentic-rag/thumbnail.jpg) 4 | 5 | 在本单元中,我们将通过代理增强检索生成(Agentic RAG)技术,帮助负责主持晚会的友好智能体 Alfred 创建用于解答宾客问题的工具。 6 | 7 | > [!TIP] 8 | > 这是代理增强 RAG 的「真实世界」应用案例,您可直接应用于个人项目或工作场景。若想获得更多实践收获,何不尝试将其应用于您的实际场景并在 Discord 社区分享? 9 | 10 | 您可以选择课程中讨论的任何框架来实现本用例。我们已在独立标签页中为每个框架提供代码示例。 11 | 12 | ## 值得铭记的盛会 13 | 14 | 现在让我们进入实战环节,为这场盛会搭建舞台! 15 | 16 | **您决定举办本世纪最奢华、最盛大的派对**——这意味着将包含:豪华宴席、魅惑舞者、知名 DJ、精致饮品、震撼烟花表演等极致元素。 17 | 18 | 您的好邻居智能体 Alfred 正着手统筹派对的各项需求,**Alfred 将全权管理所有事务**。为此,他需要掌握包括菜单、宾客名单、日程安排、天气预报等在内的完整派对信息! 19 | 20 | 除此之外,他还需确保派对圆满成功,因此**必须具备在派对期间实时解答各类问题的能力**,同时处理可能出现的突发状况。 21 | 22 | Alfred 无法孤军奋战,我们需要确保他能够获取所需的所有信息和工具。 23 | 24 | 首先,让我们为晚会制定核心需求清单。 25 | 26 | ## 晚会核心需求 27 | 28 | 在**文艺复兴时期**,真正受过良好教育的人需具备三大核心素养: 29 | 需精通**体育、文化与科学知识**。因此,我们必须通过知识储备给宾客留下深刻印象,呈现真正难忘的盛会。 30 | 但为避免冲突,**政治与宗教等敏感话题应在晚会中回避**,确保派对氛围轻松愉快,不涉及信仰与理念分歧。 31 | 32 | 根据礼仪规范,**优秀的主办方应充分了解宾客背景**,包括其兴趣爱好与事业成就。同时应善于通过宾客间的故事分享促进交流。 33 | 34 | 最后,我们还需掌握**基础天气知识**,以便实时获取更新信息,精准把握烟花表演时机,为晚会画上完美句号!🎆 35 | 36 | 由此可见,Alfred 需要大量信息支持才能办好晚会。 37 | 幸运的是,我们可以通过**检索增强生成(RAG)训练**为 Alfred 做好准备! 38 | 39 | 现在让我们开始创建 Alfred 主持晚会所需的工具集! -------------------------------------------------------------------------------- /units/fr/bonus-unit3/conclusion.mdx: -------------------------------------------------------------------------------- 1 | # Conclusion 2 | 3 | Si vous êtes arrivé jusqu'ici, félicitations ! 🥳 Vous avez construit avec succès votre propre agent de combat Pokémon ! ⚔️🎮 4 | 5 | Vous avez maîtrisé les fondamentaux des **flux de travail agentiques**, connecté un **LLM** à un environnement de jeu, et déployé un Agent intelligent prêt à affronter les défis du combat. 6 | 7 | Mais le voyage ne s'arrête pas là ! 8 | Maintenant que vous avez votre premier Agent en fonctionnement, réfléchissez à comment vous pouvez le faire évoluer davantage : 9 | - Pouvez-vous améliorer sa réflexion stratégique ? 10 | - Comment un mécanisme de mémoire ou une boucle de *feedback* changerait-il ses performances ? 11 | - Quelles expériences pourraient aider à le rendre plus compétitif en combat ? 12 | 13 | Nous aimerions entendre vos pensées sur le cours et comment nous pouvons le rendre encore meilleur pour les futurs apprenants. 14 | Vous avez des commentaires ? 👉 [Remplissez ce formulaire](https://docs.google.com/forms/d/e/1FAIpQLSe9VaONn0eglax0uTwi29rIn4tM7H2sYmmybmG5jJNlE5v0xA/viewform?usp=dialog). 15 | 16 | Merci d'avoir appris avec nous, et souvenez-vous : 17 | 18 | **Continuez à apprendre, continuez à vous entraîner, continuez à combattre, et restez impressionnants !** 🤗 19 | -------------------------------------------------------------------------------- /units/ko/unit1/final-quiz.mdx: -------------------------------------------------------------------------------- 1 | # Unit 1 퀴즈 [[unit-1-quiz]] 2 | 3 | Unit 1 planning 4 | 5 | 첫 번째 단원을 완료하신 것을 축하합니다! 지금까지 배운 핵심 개념들에 대한 이해도를 테스트해 보겠습니다. 6 | 7 | 퀴즈를 통과하면 다음 섹션으로 진행하여 수료증을 받을 수 있습니다. 8 | 9 | 행운을 빕니다! 10 | 11 | ## 퀴즈 [[quiz]] 12 | 13 | 여기 인터랙티브 퀴즈가 있습니다. 이 퀴즈는 Hugging Face Hub의 스페이스에서 호스팅됩니다. 이 단원에서 다룬 핵심 개념에 대한 이해도를 테스트하는 객관식 문제들이 제공됩니다. 퀴즈를 완료하면 점수와 정답 해설을 확인할 수 있습니다. 14 | 15 | 중요한 점: **통과 후 제출 버튼을 클릭하는 것을 잊지 마세요. 그렇지 않으면 시험 점수가 저장되지 않습니다!** 16 | 17 | 23 | 24 | 퀴즈에 👉 [여기](https://huggingface.co/spaces/agents-course/unit_1_quiz)에서도 접속할 수 있습니다. 25 | 26 | ## 수료증 [[certificate]] 27 | 28 | 퀴즈를 성공적으로 통과했으니, **이제 수료증을 받을 수 있습니다 🎓** 29 | 30 | 퀴즈를 완료하면 이 단원의 수료증에 접근할 수 있게 됩니다. 이 수료증을 다운로드하고 공유하여 과정에서의 진행 상황을 보여줄 수 있습니다. 31 | 32 | Unit 1 planning 33 | 34 | 수료증을 받으면 LinkedIn 🧑‍💼에 추가하거나 X, Bluesky 등에서 공유할 수 있습니다. **@huggingface를 태그하시면 저희가 매우 자랑스러워하며 축하해 드리고 싶습니다!** 🤗 -------------------------------------------------------------------------------- /units/vi/unit1/conclusion.mdx: -------------------------------------------------------------------------------- 1 | # Kết luận [[conclusion]] 2 | 3 | Chúc mừng bạn đã hoàn thành chương đầu tiên 🥳 4 | 5 | Bạn vừa **nắm vững kiến thức cơ bản về Agents** và đã tạo ra AI agent đầu tiên của mình! 6 | 7 | **Việc vẫn còn bối rối với một số khái niệm là hoàn toàn bình thường**. Agents là chủ đề phức tạp và cần thời gian để hiểu sâu mọi khía cạnh. 8 | 9 | **Hãy dành thời gian hiểu kỹ nội dung** trước khi tiếp tục. Việc nắm vững những kiến thức nền tảng này là cực kỳ quan trọng trước khi bước vào phần thú vị tiếp theo. 10 | 11 | Và nếu vượt qua bài Kiểm tra nhanh, đừng quên nhận chứng chỉ 🎓 👉 [tại đây](https://huggingface.co/spaces/agents-course/unit1-certification-app) 12 | 13 | Ví dụ chứng chỉ 14 | 15 | Trong chương (bổ trợ) tiếp theo, bạn sẽ học cách **tinh chỉnh một Agent để thực hiện function calling (gọi tools dựa trên prompt người dùng)**. 16 | 17 | Cuối cùng, chúng tôi rất muốn **lắng nghe phản hồi của bạn về khóa học và cách cải thiện**. Nếu có ý kiến đóng góp, hãy 👉 [điền form này](https://docs.google.com/forms/d/e/1FAIpQLSe9VaONn0eglax0uTwi29rIn4tM7H2sYmmybmG5jJNlE5v0xA/viewform?usp=dialog) 18 | 19 | ### Hãy tiếp tục học hỏi và luôn tuyệt vời nhé 🤗 -------------------------------------------------------------------------------- /units/en/unit1/conclusion.mdx: -------------------------------------------------------------------------------- 1 | # Conclusion [[conclusion]] 2 | 3 | Congratulations on finishing this first Unit 🥳 4 | 5 | You've just **mastered the fundamentals of Agents** and you've created your first AI Agent! 6 | 7 | It's **normal if you still feel confused by some of these elements**. Agents are a complex topic and it's common to take a while to grasp everything. 8 | 9 | **Take time to really grasp the material** before continuing. It’s important to master these elements and have a solid foundation before entering the fun part. 10 | 11 | And if you pass the Quiz test, don't forget to get your certificate 🎓 👉 [here](https://huggingface.co/spaces/agents-course/unit1-certification-app) 12 | 13 | Certificate Example 14 | 15 | In the next (bonus) unit, you're going to learn **to fine-tune a Agent to do function calling (aka to be able to call tools based on user prompt)**. 16 | 17 | Finally, we would love **to hear what you think of the course and how we can improve it**. If you have some feedback then, please 👉 [fill this form](https://docs.google.com/forms/d/e/1FAIpQLSe9VaONn0eglax0uTwi29rIn4tM7H2sYmmybmG5jJNlE5v0xA/viewform?usp=dialog) 18 | 19 | ### Keep Learning, stay awesome 🤗 -------------------------------------------------------------------------------- /units/zh-CN/unit2/llama-index/llama-hub.mdx: -------------------------------------------------------------------------------- 1 | # LlamaHub 简介 2 | 3 | **LlamaHub 是一个包含数百个集成组件、智能体和工具的注册中心,这些资源均可用于LlamaIndex框架。** 4 | 5 | ![LlamaHub](https://huggingface.co/datasets/agents-course/course-images/resolve/main/en/unit2/llama-index/llama-hub.png) 6 | 7 | 在本课程中我们将使用多种集成组件,因此让我们首先了解LlamaHub及其如何助力开发。 8 | 9 | 接下来我们将学习如何查找和安装所需组件的依赖项。 10 | 11 | ## 安装 12 | 13 | LlamaIndex的安装说明可通过结构清晰的**[LlamaHub官网](https://llamahub.ai/)**获取。 14 | 初次接触可能会感到有些复杂,但大多数**安装命令都遵循易于记忆的格式**: 15 | 16 | ```bash 17 | pip install llama-index-{component-type}-{framework-name} 18 | ``` 19 | 20 | 让我们尝试使用 [Hugging Face 推理 API 集成](https://llamahub.ai/l/llms/llama-index-llms-huggingface-api?from=llms) 安装 LLM 组件的依赖项。 21 | 22 | ```bash 23 | pip install llama-index-llms-huggingface-api 24 | ``` 25 | 26 | ## 用法 27 | 28 | 安装后,我们可以看到使用模式。您会注意到导入路径跟在安装命令后面! 29 | 下面,我们可以看到**LLM 组件的 Hugging Face 推理 API** 的使用示例。 30 | 31 | ```python 32 | from llama_index.llms.huggingface_api import HuggingFaceInferenceAPI 33 | 34 | llm = HuggingFaceInferenceAPI( 35 | model_name="Qwen/Qwen2.5-Coder-32B-Instruct", 36 | temperature=0.7, 37 | max_tokens=100, 38 | token="hf_xxx", 39 | ) 40 | 41 | llm.complete("Hello, how are you?") 42 | # I am good, how can I help you today? 43 | ``` 44 | 45 | 太棒了,我们现在知道如何查找、安装和使用我们所需组件的集成。 46 | **让我们深入了解这些组件**,看看如何使用它们来构建我们自己的智能体。 47 | -------------------------------------------------------------------------------- /units/ru-RU/unit1/conclusion.mdx: -------------------------------------------------------------------------------- 1 | # Заключение [[conclusion]] 2 | 3 | Поздравляем с завершением этого первого раздела 🥳. 4 | 5 | Вы только что **овладели основами работы агентов** и создали своего первого AI Агента! 6 | 7 | Это **нормально, если вы все еще чувствуете себя сбитым с толку некоторыми из этих элементов**. Агенты - сложная тема, и обычно требуется время, чтобы понять все. 8 | 9 | **Потратьте время, чтобы действительно понять материал**, прежде чем продолжать. Важно освоить эти элементы и заложить прочный фундамент, прежде чем приступать к самой интересной части. 10 | 11 | А если вы пройдете тест, не забудьте получить сертификат 🎓 👉 [здесь](https://huggingface.co/spaces/agents-course/unit1-certification-app) 12 | 13 | Пример Сертификата 14 | 15 | В следующем (бонусном) разделе вы научитесь **дообучать Agent вызову функций (а также вызову инструментов по запросу пользователя)**. 16 | 17 | Наконец, мы хотели бы **услышать, что вы думаете о курсе и как мы можем его улучшить**. Если у вас есть отзыв, пожалуйста, 👉 [заполните эту форму](https://docs.google.com/forms/d/e/1FAIpQLSe9VaONn0eglax0uTwi29rIn4tM7H2sYmmybmG5jJNlE5v0xA/viewform?usp=dialog) 18 | 19 | ### Продолжайте учиться, оставайтесь потрясающими 🤗 -------------------------------------------------------------------------------- /units/es/unit3/agentic-rag/conclusion.mdx: -------------------------------------------------------------------------------- 1 | # Conclusión 2 | 3 | En esta unidad, hemos aprendido a crear un sistema RAG agéntico para ayudar a Alfred, nuestro amigable agente de vecindario, a prepararse y a gestionar una gala extravagante. 4 | 5 | La combinación de RAG con las capacidades agéntico demuestra cómo los asistentes de IA pueden volverse muy poderosos cuando tienen: 6 | - Acceso a conocimientos estructurados (información de los invitados) 7 | - Capacidad de recuperar información en tiempo real (búsqueda web) 8 | - Herramientas específicas del dominio (información climática, estadísticas de Hub) 9 | - Memoria de las interacciones pasadas 10 | 11 | Con estas capacidades, Alfred está bien equipado para ser el perfecto anfitrión, capaz de responder a preguntas sobre los invitados, proporcionar información actualizada y asegurarse de que la gala se realice sin problemas -incluso gestionando el momento perfecto para el lanzamiento de los fuegos artificiales! 12 | 13 | > [!TIP] 14 | > Ahora que has construido un agente completo, podrías querer explorar: 15 | > 16 | > - Crear herramientas especializadas para tus propios casos de uso 17 | > - Implementar sistemas RAG más sofisticados con embeddings 18 | > - Crear sistemas multi-agente donde los agentes puedan colaborar 19 | > - Desplegar tu agente como un servicio con el que los demás puedan interactuar 20 | -------------------------------------------------------------------------------- /units/fr/unit4/get-your-certificate.mdx: -------------------------------------------------------------------------------- 1 | # Obtenez votre certificat 🎓 2 | 3 | Si vous avez obtenu un score **supérieur à 30%, félicitations ! 👏 Vous êtes maintenant éligible pour réclamer votre certificat officiel.** 4 | 5 | Suivez les étapes ci-dessous pour le recevoir : 6 | 7 | 1. Visitez la [page du certificat](https://huggingface.co/spaces/agents-course/Unit4-Final-Certificate). 8 | 2. **Connectez-vous** avec votre compte Hugging Face en utilisant le bouton fourni. 9 | 3. **Entrez votre nom complet**. C'est le nom qui apparaîtra sur votre certificat. 10 | 4. Cliquez sur **"*Obtenir mon certificat*"** pour vérifier votre score et télécharger votre certificat. 11 | 12 | Congrats! 13 | 14 | Une fois que vous avez obtenu votre certificat, n'hésitez pas à : 15 | - L'ajouter à votre **profil *LinkedIn*** 🧑‍💼 16 | - Le partager sur **X**, **Bluesky**, etc. 🎉 17 | 18 | **N'oubliez pas de taguer [@huggingface](https://huggingface.co/huggingface). Nous serions super fiers et nous aimerions vous encourager ! 🤗** 19 | 20 | > [!TIP] 21 | > Si vous avez des problèmes avec la soumission, veuillez ouvrir une discussion sur [l'onglet communauté de la certification](https://huggingface.co/spaces/agents-course/Unit4-Final-Certificate/discussions). -------------------------------------------------------------------------------- /units/fr/unit3/agentic-rag/conclusion.mdx: -------------------------------------------------------------------------------- 1 | # Conclusion 2 | 3 | Dans cette unité, nous avons appris comment créer un système de RAG agentique pour aider Alfred, notre sympathique agent, à préparer et gérer un gala exceptionnel. 4 | 5 | La combinaison du RAG avec les capacités agentiques démontre à quel point les assistants IA peuvent devenir puissants quand ils ont : 6 | - Accès à de la connaissance structurée (informations sur les invités) 7 | - La capacité de récupérer des informations en temps réel (recherche web) 8 | - Accès à des outils spécifiques au domaine (informations météorologiques, statistiques du Hub) 9 | - Une mémoire des interactions passées 10 | 11 | Avec ces capacités, Alfred est maintenant bien équipé pour être l'hôte parfait, capable de répondre aux questions sur les invités, fournir des informations à jour, et s'assurer que le gala se déroule sans encombre—gérant même le timing parfait pour le spectacle pyrotechnique ! 12 | 13 | > [!TIP] 14 | > Maintenant que vous avez construit un agent complet, vous pourriez vouloir : 15 | > 16 | > - Créer des outils plus spécialisés pour vos propres cas d'usage 17 | > - Implémenter des systèmes de RAG plus sophistiqués avec des embeddings 18 | > - Construire des systèmes multi-agents où les agents peuvent collaborer 19 | > - Déployer votre agent comme un service avec lequel d'autres peuvent interagir -------------------------------------------------------------------------------- /units/zh-CN/bonus-unit3/from-llm-to-agents.mdx: -------------------------------------------------------------------------------- 1 | # 从 LLM 到 AI 智能体 2 | 3 | 我们在课程的[第一单元](https://huggingface.co/learn/agents-course/unit1/introduction)中学到,AI 智能体能够规划和做决策。 4 | 虽然 LLM 已经使与 NPC 的交互更加自然,但智能体 AI 通过允许角色做出决策、规划行动和适应变化的环境,进一步推进了这一点。 5 | 6 | 为了说明区别,想想一个经典的 RPG NPC: 7 | 8 | - 使用 LLM:NPC 可能以更自然、多样的方式回应你的问题。这对对话很好,但 NPC 保持静态,除非你先做什么,否则它不会行动。 9 | - 使用智能体 AI:NPC 可以决定寻找帮助、设置陷阱或完全避开你,即使你没有直接与它交互。 10 | 11 | 这个小转变改变了一切。我们正在从脚本化响应者转向游戏世界中的自主行动者。 12 | 13 | 这种转变意味着 NPC 现在可以通过目标导向的行为直接与环境交互,最终导致更动态和不可预测的游戏玩法。 14 | 15 | 智能体 AI 为 NPC 提供了: 16 | 17 | - **自主性**:基于游戏状态做出独立决策。 18 | - **适应性**:响应玩家行动调整策略。 19 | - **持久性**:记住过去的交互来指导未来的行为。 20 | 21 | 这将 NPC 从反应性实体(对你的输入做出反应)转变为游戏世界中的主动参与者,为创新游戏玩法打开了大门。 22 | 23 | ## 智能体的重大限制:**它很慢**(目前) 24 | 25 | 然而,让我们现在不要过于乐观。尽管有其潜力,智能体 AI 目前在实时应用中面临挑战。 26 | 27 | 推理和规划过程可能引入延迟,使其不太适合像*Doom*或*超级马里奥兄弟*这样的快节奏游戏。 28 | 29 | 以[_Claude Plays Pokémon_](https://www.twitch.tv/claudeplayspokemon)为例。如果你考虑**思考**所需 token 数量,加上**行动**所需的 token 数量,就会清楚地发现,我们需要完全不同的解码策略来使实时游戏变得可行。 30 | 31 | Claude plays Pokémon 35 | 36 | 大多数游戏需要以大约 30 FPS 运行,这意味着实时 AI 智能体需要每秒行动 30 次,这在当前的智能体 LLM 中是不可行的。 37 | 38 | 然而,像*宝可梦*这样的回合制游戏是理想的候选者,因为它们为 AI 提供了足够的时间来深思熟虑并做出战略决策。 39 | 40 | 这就是为什么在下一节中,你将构建自己的 AI 智能体来进行宝可梦风格的回合制战斗,甚至挑战它。让我们开始吧! 41 | -------------------------------------------------------------------------------- /units/zh-CN/unit1/introduction.mdx: -------------------------------------------------------------------------------- 1 | # 智能体简介 (Introduction to Agents) 2 | Thumbnail 3 | 4 | 欢迎来到第一单元,在这里**你将在 AI 智能体 (AI Agents) 的基础知识中建立坚实的基础**,包括: 5 | 6 | * **理解智能体 (Understanding Agents)** 7 | * 什么是智能体,它是如何工作的? 8 | * 智能体如何使用推理 (Reasoning) 和规划 (Planning) 做出决策? 9 | 10 | * **大型语言模型 (LLMs) 在智能体中的角色** 11 | * LLMs 如何作为智能体的"大脑" 12 | * LLMs 如何通过消息系统 (Message System) 构建对话 13 | 14 | * **工具和行动 (Tools and Actions)** 15 | * 智能体如何使用外部工具与环境交互 16 | * 如何为你的智能体构建和集成工具 17 | 18 | * **智能体工作流程 (Agent Workflow):** 19 | * *思考 (Think)* → *行动 (Act)* → *观察 (Observe)* 20 | 21 | 探索这些主题后,**你将使用 `smolagents` 构建你的第一个智能体**! 22 | 23 | 你的智能体名为 Alfred,将处理一个简单的任务,并展示如何在实践中应用这些概念。 24 | 25 | 你甚至会学习如何**在 Hugging Face Spaces 上发布你的智能体**,这样你就可以与朋友和同事分享它。 26 | 27 | 最后,在本单元结束时,你将参加一个测验。通过它,你将**获得你的第一个课程认证**:🎓 智能体基础证书 (Certificate of Fundamentals of Agents)。 28 | 29 | Certificate Example 30 | 31 | 这个单元是你的**重要起点**,在进入更高级的主题之前,为理解智能体打下基础。 32 | 33 | Unit 1 planning 34 | 35 | 这是一个大单元,所以**请慢慢来**,不要犹豫随时回来复习这些章节。 36 | 37 | 准备好了吗?让我们开始吧!🚀 -------------------------------------------------------------------------------- /units/zh-CN/unit2/llama-index/README.md: -------------------------------------------------------------------------------- 1 | # 目录 2 | 3 | 此 LlamaIndex 框架大纲是课程第 2 单元的一部分。您可以在 hf.co/learn 上访问有关 LlamaIndex 的第 2 单元 👉 这里 4 | 5 | | 标题 | 描述 | 6 | | -------------------------------- | ------------------------------------------------------------------------------------ | 7 | | [介绍](introduction.mdx) | LlamaIndex 简介 | 8 | | [LlamaHub](llama-hub.mdx) | LlamaHub:集成、智能体和工具注册表 | 9 | | [组件](components.mdx) | 组件:工作流的构件 | 10 | | [工具](tools.mdx) | 工具:如何在 LlamaIndex 中构建工具 | 11 | | [测验 1](quiz1.mdx) | 测验 1 | 12 | | [智能体](agents.mdx) | 智能体:如何在 LlamaIndex 中建立智能体 | 13 | | [工作流](workflows.mdx) | 工作流:由按顺序执行的组件组成的一系列步骤和事件 | 14 | | [测验 2](quiz2.mdx) | 测验 2 | 15 | | [结论](conclusion.mdx) | 结论 | 16 | 17 | -------------------------------------------------------------------------------- /units/es/unit1/conclusion.mdx: -------------------------------------------------------------------------------- 1 | # Conclusión [[conclusion]] 2 | 3 | ¡Felicitaciones por terminar esta primera Unidad 🥳 4 | 5 | ¡Acabas de **dominar los fundamentos de los Agentes** y has creado tu primer Agente de IA! 6 | 7 | Es **normal si todavía te sientes confundido por algunos de estos elementos**. Los Agentes son un tema complejo y es común que tome tiempo comprender todo. 8 | 9 | **Tómate el tiempo para entender realmente el material** antes de continuar. Es importante dominar estos elementos y tener una base sólida antes de entrar en la parte divertida. 10 | 11 | Y si pasas la prueba del Quiz, no olvides obtener tu certificado 🎓 👉 [aquí](https://huggingface.co/spaces/agents-course/unit1-certification-app) 12 | 13 | Ejemplo de Certificado 14 | 15 | En la siguiente unidad (bonus), aprenderás **a ajustar un Agente para hacer llamadas a funciones (también conocido como ser capaz de llamar a herramientas basadas en el prompt del usuario)**. 16 | 17 | Finalmente, nos encantaría **escuchar lo que piensas del curso y cómo podemos mejorarlo**. Si tienes algún comentario, por favor 👉 [completa este formulario](https://docs.google.com/forms/d/e/1FAIpQLSe9VaONn0eglax0uTwi29rIn4tM7H2sYmmybmG5jJNlE5v0xA/viewform?usp=dialog) 18 | 19 | ### Sigue aprendiendo, mantente increíble 🤗 -------------------------------------------------------------------------------- /units/fr/unit1/conclusion.mdx: -------------------------------------------------------------------------------- 1 | # Conclusion [[conclusion]] 2 | 3 | Félicitations pour avoir terminé cette première Unité 🥳 4 | 5 | Vous **maîtrisez les fondamentaux** et avez créé votre premier agent ! 6 | 7 | Il est **normal que vous soyez encore un peu confus par certains éléments**. Les agents sont un sujet complexe et il est courant de mettre un certain temps à tout comprendre. 8 | 9 | **Prenez le temps de bien assimiler le contenu** avant de continuer. Il est important de maîtriser ces éléments et d'avoir une base solide avant de passer à la partie amusante. 10 | 11 | Et si vous réussissez le quiz, n'oubliez pas de récupérer votre certificat 🎓 👉 [ici](https://huggingface.co/spaces/agents-course/unit1-certification-app) 12 | 13 | Exemple de Certificat 14 | 15 | Dans la prochaine unité (bonus), vous allez apprendre **à finetuner un agent pour qu'il puisse appeler des fonctions (i.e être capable d'appeler des outils en fonction du *prompt* de l'utilisateur)**. 16 | 17 | Enfin, nous serions ravis **d'entendre ce que vous pensez du cours et comment nous pourrions l'améliorer**. Si vous avez des retours, n'hésitez pas à [remplir ce formulaire](https://docs.google.com/forms/d/e/1FAIpQLSe9VaONn0eglax0uTwi29rIn4tM7H2sYmmybmG5jJNlE5v0xA/viewform?usp=dialog). 18 | 19 | ### Continuez à apprendre, restez géniaux 🤗 20 | -------------------------------------------------------------------------------- /units/ko/unit1/README.md: -------------------------------------------------------------------------------- 1 | # 컨텐츠 목록 2 | 3 | 👉 여기에서 Unit1을 접속하실 수 있습니다. 4 | 5 | -------------------------------------------------------------------------------- /units/zh-CN/unit1/observations.mdx: -------------------------------------------------------------------------------- 1 | # Observe: 整合反馈以反思和调整 2 | 3 | Observations(观察)是**智能体感知其行动结果的方式**。 4 | 5 | 它们提供关键信息,为智能体的思考过程提供燃料并指导未来行动。 6 | 7 | 这些是**来自环境的信号**——无论是 API 返回的数据、错误信息还是系统日志——它们指导着下一轮的思考循环。 8 | 9 | 在观察阶段,智能体会: 10 | 11 | - **收集反馈**:接收数据或确认其行动是否成功 12 | - **附加结果**:将新信息整合到现有上下文中,有效更新记忆 13 | - **调整策略**:使用更新后的上下文来优化后续思考和行动 14 | 15 | 例如,当天气 API 返回数据*"partly cloudy, 15°C, 60% humidity"*(局部多云,15°C,60% 湿度)时,该观察结果会被附加到智能体的记忆(位于提示末尾)。 16 | 17 | 智能体随后利用这些信息决定是否需要额外数据,或是否准备好提供最终答案。 18 | 19 | 这种**迭代式反馈整合确保智能体始终保持与目标的动态对齐**,根据现实结果不断学习和调整。 20 | 21 | 这些观察**可能呈现多种形式**,从读取网页文本到监测机械臂位置。这可以视为工具"日志",为行动执行提供文本反馈。 22 | 23 | | 观察类型 | 示例 | 24 | |---------------------|---------------------------------------------------------------------------| 25 | | 系统反馈 | 错误信息、成功通知、状态码 | 26 | | 数据变更 | 数据库更新、文件系统修改、状态变更 | 27 | | 环境数据 | 传感器读数、系统指标、资源使用情况 | 28 | | 响应分析 | API 响应、查询结果、计算输出 | 29 | | 基于时间的事件 | 截止时间到达、定时任务完成 | 30 | 31 | ## 结果如何被附加? 32 | 33 | 执行操作后,框架按以下步骤处理: 34 | 35 | 1. **解析操作** 以识别要调用的函数和使用的参数 36 | 2. **执行操作** 37 | 3. **将结果附加** 作为 **Observation** 38 | 39 | --- 40 | 至此我们已经学习了智能体的思考-行动-观察循环。 41 | 42 | 如果某些概念仍显模糊,不必担心——我们将在后续单元中重访并深化这些概念。 43 | 44 | 现在,是时候通过编写你的第一个智能体来实践所学知识了! 45 | -------------------------------------------------------------------------------- /units/en/unit1/README.md: -------------------------------------------------------------------------------- 1 | # Table of Contents 2 | 3 | You can access Unit 1 on hf.co/learn 👉 here 4 | 5 | -------------------------------------------------------------------------------- /units/ru-RU/unit1/README.md: -------------------------------------------------------------------------------- 1 | # Table of Contents 2 | 3 | You can access Unit 1 on hf.co/learn 👉 here 4 | 5 | -------------------------------------------------------------------------------- /units/ko/unit1/introduction.mdx: -------------------------------------------------------------------------------- 1 | # 에이전트 소개 [[introduction-to-agents]] 2 | 3 | Thumbnail 4 | 5 | 첫 번째 단원에 오신 것을 환영합니다! 이번 단원에서 여러분을 **AI 에이전트의 기초**를 탄탄히 다질 것이며, 다룰 주요 내용은 다음과 같습니다 : 6 | 7 | - **에이전트 이해하기** 8 | - 에이전트란 무엇이며, 어떻게 작동하는가? 9 | - 에이전트는 어떻게 추론과 계획을 통해 의사 결정을 내리는가? 10 | 11 | - **에이전트 내 LLM(대형 언어 모델)의 역할** 12 | - LLM이 에이전트의 "두뇌" 역할을 하는 방식 13 | - LLM이 메시지 시스템을 통해 대화를 구조화하는 방법. 14 | 15 | - **도구(Tool)와 행동(Action)** 16 | - 에이전트가 외부 도구를 활용하여 환경과 상호작용하는 방식 17 | - 에이전트에 도구를 구축하고 통합하는 방법 18 | 19 | - **에이전트 워크플로우:** 20 | - *생각(Think)* → *행동(Act)* → *관찰(Observe)*. 21 | 22 | After exploring these topics, **you’ll build your first Agent** using `smolagents`! 23 | 이 개념들을 살펴본 후, 여러분은 `smolagents`를 사용하여 **첫 번째 에이전트**를 직접 구현해 볼 것입니다! 24 | 25 | Alfred라는 에이전트를 통해, 배운 개념들을 적용할 수 있는 간단한 작업 수행 방법을 배울 것입니다. 26 | 27 | 또한 **Hugging Face Spaces에 여러분이 만든 에이전트를 게시하는 방법**도 배워, 동료들과 친구들에게 공유할 수 있습니다. 28 | 29 | 마지막으로, 이 단원의 끝에서 퀴즈를 통과하게 되면 **🎓 Certificate of Fundamentals of Agents** 인증서를 획득할 수 있습니다! 30 | 31 | Certificate Example 32 | 33 | 이 단원은 **에이전트 학습의 필수 시작점**으로, 이후 더 고급 개념을 배우기 위한 기초를 다집니다. 34 | 35 | Unit 1 planning 36 | 37 | 단원의 내용이 많으니, **천천히** 학습하며 필요할 때 다시 돌아와 복습하세요! 38 | 39 | 준비되셨나요? 함께 시작해 봅시다! 🚀 40 | -------------------------------------------------------------------------------- /units/ko/unit1/observations.mdx: -------------------------------------------------------------------------------- 1 | # 관찰: 피드백을 통합하여 성찰하고 적응하기 [[observe-integrating-feedback-to-reflect-and-adapt]] 2 | 3 | 관찰은 **에이전트가 자신의 행동 결과를 인식하는 방법**입니다. 4 | 5 | 이는 에이전트의 사고 과정을 촉진하고 향후 행동을 안내하는 중요한 정보를 제공합니다. 6 | 7 | 관찰은 **환경으로부터의 신호**입니다. API의 데이터, 오류 메시지, 또는 시스템 로그와 같은 정보가 다음 사고 주기를 이끕니다. 8 | 9 | 관찰 단계에서 에이전트는: 10 | 11 | - **피드백 수집:** 행동이 성공했는지(또는 실패했는지)에 대한 데이터나 확인을 받습니다. 12 | - **결과 추가:** 새로운 정보를 기존 맥락에 통합하여 실질적으로 기억을 업데이트합니다. 13 | - **전략 조정:** 이렇게 업데이트된 맥락을 활용하여 이후의 사고와 행동을 개선합니다. 14 | 15 | 예를 들어, 날씨 API가 *"구름 조금, 15°C, 습도 60%"*와 같은 데이터를 반환하면, 이 관찰 결과는 에이전트의 기억(프롬프트 끝부분)에 추가됩니다. 16 | 17 | 그런 다음 에이전트는 이를 활용해 추가 정보가 필요한지 아니면 최종 답변을 제공할 준비가 되었는지 결정합니다. 18 | 19 | 이러한 **피드백의 반복적 통합은 에이전트가 목표에 계속 맞춰 나가도록 보장**하며, 실제 결과를 바탕으로 지속적으로 학습하고 조정합니다. 20 | 21 | 이러한 관찰은 **웹페이지 텍스트를 읽는 것부터 로봇 팔의 위치를 모니터링하는 것까지 다양한 형태**를 취할 수 있습니다. 이는 행동 실행에 대한 텍스트 피드백을 제공하는 도구 "로그"와 같이 볼 수 있습니다. 22 | 23 | | 관찰 유형 | 예시 | 24 | |---------------------|---------------------------------------------------------------------------| 25 | | 시스템 피드백 | 오류 메시지, 성공 알림, 상태 코드 | 26 | | 데이터 변경 | 데이터베이스 업데이트, 파일 시스템 수정, 상태 변화 | 27 | | 환경 데이터 | 센서 읽기, 시스템 지표, 자원 사용량 | 28 | | 응답 분석 | API 응답, 쿼리 결과, 계산 출력 | 29 | | 시간 기반 이벤트 | 기한 도달, 예약 작업 완료 | 30 | 31 | ## 결과는 어떻게 추가되나요? [[how-are-the-results-appended]] 32 | 33 | 행동을 수행한 후, 프레임워크는 다음 단계를 순서대로 따릅니다: 34 | 35 | 1. **행동을 분석**하여 호출할 함수와 사용할 인수를 식별합니다. 36 | 2. **행동을 실행**합니다. 37 | 3. **결과를 추가**하여 **관찰**합니다. 38 | 39 | --- 40 | 이제 에이전트의 사고-행동-관찰 주기에 대해 배웠습니다. 41 | 42 | 일부 측면이 아직 명확하지 않더라도 걱정하지 마세요. 이후 단원에서 이러한 개념을 다시 살펴보고 더 깊이 이해할 기회가 있을 것입니다. 43 | 44 | 이제 첫 번째 에이전트를 직접 코딩하여 지금까지 배운 지식을 실습해 볼 시간입니다! 45 | -------------------------------------------------------------------------------- /units/zh-CN/bonus-unit1/introduction.mdx: -------------------------------------------------------------------------------- 1 | # 简介 (Introduction) 2 | 3 | ![附加单元1缩略图](https://huggingface.co/datasets/agents-course/course-images/resolve/main/en/bonus-unit1/thumbnail.jpg) 4 | 5 | 欢迎来到第一个**附加单元**,在这里你将学习如何**为函数调用 (function calling) 微调大语言模型 (Large Language Model, LLM)**。 6 | 7 | 在大语言模型领域,函数调用正在迅速成为一项*必须掌握*的技术。 8 | 9 | 这个想法是,不同于我们在第1单元中仅依赖基于提示的方法,函数调用在训练阶段就训练你的模型**采取行动和解释观察结果**,使你的人工智能更加健壮。 10 | 11 | > **我应该什么时候学习这个附加单元?** 12 | > 13 | > 这个部分是**可选的**,比第1单元更高级,所以不要犹豫,你可以现在就学习这个单元,或者在通过本课程提高了知识水平后再回来学习。 14 | > 15 | > 但不用担心,这个附加单元设计时包含了你需要的所有信息,所以即使你还没有学习微调的内部工作原理,我们也会带你了解为函数调用微调模型的每个核心概念。 16 | 17 | 让你能够跟上这个附加单元的最佳方式是: 18 | 19 | 1. 了解如何使用 Transformers 微调大语言模型,如果你还不了解,[请查看这里](https://huggingface.co/learn/nlp-course/chapter3/1?fw=pt) 20 | 21 | 2. 了解如何使用 `SFTTrainer` 来微调我们的模型,要了解更多信息,[请查看这份文档](https://huggingface.co/learn/nlp-course/en/chapter11/1) 22 | 23 | --- 24 | 25 | ## 你将学到什么 26 | 27 | 1. **函数调用 (Function Calling)** 28 | 现代大语言模型如何有效地构建对话,使它们能够触发**工具 (Tools)**。 29 | 30 | 2. **LoRA(低秩适应,Low-Rank Adaptation)** 31 | 一种**轻量级且高效**的微调方法,减少计算和存储开销。LoRA 使大型模型的训练变得*更快、更便宜、更容易*部署。 32 | 33 | 3. **函数调用模型中的思考 → 行动 → 观察循环(Thought → Act → Observe Cycle)** 34 | 一种简单但强大的方法,用于构建模型如何决定何时(以及如何)调用函数、跟踪中间步骤以及解释来自外部工具或API的结果。 35 | 36 | 4. **新的特殊词元 (Special Tokens)** 37 | 我们将介绍**特殊标记**,帮助模型区分: 38 | - 内部"思维链"推理 39 | - 外部函数调用 40 | - 来自外部工具的响应 41 | 42 | --- 43 | 44 | 在完成这个附加单元后,你将能够: 45 | 46 | - **理解**工具相关的 API 内部工作原理。 47 | - 使用 LoRA 技术**微调**模型。 48 | - **实现**和**修改**思考 → 行动 → 观察循环,以创建健壮和可维护的函数调用工作流。 49 | - **设计和使用**特殊词元,无缝分离模型的内部推理和外部行动。 50 | 51 | 而且你将**拥有自己微调的模型来进行函数调用。** 🔥 52 | 53 | 让我们深入了解**函数调用**吧! -------------------------------------------------------------------------------- /units/ko/_toctree.yml: -------------------------------------------------------------------------------- 1 | - title: Unit 0. Welcome to the course 2 | sections: 3 | - local: unit0/introduction 4 | title: Welcome to the course 🤗 5 | - local: unit0/onboarding 6 | title: Onboarding 7 | - local: unit0/discord101 8 | title: (Optional) Discord 101 9 | - title: Unit 1. Introduction to Agents 10 | sections: 11 | - local: unit1/introduction 12 | title: Introduction 13 | - local: unit1/what-are-agents 14 | title: What is an Agent? 15 | - local: unit1/quiz1 16 | title: Quick Quiz 1 17 | - local: unit1/what-are-llms 18 | title: What are LLMs? 19 | - local: unit1/messages-and-special-tokens 20 | title: Messages and Special Tokens 21 | - local: unit1/tools 22 | title: What are Tools? 23 | - local: unit1/quiz2 24 | title: Quick Quiz 2 25 | - local: unit1/agent-steps-and-structure 26 | title: Understanding AI Agents through the Thought-Action-Observation Cycle 27 | - local: unit1/thoughts 28 | title: Thought, Internal Reasoning and the Re-Act Approach 29 | - local: unit1/actions 30 | title: Actions, Enabling the Agent to Engage with Its Environment 31 | - local: unit1/observations 32 | title: Observe, Integrating Feedback to Reflect and Adapt 33 | - local: unit1/dummy-agent-library 34 | title: Dummy Agent Library 35 | - local: unit1/tutorial 36 | title: Let’s Create Our First Agent Using smolagents 37 | - local: unit1/final-quiz 38 | title: Unit 1 Final Quiz 39 | - local: unit1/conclusion 40 | title: Conclusion 41 | - title: Bonus Unit 1. Fine-tuning an LLM for Function-calling 42 | sections: 43 | - local: bonus-unit1/introduction 44 | title: Introduction -------------------------------------------------------------------------------- /units/vi/unit1/final-quiz.mdx: -------------------------------------------------------------------------------- 1 | # Chương 1: Kiểm tra nhanh 2 | 3 | Kế hoạch chương 1 4 | 5 | Chúc mừng bạn đã hoàn thành chương đầu tiên! Hãy cùng kiểm tra hiểu biết của bạn về các khái niệm chính đã học nhé. 6 | 7 | Khi vượt qua bài kiểm tra này, hãy chuyển sang phần tiếp theo để nhận chứng chỉ của bạn. 8 | 9 | Chúc may mắn! 10 | 11 | ## Bài kiểm tra 12 | 13 | Đây là bài kiểm tra tương tác được host trên Hugging Face Hub trong một Space. Bạn sẽ trải qua các câu hỏi trắc nghiệm để kiểm tra hiểu biết về các khái niệm chính trong chương này. Sau khi hoàn thành, bạn có thể xem điểm số và đáp án đúng. 14 | 15 | Lưu ý quan trọng: **đừng quên nhấn Submit sau khi hoàn thành, nếu không điểm thi của bạn sẽ không được lưu!** 16 | 17 | 23 | 24 | Bạn cũng có thể truy cập bài kiểm tra tại 👉 [đây](https://huggingface.co/spaces/agents-course/unit_1_quiz) 25 | 26 | ## Chứng chỉ 27 | 28 | Giờ bạn đã vượt qua bài kiểm tra thành công, **hãy nhận chứng chỉ 🎓 của bạn** 29 | 30 | Khi hoàn thành bài kiểm tra, bạn sẽ được cấp chứng chỉ hoàn thành chương này. Bạn có thể tải về và chia sẻ chứng chỉ này để thể hiện tiến độ học tập. 31 | 32 | Kế hoạch chương 1 33 | 34 | Sau khi nhận chứng chỉ, bạn có thể thêm vào LinkedIn 🧑‍💼 hoặc chia sẻ lên X, Bluesky... **Chúng mình sẽ rất tự hào và muốn chúc mừng bạn nếu bạn tag @huggingface**! 🤗 -------------------------------------------------------------------------------- /units/es/unit1/README.md: -------------------------------------------------------------------------------- 1 | # Tabla de Contenidos 2 | 3 | Puedes acceder a la Unidad 1 en hf.co/learn 👉 aquí 4 | 5 | -------------------------------------------------------------------------------- /units/en/unit4/introduction.mdx: -------------------------------------------------------------------------------- 1 | # Welcome to the final Unit [[introduction]] 2 | 3 | AI Agents Course thumbnail 4 | 5 | Welcome to the final unit of the course! 🎉 6 | 7 | So far, you’ve **built a strong foundation in AI Agents**, from understanding their components to creating your own. With this knowledge, you’re now ready to **build powerful agents** and stay up-to-date with the latest advancements in this fast-evolving field. 8 | 9 | This unit is all about applying what you’ve learned. It’s your **final hands-on project**, and completing it is your ticket to earning the **course certificate**. 10 | 11 | ## What’s the challenge? 12 | 13 | You’ll create your own agent and **evaluate its performance using a subset of the [GAIA benchmark](https://huggingface.co/spaces/gaia-benchmark/leaderboard)**. 14 | 15 | To successfully complete the course, your agent needs to score **30% or higher** on the benchmark. Achieve that, and you’ll earn your **Certificate of Completion**, officially recognizing your expertise. 🏅 16 | 17 | Additionally, see how you stack up against your peers! A dedicated **[Student Leaderboard](https://huggingface.co/spaces/agents-course/Students_leaderboard)** is available for you to submit your scores and see the community's progress. 18 | 19 | > ** 🚨 Heads Up: Advanced & Hands-On Unit** 20 | > 21 | > Please be aware that this unit shifts towards a more practical, hands-on approach. Success in this section will require **more advanced coding knowledge** and relies on you navigating tasks with **less explicit guidance** compared to earlier parts of the course. 22 | 23 | Sounds exciting? Let’s get started! 🚀 -------------------------------------------------------------------------------- /units/zh-CN/unit0/discord101.mdx: -------------------------------------------------------------------------------- 1 | # (选读) Discord 101 [[discord-101]] 2 | 3 | Discord 礼仪指南 4 | 5 | 本指南旨在帮助您快速上手 Discord ——这款在游戏与机器学习社区广受欢迎的自由聊天平台。 6 | 7 | 点击此处 加入**拥有逾10万成员**的 Hugging Face 社区 Discord 服务器,开启您的技术社交之旅! 8 | 9 | ## Hugging Face Discord 社区的智能体课程 [[hf-discord-agents-course]] 10 | 11 | 对于初次接触 Discord 的用户,平台操作可能稍显复杂,以下简明指引将助您快速掌握核心功能。 12 | 13 | 14 | 15 | Hugging Face 社区服务器汇聚了多元技术方向的活跃开发者,通过论文研讨、技术活动等丰富形式,为您打造沉浸式学习体验。 16 | 17 | 18 | 完成【注册】(http://hf.co/join/discord)后,请前往`#自我介绍`频道完善个人资料。 19 | 20 | 我们为智能体课程专设了四大核心频道: 21 | 22 | - `智能体课程公告`: 获取**最新课程动态与更新通知**. 23 | - `🎓-智能体课程总览`: 进行**日常讨论与自由交流**. 24 | - `智能体课程答疑`: **提问解惑与互助学习**专区. 25 | - `智能体成果展示`: **分享您的最佳智能体作品** . 26 | 27 | 额外推荐关注: 28 | 29 | - `smolagents技术交流`: 关于**智能体库的使用讨论与技术支援**. 30 | 31 | ## Discord 高效使用技巧 32 | 33 | ### 服务器加入指南 34 | 35 | 若您对 Discord 平台尚不熟悉,建议参阅本平台的 服务器加入指南 获取详细操作指引。 36 | 37 | 以下是简明的步骤指南: 38 | 39 | 1. 点击 邀请链接(新窗口打开)。 40 | 2. 登录现有 Discord 账户或注册新账号。 41 | 3. 完成真人验证。 42 | 4. 设置用户名与头像(建议使用学术机构标识)。 43 | 5. 点击"加入服务器"完成接入。 44 | 45 | ### 如何高效使用 Discord 46 | 47 | 以下是有效使用 Discord 的几点建议: 48 | 49 | - **语音频道**虽已开放,但文字聊天仍是更常用的沟通方式。 50 | - 支持使用 **Markdown style** 格式化文本(尤其适用于代码编写),但需注意其在链接处理方面的效果欠佳。 51 | - 针对**长对话场景**,建议开启子线程(Threads)功能以保持讨论条理性。 52 | 53 | 希望本指南能为您提供帮助!如有任何疑问,欢迎通过 Discord 平台向我们咨询 🤗. 54 | -------------------------------------------------------------------------------- /units/en/unit4/additional-readings.mdx: -------------------------------------------------------------------------------- 1 | # And now? What topics I should learn? 2 | 3 | Agentic AI is a rapidly evolving field, and understanding foundational protocols is essential for building intelligent, autonomous systems. 4 | 5 | Two important standards you should get familiar with are: 6 | 7 | - The **Model Context Protocol (MCP)** 8 | - The **Agent-to-Agent Protocol (A2A)** 9 | 10 | ## 🔌 Model Context Protocol (MCP) 11 | 12 | The **Model Context Protocol (MCP)** by Anthropic is an open standard that enables AI models to securely and seamlessly **connect with external tools, data sources, and applications**, making agents more capable and autonomous. 13 | 14 | Think of MCP as a **universal adapter**, like a USB-C port, that allows AI models to plug into various digital environments **without needing custom integration for each one**. 15 | 16 | MCP is quickly gaining traction across the industry, with major companies like OpenAI and Google beginning to adopt it. 17 | 18 | 📚 Learn more: 19 | - [Anthropic's official announcement and documentation](https://www.anthropic.com/news/model-context-protocol) 20 | - [MCP on Wikipedia](https://en.wikipedia.org/wiki/Model_Context_Protocol) 21 | - [Blog on MCP](https://huggingface.co/blog/Kseniase/mcp) 22 | 23 | ## 🤝 Agent-to-Agent (A2A) Protocol 24 | 25 | Google has developed the **Agent-to-Agent (A2A) protocol** as a complementary counterpart to Anthropic's Model Context Protocol (MCP). 26 | 27 | While MCP connects agents to external tools, **A2A connects agents to each other**, paving the way for cooperative, multi-agent systems that can work together to solve complex problems. 28 | 29 | 📚 Dive deeper into A2A: 30 | - [Google’s A2A announcement](https://developers.googleblog.com/en/a2a-a-new-era-of-agent-interoperability/) 31 | -------------------------------------------------------------------------------- /units/fr/unit1/README.md: -------------------------------------------------------------------------------- 1 | # Table des matières 2 | 3 | Vous pouvez accéder à l'Unité 1 sur hf.co/learn 👉 ici 4 | 5 | 20 | -------------------------------------------------------------------------------- /units/zh-CN/unit2/introduction.mdx: -------------------------------------------------------------------------------- 1 | # 智能体框架介绍 2 | 3 | Thumbnail 4 | 5 | 欢迎来到第二单元,在这里**我们将探索不同的智能体框架(agentic frameworks)**,这些框架可用于构建强大的智能体应用。 6 | 7 | 我们将学习: 8 | 9 | - 在单元 2.1:[smolagents](https://huggingface.co/docs/smolagents/en/index) 10 | - 在单元 2.2:[LlamaIndex](https://www.llamaindex.ai/) 11 | - 在单元 2.3:[LangGraph](https://www.langchain.com/langgraph) 12 | 13 | 让我们开始吧!🕵 14 | 15 | ## 何时使用智能体框架 16 | 17 | **构建围绕大语言模型(LLMs)的应用时,并不总是需要智能体框架**。它们在工作流中提供了灵活性,可以高效地解决特定任务,但并非总是必需的。 18 | 19 | 有时,**预定义的工作流足以满足用户请求**,并且没有真正需要智能体框架。如果构建智能体的方法很简单,比如一系列提示,使用纯代码可能就足够了。优势在于开发者将**完全控制和理解他们的系统,没有抽象层**。 20 | 21 | 然而,当工作流变得更加复杂时,例如让大语言模型调用函数或使用多个智能体,这些抽象开始变得有用。 22 | 23 | 考虑到这些想法,我们已经可以确定对一些功能的需求: 24 | 25 | * 一个驱动系统的*大语言模型引擎*。 26 | * 智能体可以访问的*工具列表*。 27 | * 用于从大语言模型输出中提取工具调用的*解析器*。 28 | * 与解析器同步的*系统提示*。 29 | * 一个*记忆系统*。 30 | * *错误日志和重试机制*以控制大语言模型的错误。 31 | 32 | 我们将探讨这些主题在各种框架中如何解决,包括 `smolagents`、`LlamaIndex` 和 `LangGraph`。 33 | 34 | ## 智能体框架单元 35 | 36 | | 框架 | 描述 | 单元作者 | 37 | |------------|----------------|----------------| 38 | | [smolagents](./smolagents/introduction) | 由 Hugging Face 开发的智能体框架。 | Sergio Paniego - [HF](https://huggingface.co/sergiopaniego) - [X](https://x.com/sergiopaniego) - [Linkedin](https://www.linkedin.com/in/sergio-paniego-blanco) | 39 | | [Llama-Index](./llama-index/introduction) | 将上下文增强智能体带至生产端的端到端工具 | David Berenstein - [HF](https://huggingface.co/davidberenstein1957) - [X](https://x.com/davidberenstei) - [Linkedin](https://www.linkedin.com/in/davidberenstein) | 40 | | [LangGraph](./langgraph/introduction) | 允许对智能体进行有序协调的智能体 | Joffrey THOMAS - [HF](https://huggingface.co/Jofthomas) - [X](https://x.com/Jthmas404) - [Linkedin](https://www.linkedin.com/in/joffrey-thomas) | 41 | -------------------------------------------------------------------------------- /units/en/unit1/final-quiz.mdx: -------------------------------------------------------------------------------- 1 | # Unit 1 Quiz 2 | 3 | Unit 1 planning 4 | 5 | Well done on working through the first unit! Let's test your understanding of the key concepts covered so far. 6 | 7 | When you pass the quiz, proceed to the next section to claim your certificate. 8 | 9 | Good luck! 10 | 11 | ## Quiz 12 | 13 | Here is the interactive quiz. The quiz is hosted on the Hugging Face Hub in a space. It will take you through a set of multiple choice questions to test your understanding of the key concepts covered in this unit. Once you've completed the quiz, you'll be able to see your score and a breakdown of the correct answers. 14 | 15 | One important thing: **don't forget to click on Submit after you passed, otherwise your exam score will not be saved!** 16 | 17 | 23 | 24 | You can also access the quiz 👉 [here](https://huggingface.co/spaces/agents-course/unit_1_quiz) 25 | 26 | ## Certificate 27 | 28 | Now that you have successfully passed the quiz, **you can get your certificate 🎓** 29 | 30 | When you complete the quiz, it will grant you access to a certificate of completion for this unit. You can download and share this certificate to showcase your progress in the course. 31 | 32 | Unit 1 planning 33 | 34 | Once you receive your certificate, you can add it to your LinkedIn 🧑‍💼 or share it on X, Bluesky, etc. **We would be super proud and would love to congratulate you if you tag @huggingface**! 🤗 35 | -------------------------------------------------------------------------------- /units/en/unit2/langgraph/introduction.mdx: -------------------------------------------------------------------------------- 1 | # Introduction to `LangGraph` 2 | 3 | Unit 2.3 Thumbnail 4 | 5 | Welcome to this next part of our journey, where you'll learn **how to build applications** using the [`LangGraph`](https://github.com/langchain-ai/langgraph) framework designed to help you structure and orchestrate complex LLM workflows. 6 | 7 | `LangGraph` is a framework that allows you to build **production-ready** applications by giving you **control** tools over the flow of your agent. 8 | 9 | ## Module Overview 10 | 11 | In this unit, you'll discover: 12 | 13 | ### 1️⃣ [What is LangGraph, and when to use it?](./when_to_use_langgraph) 14 | ### 2️⃣ [Building Blocks of LangGraph](./building_blocks) 15 | ### 3️⃣ [Alfred, the mail sorting butler](./first_graph) 16 | ### 4️⃣ [Alfred, the document Analyst agent](./document_analysis_agent) 17 | ### 5️⃣ [Quiz](./quizz1) 18 | 19 | > [!WARNING] 20 | > The examples in this section require access to a powerful LLM/VLM model. We ran them using the GPT-4o API because it has the best compatibility with langGraph. 21 | 22 | By the end of this unit, you'll be equipped to build robust, organized and production ready applications ! 23 | 24 | That being said, this section is an introduction to LangGraph and more advanced topics can be discovered in the free LangChain academy course : [Introduction to LangGraph](https://academy.langchain.com/courses/intro-to-langgraph) 25 | 26 | Let's get started! 27 | 28 | ## Resources 29 | 30 | - [LangGraph Agents](https://langchain-ai.github.io/langgraph/) - Examples of LangGraph agent 31 | - [LangChain academy](https://academy.langchain.com/courses/intro-to-langgraph) - Full course on LangGraph from LangChain 32 | -------------------------------------------------------------------------------- /units/fr/unit1/final-quiz.mdx: -------------------------------------------------------------------------------- 1 | # Quiz final de l'Unité 1 2 | 3 | Planification de l'Unité 1 4 | 5 | Bravo d'avoir terminé la première unité ! Testons maintenant votre compréhension des concepts clés abordés jusqu'à présent. 6 | 7 | Une fois que vous aurez réussi le quiz, passez à la section suivante pour réclamer votre certificat. 8 | 9 | Bonne chance ! 10 | 11 | ## Quiz 12 | 13 | Voici le quiz interactif hébergé dans un *Space*. Il vous guidera à travers une série de questions à choix multiples afin de tester votre compréhension des concepts clés abordés dans cette unité. Une fois le quiz terminé, vous pourrez voir votre score et une répartition des réponses correctes. 14 | 15 | Un point important : **n'oubliez pas de cliquer sur *Submit* après avoir réussi, sinon votre note d'examen ne sera pas sauvegardée !** 16 | 17 | 23 | 24 | Vous pouvez également accéder au quiz 👉 [ici](https://huggingface.co/spaces/agents-course/unit_1_quiz). 25 | 26 | 27 | ## Certificat 28 | 29 | Lorsque vous aurez terminé le quiz, vous aurez accès à un certificat d'achèvement pour cette unité. Vous pouvez télécharger et partager ce certificat pour mettre en valeur vos progrès dans le cours. 30 | 31 | Unit 1 planning 32 | 33 | Une fois que vous l'avez reçu, vous pouvez l'ajouter à votre LinkedIn 🧑‍💼 ou le partager sur X, Bluesky, etc. **Nous serions super fiers et aimerions vous féliciter si vous mentionnez @huggingface** ! 🤗 34 | -------------------------------------------------------------------------------- /units/es/unit4/introduction.mdx: -------------------------------------------------------------------------------- 1 | # Bienvenido/a a la última Unidad [[introduccion]] 2 | 3 | Miniatura Curso Agentes IA 4 | 5 | ¡Bienvenido/a a la última unidad del curso! 🎉 6 | 7 | Hasta ahora, has **construido una base sólida en Agentes de IA**, desde comprender sus componentes hasta crear los tuyos propios. Con este conocimiento, ahora estás listo/a para **construir agentes poderosos** y mantenerte al día con los últimos avances en este campo en rápida evolución. 8 | 9 | Esta unidad trata sobre aplicar lo que has aprendido. Es tu **proyecto práctico final**, y completarlo es tu boleto para obtener el **certificado del curso**. 10 | 11 | ## ¿Cuál es el desafío? 12 | 13 | Crearás tu propio agente y **evaluarás su rendimiento utilizando un subconjunto del [benchmark GAIA](https://huggingface.co/spaces/gaia-benchmark/leaderboard)**. 14 | 15 | Para completar con éxito el curso, tu agente necesita obtener una puntuación del **30% o superior** en el benchmark. Logra eso, y obtendrás tu **Certificado de Finalización**, reconociendo oficialmente tu experiencia. 🏅 16 | 17 | ¡Además, mira cómo te comparas con tus compañeros! Una **[Tabla de Clasificación de Estudiantes](https://huggingface.co/spaces/agents-course/Students_leaderboard)** dedicada está disponible para que envíes tus puntuaciones y veas el progreso de la comunidad. 18 | 19 | > ** 🚨 Atención: Unidad Avanzada y Práctica** 20 | > 21 | > Ten en cuenta que esta unidad cambia hacia un enfoque más práctico. El éxito en esta sección requerirá **conocimientos de codificación más avanzados** y depende de que navegues por las tareas con **menos guía explícita** en comparación con las partes anteriores del curso. 22 | 23 | ¿Suena emocionante? ¡Comencemos! 🚀 -------------------------------------------------------------------------------- /units/en/bonus-unit2/introduction.mdx: -------------------------------------------------------------------------------- 1 | # AI Agent Observability & Evaluation 2 | 3 | ![Bonus Unit 2 Thumbnail](https://langfuse.com/images/cookbook/huggingface-agent-course/agent-observability-and-evaluation.png) 4 | 5 | Welcome to **Bonus Unit 2**! In this chapter, you'll explore advanced strategies for observing, evaluating, and ultimately improving the performance of your agents. 6 | 7 | --- 8 | 9 | ## 📚 When Should I Do This Bonus Unit? 10 | 11 | This bonus unit is perfect if you: 12 | - **Develop and Deploy AI Agents:** You want to ensure that your agents are performing reliably in production. 13 | - **Need Detailed Insights:** You're looking to diagnose issues, optimize performance, or understand the inner workings of your agent. 14 | - **Aim to Reduce Operational Overhead:** By monitoring agent costs, latency, and execution details, you can efficiently manage resources. 15 | - **Seek Continuous Improvement:** You’re interested in integrating both real-time user feedback and automated evaluation into your AI applications. 16 | 17 | In short, for everyone who wants to bring their agents in front of users! 18 | 19 | --- 20 | 21 | ## 🤓 What You’ll Learn 22 | 23 | In this unit, you'll learn: 24 | - **Instrument Your Agent:** Learn how to integrate observability tools via OpenTelemetry with the *smolagents* framework. 25 | - **Monitor Metrics:** Track performance indicators such as token usage (costs), latency, and error traces. 26 | - **Evaluate in Real-Time:** Understand techniques for live evaluation, including gathering user feedback and leveraging an LLM-as-a-judge. 27 | - **Offline Analysis:** Use benchmark datasets (e.g., GSM8K) to test and compare agent performance. 28 | 29 | --- 30 | 31 | ## 🚀 Ready to Get Started? 32 | 33 | In the next section, you'll learn the basics of Agent Observability and Evaluation. After that, its time to see it in action! -------------------------------------------------------------------------------- /units/es/unit1/final-quiz.mdx: -------------------------------------------------------------------------------- 1 | # Quiz de la Unidad 1 2 | 3 | Planificación de la Unidad 1 4 | 5 | ¡Bien hecho por completar la primera unidad! Vamos a poner a prueba tu comprensión de los conceptos clave cubiertos hasta ahora. 6 | 7 | Cuando apruebes el quiz, procede a la siguiente sección para reclamar tu certificado. 8 | 9 | ¡Buena suerte! 10 | 11 | ## Quiz 12 | 13 | Aquí está el quiz interactivo. El quiz está alojado en Hugging Face Hub en un space. Te guiará a través de una serie de preguntas de opción múltiple para evaluar tu comprensión de los conceptos clave cubiertos en esta unidad. Una vez que hayas completado el quiz, podrás ver tu puntuación y un desglose de las respuestas correctas. 14 | 15 | Una cosa importante: **¡no olvides hacer clic en Enviar después de aprobar, de lo contrario tu puntuación del examen no se guardará!** 16 | 17 | 23 | 24 | También puedes acceder al quiz 👉 [aquí](https://huggingface.co/spaces/agents-course/unit_1_quiz) 25 | 26 | ## Certificado 27 | 28 | Ahora que has aprobado exitosamente el quiz, **puedes obtener tu certificado 🎓** 29 | 30 | Cuando completes el quiz, te dará acceso a un certificado de finalización para esta unidad. Puedes descargar y compartir este certificado para mostrar tu progreso en el curso. 31 | 32 | Planificación de la Unidad 1 33 | 34 | Una vez que recibas tu certificado, puedes añadirlo a tu LinkedIn 🧑‍💼 o compartirlo en X, Bluesky, etc. **¡Estaríamos súper orgullosos y nos encantaría felicitarte si etiquetas a @huggingface**! 🤗 35 | -------------------------------------------------------------------------------- /units/es/unit2/langgraph/introduction.mdx: -------------------------------------------------------------------------------- 1 | # Introducción a `LangGraph` 2 | 3 | Unit 2.3 Thumbnail 4 | 5 | Bienvenido a esta siguiente parte de nuestro viaje, donde aprenderás **cómo construir aplicaciones** utilizando el marco de trabajo [`LangGraph`](https://github.com/langchain-ai/langgraph) diseñado para ayudarte a estructurar y orquestar flujos de trabajo complejos con LLM. 6 | 7 | `LangGraph` es un marco de trabajo que te permite construir aplicaciones **listas para producción** dándote herramientas de **control** sobre el flujo de tu agente. 8 | 9 | ## Descripción General del Módulo 10 | 11 | En esta unidad, descubrirás: 12 | 13 | ### 1️⃣ [¿Qué es LangGraph y cuándo usarlo?](./when_to_use_langgraph) 14 | ### 2️⃣ [Componentes Básicos de LangGraph](./building_blocks) 15 | ### 3️⃣ [Alfred, el mayordomo clasificador de correo](./first_graph) 16 | ### 4️⃣ [Alfred, el agente de Análisis de documentos](./document_analysis_agent) 17 | ### 5️⃣ [Cuestionario](./quizz1) 18 | 19 | > [!WARNING] 20 | > Los ejemplos en esta sección requieren acceso a un modelo LLM/VLM potente. Los ejecutamos usando la API de GPT-4o porque tiene la mejor compatibilidad con langGraph. 21 | 22 | ¡Al final de esta unidad, estarás equipado para construir aplicaciones robustas, organizadas y listas para producción! 23 | 24 | Dicho esto, esta sección es una introducción a langGraph y se pueden descubrir temas más avanzados en el curso gratuito de langChain academy: [Introducción a LangGraph](https://academy.langchain.com/courses/intro-to-langgraph) 25 | 26 | ¡Comencemos! 27 | 28 | ## Recursos 29 | 30 | - [Agentes LangGraph](https://langchain-ai.github.io/langgraph/) - Ejemplos de agentes LangGraph 31 | - [Academia LangChain](https://academy.langchain.com/courses/intro-to-langgraph) - FCurso completo sobre LangGraph de LangChain -------------------------------------------------------------------------------- /units/en/bonus-unit3/introduction.mdx: -------------------------------------------------------------------------------- 1 | # Introduction 2 | 3 | Bonus Unit 3 AI in Games 4 | 5 | 🎶I want to be the very best ... 🎶 6 | 7 | Welcome to this **bonus unit**, where you'll explore the exciting intersection of **AI Agents and games**! 🎮🤖 8 | 9 | Imagine a game where non-playable characters (NPCs) don’t just follow scripted lines, but instead hold dynamic conversations, adapt to your strategies, and evolve as the story unfolds. This is the power of combining **LLMs and agentic behavior in games**: it opens the door to **emergent storytelling and gameplay like never before**. 10 | 11 | In this bonus unit, you’ll: 12 | 13 | - Learn how to build an AI Agent that can engage in **Pokémon-style turn-based battles** 14 | - Play against it, or even challenge other agents online 15 | 16 | We've already seen [some](https://www.anthropic.com/research/visible-extended-thinking) [examples](https://www.twitch.tv/gemini_plays_pokemon) from the AI community for playing Pokémon using LLMs, and in this unit you'll learn how you can replicate that using your own Agent with the ideas that you've learnt through the course. 17 | 18 | Claude plays Pokémon 19 | 20 | ## Want to go further? 21 | 22 | - 🎓 **Master LLMs in Games**: Dive deeper into game development with our full course [Machine Learning for Games Course](https://hf.co/learn/ml-games-course). 23 | 24 | - 📘 **Get the AI Playbook**: Discover insights, ideas, and practical tips in the [AI Playbook for Game Developers](https://thomassimonini.substack.com/), where the future of intelligent game design is explored. 25 | 26 | But before we build, let’s see how LLMs are already being used in games with **four inspiring real-world examples**. 27 | -------------------------------------------------------------------------------- /units/fr/unit4/introduction.mdx: -------------------------------------------------------------------------------- 1 | # Introduction à l'unité finale [[introduction]] 2 | 3 | AI Agents Course thumbnail 4 | 5 | Bienvenue dans l'unité finale du cours ! 🎉 6 | 7 | Jusqu'à présent, vous avez **acquis de solides connaissances sur les agents**, depuis la compréhension de leurs composants jusqu'à la création de vos propres agents. Avec ces connaissances, vous êtes maintenant prêt à en **construire des puissants** et à rester à jour avec les dernières avancées dans ce domaine en rapide évolution. 8 | 9 | Cette unité consiste entièrement à appliquer ce que vous avez appris. C'est votre **projet pratique final** et le compléter est votre ticket pour obtenir le **certificat du cours**. 10 | 11 | ## Quel est le défi ? 12 | 13 | Vous allez créer votre propre agent et **évaluer ses performances en utilisant un sous-ensemble du [*benchmark* GAIA](https://huggingface.co/spaces/gaia-benchmark/leaderboard)**. 14 | 15 | Pour réussir le cours, votre agent doit obtenir un score de **30% ou plus** sur le *benchmark*. Atteignez cet objectif, et vous obtiendrez votre **Certificat de Réussite**, reconnaissant officiellement votre expertise. 🏅 16 | 17 | De plus, voyez comment vous vous classez face à vos pairs ! Un **[Classement des Étudiants](https://huggingface.co/spaces/agents-course/Students_leaderboard)** dédié est disponible pour que vous puissiez soumettre vos scores et voir les progrès de la communauté. 18 | 19 | > ** 🚨 Attention : Unité Avancée et Pratique** 20 | > 21 | > Veuillez noter que cette unité adopte une approche plus pratique. La réussite dans cette section nécessitera **des connaissances en programmation plus avancées** et reposera sur le fait que vous naviguerez dans des tâches avec **moins de conseils explicites** que dans les parties précédentes du cours. 22 | 23 | Cela vous semble excitant ? Commençons ! 🚀 -------------------------------------------------------------------------------- /units/zh-CN/bonus-unit3/launching_agent_battle.mdx: -------------------------------------------------------------------------------- 1 | # 启动你的宝可梦战斗智能体 2 | 3 | 现在是时候战斗了!⚡️ 4 | 5 | ## **与直播智能体战斗!** 6 | 7 | 如果你不想构建自己的智能体,只是好奇智能体在宝可梦中的战斗潜力。我们正在[twitch](https://www.twitch.tv/jofthomas)上主持一个自动化直播 8 | 9 | 15 | 16 | 要在直播中与智能体战斗,你可以: 17 | 18 | 说明: 19 | 20 | 1. 前往 **Pokémon Showdown Space** :[链接在此](https://huggingface.co/spaces/Jofthomas/Pokemon_showdown) 21 | 2. **选择你的名称**(右上角)。 22 | 3. 找到**当前智能体的用户名**。检查: 23 | - **直播显示**:[链接在此](https://www.twitch.tv/jofthomas) 24 | 4. 在 Showdown Space 上**搜索**该用户名并**发送战斗邀请**。 25 | 26 | _注意_:一次只有一个智能体在线!确保你有正确的名称。 27 | 28 | ## 宝可梦战斗智能体挑战者 29 | 30 | 如果你已经从上一节创建了自己的宝可梦战斗智能体,你可能想知道:**我如何测试它与其他智能体的对抗?**让我们找出答案! 31 | 32 | 我们为此目的构建了一个专门的[Hugging Face Space](https://huggingface.co/spaces/PShowdown/pokemon_agents): 33 | 34 | 40 | 41 | 这个 Space 连接到我们自己的**Pokémon Showdown 服务器**,你的智能体可以在那里与其他智能体进行史诗般的 AI 驱动战斗。 42 | 43 | ### 如何启动你的智能体 44 | 45 | 按照这些步骤在竞技场中让你的智能体活跃起来: 46 | 47 | 1. **复制 Space** 48 | 点击 Space 右上角菜单中的三个点,选择"复制此 Space"。 49 | 50 | 2. **将你的智能体代码添加到`agent.py`** 51 | 打开文件并粘贴你的智能体实现。你可以遵循这个[示例](https://huggingface.co/spaces/PShowdown/pokemon_agents/blob/main/agents.py)或查看[项目结构](https://huggingface.co/spaces/PShowdown/pokemon_agents/tree/main)获取指导。 52 | 53 | 3. **在`app.py`中注册你的智能体** 54 | 将你的智能体名称和逻辑添加到下拉菜单。参考[这个片段](https://huggingface.co/spaces/PShowdown/pokemon_agents/blob/main/app.py)获取灵感。 55 | 56 | 4. **选择你的智能体** 57 | 添加后,你的智能体将在"选择智能体"下拉菜单中显示。从列表中选择它!✅ 58 | 59 | 5. **输入你的 Pokémon Showdown 用户名** 60 | 确保用户名与 iframe 的**"选择名称"**输入中显示的匹配。你也可以连接你的官方账户。 61 | 62 | 6. **点击"发送战斗邀请"** 63 | 你的智能体将向选定的对手发送邀请。它应该出现在屏幕上! 64 | 65 | 7. **接受战斗并享受战斗!** 66 | 让战斗开始!愿最聪明的智能体获胜 67 | 68 | 准备看到你的创作在行动中吗?让 AI 对决开始!🥊 69 | -------------------------------------------------------------------------------- /units/zh-CN/unit4/hands-on.mdx: -------------------------------------------------------------------------------- 1 | # 动手实践 2 | 3 | 现在你已经准备好更深入地创建你的最终智能体了,让我们看看如何提交它以供评审。 4 | 5 | ## 数据集 6 | 7 | 此排行榜使用的数据集包含从 GAIA **验证**集的一级问题中所提取的 20 个问题。 8 | 9 | 这些问题是根据回答问题所需的工具和步骤数量进行筛选的。 10 | 11 | 根据 GAIA 基准目前的状况,我们认为让你尝试在一级问题中达到 30% 的准确率是一个相对好的测试。 12 | 13 | GAIA current status! 14 | 15 | ## 流程 16 | 17 | 现在你脑海中最大的问题可能是:“我如何开始提交?” 18 | 19 | 对于本单元,我们创建了一个 API,你可以通过它获取问题并发送答案进行评分。 20 | 以下是路由摘要(请参阅[实时文档](https://agents-course-unit4-scoring.hf.space/docs)以获取交互式详细信息): 21 | 22 | * **`GET /questions`**:检索过滤后的评估问题完整列表。 23 | * **`GET /random-question`**:从列表中获取一个随机问题。 24 | * **`GET /files/{task_id}`**:下载与给定任务 ID 关联的特定文件。 25 | * **`POST /submit`**:提交智能体的答案,计算分数,并更新排行榜。 26 | 27 | 提交函数将以**完全匹配**的方式将答案与真实答案进行比较,因此请好好作出提示!GAIA 团队在此处分享了一个代理提示示例(为了本课程的目的,请确保你的提交中不包含文本“FINAL ANSWER”,只需让你的代理回复答案而无需其他内容)。 28 | 29 | 🎨 **打造你自己的模板!** 30 | 31 | 为了演示与 API 交互的过程,我们提供了一个[基本模板](https://huggingface.co/spaces/agents-course/Final_Assignment_Template)作为开始的部分。 32 | 33 | 我们请您随意的去更改、添加或完全重构它!以最适合你的方法和具有创造力的方式修改它。这也是我们所**积极鼓励**的方式。 34 | 35 | 为了提交此模板,请需要计算 API 所需的 3 个内容: 36 | 37 | * **用户名:** 你的 Hugging Face 用户名(此处通过 Gradio 登录获取),用于识别你的提交。 38 | * **代码链接 (`agent_code`):** 指向你的 Hugging Face Space 代码(`.../tree/main`)的 URL,用于验证目的,因此请保持你的 Space 为公开。 39 | * **答案 (`answers`):** 你的代理生成的响应列表(`{"task_id": ..., "submitted_answer": ...}`),用于评分。 40 | 41 | 因此,我们鼓励你从复制此[模板](https://huggingface.co/spaces/agents-course/Final_Assignment_Template)到你自己的 huggingface 个人资料开始。 42 | 43 | 🏆 在[此处](https://huggingface.co/spaces/agents-course/Students_leaderboard)查看排行榜 44 | 45 | *温馨提示:此排行榜仅供娱乐!我们知道可以在没有完全验证的情况下提交分数。如果我们看到太多没有公开链接支持的高分,我们可能需要审查、调整或删除一些条目,以保持排行榜的有用性。* 46 | 排行榜将显示你的 Space 代码库链接,由于此排行榜仅供学生使用,如果你获得了一个令你骄傲的分数,请保持你的 Space 公开。 47 | -------------------------------------------------------------------------------- /units/en/unit3/agentic-rag/agentic-rag.mdx: -------------------------------------------------------------------------------- 1 | # Agentic Retrieval Augmented Generation (RAG) 2 | 3 | In this unit, we'll be taking a look at how we can use Agentic RAG to help Alfred prepare for the amazing gala. 4 | 5 | > [!TIP] 6 | > We know we've already discussed Retrieval Augmented Generation (RAG) and agentic RAG in the previous unit, so feel free to skip ahead if you're already familiar with the concepts. 7 | 8 | LLMs are trained on enormous bodies of data to learn general knowledge. 9 | However, the world knowledge model of LLMs may not always be relevant and up-to-date information. 10 | **RAG solves this problem by finding and retrieving relevant information from your data and forwarding that to the LLM.** 11 | 12 | ![RAG](https://huggingface.co/datasets/agents-course/course-images/resolve/main/en/unit2/llama-index/rag.png) 13 | 14 | Now, think about how Alfred works: 15 | 16 | 1. We've asked Alfred to help plan a gala 17 | 2. Alfred needs to find the latest news and weather information 18 | 3. Alfred needs to structure and search the guest information 19 | 20 | Just as Alfred needs to search through your household information to be helpful, any agent needs a way to find and understand relevant data. 21 | **Agentic RAG is a powerful way to use agents to answer questions about your data.** We can pass various tools to Alfred to help him answer questions. 22 | However, instead of answering the question on top of documents automatically, Alfred can decide to use any other tool or flow to answer the question. 23 | 24 | ![Agentic RAG](https://huggingface.co/datasets/agents-course/course-images/resolve/main/en/unit2/llama-index/agentic-rag.png) 25 | 26 | Let's start **building our agentic RAG workflow!** 27 | 28 | First, we'll create a RAG tool to retrieve up-to-date details about the invitees. Next, we'll develop tools for web search, weather updates, and Hugging Face Hub model download statistics. Finally, we'll integrate everything to bring our agentic RAG agent to life! 29 | -------------------------------------------------------------------------------- /units/fr/unit2/langgraph/introduction.mdx: -------------------------------------------------------------------------------- 1 | # Introduction à LangGraph 2 | 3 | Unit 2.3 Thumbnail 4 | 5 | Bienvenue dans cette nouvelle partie de notre voyage, où vous allez apprendre **comment créer des applications** en utilisant le *framework* [`LangGraph`](https://github.com/langchain-ai/langgraph) conçu pour vous aider à structurer et orchestrer des *workflows* complexes avec des LLM. 6 | 7 | `LangGraph` est un framework qui vous permet de créer des applications **prêtes pour la production** en vous donnant des outils de **contrôle** sur le flux de votre agent. 8 | 9 | ## Aperçu du module 10 | 11 | Dans cette unité, vous découvrirez : 12 | 13 | ### 1️⃣ [Qu'est-ce que LangGraph et quand l'utiliser ?](./when_to_use_langgraph) 14 | ### 2️⃣ [Les composants de base de LangGraph](./building_blocks) 15 | ### 3️⃣ [Alfred, le majordome trieur de courrier](./first_graph) 16 | ### 4️⃣ [Alfred, l'agent d'analyse de documents](./document_analysis_agent) 17 | ### 5️⃣ [Quiz](./quiz1) 18 | 19 | > [!WARNING] 20 | > Les exemples de cette section nécessitent l'accès à un modèle LLM/VLM puissant. Nous les avons exécutés en utilisant l'API GPT-4o car elle offre la meilleure compatibilité avec LangGraph. 21 | 22 | À la fin de cette unité, vous serez en mesure de créer des applications robustes, organisées et prêtes pour la production ! 23 | 24 | Cela étant dit, cette section est une introduction à LangGraph et des sujets plus avancés peuvent être découverts dans le cours gratuit de la *LangChain academy* : [*Introduction to LangGraph*](https://academy.langchain.com/courses/intro-to-langgraph). 25 | 26 | Commençons ! 27 | 28 | ## Ressources 29 | 30 | - [*LangGraph Agents*](https://langchain-ai.github.io/langgraph/) - Exemples d'agents LangGraph 31 | - [*LangChain academy*](https://academy.langchain.com/courses/intro-to-langgraph) - Cours complet sur LangGraph de LangChain 32 | -------------------------------------------------------------------------------- /units/es/unit4/additional-readings.mdx: -------------------------------------------------------------------------------- 1 | # ¿Y ahora? ¿Qué temas debería aprender? 2 | 3 | La IA Agéntica es un campo en rápida evolución, y comprender los protocolos fundamentales es esencial para construir sistemas inteligentes y autónomos. 4 | 5 | Dos estándares importantes con los que deberías familiarizarte son: 6 | 7 | - El **Protocolo de Contexto del Modelo (MCP)** 8 | - El **Protocolo Agente a Agente (A2A)** 9 | 10 | ## 🔌 Protocolo de Contexto del Modelo (MCP) 11 | 12 | El **Protocolo de Contexto del Modelo (MCP)** de Anthropic es un estándar abierto que permite a los modelos de IA **conectarse de forma segura y fluida con herramientas externas, fuentes de datos y aplicaciones**, haciendo que los agentes sean más capaces y autónomos. 13 | 14 | Piensa en el MCP como un **adaptador universal**, como un puerto USB-C, que permite a los modelos de IA conectarse a diversos entornos digitales **sin necesidad de una integración personalizada para cada uno**. 15 | 16 | El MCP está ganando rápidamente terreno en la industria, con grandes empresas como OpenAI y Google comenzando a adoptarlo. 17 | 18 | 📚 Aprende más: 19 | - [Anuncio oficial y documentación de Anthropic](https://www.anthropic.com/news/model-context-protocol) 20 | - [MCP en Wikipedia (en inglés)](https://en.wikipedia.org/wiki/Model_Context_Protocol) 21 | - [Blog sobre MCP (en inglés)](https://huggingface.co/blog/Kseniase/mcp) 22 | 23 | ## 🤝 Protocolo Agente a Agente (A2A) 24 | 25 | Google ha desarrollado el **Protocolo Agente a Agente (A2A)** como contraparte complementaria al Protocolo de Contexto del Modelo (MCP) de Anthropic. 26 | 27 | Mientras que el MCP conecta a los agentes con herramientas externas, **el A2A conecta a los agentes entre sí**, allanando el camino para sistemas cooperativos multiagente que pueden trabajar juntos para resolver problemas complejos. 28 | 29 | 📚 Profundiza en A2A: 30 | - [Anuncio de A2A de Google (en inglés)](https://developers.googleblog.com/en/a2a-a-new-era-of-agent-interoperability/) 31 | -------------------------------------------------------------------------------- /units/ko/bonus-unit1/introduction.mdx: -------------------------------------------------------------------------------- 1 | # 소개[[introduction]] 2 | 3 | ![Bonus Unit 1 Thumbnail](https://huggingface.co/datasets/agents-course/course-images/resolve/main/en/bonus-unit1/thumbnail.jpg) 4 | 5 | 첫 번째 **Bonus Unit**에 오신 것을 환영합니다. 여기에서 **함수 호출을 위한 대형 언어 모델(LLM)을 미세 조정하는 방법**을 배우게 됩니다. 6 | 7 | 대형 언어 모델(LLM)에서 함수 호출은 *필수 학습* 기술이 되어 가고 있습니다. 8 | 9 | 여기서 핵심은 Unit 1에서 했던 것처럼 프롬프트 기반 접근 방식에만 의존하는 대신, 함수 호출을 통해 **학습 과정에서 직접 행동을 수행하고 관찰된 정보를 해석하도록** 모델을 훈련시켜 AI의 견고성을 높인다는 점입니다. 10 | 11 | > **Bonus Unit을 언제 진행해야 하나요?** 12 | > 13 | > 이 섹션은 **선택 사항**이며 Unit 1보다 **심화된 내용**을 다루므로, 지금 바로 진행하거나 이 과정을 통해 지식이 더 쌓인 후에 다시 살펴보셔도 좋습니다. 14 | > 15 | > 하지만 걱정하지 마세요. 이 Bonus Unit은 필요한 모든 정보를 담고 있어, 미세 조정의 내부 작동 방식을 아직 배우지 않으셨더라도 함수 호출을 위한 핵심 개념을 하나하나 안내해 드립니다. 16 | 17 | Bonus Unit을 가장 효과적으로 따라가려면: 18 | 19 | 1. 아직 Transformers로 대형 언어 모델(LLM)을 미세 조정하는 방법을 모른다면 [여기](https://huggingface.co/learn/nlp-course/chapter3/1?fw=pt)를 확인하세요. 20 | 21 | 2. `SFTTrainer`를 사용하여 모델을 미세 조정하는 방법을 알고 싶다면 [공식 문서](https://huggingface.co/learn/nlp-course/en/chapter11/1)를 참조하세요. 22 | 23 | --- 24 | 25 | ## 학습 내용[[what-you’ll-learn]] 26 | 27 | 1. **함수 호출** 28 | 최신 LLM이 대화를 구조화하여 **도구**를 호출할 수 있게 하는 방법을 배웁니다. 29 | 30 | 2. **LoRA (저차원 적응)** 31 | 계산 및 저장 오버헤드를 줄여주는 **경량화되고 효율적인** 미세 조정 방법입니다. LoRA는 대형 모델을 *더 빠르고 저렴하게 훈련하고, 쉽게 배포할 수 있게 합니다.* 32 | 33 | 3. 함수 호출 모델에서의 **사고 → 행동 → 관찰 사이클** 34 | 간단하지만 강력한 접근 방식으로, 모델이 언제(그리고 어떻게) 함수를 호출할지 결정하고, 중간 단계를 추적하며, 외부 도구나 API로부터 받은 결과를 해석하는 과정을 구조화합니다. 35 | 36 | 4. **새로운 특수 토큰** 37 | 모델이 다음 항목들을 구별할 수 있도록 특수한 마커를 도입합니다. 38 | - 내부 “사고 과정” 추론 39 | - 함수 호출 요청 40 | - 외부 도구로부터 돌아오는 응답 41 | 42 | --- 43 | 44 | Bonus Unit을 마치면 다음을 할 수 있습니다. 45 | 46 | - **도구** 관련 API의 내부 작동 방식을 **이해**합니다. 47 | - LoRA 기법을 사용하여 모델을 **미세 조정**합니다. 48 | - 사고 → 행동 → 관찰 사이클을 **구현**하고 **수정**하여 견고하고 유지보수 가능한 함수 호출 워크플로를 만듭니다. 49 | - 모델의 내부 추론과 외부 행동을 원활하게 구분할 수 있도록 **특수 토큰을 설계 및 활용**합니다. 50 | 51 | 그리고 **함수를 호출하기 위해 직접 모델을 미세 조정**하게 됩니다. 🔥 52 | 53 | 이제 **함수 호출**에 대해 본격적으로 살펴보겠습니다! 54 | -------------------------------------------------------------------------------- /units/vi/unit1/introduction.mdx: -------------------------------------------------------------------------------- 1 | # Giới thiệu về Agent 2 | 3 | Thumbnail 4 | 5 | Chào mừng bạn đến với chương đầu tiên, nơi **bạn sẽ xây dựng nền tảng vững chắc về nguyên lý cơ bản của AI agent** bao gồm: 6 | 7 | - **Hiểu về Agent** 8 | - Agent là gì và hoạt động thế nào? 9 | - Cách Agent đưa ra quyết định thông qua lập luận và lập kế hoạch? 10 | 11 | - **Vai trò của Mô hình ngôn ngữ lớn (LLM) trong Agent** 12 | - Cách LLM đóng vai trò "bộ não" của Agent. 13 | - Cách LLM tổ chức hội thoại qua hệ thống Messages. 14 | 15 | - **Công cụ và hành động** 16 | - Cách Agent sử dụng Công cụ (Tools) bên ngoài để tương tác với môi trường. 17 | - Cách xây dựng và tích hợp Tools cho Agent của bạn. 18 | 19 | - **Quy trình hoạt động của Agent:** 20 | - *Tư duy (Thought)* → *Hành động (Action)* → *Quan sát (Observation)*. 21 | 22 | Sau khi khám phá các chủ đề này, **bạn sẽ xây dựng Agent đầu tiên** bằng `smolagents`! 23 | 24 | Agent của bạn tên Alfred sẽ xử lý một nhiệm vụ đơn giản và minh họa cách áp dụng các khái niệm vào thực tế. 25 | 26 | Bạn thậm chí sẽ học cách **đăng Agent lên Hugging Face Spaces** để chia sẻ với bạn bè và đồng nghiệp. 27 | 28 | Cuối chương này, bạn sẽ làm một bài Kiểm tra nhanh. Hoàn thành thành công, bạn sẽ **nhận được chứng chỉ đầu tiên**: 🎓 Chứng chỉ Nguyên lý cơ bản về Agent. 29 | 30 | Certificate Example 31 | 32 | Đây là **điểm khởi đầu quan trọng**, đặt nền móng để hiểu về Agent trước khi chuyển sang các chủ đề nâng cao. 33 | 34 | Unit 1 planning 35 | 36 | Đây là một chương lớn, vì vậy hãy **dành thời gian** và đừng ngại xem lại các phần này khi cần. 37 | 38 | Sẵn sàng chưa? Cùng bắt đầu thôi! 🚀 -------------------------------------------------------------------------------- /units/en/unit1/introduction.mdx: -------------------------------------------------------------------------------- 1 | # Introduction to Agents 2 | 3 | Thumbnail 4 | 5 | Welcome to this first unit, where **you'll build a solid foundation in the fundamentals of AI Agents** including: 6 | 7 | - **Understanding Agents** 8 | - What is an Agent, and how does it work? 9 | - How do Agents make decisions using reasoning and planning? 10 | 11 | - **The Role of LLMs (Large Language Models) in Agents** 12 | - How LLMs serve as the “brain” behind an Agent. 13 | - How LLMs structure conversations via the Messages system. 14 | 15 | - **Tools and Actions** 16 | - How Agents use external tools to interact with the environment. 17 | - How to build and integrate tools for your Agent. 18 | 19 | - **The Agent Workflow:** 20 | - *Think* → *Act* → *Observe*. 21 | 22 | After exploring these topics, **you’ll build your first Agent** using `smolagents`! 23 | 24 | Your Agent, named Alfred, will handle a simple task and demonstrate how to apply these concepts in practice. 25 | 26 | You’ll even learn how to **publish your Agent on Hugging Face Spaces**, so you can share it with friends and colleagues. 27 | 28 | Finally, at the end of this Unit, you'll take a quiz. Pass it, and you'll **earn your first course certification**: the 🎓 Certificate of Fundamentals of Agents. 29 | 30 | Certificate Example 31 | 32 | This Unit is your **essential starting point**, laying the groundwork for understanding Agents before you move on to more advanced topics. 33 | 34 | Unit 1 planning 35 | 36 | It's a big unit, so **take your time** and don’t hesitate to come back to these sections from time to time. 37 | 38 | Ready? Let’s dive in! 🚀 39 | -------------------------------------------------------------------------------- /units/zh-CN/unit1/quiz2.mdx: -------------------------------------------------------------------------------- 1 | # 快速自测(不计分)[[quiz2]] 2 | 3 | 4 | 什么?!还有测验?我们理解,我们理解... 😅 但这个简短的不计分测验旨在**帮助您巩固刚学习的关键概念**。 5 | 6 | 本测验涵盖大型语言模型(LLMs)、消息系统和工具——这些是理解和构建 AI 智能体的核心组件。 7 | 8 | ### 问题1:以下哪项最能描述 AI 工具? 9 | 10 | 27 | 28 | --- 29 | 30 | ### 问题2: AI 智能体如何将工具作为"行动"在环境中使用? 31 | 32 | 49 | 50 | --- 51 | 52 | ### 问题3:什么是大语言模型(LLM)? 53 | 54 | 71 | 72 | --- 73 | 74 | ### 问题4:以下哪项最能描述特殊标记(special tokens)在 LLMs 中的作用? 75 | 76 | 93 | 94 | --- 95 | 96 | ### 问题5: AI 聊天模型如何处理用户消息的内部流程? 97 | 98 | 115 | 116 | --- 117 | 118 | 119 | 都明白了吗?很好!现在让我们**深入完整的智能体流程,开始构建你的第一个 AI 智能体!** 120 | -------------------------------------------------------------------------------- /units/ru-RU/unit1/introduction.mdx: -------------------------------------------------------------------------------- 1 | # Введение в Агентов 2 | 3 | Thumbnail 4 | 5 | Добро пожаловать в первый раздел, где **вы заложите прочный фундамент основ ИИ-агентов**, включая: 6 | 7 | - **Понимание агентов** 8 | - Что такое агент и как он работает? 9 | - Как агенты принимают решения, используя рассуждения и планирование? 10 | 11 | - **Роль LLM (Large Language Models - больших языковых моделей) в агентах**. 12 | - Как LLM служат «мозгом» агента. 13 | - Как LLM структурируют диалоги с помощью системы сообщений. 14 | 15 | - **Инструменты (Tools) и Действия (Actions)**. 16 | - Как агенты используют внешние инструменты для взаимодействия с окружающей средой. 17 | - Как создавать и интегрировать инструменты для своего агента. 18 | 19 | - **Процесс работы агента (Agent Workflow):** 20 | - *Думать* → *Действовать* → *Наблюдать*. 21 | 22 | Изучив эти темы, **вы создадите своего первого агента**, используя `smolagents`! 23 | 24 | Ваш агент по имени Альфред справится с простым заданием и продемонстрирует, как применять эти понятия на практике. 25 | 26 | Вы даже узнаете, как **опубликовать своего агента в Hugging Face Spaces**, чтобы поделиться им с друзьями и коллегами. 27 | 28 | Наконец, в конце этого раздела вы пройдете тест. Пройдя его, вы **получите свой первый сертификат курса**: 🎓 Сертификат по основам работы с агентами. 29 | 30 | Certificate Example 31 | 32 | Этот раздел - ваша **основная отправная точка**, закладывающая основу для понимания Агентов, прежде чем вы перейдете к более сложным темам. 33 | 34 | Unit 1 planning 35 | 36 | Это большой раздел, поэтому **не торопитесь** и не стесняйтесь время от времени возвращаться к нему. 37 | 38 | Готовы? Погружаемся! 🚀 39 | -------------------------------------------------------------------------------- /units/fr/unit4/additional-readings.mdx: -------------------------------------------------------------------------------- 1 | # Et maintenant ? Quels sujets devrais-je apprendre ? 2 | 3 | L'IA agentique est un domaine en évolution rapide, et comprendre les protocoles fondamentaux est essentiel pour construire des systèmes intelligents et autonomes. 4 | 5 | Deux standards importants avec lesquels vous devriez vous familiariser sont : 6 | 7 | - Le ***Model Context Protocol* (MCP)** 8 | - Le ***Agent-to-Agent Protocol* (A2A)** 9 | 10 | ## 🔌 *Model Context Protocol* (MCP) 11 | 12 | Le ***Model Context Protocol* (MCP)** d'Anthropic est un standard ouvert qui permet aux modèles de se connecter de manière sécurisée et transparente **avec des outils externes, des sources de données et des applications**, rendant les agents plus compétents et autonomes. 13 | 14 | Pensez à MCP comme un **adaptateur universel**, comme un port USB-C, qui permet aux modèles de se connecter à divers environnements numériques **sans avoir besoin d'intégration personnalisée pour chacun**. 15 | 16 | MCP gagne rapidement en popularité dans l'industrie, avec des entreprises majeures comme *OpenAI* et *Google* qui commencent à l'adopter. 17 | 18 | 📚 En savoir plus : 19 | - [Annonce officielle et documentation d'Anthropic](https://www.anthropic.com/news/model-context-protocol) 20 | - [MCP sur Wikipedia](https://en.wikipedia.org/wiki/Model_Context_Protocol) 21 | - [Un article de blog sur MCP](https://huggingface.co/blog/Kseniase/mcp) 22 | - [Le cours d'Hugging Face sur le sujet](https://huggingface.co/learn/mcp-course/unit0/introduction) 23 | 24 | ## 🤝 Protocole *Agent-to-Agent* (A2A) 25 | 26 | Google a développé le **protocole *Agent-to-Agent* (A2A)** comme un complément au *Model Context Protocol* (MCP) d'Anthropic. 27 | 28 | Alors que MCP connecte les agents aux outils externes, **A2A connecte les agents entre eux**, ouvrant la voie à des systèmes multi-agents coopératifs qui peuvent travailler ensemble pour résoudre des problèmes complexes. 29 | 30 | 📚 En savoir plus : 31 | - [L'annonce de Google](https://developers.googleblog.com/en/a2a-a-new-era-of-agent-interoperability/) -------------------------------------------------------------------------------- /units/zh-CN/bonus-unit3/state-of-art.mdx: -------------------------------------------------------------------------------- 1 | # 游戏中使用 LLM 的最新技术 2 | 3 | 为了让你了解这个领域已经取得了多少进展,让我们来看看三个技术演示和一个已发布的游戏,它们展示了 LLM 在游戏中的集成。 4 | 5 | ## 🕵️‍♂️ NVIDIA 和 Inworld AI 的 Covert Protocol 6 | 7 | Covert Protocol 11 | 12 | 在 2024 年 GDC 上展示的 _Covert Protocol_ 是一个技术演示,让你扮演私人侦探的角色。 13 | 14 | 这个演示中有趣的是使用 AI 驱动的 NPC,它们实时回应你的询问,根据你的交互影响叙事。 15 | 16 | 演示基于虚幻引擎 5 构建,利用 NVIDIA 的 Avatar Cloud Engine(ACE)和 Inworld 的 AI 来创建逼真的角色交互。 17 | 18 | 了解更多 👉 [Inworld AI 博客](https://inworld.ai/blog/nvidia-inworld-ai-demo-on-device-capabilities) 19 | 20 | ## 🤖 育碧的 NEO NPCs 21 | 22 | Neo NPC 26 | 27 | 同样在 2024 年 GDC 上,育碧推出了*NEO NPCs*,一个展示由生成 AI 驱动的 NPC 的原型。 28 | 29 | 这些角色可以感知他们的环境,记住过去的交互,并与玩家进行有意义的对话。 30 | 31 | 这里的想法是创建更沉浸和响应的游戏世界,玩家可以与 NPC 进行真正的交互。 32 | 33 | 了解更多 👉 [Inworld AI 博客](https://inworld.ai/blog/gdc-2024) 34 | 35 | ## ⚔️ 搭载 NVIDIA ACE 技术的 Mecha break 36 | 37 | Mecha BREAK 41 | 42 | 即将推出的多人机甲战斗游戏 _Mecha break_ 集成了 NVIDIA 的 ACE 技术,让 AI 驱动的 NPC 栩栩如生。 43 | 44 | 玩家可以使用自然语言与这些角色交互,由于 GPT-4o 集成,NPC 可以通过网络摄像头识别玩家和物体。这一创新承诺提供更沉浸和互动的游戏体验。 45 | 46 | 了解更多 👉 [NVIDIA 博客](https://blogs.nvidia.com/blog/digital-human-technology-mecha-break/) 47 | 48 | ## 🧛‍♂️ Proxima Enterprises 的*Suck Up!* 49 | 50 | Suck Up 54 | 55 | 最后,*Suck Up!*是一款已发布的游戏,你扮演一个吸血鬼,试图**通过说服 AI 驱动的 NPC 邀请你进入来进入家中**。 56 | 57 | 每个角色都由生成 AI 驱动,允许动态和不可预测的交互。 58 | 59 | 了解更多 👉 [Suck Up! 官方网站](https://www.playsuckup.com/) 60 | 61 | ## 等等...智能体在哪里? 62 | 63 | 探索了这些演示后,你可能想知道:"这些例子展示了 LLM 在游戏中的使用,但它们似乎不涉及智能体。那么,区别是什么,智能体为游戏带来了哪些额外能力?" 64 | 65 | 不要担心,这就是我们将在下一节中学习的内容。 66 | -------------------------------------------------------------------------------- /units/zh-CN/unit2/langgraph/when_to_use_langgraph.mdx: -------------------------------------------------------------------------------- 1 | # 什么是 `LangGraph`? 2 | 3 | `LangGraph` 是由 [LangChain](https://www.langchain.com/) 开发的框架,**用于管理集成 LLM 的应用程序的控制流**。 4 | 5 | ## `LangGraph` 和 `LangChain` 有何不同? 6 | 7 | LangChain 提供了与模型和其他组件交互的标准接口,可用于检索、LLM 调用和工具调用。 8 | LangChain 的类可能会在 LangGraph 中使用,但不是必须的。 9 | 10 | 这两个包是独立的可以单独使用,但最终你在网上找到的资源都会同时使用这两个包。 11 | 12 | ## 何时应该使用 `LangGraph`? 13 | ### 控制 vs 自由度 14 | 15 | 在设计 AI 应用时,你面临 **控制** 与 **自由度** 的基本权衡: 16 | 17 | - **自由度** 赋予 LLM 更多创造性地解决问题的空间 18 | - **控制** 能确保可预测的行为并维持安全护栏 19 | 20 | 像 *smolagents* 中的代码智能体(Code Agents)具有高度自由度。它们可以在单个行动步骤中调用多个工具、创建自己的工具等。然而,这种行为会使它们比使用 JSON 的常规 Agent 更难预测和控制! 21 | 22 | `LangGraph` 则位于光谱的另一端,当你需要对智能体的执行进行 **"控制"** 时,它就会大放异彩。 23 | 24 | 当你需要 **对应用程序保持控制** 时,LangGraph 特别有价值。它为你提供了构建可预测流程应用程序的工具,同时仍能利用 LLM 的强大能力。 25 | 26 | 简而言之,如果你的应用程序包含需要以特定方式编排的多个步骤,并在每个连接点做出决策,**LangGraph 就能提供你所需的结构**。 27 | 28 | 举个例子,假设我们要构建一个能够回答文档相关问题的 LLM 助手。 29 | 30 | 由于 LLM 最擅长理解文本,在回答问题之前,你需要将其他复杂模态(图表、表格)转换为文本。但这个选择取决于你拥有的文档类型! 31 | 32 | 我选择将这种分支流程表示为: 33 | 34 | 控制流程图 35 | 36 | > 💡 **提示:** 左侧部分不是智能体,因为这里不涉及工具调用。但右侧部分需要编写代码来查询 xls 文件(转换为 pandas 并操作它)。 37 | 38 | 虽然这个分支是确定性的,但你也可以设计基于 LLM 输出结果的非确定性条件分支。 39 | 40 | LangGraph 表现出色的关键场景包括: 41 | 42 | - 需要显式控制流程的 **多步骤推理过程** 43 | - 需要在步骤之间 **保持状态持久化** 的应用程序 44 | - **结合确定性逻辑与 AI 能力** 的系统 45 | - 需要 **人工介入** 的工作流 46 | - 多个组件协同工作的 **复杂智能体架构** 47 | 48 | 本质上,只要有可能,**作为人类** 就应该根据每个操作的输出设计行动流程,并据此决定下一步执行什么。在这种情况下,LangGraph 就是你正确的选择! 49 | 50 | 在我看来,`LangGraph` 是市场上最适合生产环境的智能体框架。 51 | 52 | ## LangGraph 如何工作? 53 | 54 | 其核心在于,`LangGraph` 使用有向图结构来定义应用程序的流程: 55 | 56 | - **节点** 表示独立的处理步骤(如调用 LLM、使用工具或做出决策) 57 | - **边** 定义步骤之间可能的转换 58 | - **状态** 由用户定义和维护,并在执行期间在节点间传递。当决定下一个目标节点时,我们查看的就是当前状态 59 | 60 | 我们将在下一章更深入地探讨这些基本模块! 61 | 62 | ## 它和普通 Python 有何不同?为什么需要 LangGraph? 63 | 64 | 你可能会想:"我可以用常规 Python 代码和 if-else 语句来处理所有这些流程,对吧?" 65 | 66 | 虽然技术上可行,但对于构建复杂系统,LangGraph 相比原生 Python 有 **诸多优势**。没有 LangGraph 你也能构建相同应用,但它能为你提供更便捷的工具和抽象。 67 | 68 | 它包含状态管理、可视化、日志追踪(traces)、内置的人类介入机制等功能。 -------------------------------------------------------------------------------- /units/es/unit2/llama-index/llama-hub.mdx: -------------------------------------------------------------------------------- 1 | # Introducción a LlamaHub 2 | 3 | **LlamaHub es un registro de cientos de integraciones, agentes y herramientas que puedes utilizar dentro de LlamaIndex.** 4 | 5 | ![LlamaHub](https://huggingface.co/datasets/agents-course/course-images/resolve/main/en/unit2/llama-index/llama-hub.png) 6 | 7 | Vamos a utilizar varias integraciones en este curso, así que primero echaremos un vistazo a LlamaHub y veremos cómo puede ayudarnos. 8 | 9 | Vamos a ver cómo encontrar e instalar las dependencias para los componentes que necesitamos. 10 | 11 | ## Instalación 12 | 13 | Las instrucciones de instalación de LlamaIndex están disponibles en **[LlamaHub](https://llamahub.ai/)**. 14 | Puede parecer un poco abrumador al principio, pero la mayoría de los comandos de **instalación siguen un formato fácil de recordar **: 15 | 16 | ```bash 17 | pip install llama-index-{component-type}-{framework-name} 18 | ``` 19 | Vamos a intentar instalar las dependencias para un componente de LLM utilizando la [integración de la API de inferencia de Hugging Face](https://llamahub.ai/l/llms/llama-index-llms-huggingface-api?from=llms). 20 | 21 | ```bash 22 | pip install llama-index-llms-huggingface-api 23 | ``` 24 | 25 | ## Uso 26 | 27 | Una vez instalado, podemos ver los patrones de uso. Notaras que los caminos de importación siguen el comando de instalación! 28 | Debajo, podemos ver un ejemplo de la utilización de **la API de inferencia de Hugging Face para un componente LLM**. 29 | 30 | ```python 31 | from llama_index.llms.huggingface_api import HuggingFaceInferenceAPI 32 | 33 | llm = HuggingFaceInferenceAPI( 34 | model_name="Qwen/Qwen2.5-Coder-32B-Instruct", 35 | temperature=0.7, 36 | max_tokens=100, 37 | token="hf_xxx", 38 | ) 39 | 40 | llm.completar(" Hola, cómo estás?") 41 | # Estoy bien, ¿cómo puedo ayudarte hoy? 42 | ``` 43 | 44 | Genial, ahora sabemos como encontrar, instalar y utilizar las integraciones para los componentes que necesitamos. 45 | **Vamos a profundizar en los componentes** y veremos como podemos utilizarlos para construir nuestros propios agentes. 46 | -------------------------------------------------------------------------------- /units/es/bonus-unit3/introduction.mdx: -------------------------------------------------------------------------------- 1 | # Introducción 2 | 3 | Unidad Bonus 3 IA en Juegos 4 | 5 | 🎶 ¡Quiero ser el mejor...! 🎶 6 | 7 | ¡Bienvenido a esta **unidad bonus**, donde explorarás la emocionante intersección entre los **Agentes de IA y los juegos**! 🎮🤖 8 | 9 | Imagina un juego donde los personajes no jugables (PNJs) no solo siguen líneas de diálogo predefinidas, sino que mantienen conversaciones dinámicas, se adaptan a tus estrategias y evolucionan a medida que se desarrolla la historia. Este es el poder de combinar **LLMs y comportamiento agéntico en los juegos**: abre la puerta a **narrativas y jugabilidad emergentes como nunca antes**. 10 | 11 | En esta unidad bonus, tú: 12 | 13 | - Aprenderás a construir un Agente de IA que pueda participar en **batallas por turnos al estilo Pokémon** 14 | - Jugarás contra él, o incluso desafiarás a otros agentes en línea 15 | 16 | Ya hemos visto [algunos](https://www.anthropic.com/research/visible-extended-thinking) [ejemplos](https://www.twitch.tv/gemini_plays_pokemon) de la comunidad de IA para jugar Pokémon usando LLMs, y en esta unidad aprenderás cómo puedes replicar eso usando tu propio Agente con las ideas que has aprendido a lo largo del curso. 17 | 18 | Claude juega Pokémon 19 | 20 | ## ¿Quieres ir más allá? 21 | 22 | - 🎓 **Domina los LLMs en Juegos**: Sumérgete más en el desarrollo de juegos con nuestro curso completo [Curso de Aprendizaje Automático para Juegos](https://hf.co/learn/ml-games-course). 23 | 24 | - 📘 **Obtén el Manual de IA**: Descubre ideas, perspectivas y consejos prácticos en el [Manual de IA para Desarrolladores de Juegos](https://thomassimonini.substack.com/), donde se explora el futuro del diseño inteligente de juegos. 25 | 26 | Pero antes de construir, veamos cómo ya se están utilizando los LLMs en los juegos con **cuatro inspiradores ejemplos del mundo real**. 27 | -------------------------------------------------------------------------------- /units/es/bonus-unit2/introduction.mdx: -------------------------------------------------------------------------------- 1 | # Observabilidad y Evaluación de Agentes de IA 2 | 3 | ![Bonus Unit 2 Thumbnail](https://langfuse.com/images/cookbook/huggingface-agent-course/agent-observability-and-evaluation.png) 4 | 5 | ¡Bienvenido a la **Unidad Extra 2**! En este capítulo, explorarás estrategias avanzadas para observar, evaluar y, en última instancia, mejorar el rendimiento de tus agentes. 6 | 7 | --- 8 | 9 | ## 📚 ¿Cuándo debería hacer esta Unidad Extra? 10 | 11 | Esta unidad extra es perfecta si: 12 | - **Desarrollas y Despliegas Agentes de IA:** Quieres asegurarte de que tus agentes estén funcionando de manera confiable en producción. 13 | - **Necesitas Información Detallada:** Buscas diagnosticar problemas, optimizar el rendimiento o entender el funcionamiento interno de tu agente. 14 | - **Buscas Reducir la Sobrecarga Operativa:** Al monitorear los costos, la latencia y los detalles de ejecución del agente, puedes gestionar los recursos de manera eficiente. 15 | - **Buscas Mejora Continua:** Estás interesado en integrar tanto la retroalimentación de usuarios en tiempo real como la evaluación automatizada en tus aplicaciones de IA. 16 | 17 | En resumen, ¡para todos los que quieran poner sus agentes frente a los usuarios! 18 | 19 | --- 20 | 21 | ## 🤓 What You’ll Learn 22 | ## 🤓 Lo que Aprenderás 23 | 24 | En esta unidad, aprenderás: 25 | - **Instrumentar tu Agente:** Aprende cómo integrar herramientas de observabilidad a través de OpenTelemetry con el framework *smolagents*. 26 | - **Monitorear Métricas:** Seguimiento de indicadores de rendimiento como el uso de tokens (costos), latencia y trazas de errores. 27 | - **Evaluar en Tiempo Real:** Comprende técnicas para evaluación en vivo, incluyendo la recopilación de retroalimentación de usuarios y el aprovechamiento de un LLM como juez. 28 | - **Análisis Offline:** Utiliza conjuntos de datos de referencia (por ejemplo, GSM8K) para probar y comparar el rendimiento de agentes. 29 | 30 | --- 31 | 32 | ## 🚀 ¿Listo para Empezar? 33 | 34 | En la siguiente sección, aprenderás los fundamentos de la Observabilidad y Evaluación de Agentes. Después de eso, ¡es hora de verlo en acción! -------------------------------------------------------------------------------- /units/fr/bonus-unit2/introduction.mdx: -------------------------------------------------------------------------------- 1 | # Introduction 2 | 3 | ![Bonus Unit 2 Thumbnail](https://langfuse.com/images/cookbook/huggingface-agent-course/agent-observability-and-evaluation.png) 4 | 5 | Bienvenue dans l'**Unité Bonus 2** ! Dans ce chapitre, vous explorerez des stratégies avancées pour observer, évaluer et finalement améliorer les performances de vos agents. 6 | 7 | --- 8 | 9 | ## 📚 Quand dois-je faire cette Unité Bonus ? 10 | 11 | Cette unité bonus est parfaite si vous : 12 | - **Développez et déployez des agents :** Vous voulez vous assurer que vos agents performent de manière fiable en production. 13 | - **Avez besoin d'informations détaillées :** Vous cherchez à diagnostiquer des problèmes, optimiser les performances, ou comprendre le fonctionnement interne de votre agent. 14 | - **Visez à réduire les coûts opérationnels :** En surveillant les coûts des agents, la latence et les détails d'exécution, vous pouvez gérer efficacement les ressources. 15 | - **Recherchez une amélioration continue :** Vous êtes intéressé par l'intégration de retour utilisateur en temps réel et d'évaluation automatisée dans vos applications. 16 | 17 | En résumé, pour tous ceux qui veulent mettre leurs agents face à des utilisateurs ! 18 | 19 | --- 20 | 21 | ## 🤓 Ce que vous allez apprendre 22 | 23 | Dans cette unité, vous verrez comment : 24 | - **Instrumenter votre agent :** Apprenez comment intégrer des outils d'observabilité via *OpenTelemetry* avec le *framework* smolagents. 25 | - **Surveiller les métriques :** Suivez les indicateurs de performance tels que l'utilisation du nombre de *tokens* (coûts), la latence et les traces d'erreur. 26 | - **Évaluer en temps réel :** Comprenez les techniques pour l'évaluation en direct, y compris la collecte de retour utilisateur et l'utilisation d'un *LLM-as-a-judge*. 27 | - **Analyse hors ligne :** Utilisez des jeux de données de référence (par exemple, GSM8K) pour tester et comparer les performances des agents. 28 | 29 | --- 30 | 31 | ## 🚀 Prêt à commencer ? 32 | 33 | Dans la prochaine section, vous allez voir les bases de l'observabilité et de l'évaluation des agents. Après cela, il sera temps de les voir en action ! -------------------------------------------------------------------------------- /units/es/unit1/introduction.mdx: -------------------------------------------------------------------------------- 1 | # Introducción a los Agentes 2 | 3 | Thumbnail 4 | 5 | Bienvenido a esta primera unidad, donde **construirás una base sólida en los fundamentos de los Agentes de IA** incluyendo: 6 | 7 | - **Comprendiendo los Agentes** 8 | - ¿Qué es un Agente y cómo funciona? 9 | - ¿Cómo los Agentes toman decisiones utilizando razonamiento y planificación? 10 | 11 | - **El Papel de los LLMs (Modelos de Lenguaje Grandes) en los Agentes** 12 | - Cómo los LLMs sirven como el "cerebro" detrás de un Agente. 13 | - Cómo los LLMs estructuran conversaciones a través del sistema de Mensajes. 14 | 15 | - **Herramientas y Acciones** 16 | - Cómo los Agentes utilizan herramientas externas para interactuar con el entorno. 17 | - Cómo construir e integrar herramientas para tu Agente. 18 | 19 | - **El Flujo de Trabajo del Agente:** 20 | - *Pensar* → *Actuar* → *Observar*. 21 | 22 | Después de explorar estos temas, **¡construirás tu primer Agente** utilizando `smolagents`! 23 | 24 | Tu Agente, llamado Alfred, manejará una tarea simple y demostrará cómo aplicar estos conceptos en la práctica. 25 | 26 | Incluso aprenderás cómo **publicar tu Agente en Hugging Face Spaces**, para que puedas compartirlo con amigos y colegas. 27 | 28 | Finalmente, al final de esta Unidad, realizarás un quiz. Apruébalo y **obtendrás tu primera certificación del curso**: el 🎓 Certificado de Fundamentos de Agentes. 29 | 30 | Ejemplo de Certificado 31 | 32 | Esta Unidad es tu **punto de partida esencial**, estableciendo las bases para entender los Agentes antes de avanzar a temas más avanzados. 33 | 34 | Planificación de la Unidad 1 35 | 36 | Es una unidad grande, así que **tómate tu tiempo** y no dudes en volver a estas secciones de vez en cuando. 37 | 38 | ¿Listo? ¡Vamos a sumergirnos! 🚀 39 | -------------------------------------------------------------------------------- /units/vi/_toctree.yml: -------------------------------------------------------------------------------- 1 | - title: Chương 0. Welcome to the course 2 | sections: 3 | - local: unit0/introduction 4 | title: Chào mừng bạn đến với khóa học 🤗 5 | - local: unit0/onboarding 6 | title: Làm quen 7 | - local: unit0/discord101 8 | title: (Bổ trợ) Discord 101 (Giới thiệu cơ bản về Discord) 9 | - title: Live 1. Cách khóa học vận hành + Hỏi và Đáp 10 | sections: 11 | - local: communication/live1 12 | title: Live 1. Cách khóa học vận hành + Hỏi và Đáp 13 | - title: Chương 1. Giới thiệu về Agents 14 | sections: 15 | - local: unit1/introduction 16 | title: Giới thiệu 17 | - local: unit1/what-are-agents 18 | title: Agent là gì? 19 | - local: unit1/quiz1 20 | title: Kiểm tra nhanh 1 21 | - local: unit1/what-are-llms 22 | title: LLM là gì? 23 | - local: unit1/messages-and-special-tokens 24 | title: Tin nhắn và Special Token 25 | - local: unit1/tools 26 | title: Tools là gì? 27 | - local: unit1/quiz2 28 | title: Kiểm tra nhanh 2 29 | - local: unit1/agent-steps-and-structure 30 | title: Hiểu về AI Agents qua chu kỳ Thought-Action-Observation 31 | - local: unit1/thoughts 32 | title: Suy nghĩ, Lập luận nội bộ và phương pháp Re-Act 33 | - local: unit1/actions 34 | title: Hành động, Giúp Agent tương tác với môi trường 35 | - local: unit1/observations 36 | title: Quan sát, Tích hợp phản hồi để điều chỉnh 37 | - local: unit1/dummy-agent-library 38 | title: Thư viện Dummy Agent 39 | - local: unit1/tutorial 40 | title: Hãy tạo Agent đầu tiên với Smolagents 41 | - local: unit1/final-quiz 42 | title: Bài kiểm tra cuối chương 1 43 | - local: unit1/conclusion 44 | title: Kết luận 45 | - title: Chương bổ trợ 1. Fine-tune LLM cho Function-calling 46 | sections: 47 | - local: bonus-unit1/introduction 48 | title: Giới thiệu 49 | - local: bonus-unit1/what-is-function-calling 50 | title: Function Calling là gì? 51 | - local: bonus-unit1/fine-tuning 52 | title: Hãy fine-tuning model cho Function-calling 53 | - local: bonus-unit1/conclusion 54 | title: Kết luận 55 | - title: Khi nào các bước tiếp theo được công bố? 56 | sections: 57 | - local: communication/next-units 58 | title: Các chương tiếp theo -------------------------------------------------------------------------------- /units/fr/unit1/introduction.mdx: -------------------------------------------------------------------------------- 1 | # Introduction aux agents 2 | 3 | Vignette 4 | 5 | Bienvenue dans cette première unité, qui **vous permettra d'acquérir des bases solides sur les principes fondamentaux des agents**, notamment : 6 | 7 | - **Comprendre les agents** 8 | - Qu'est-ce qu'un agent, et comment fonctionne-t-il ? 9 | - Comment les agents prennent-ils des décisions via le raisonnement et la planification ? 10 | 11 | - **Le rôle des LLM (*Large Language Models*) dans les agents** 12 | - Comment les LLM servent de « cerveau » aux agents. 13 | - Comment les LLM structurent les conversations via le système de messages. 14 | 15 | - **Outils et actions** 16 | - Comment les agents utilisent des outils externes pour interagir avec l'environnement. 17 | - Comment construire et intégrer des outils pour votre agent. 18 | 19 | - **Le flux de travail de l'agent :** 20 | - *Think* → *Act* → *Observe* (*Penser* → *Agir* → *Observer*). 21 | 22 | Après avoir exploré ces sujets, **vous construirez votre premier agent** en utilisant `smolagents` ! 23 | 24 | Votre agent, nommé Alfred, réalisera une tâche simple et démontrera comment appliquer ces concepts en pratique. 25 | 26 | Vous apprendrez même comment **publier votre agent via un *Space*** afin de le partager avec vos amis et collègues. 27 | 28 | Enfin, à la fin de cette Unité, vous passerez un quiz. Réussissez-le, et vous **obtiendrez votre première certification du cours** : le 🎓 Certificat *Fundamentals of Agents*. 29 | 30 | Exemple de Certificat 31 | 32 | Cette Unité est votre **point de départ** posant les bases pour comprendre les agents avant de passer à des sujets plus avancés. 33 | 34 | Planification de l'Unité 1 35 | 36 | C'est une grande unité, alors **prenez votre temps** et n'hésitez pas à revenir sur ces sections de temps en temps. 37 | 38 | Prêt ? Plongeons dans l'aventure ! 🚀 39 | -------------------------------------------------------------------------------- /units/fr/bonus-unit3/introduction.mdx: -------------------------------------------------------------------------------- 1 | # Introduction 2 | 3 | Bonus Unit 3 AI in Games 4 | 5 | 🎶Je veux être le meilleur... 🎶 6 | 7 | Bienvenue dans cette **unité bonus**, où vous explorerez l'intersection passionnante entre **les agents et les jeux vidéos** ! 🎮🤖 8 | 9 | Imaginez un jeu où les personnages non-joueurs (PNJ) ne suivent pas simplement des lignes scriptées, mais tiennent plutôt des conversations dynamiques, s'adaptent à vos stratégies et évoluent au fur et à mesure que l'histoire se déroule. C'est le pouvoir de combiner **les LLM et le comportement agentique dans les jeux** : cela ouvre la porte à **une narration et un *gameplay* émergents comme jamais auparavant**. 10 | 11 | Dans cette unité bonus, vous allez : 12 | 13 | - Apprendre comment construire un agent pouvant faire des **combats au tour par tour dans le style de Pokémon** 14 | - Jouer contre lui, ou même défier d'autres agents en ligne 15 | 16 | Nous avons déjà vu [quelques](https://www.anthropic.com/research/visible-extended-thinking) [exemples](https://www.twitch.tv/gemini_plays_pokemon) de la communauté IA pour jouer à Pokémon en utilisant des LLM. Dans cette unité vous apprendrez comment vous pouvez répliquer cela en utilisant votre propre agent avec les idées que vous avez apprises à travers le cours. 17 | 18 | Claude plays Pokémon 19 | 20 | ## Vous voulez aller plus loin ? 21 | 22 | - 🎓 **Maîtrisez les LLM dans les jeux vidéos** : Plongez plus profondément dans le développement de jeux avec notre cours complet [*Machine Learning for Games Course*](https://hf.co/learn/ml-games-course) (en anglais). 23 | 24 | - 📘 **Obtenez le *Playbook*** : Découvrez des informations, idées et conseils pratiques dans le [*AI Playbook for Game Developers*](https://thomassimonini.substack.com/) de Thomas Simonini, où l'avenir de la conception de jeux intelligents est exploré. 25 | 26 | Mais avant de construire cela, voyons comment les LLM sont déjà utilisés dans les jeux avec **quatre exemples du monde réel**. -------------------------------------------------------------------------------- /units/es/unit3/agentic-rag/agentic-rag.mdx: -------------------------------------------------------------------------------- 1 | # Generación Aumentada por Recuperación con Agentes (RAG Agéntico) 2 | 3 | En esta unidad, veremos cómo podemos usar RAG Agéntico para ayudar a Alfred a prepararse para la increíble gala. 4 | 5 | > [!TIP] 6 | > Sabemos que ya hemos discutido la Generación Aumentada por Recuperación (RAG) y RAG agéntico en la unidad anterior, así que siéntete libre de avanzar si ya estás familiarizado con los conceptos. 7 | 8 | Los LLMs están entrenados en enormes volúmenes de datos para aprender conocimiento general. 9 | Sin embargo, el modelo de conocimiento del mundo de los LLMs no siempre puede contener información relevante y actualizada. 10 | **RAG resuelve este problema encontrando y recuperando información relevante de tus datos y enviándola al LLM.** 11 | 12 | ![RAG](https://huggingface.co/datasets/agents-course/course-images/resolve/main/en/unit2/llama-index/rag.png) 13 | 14 | Ahora, piensa en cómo funciona Alfred: 15 | 16 | 1. Le hemos pedido a Alfred que ayude a planificar una gala 17 | 2. Alfred necesita encontrar las últimas noticias e información meteorológica 18 | 3. Alfred necesita estructurar y buscar la información de los invitados 19 | 20 | Así como Alfred necesita buscar en la información de tu hogar para ser útil, cualquier agente necesita una manera de encontrar y comprender datos relevantes. 21 | **RAG Agéntico es una forma poderosa de usar agentes para responder preguntas sobre tus datos.** Podemos proporcionar varias herramientas a Alfred para ayudarlo a responder preguntas. 22 | Sin embargo, en lugar de responder automáticamente a la pregunta basada en documentos, Alfred puede decidir usar cualquier otra herramienta o flujo para responder la pregunta. 23 | 24 | ![RAG Agéntico](https://huggingface.co/datasets/agents-course/course-images/resolve/main/en/unit2/llama-index/agentic-rag.png) 25 | 26 | ¡Comencemos a **construir nuestro flujo de trabajo de RAG agéntico!** 27 | 28 | Primero, crearemos una herramienta RAG para recuperar detalles actualizados sobre los invitados. Luego, desarrollaremos herramientas para búsqueda web, actualizaciones meteorológicas y estadísticas de descargas de modelos de Hugging Face Hub. Finalmente, integraremos todo para dar vida a nuestro agente RAG agéntico! 29 | -------------------------------------------------------------------------------- /units/fr/unit3/agentic-rag/agentic-rag.mdx: -------------------------------------------------------------------------------- 1 | # RAG agentique 2 | 3 | Dans cette unité, nous allons examiner comment nous pouvons utiliser le *RAG agentique* pour aider Alfred à préparer l'incroyable gala. 4 | 5 | > [!TIP] 6 | > Nous avons déjà discuté du RAG et du RAG agentique dans l'unité précédente, donc n'hésitez pas à passer directement à la suite si vous êtes déjà familier avec ces concepts. 7 | 8 | Les LLM sont entraînés sur d'énormes corpus de données pour apprendre des connaissances générales. 9 | Cependant, ce modèle de connaissance du monde peut ne pas toujours être des informations pertinentes et à jour. 10 | **Le RAG résout ce problème en trouvant et récupérant des informations pertinentes à partir de vos données et en les transmettant au LLM.** 11 | 12 | ![RAG](https://huggingface.co/datasets/agents-course/course-images/resolve/main/en/unit2/llama-index/rag.png) 13 | 14 | Maintenant, pensez à comment Alfred fonctionne : 15 | 16 | 1. Nous lui avons demandé d'aider à planifier un gala 17 | 2. Il doit trouver les dernières nouvelles et informations météorologiques 18 | 3. Il doit structurer et rechercher les informations sur les invités 19 | 20 | Tout comme Alfred a besoin de chercher dans vos informations domestiques pour être utile, tout agent a besoin d'un moyen de trouver et comprendre les données pertinentes. 21 | **Le RAG agentique est un moyen puissant d'utiliser les agents pour répondre aux questions sur vos données.** Nous pouvons passer divers outils à Alfred pour l'aider à répondre aux questions. 22 | Cependant, au lieu de répondre automatiquement à la question sur la base de documents, Alfred peut décider d'utiliser tout autre outil ou flux pour répondre à la question. 23 | 24 | ![RAG agentique](https://huggingface.co/datasets/agents-course/course-images/resolve/main/en/unit2/llama-index/agentic-rag.png) 25 | 26 | Commençons **à construire notre *workflow* de RAG agentique !** 27 | 28 | Tout d'abord, nous allons créer un outil de RAG pour récupérer les détails à jour sur les invités. Ensuite, nous développerons des outils pour la recherche web, les mises à jour météorologiques et les statistiques de téléchargement de modèles sur le Hub d'Hugging Face. Enfin, nous intégrerons le tout pour donner vie à notre agent de RAG agentique ! -------------------------------------------------------------------------------- /units/zh-CN/unit4/what-is-gaia.mdx: -------------------------------------------------------------------------------- 1 | # 什么是GAIA? 2 | 3 | [GAIA](https://huggingface.co/papers/2311.12983) 是一个**用于评估AI助手在需要核心能力组合的真实世界任务上的表现的基准**,这些核心能力包括推理、多模态理解、网页浏览和熟练的工具使用。 4 | 5 | 此论文介绍了GAIA _"[GAIA: A Benchmark for General AI Assistants](https://huggingface.co/papers/2311.12983)"_。 6 | 7 | 该基准包含**466个精心策划的问题**,这些问题对人类来说**在概念上简单**,但对当前的AI系统来说却**极具挑战性**。 8 | 9 | 为了说明差距: 10 | - **人类**:约92%的成功率 11 | - **带有插件的GPT-4**:约15% 12 | - **深度研究(OpenAI)**:在验证集上的得分为67.36% 13 | 14 | GAIA突出了AI模型的当前局限性,并提供了一个严格的基准来评估向真正通用AI助手发展的进展。 15 | 16 | ## 🌱 GAIA的核心原则 17 | 18 | GAIA围绕以下支柱精心设计: 19 | 20 | - 🔍 **现实世界的难度**:任务需要多步骤推理、多模态理解和工具交互。 21 | - 🧾 **人类可解释性**:尽管对AI来说很难,但每个任务在概念上对人类来说仍然简单易懂。 22 | - 🛡️ **不可游戏化**:正确答案需要完整的任务执行,使得蛮力破解无效。 23 | - 🧰 **评估的简单性**:答案简洁、事实性强且明确———作为一个理想的基准测试。 24 | 25 | ## 难度等级 26 | 27 | GAIA任务被组织为**三个递增复杂度的等级**,每个等级测试特定技能: 28 | 29 | - **一级**:需要少于5个步骤和最少的工具使用。 30 | - **二级**:涉及更复杂的推理和多个工具之间的协调以及5-10个步骤。 31 | - **三级**:需要长期规划和各种工具的高级集成。 32 | 33 | ![GAIA等级](https://huggingface.co/datasets/agents-course/course-images/resolve/main/en/unit4/gaia_levels.png) 34 | 35 | ## 困难GAIA等级(Hard GAIA)的问题示例 36 | 37 | > 在2008年画作“乌兹别克斯坦的刺绣”中展示的水果中,哪些曾在1949年10月的早餐菜单中被提供,作为后来用于电影《最后航程》的远洋班轮的一部分?请将这些水果以逗号分隔的列表形式给出,按照它们在画作中从12点位置开始的顺时针排列顺序,并使用每种水果的复数形式。 38 | 39 | 正如您所见,这个问题在几个方面对AI系统提出了挑战: 40 | 41 | - 需要一个**结构化的响应格式** 42 | - 涉及**多模态推理**(例如,分析图像) 43 | - 需要**多跳检索**相互依赖的事实: 44 | - 识别画作中的水果 45 | - 发现哪个远洋班轮用于*最后航程* 46 | - 查找该船1949年10月的早餐菜单 47 | - 需要**正确的排序**和高级规划以按正确顺序解决 48 | 49 | 这种任务突出了单独的LLM往往不足的地方,使GAIA成为**基于智能体的系统**的理想基准,这些系统可以在多个步骤和模态上进行推理、检索和执行。 50 | 51 | ![GAIA capabilities plot](https://huggingface.co/datasets/agents-course/course-images/resolve/main/en/unit4/gaia_capabilities.png) 52 | 53 | ## 实时评估 54 | 55 | 为了鼓励持续的基准测试,**GAIA在Hugging Face上提供了一个公共排行榜**,您可以在其中测试您的模型对**300个测试问题**的表现。 56 | 57 | 👉 在[这里](https://huggingface.co/spaces/gaia-benchmark/leaderboard)查看排行榜 58 | 59 | 65 | 66 | 想深入了解GAIA? 67 | 68 | - 📄 [阅读完整论文](https://huggingface.co/papers/2311.12983) 69 | - 📄 [OpenAI的深度研究发布文章](https://openai.com/index/introducing-deep-research/) 70 | - 📄 [开源DeepResearch – 释放我们的搜索智能体](https://huggingface.co/blog/open-deep-research) -------------------------------------------------------------------------------- /units/zh-CN/unit2/llama-index/quiz2.mdx: -------------------------------------------------------------------------------- 1 | # 快速自测(不计分)[[quiz2]] 2 | 3 | 什么?!又是测验?我们知道,我们知道...😅但这个简短的不计分测验是为了**帮助您巩固刚学到的关键概念**。 4 | 5 | 本测验涵盖智能体工作流程和交互——这些是构建高效AI智能体的核心组件。 6 | 7 | ### Q1: AgentWorkflow 在 LlamaIndex 中的主要作用是什么? 8 | 9 | 30 | 31 | --- 32 | 33 | ### Q2: 哪个对象用于跟踪工作流的状态? 34 | 35 | 56 | 57 | --- 58 | 59 | ### Q3: 如果希望智能体记住之前的交互,应该使用哪个方法? 60 | 61 | 82 | 83 | --- 84 | 85 | ### Q4: Agentic RAG 的关键特性是什么? 86 | 87 | 108 | 109 | --- 110 | 111 | 112 | 明白了吗?太棒了!现在让我们**简要回顾一下本单元!** 113 | -------------------------------------------------------------------------------- /units/zh-CN/unit1/README.md: -------------------------------------------------------------------------------- 1 | # 目录 2 | 3 | 您可以在 hf.co/learn 上访问第 1 单元 👉 此处 4 | 5 | 20 | 21 | 36 | -------------------------------------------------------------------------------- /units/en/unit2/llama-index/llama-hub.mdx: -------------------------------------------------------------------------------- 1 | # Introduction to the LlamaHub 2 | 3 | **LlamaHub is a registry of hundreds of integrations, agents and tools that you can use within LlamaIndex.** 4 | 5 | ![LlamaHub](https://huggingface.co/datasets/agents-course/course-images/resolve/main/en/unit2/llama-index/llama-hub.png) 6 | 7 | We will be using various integrations in this course, so let's first look at the LlamaHub and how it can help us. 8 | 9 | Let's see how to find and install the dependencies for the components we need. 10 | 11 | ## Installation 12 | 13 | LlamaIndex installation instructions are available as a well-structured **overview on [LlamaHub](https://llamahub.ai/)**. 14 | This might be a bit overwhelming at first, but most of the **installation commands generally follow an easy-to-remember format**: 15 | 16 | ```bash 17 | pip install llama-index-{component-type}-{framework-name} 18 | ``` 19 | 20 | Let's try to install the dependencies for an LLM and embedding component using the [Hugging Face inference API integration](https://llamahub.ai/l/llms/llama-index-llms-huggingface-api?from=llms). 21 | 22 | ```bash 23 | pip install llama-index-llms-huggingface-api llama-index-embeddings-huggingface 24 | ``` 25 | 26 | ## Usage 27 | 28 | Once installed, we can see the usage patterns. You'll notice that the import paths follow the install command! 29 | Underneath, we can see an example of the usage of **the Hugging Face inference API for an LLM component**. 30 | 31 | ```python 32 | from llama_index.llms.huggingface_api import HuggingFaceInferenceAPI 33 | import os 34 | from dotenv import load_dotenv 35 | 36 | # Load the .env file 37 | load_dotenv() 38 | 39 | # Retrieve HF_TOKEN from the environment variables 40 | hf_token = os.getenv("HF_TOKEN") 41 | 42 | llm = HuggingFaceInferenceAPI( 43 | model_name="Qwen/Qwen2.5-Coder-32B-Instruct", 44 | temperature=0.7, 45 | max_tokens=100, 46 | token=hf_token, 47 | provider="auto" 48 | ) 49 | 50 | response = llm.complete("Hello, how are you?") 51 | print(response) 52 | # I am good, how can I help you today? 53 | ``` 54 | 55 | Wonderful, we now know how to find, install and use the integrations for the components we need. 56 | **Let's dive deeper into the components** and see how we can use them to build our own agents. 57 | -------------------------------------------------------------------------------- /units/ko/unit0/discord101.mdx: -------------------------------------------------------------------------------- 1 | # (선택 섹션) Discord 101 [[discord-101]] 2 | 3 | The Discord Etiquette 4 | 5 | 이 가이드는 게임 및 머신러닝(Machine Learning) 커뮤니티에서 인기 있는 무료 채팅 플랫폼, 디스코드(Discord)를 처음 사용하는 분들을 위한 안내서입니다. 6 | 7 | Hugging Face 커뮤니티 Discord 서버에서는 **10만 명 이상**의 멤버가 활동하고 있습니다. 아래 링크를 클릭하여 참여해 보세요!다른 사용자들과 만날 수 있는 좋은 장소입니다! 8 | 9 | ## Hugging Face 디스코드 채널에서 Agent 코스를 만나보세요! 10 | 11 | Starting on Discord can be a bit overwhelming, so here's a quick guide to help you navigate. 12 | 디스코드를 처음 이용하신다면 다소 낯설 수 있어, 퀵가이드를 준비했습니다. 13 | 14 | 15 | 16 | Hugging Face 커뮤니티 서버에서는 논문 토론, 이벤트 등 다양한 분야에 활발한 커뮤니티입니다. 17 | 18 | 19 | 먼저 [회원가입](http://hf.co/join/discord) 하신 후, `#introduce-yourself` 채널에서 간단한 자기소개를 남겨주세요! 20 | 21 | 이 서버에는 에이전트 코스 전용 4가지 채널이 있습니다! : 22 | 23 | - `agents-course-announcements`: **최신 코스 소식**을 확인하는 공간 24 | - `🎓-agents-course-general`: **자유로운 대화와 토론** 을 위한 공간 25 | - `agents-course-questions`: **질문 & 동료들과 도움 주고 받기** 위한 공간 26 | - `agents-course-showcase`: **자신이 만든 최고의 AI 에이전트를 공유** 하기 위한 공간 27 | 28 | 추가로 : 29 | 30 | - `smolagents`: **라이브러리에 대한 논의 및 지원** 을 받을 수 있습니다. 31 | 32 | ## 디스코드 활용 팁 33 | 34 | ### 서버에 참여하는 방법 35 | 36 | Discord가 익숙하지 않다면, 서버 참여 방법에 대한 공식 가이드를 참고하세요! 37 | 38 | 간단한 절차는 다음과 같습니다 : 39 | 40 | 1. 초대 링크를 클릭합니다. 41 | 2. 디스코드 계정으로 로그인 하거나, 새 계정을 만듭니다. 42 | 3. 본인이 AI 에이전트가 아님을 인증하세요! 43 | 4. 별명과 아바타를 설정합니다. 44 | 5. "서버 참여(Join Server)"를 클릭합니다! 45 | 46 | ### 디스코드 효과적으로 활용하기 47 | 48 | 디스코드를 효과적으로 활용할 수 있는 몇 가지 팁! 49 | 50 | - **음성 채널** 도 제공되지만, 일반적으로는 텍스트 채팅이 더 많이 사용됩니다. 51 | - **마크다운 형식**을 사용할 수 있어, 코드 작성시 유용합니다. 링크에는 마크다운 사용이 제한될 수 있습니다! 52 | - **긴 대화**시 스레드를 활용하시면 더 편리합니다. 53 | 54 | 이 가이드가 도움이 되셨기를 바랍니다! 질문이 있으면 디스코드에서 언제든 문의해주세요. 🤗 55 | -------------------------------------------------------------------------------- /units/zh-CN/bonus-unit1/fine-tuning.mdx: -------------------------------------------------------------------------------- 1 | # 让我们为函数调用微调模型 (Let's Fine-Tune your model for function-calling) 2 | 3 | 我们现在准备好为函数调用微调我们的第一个模型了 🔥。 4 | 5 | ## 我们如何训练模型进行函数调用? 6 | 7 | > 答案:我们需要**数据** 8 | 9 | 模型训练可以分为3个步骤: 10 | 11 | 1. **模型在大量数据上进行预训练 (pretrained)**。这一步的输出是一个**预训练模型 (pre-trained model)**。例如 [google/gemma-2-2b](https://huggingface.co/google/gemma-2-2b)。这是一个基础模型,只知道**如何预测下一个词元(token),而没有良好的指令跟随能力**。 12 | 13 | 2. 然后,为了在对话环境中发挥作用,模型需要进行**微调 (fine-tuned)**以遵循指令。在这一步中,可以由模型创建者、开源社区、你或任何人进行训练。例如 [google/gemma-2-2b-it](https://huggingface.co/google/gemma-2-2b-it) 是由 Gemma 项目背后的谷歌团队进行的指令微调模型。 14 | 15 | 3. 然后可以将模型**对齐 (aligned)**到创建者的偏好。例如,一个必须永远不能对客户无礼的客户服务聊天模型。 16 | 17 | 通常,像 Gemini 或 Mistral 这样的完整产品**会经历所有这3个步骤**,而你在 Hugging Face 上找到的模型可能已经经过了这些训练步骤中的一个或多个。 18 | 19 | 在本教程中,我们将基于 [google/gemma-2-2b-it](https://huggingface.co/google/gemma-2-2b-it) 构建一个函数调用模型。基础模型是 [google/gemma-2-2b](https://huggingface.co/google/gemma-2-2b),谷歌团队在指令跟随方面对基础模型进行了微调:产生了 **"google/gemma-2-2b-it"**。 20 | 21 | 在这种情况下,我们将使用 **"google/gemma-2-2b-it"** 作为基础,**而不是基础模型,因为它之前经历的微调对我们的用例很重要**。 22 | 23 | 由于我们想要通过消息对话与我们的模型进行交互,从基础模型开始**需要更多的训练才能学习指令跟随、聊天和函数调用**。 24 | 25 | 通过从指令微调模型开始,**我们最小化了模型需要学习的信息量**。 26 | 27 | ## LoRA(大语言模型的低秩适应) 28 | 29 | LoRA(大语言模型的低秩适应,Low-Rank Adaptation of Large Language Models)是一种流行的轻量级训练技术,它显著**减少了可训练参数的数量**。 30 | 31 | 它的工作原理是**将较少数量的新权重作为适配器插入到模型中进行训练**。这使得使用 LoRA 进行训练更快、内存效率更高,并产生更小的模型权重(几百 MB),更易于存储和共享。 32 | 33 | LoRA inference 34 | 35 | LoRA 通过向 Transformer 层添加秩分解矩阵对来工作,通常关注线性层。在训练期间,我们将"冻结"模型的其余部分,只更新那些新添加的适配器的权重。 36 | 37 | 通过这样做,我们需要训练的参数数量大大减少,因为我们只需要更新适配器的权重。 38 | 39 | 在推理过程中,输入通过适配器传递,基础模型或这些适配器权重可以与基础模型合并,不会产生额外的延迟开销。 40 | 41 | LoRA 特别适用于将**大型**语言模型适应特定任务或领域,同时保持资源需求可控。这有助于减少训练模型所需的内存。 42 | 43 | 如果你想了解更多关于 LoRA 如何工作的信息,你应该查看这个[教程](https://huggingface.co/learn/nlp-course/chapter11/4?fw=pt)。 44 | 45 | ## 为函数调用微调模型 46 | 47 | 你可以在这里访问教程笔记本 👉 [点击这里](https://huggingface.co/agents-course/notebooks/blob/main/bonus-unit1/bonus-unit1.ipynb)。 48 | 49 | 然后,点击 [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/#fileId=https://huggingface.co/agents-course/notebooks/blob/main/bonus-unit1/bonus-unit1.ipynb) 以便在 Colab Notebook 中运行它。 -------------------------------------------------------------------------------- /units/ru-RU/_toctree.yml: -------------------------------------------------------------------------------- 1 | - title: Раздел 0. Добро пожаловать на курс! 2 | sections: 3 | - local: unit0/introduction 4 | title: Добро пожаловать на курс 🤗 5 | - local: unit0/onboarding 6 | title: Вводная часть 7 | - local: unit0/discord101 8 | title: (Необязательно) Discord 101 9 | - title: Прямой эфир 1. Как работает курс, вопросы и ответы 10 | sections: 11 | - local: communication/live1 12 | title: Прямой эфир 1. Как работает курс, вопросы и ответы 13 | - title: Раздел 1. Введение в Агентов 14 | sections: 15 | - local: unit1/introduction 16 | title: Введение 17 | - local: unit1/what-are-agents 18 | title: Что такое Агент? 19 | - local: unit1/quiz1 20 | title: Быстрый тест 1 21 | - local: unit1/what-are-llms 22 | title: Что такое LLM? 23 | - local: unit1/messages-and-special-tokens 24 | title: Сообщения и специальные токены 25 | - local: unit1/tools 26 | title: Что такое инструменты? 27 | - local: unit1/quiz2 28 | title: Быстрый тест 2 29 | - local: unit1/agent-steps-and-structure 30 | title: Понимание ИИ агентов через цикл "Мысль-Действие-Наблюдение" 31 | - local: unit1/thoughts 32 | title: Мышление, внутренние рассуждения и подход Re-Act 33 | - local: unit1/actions 34 | title: Действия, позволяющие агенту взаимодействовать с окружающей средой 35 | - local: unit1/observations 36 | title: Наблюдение, интеграция обратной связи для Осмысления и Адаптации 37 | - local: unit1/dummy-agent-library 38 | title: Библиотека фиктивного агента 39 | - local: unit1/tutorial 40 | title: Давайте создадим нашего первого агента используя Smolagents 41 | - local: unit1/final-quiz 42 | title: Раздел 1 Финальный тест 43 | - local: unit1/get-your-certificate 44 | title: Получите свой сертификат 45 | - local: unit1/conclusion 46 | title: Заключение 47 | - title: Бонусный раздел 1. Дообучение LLM для вызова функций 48 | sections: 49 | - local: bonus-unit1/introduction 50 | title: Введение 51 | - local: bonus-unit1/what-is-function-calling 52 | title: Что такое вызов функции? 53 | - local: bonus-unit1/fine-tuning 54 | title: Давайте дообучим вашу модель для вызова функций 55 | - local: bonus-unit1/conclusion 56 | title: Заключение 57 | - title: Когда будут опубликованы следующие шаги? 58 | sections: 59 | - local: communication/next-units 60 | title: Следующие разделы 61 | -------------------------------------------------------------------------------- /units/ko/unit1/thoughts.mdx: -------------------------------------------------------------------------------- 1 | # 사고: AI 에이전트의 내부 추론과 Re-Act 방식 [[thought-internal-reasoning-and-the-re-act-approach]] 2 | 3 | > [!TIP] 4 | > 이 섹션에서는 AI 에이전트의 내면—즉, 추론하고 계획하는 능력을 자세히 살펴봅니다. 에이전트가 내부 대화를 통해 정보를 분석하고, 복잡한 문제를 다루기 쉬운 단계로 나누며, 다음 행동을 결정하는 과정을 탐구합니다. 또한 'Re-Act' 방식이라는 프롬프팅 기법을 소개합니다. 이는 모델이 행동하기 전에 '단계적으로 생각'하도록 유도하는 방법입니다. 5 | 6 | 사고는 **에이전트가 작업을 해결하기 위해 내부적으로 추론하고 계획하는 과정**을 의미합니다. 7 | 8 | 이는 에이전트의 대규모 언어 모델(LLM)이 가진 **프롬프트에 제시된 정보를 분석하는 능력**을 활용하는 것입니다. 9 | 10 | 마치 에이전트의 머릿속 대화라고 생각하면 됩니다. 주어진 과제를 검토하고 어떻게 접근할지 전략을 세우는 과정이죠. 11 | 12 | 에이전트의 사고 과정은 현재 상황을 관찰하고 다음에 취해야 할 행동을 결정하는 역할을 합니다. 13 | 14 | 이를 통해 에이전트는 **복잡한 문제를 더 작고 다루기 쉬운 단계로 분해**하고, 이전 경험을 되돌아보며, 새로운 정보를 바탕으로 계획을 지속적으로 조정합니다. 15 | 16 | 다음은 일반적인 사고 유형의 예시입니다: 17 | 18 | | 사고 유형 | 예시 | 19 | |----------------|---------| 20 | | 계획 수립 | "이 작업을 세 단계로 나눠야겠다: 1) 데이터 수집, 2) 트렌드 분석, 3) 보고서 작성" | 21 | | 분석 | "오류 메시지를 보니, 문제는 데이터베이스 연결 설정과 관련이 있는 것 같다" | 22 | | 의사 결정 | "사용자의 예산 제약을 고려하면, 중간 가격대 옵션을 추천하는 것이 좋겠다" | 23 | | 문제 해결 | "이 코드를 최적화하려면, 먼저 어디가 병목인지 프로파일링해봐야 한다" | 24 | | 기억 활용 | "사용자가 앞서 파이썬을 선호한다고 했으니, 파이썬 예제를 제공해야겠다" | 25 | | 자기 성찰 | "이전 접근법이 효과적이지 않았으니, 다른 방식을 시도해봐야겠다" | 26 | | 목표 설정 | "이 작업을 완료하려면, 먼저 성공 기준을 명확히 해야 한다" | 27 | | 우선순위 결정 | "새 기능을 추가하기 전에 보안 취약점부터 해결하는 것이 옳다" | 28 | 29 | > **참고:** 함수 호출에 최적화된 LLM의 경우, 사고 과정은 선택적으로 사용할 수 있습니다. 30 | > *함수 호출에 익숙하지 않다면, 행동(Actions) 섹션에서 더 자세한 내용을 확인할 수 있습니다.* 31 | 32 | ## Re-Act 방식 [[the-re-act-approach]] 33 | 34 | 핵심 방법론 중 하나는 "추론"(Reasoning)과 "행동"(Acting)을 결합한 **ReAct 방식**입니다. 35 | 36 | ReAct는 LLM이 다음 토큰을 생성하기 전에 "단계별로 생각해보자"라는 문구를 추가하는 간단한 프롬프팅 기법입니다. 37 | 38 | 모델에게 "단계별로 생각"하도록 지시하면, 바로 최종 해답을 내놓기보다 **계획을 세우는 방향**으로 토큰 생성이 유도됩니다. 이는 모델이 문제를 *하위 과제*로 **분해**하도록 장려하기 때문입니다. 39 | 40 | 이렇게 하면 모델이 각 단계를 더 상세히 고려할 수 있어, 일반적으로 최종 해답을 바로 생성하려 할 때보다 오류가 적게 발생합니다. 41 | 42 |
43 | ReAct 44 |
(d)는 "단계별로 생각해보자"라는 프롬프트를 사용한 Re-Act 방식의 예시입니다 45 |
46 |
47 | 48 | > [!TIP] 49 | > 최근 추론 전략에 대한 관심이 크게 늘고 있습니다. Deepseek R1이나 OpenAI의 o1과 같은 모델들이 바로 이런 흐름을 반영합니다. 이 모델들은 "대답하기 전에 먼저 생각하도록" 특별히 미세 조정되었습니다. 50 | > 51 | > 이런 모델들은 특정 _사고_ 영역(``와 `` 특수 토큰 사이에 포함)을 항상 생성하도록 훈련되었습니다. 이는 ReAct처럼 단순한 프롬프팅 기법이 아니라, 우리가 원하는 결과물의 수천 가지 예시를 분석한 후 이런 사고 영역을 생성하는 방법을 학습하는 훈련 방식입니다. 52 | 53 | --- 54 | 이제 사고 과정에 대해 더 잘 이해했으니, 프로세스의 두 번째 부분인 행동(Act)에 대해 더 자세히 살펴보겠습니다. 55 | -------------------------------------------------------------------------------- /units/zh-CN/unit2/llama-index/quiz1.mdx: -------------------------------------------------------------------------------- 1 | # 小测验(不计分) [[quiz1]] 2 | 3 | 到目前为止,我们已经讨论了 LlamaIndex 的关键组件和工具。 4 | 是时候做个小测验了,因为**自我测试**是最好的学习方式,也能[避免能力错觉](https://www.coursera.org/lecture/learning-how-to-learn/illusions-of-competence-BuFzf)。 5 | 这将帮助您发现**哪些知识需要加强**。 6 | 7 | 本测验为可选项目,不计入成绩。 8 | 9 | ### Q1: 什么是 QueryEngine? 10 | 以下哪项最能描述 QueryEngine 组件? 11 | 12 | 33 | 34 | --- 35 | 36 | ### Q2: FunctionTools 的作用是什么? 37 | 为什么 FunctionTools 对 Agent 很重要? 38 | 39 | 60 | 61 | --- 62 | 63 | ### Q3: LlamaIndex 中的 Toolspecs 是什么? 64 | Toolspecs 的主要目的是什么? 65 | 66 | 87 | 88 | --- 89 | 90 | ### Q4: 创建工具时需要什么? 91 | 创建工具时必须包含哪些信息? 92 | 93 | 114 | 115 | --- 116 | 117 | 恭喜完成测验 🥳!如果有错误,请重新阅读章节巩固知识。如果全部正确,您已准备好深入学习这些组件的构建了! -------------------------------------------------------------------------------- /units/fr/unit2/llama-index/llama-hub.mdx: -------------------------------------------------------------------------------- 1 | # Introduction au *LlamaHub* 2 | 3 | ***LlamaHub* est un registre de centaines d'intégrations, d'*agents* et d'*outils* que vous pouvez utiliser dans LlamaIndex.** 4 | 5 | ![LlamaHub](https://huggingface.co/datasets/agents-course/course-images/resolve/main/en/unit2/llama-index/llama-hub.png) 6 | 7 | Nous utiliserons diverses intégrations dans ce cours, alors examinons d'abord le *LlamaHub* et comment il peut nous aider. 8 | 9 | Voyons comment trouver et installer les dépendances pour les *components* dont nous avons besoin. 10 | 11 | ## Installation 12 | 13 | Les instructions d'installation de LlamaIndex sont disponibles comme un **aperçu bien structuré sur [*LlamaHub*](https://llamahub.ai/)**. 14 | Cela peut être un peu démoralisant au début, mais la plupart des **commandes d'installation suivent généralement un format facile à retenir** : 15 | 16 | ```bash 17 | pip install llama-index-{component-type}-{framework-name} 18 | ``` 19 | 20 | Essayons d'installer les dépendances pour un *component* *LLM* et *embedding* en utilisant l'[intégration de l'API d'inférence *Hugging Face*](https://llamahub.ai/l/llms/llama-index-llms-huggingface-api?from=llms). 21 | 22 | ```bash 23 | pip install llama-index-llms-huggingface-api llama-index-embeddings-huggingface 24 | ``` 25 | 26 | ## Utilisation 27 | 28 | Une fois installé, nous pouvons voir les motifs d'utilisation. Vous remarquerez que les chemins d'importation suivent la commande d'installation ! 29 | Ci-dessous, nous pouvons voir un exemple d'utilisation de **l'API d'inférence Hugging Face pour un *component* LLM**. 30 | 31 | ```python 32 | from llama_index.llms.huggingface_api import HuggingFaceInferenceAPI 33 | import os 34 | from dotenv import load_dotenv 35 | 36 | # Charger le fichier .env 37 | load_dotenv() 38 | 39 | # Récupérer HF_TOKEN à partir des variables d'environnement 40 | hf_token = os.getenv("HF_TOKEN") 41 | 42 | llm = HuggingFaceInferenceAPI( 43 | model_name="Qwen/Qwen2.5-Coder-32B-Instruct", 44 | temperature=0.7, 45 | max_tokens=100, 46 | token=hf_token, 47 | ) 48 | 49 | response = llm.complete("Hello, how are you?") 50 | print(response) 51 | # Je suis bon, comment puis-je vous aider aujourd'hui ? 52 | ``` 53 | 54 | Parfait, nous savons maintenant comment trouver, installer et utiliser les intégrations pour les *components* dont nous avons besoin. 55 | **Approfondissons les *components*** et voyons comment nous pouvons les utiliser pour construire nos propres agents. -------------------------------------------------------------------------------- /units/ko/unit0/onboarding.mdx: -------------------------------------------------------------------------------- 1 | # 온보딩(Onboarding): 첫 걸음 내딛기 ⛵ 2 | 3 | Time to Onboard 4 | 5 | 이제 모든 필요한 정보를 확인했으니, 본격적으로 시작해 봅시다! 이 섹션에서는 다음 네 가지를 진행할 예정입니다 : 6 | 7 | 1. **Hugging Face 계정 생성** (아직 계정이 없으신 경우) 8 | 2. **Discord 가입 후 자기 소개** (수줍어 마세요 🤗) 9 | 3. **Hub에서 Hugging Face Agents 코스 팔로우** 10 | 4. **코스 널리 알리기** 11 | 12 | ### Step 1: Hugging Face 계정 생성 13 | 14 | (아직 계정이 없으신 경우) 여기에서 Hugging Face 계정을 만들어주세요. 15 | 16 | ### Step 2: Discord 커뮤니티에 가입하기 17 | 18 | 👉🏻 여기에서 Discord 서버에 가입하세요. 19 | 20 | 가입 후, `#introduce-yourself` 채널에서 간단하게 자기소개를 남겨주세요. 21 | 22 | 이 서버에는 AI 에이전트와 관련된 채널을 제공하고 있습니다: 23 | 24 | - `agents-course-announcements`: **최신 코스 소식**을 확인하는 공간 25 | - `🎓-agents-course-general`: **자유로운 대화와 토론** 을 위한 공간 26 | - `agents-course-questions`: **질문 & 동료들과 도움을**주고 받는 공간 27 | - `agents-course-showcase`: **자신이 만든 AI 에이전트를 공유** 하는 공간 28 | 29 | 추가로: 30 | 31 | - `smolagents`: **라이브러리에 대한 논의 및 지원** 을 받을 수 있습니다. 32 | 33 | Discord 사용이 처음이신 분들을 위해, Discord 101 가이드를 준비했습니다. [다음 섹션](discord101)에서 확인해 보세요! 34 | 35 | ### Step 3: Hugging Face Agent 코스 팔로우하기 36 | 37 | 최신 강의 자료, 업데이트, 공지를 놓치지 않으려면 ** Hugging Face Agents 코스를 팔로우하세요** 38 | 39 | 👉 Go 여기에서 **팔로우(follow)**버튼을 클릭하세요! 40 | 41 | Follow 42 | 43 | ### Step 4: 코스 널리 알리기 44 | 45 | 이 코스가 더 많은 사람들에게 알려질 수 있도록 도와주세요 :) 두 가지 기여 방법을 제안합니다 : 46 | 47 | 1. Github에서 ⭐로 코스 응원하기 48 | 49 | Repo star 50 | 51 | 2. 배움의 여정 공유하기 : **이 코스를 듣고 있다는 것을 많은 사람들에게 알려주세요!** 소셜미디어에 사용하실 수 있도록 이미지도 준비해두었습니다 ! 52 | 53 | 54 | 55 | 👉 [여기](https://huggingface.co/datasets/agents-course/course-images/resolve/main/en/communication/share.png?download=true) 에서 이미지를 다운로드 할 수 있습니다. 56 | 57 | 축하합니다! 🎉 **온보딩 과정을 완료하셨습니다!** 이제 본격적으로 AI 에이전트에 대해 배울 준비가 되었습니다 ! 즐거운 학습되세요. 58 | 59 | Keep Learning, stay awesome 🤗 60 | -------------------------------------------------------------------------------- /units/zh-CN/bonus-unit1/what-is-function-calling.mdx: -------------------------------------------------------------------------------- 1 | # 什么是函数调用?(What is Function Calling?) 2 | 3 | 函数调用是**大语言模型 (LLM) 对其环境采取行动的一种方式**。它最初在 [GPT-4中引入](https://openai.com/index/function-calling-and-other-api-updates/),然后被其他模型复制。 4 | 5 | 就像智能体 (Agent) 的工具一样,函数调用赋予了模型**对其环境采取行动的能力**。然而,函数调用能力是**由模型学习的**,并且**比其他智能体技术更少依赖提示**。 6 | 7 | 在第1单元中,智能体**没有学习使用工具 (Tools)**,我们只是提供了工具列表,并依赖模型**能够泛化使用这些工具定义计划**的事实。 8 | 9 | 而在这里,**通过函数调用,智能体被微调(训练)来使用工具**。 10 | 11 | ## 模型如何"学习"采取行动? 12 | 13 | 在第1单元中,我们探讨了智能体的一般工作流程。一旦用户向智能体提供了一些工具并用查询提示它,模型将循环执行: 14 | 15 | 1. *思考(Think)*:为了实现目标,我需要采取什么行动。 16 | 2. *行动(Act)*:使用正确的参数格式化行动并停止生成。 17 | 3. *观察(Observe)*:从执行中获取结果。 18 | 19 | 在通过 API 与模型进行的"典型"对话中,对话将在用户和助手消息之间交替进行,如下所示: 20 | 21 | ```python 22 | conversation = [ 23 | {"role": "user", "content": "I need help with my order"}, 24 | {"role": "assistant", "content": "I'd be happy to help. Could you provide your order number?"}, 25 | {"role": "user", "content": "It's ORDER-123"}, 26 | ] 27 | ``` 28 | 29 | 函数调用为对话带来了**新的角色**! 30 | 31 | 1. 一个用于 **行动(Action)** 的新角色 32 | 2. 一个用于 **观察(Observation)** 的新角色 33 | 34 | 如果我们以 [Mistral API](https://docs.mistral.ai/capabilities/function_calling/) 为例,它看起来像这样: 35 | 36 | ```python 37 | conversation = [ 38 | { 39 | "role": "user", 40 | "content": "What's the status of my transaction T1001?" 41 | }, 42 | { 43 | "role": "assistant", 44 | "content": "", 45 | "function_call": { 46 | "name": "retrieve_payment_status", 47 | "arguments": "{\"transaction_id\": \"T1001\"}" 48 | } 49 | }, 50 | { 51 | "role": "tool", 52 | "name": "retrieve_payment_status", 53 | "content": "{\"status\": \"Paid\"}" 54 | }, 55 | { 56 | "role": "assistant", 57 | "content": "Your transaction T1001 has been successfully paid." 58 | } 59 | ] 60 | ``` 61 | 62 | > ...但你说函数调用有一个新角色? 63 | 64 | **是也不是**,在这种情况下和许多其他API中,模型将要采取的行动格式化为"助手"消息。聊天模板然后将此表示为函数调用的**特殊词元 (special tokens)**。 65 | 66 | - `[AVAILABLE_TOOLS]` – 开始可用工具列表 67 | - `[/AVAILABLE_TOOLS]` – 结束可用工具列表 68 | - `[TOOL_CALLS]` – 调用工具(即采取"行动") 69 | - `[TOOL_RESULTS]` – "观察"行动的结果 70 | - `[/TOOL_RESULTS]` – 观察结束(即模型可以再次解码) 71 | 72 | 我们将在本课程中再次讨论函数调用,但如果你想深入了解,可以查看[这个优秀的文档部分](https://docs.mistral.ai/capabilities/function_calling/) 73 | 74 | --- 75 | 76 | 现在我们已经了解了什么是函数调用以及它是如何工作的,让我们**为一个尚未具有这些能力的模型添加一些函数调用功能**:通过向模型添加一些新的特殊词元来增强: [google/gemma-2-2b-it](https://huggingface.co/google/gemma-2-2b-it)。 77 | 78 | 要能够做到这一点,**我们首先需要理解微调和LoRA**。 -------------------------------------------------------------------------------- /units/es/unit2/introduction.mdx: -------------------------------------------------------------------------------- 1 | # Introducción a los Frameworks de Agentes 2 | 3 | Thumbnail 4 | 5 | Bienvenido/a a esta segunda unidad, donde **exploraremos diferentes frameworks de agentes** que pueden ser utilizados para construir poderosas aplicaciones basadas en agentes. 6 | 7 | Estudiaremos: 8 | 9 | - En la Unidad 2.1: [smolagents](https://huggingface.co/docs/smolagents/es/index) 10 | - En la Unidad 2.2: [LlamaIndex](https://www.llamaindex.ai/) 11 | - En la Unidad 2.3: [LangGraph](https://www.langchain.com/langgraph) 12 | 13 | ¡Vamos a sumergirnos! 🕵 14 | 15 | ## Cuándo Usar un Framework de Agentes 16 | 17 | Un framework de agentes **no siempre es necesario cuando se construye una aplicación basada en LLMs**. Proporcionan flexibilidad en el flujo de trabajo para resolver eficientemente una tarea específica, pero no siempre son necesarios. 18 | 19 | A veces, **los flujos de trabajo predefinidos son suficientes** para satisfacer las solicitudes de los usuarios, y no hay una necesidad real de un framework de agentes. Si el enfoque para construir un agente es simple, como una cadena de prompts, usar código plano puede ser suficiente. La ventaja es que el desarrollador/a tendrá **control total y comprensión de su sistema sin abstracciones**. 20 | 21 | Sin embargo, cuando el flujo de trabajo se vuelve más complejo, como permitir que un LLM llame a funciones o usar múltiples agentes, estas abstracciones comienzan a ser útiles. 22 | 23 | Considerando estas ideas, ya podemos identificar la necesidad de algunas características: 24 | 25 | * Un *motor LLM* que impulse el sistema. 26 | * Una *lista de herramientas* a las que el agente puede acceder. 27 | * Un *analizador* para extraer llamadas a herramientas de la salida del LLM. 28 | * Un *prompt de sistema* sincronizado con el analizador. 29 | * Un *sistema de memoria*. 30 | * *Registro de errores y mecanismos de reintento* para controlar los errores del LLM. 31 | Exploraremos cómo se resuelven estos temas en varios frameworks, incluyendo `smolagents`, `LlamaIndex` y `LangGraph`. 32 | 33 | ## Unidades de Frameworks de Agentes 34 | 35 | | Framework | Descripción | Autor de la Unidad | 36 | |------------|----------------|----------------| 37 | | [smolagents](./smolagents/introducción) | Framework de agentes desarrollado por Hugging Face. | Sergio Paniego - [HF](https://huggingface.co/sergiopaniego) - [X](https://x.com/sergiopaniego) - [Linkedin](https://www.linkedin.com/in/sergio-paniego-blanco) | 38 | -------------------------------------------------------------------------------- /units/zh-CN/unit1/thoughts.mdx: -------------------------------------------------------------------------------- 1 | # 思维机制:内部推理与 ReAct 方法 2 | 3 | > [!TIP] 4 | > 本节将深入探讨 AI 智能体的内部运作机制——其推理与规划能力。我们将解析智能体如何通过内部对话分析信息,将复杂问题分解为可管理的步骤,并决策下一步行动。同时介绍 ReAct 方法,是一种鼓励模型在行动前"逐步思考"的提示技术。 5 | 6 | 思维(Thought)代表着智能体**解决任务的内部推理与规划过程**。 7 | 8 | 这利用了智能体的大型语言模型 (LLM) 能力**来分析其 prompt 中的信息**。 9 | 10 | 可将其视为智能体的内部对话,在此过程中它会考量当前任务并制定应对策略。 11 | 12 | 智能体的思维负责获取当前观察结果,并决定下一步应采取的行动。 13 | 14 | 通过这一过程,智能体能够**将复杂问题分解为更小、更易管理的步骤**,反思过往经验,并根据新信息持续调整计划。 15 | 16 | 以下是常见思维模式的示例: 17 | 18 | | 思维类型 | 示例 | 19 | |------------------|---------------------------------------------------------------------| 20 | | Planning(规划) | "I need to break this task into three steps: 1) gather data, 2) analyze trends, 3) generate report"("我需要将任务分解为三步:1)收集数据 2)分析趋势 3)生成报告") | 21 | | Analysis(分析) | "Based on the error message, the issue appears to be with the database connection parameters"("根据错误信息,问题似乎出在数据库连接参数") | 22 | | Decision Making(决策) | "Given the user's budget constraints, I should recommend the mid-tier option"("考虑到用户的预算限制,应推荐中端选项") | 23 | | Problem Solving(问题解决) | "To optimize this code, I should first profile it to identify bottlenecks"("优化此代码需先进行性能分析定位瓶颈") | 24 | | Memory Integration(记忆整合) | "The user mentioned their preference for Python earlier, so I'll provide examples in Python"("用户先前提到偏好 Python,因此我将提供 Python 示例") | 25 | | Self-Reflection(自我反思) | "My last approach didn't work well, I should try a different strategy"("上次方法效果不佳,应尝试不同策略") | 26 | | Goal Setting(目标设定) | "To complete this task, I need to first establish the acceptance criteria"("完成此任务需先确定验收标准") | 27 | | Prioritization(优先级排序) | "The security vulnerability should be addressed before adding new features"("在添加新功能前应先修复安全漏洞") | 28 | 29 | > **注意:** 对于专为 function-calling 微调的 LLMs,思维过程是可选的。 30 | > *若您不熟悉 function-calling 概念,后续"行动"章节将提供详细说明。* 31 | 32 | ## ReAct 方法 33 | 34 | 核心方法是 **ReAct 方法**,即"推理"(Reasoning/Think)与"行动"(Acting/Act)的结合。 35 | 36 | ReAct 是一种简单的提示技术,在让 LLM 解码后续 token 前添加"Let's think step by step"(让我们逐步思考)的提示。 37 | 38 | 通过提示模型"逐步思考",可以引导解码过程生成**计划**而非直接输出最终解决方案,因为模型被鼓励将问题**分解**为*子任务*。 39 | 40 | 这种方法使模型能够更详细地考虑各个子步骤,通常比直接生成最终方案产生更少错误。 41 | 42 |
43 | ReAct 44 |
图 (d) 展示了 ReAct 方法示例,我们通过"Let's think step by step"提示模型 45 |
46 |
47 | 48 | > [!TIP] 49 | > 近期推理策略受到广泛关注,这体现在 Deepseek R1 或 OpenAI 的 o1 等模型的开发中。这些模型经过微调,被训练为"先思考再回答"。 50 | > 51 | > 它们通过特殊标记(`` 和 ``)来界定 _思考_ 部分。这不仅是类似 ReAct 的提示技巧,更是通过分析数千个示范案例,让模型学习生成这些思考段的训练方法。 52 | 53 | --- 54 | 现在我们已经深入理解了思维过程,接下来将更深入探讨流程的第二部分:行动。 55 | -------------------------------------------------------------------------------- /units/vi/unit0/discord101.mdx: -------------------------------------------------------------------------------- 1 | # (Bổ trợ) Discord 101 (nhập môn) [[discord-101]] 2 | 3 | Quy tắc ứng xử trên Discord 4 | 5 | Hướng dẫn này giúp bạn làm quen với Discord - nền tảng chat miễn phí phổ biến trong cộng đồng gaming và ML (Machine Learning - học máy). 6 | 7 | Tham gia server Discord Cộng đồng Hugging Face (**hơn 100,000 thành viên**) bằng cách click tại đây. Đây là nơi tuyệt vời để kết nối với mọi người! 8 | 9 | ## Khóa học Agents trên Cộng đồng Discord của Hugging Face 10 | 11 | Khi mới dùng Discord, bạn có thể hơi choáng ngợp. Dưới đây là hướng dẫn nhanh để làm quen. 12 | 13 | 14 | 15 | Server HF Community sở hữu cộng đồng sôi động với nhiều lĩnh vực khác nhau, mang đến cơ hội học hỏi qua thảo luận nghiên cứu, sự kiện và hơn thế. 16 | 17 | Sau khi [đăng ký](http://hf.co/join/discord), hãy giới thiệu bản thân ở kênh `#introduce-yourself`. 18 | 19 | Chúng mình đã tạo 4 kênh riêng cho khóa học: 20 | 21 | - `agents-course-announcements`: cập nhật **thông tin mới nhất về khóa học** 22 | - `🎓-agents-course-general`: **thảo luận chung và trò chuyện** 23 | - `agents-course-questions`: **đặt câu hỏi và giúp đỡ bạn học** 24 | - `agents-course-showcase`: **khoe agent xuất sắc nhất của bạn** 25 | 26 | Bạn cũng có thể xem thêm: 27 | - `smolagents`: **thảo luận và hỗ trợ về thư viện** 28 | 29 | ## Mẹo sử dụng Discord hiệu quả 30 | 31 | ### Cách tham gia server Discord 32 | 33 | Nếu bạn chưa quen với Discord, hãy xem hướng dẫn này. 34 | 35 | Tóm tắt các bước: 36 | 1. Click Liên kết mời 37 | 2. Đăng nhập bằng tài khoản Discord hoặc tạo tài khoản mới 38 | 3. Xác nhận bạn không phải AI agent! 39 | 4. Thiết lập biệt danh và avatar 40 | 5. Click "Join Server" 41 | 42 | ### Cách dùng Discord hiệu quả 43 | 44 | Một số mẹo hữu ích: 45 | - **Voice channels** (kênh thoại) có sẵn nhưng chat text được dùng phổ biến hơn 46 | - Định dạng text bằng **markdown**, đặc biệt hữu ích khi viết code (lưu ý: markdown không áp dụng tốt cho link) 47 | - Mở **thread** (luồng) cho các cuộc thảo luận dài để giữ gọn kênh chính 48 | 49 | Hi vọng hướng dẫn này hữu ích! Nếu có thắc mắc, hãy hỏi chúng mình trên Discord 🤗. -------------------------------------------------------------------------------- /units/vi/unit1/observations.mdx: -------------------------------------------------------------------------------- 1 | # Quan sát: Tích hợp phản hồi để phản ánh và thích ứng 2 | 3 | Quan sát là **cách Agent nhận thức hậu quả từ hành động của nó**. 4 | 5 | Chúng cung cấp thông tin quan trọng thúc đẩy quá trình tư duy của Agent và định hướng các hành động tiếp theo. 6 | 7 | Chúng là **tín hiệu từ môi trường**—dù là dữ liệu từ API, thông báo lỗi hay nhật ký hệ thống—để hướng dẫn chu kỳ tư duy tiếp theo. 8 | 9 | Trong giai đoạn quan sát, agent sẽ: 10 | - **Thu thập phản hồi:** Nhận dữ liệu hoặc xác nhận về việc hành động đã thành công (hay chưa?) 11 | - **Thêm kết quả:** Tích hợp thông tin mới vào ngữ cảnh hiện có, cập nhật bộ nhớ. 12 | - **Điều chỉnh chiến lược:** Sử dụng ngữ cảnh đã cập nhật để cải thiện các tư duy/hành động tiếp theo. 13 | 14 | Ví dụ: Nếu weather API trả về dữ liệu *"partly cloudy, 15°C, 60% humidity"* (trời có mây, 15°C, độ ẩm 60%), quan sát này sẽ được thêm vào bộ nhớ của agent (cuối prompt). 15 | 16 | Agent sau đó dùng nó để quyết định xem cần thêm thông tin hay đã sẵn sàng đưa ra câu trả lời cuối. 17 | 18 | **Việc lặp lại tích hợp phản hồi đảm bảo agent luôn alignment (cân chỉnh) động với mục tiêu**, liên tục học và điều chỉnh dựa trên kết quả thực tế. 19 | 20 | Các quan sát **có nhiều dạng**, từ đọc văn bản webpage đến giám sát vị trí cánh tay robot. Điều này giống như "logs" của Tool cung cấp phản hồi dạng văn bản về việc thực thi Hoạt động. 21 | 22 | | Loại quan sát | Ví dụ | 23 | |---------------------|---------------------------------------------------------------------------| 24 | | Phản hồi hệ thống | Thông báo lỗi, thông báo thành công, status codes | 25 | | Thay đổi dữ liệu | Cập nhật database, thay đổi file hệ thống, thay đổi trạng thái | 26 | | Dữ liệu môi trường | Đọc cảm biến, số liệu hệ thống, mức độ sử dụng tài nguyên | 27 | | Phân tích phản hồi | API responses, kết quả truy vấn, đầu ra tính toán | 28 | | Sự kiện theo thời gian | Hết hạn deadline, hoàn thành task theo lịch | 29 | 30 | ## Kết quả được thêm vào như thế nào? 31 | 32 | Sau khi thực hiện action, framework sẽ làm theo các bước sau: 33 | 1. **Phân tích hành động** để xác định function(s) cần gọi và argument(s) sử dụng. 34 | 2. **Thực thi hành động.** 35 | 3. **Thêm kết quả** dưới dạng **Quan sát**. 36 | 37 | --- 38 | Chúng ta đã tìm hiểu về Chu kỳ Tư duy-Hành động-Quan sát của Agent. 39 | 40 | Nếu một số khía cạnh vẫn còn mơ hồ, đừng lo—chúng ta sẽ quay lại và đào sâu các khái niệm này trong các chương tiếp theo. 41 | 42 | Giờ là lúc áp dụng kiến thức vào thực tế bằng cách viết code cho Agent đầu tiên của bạn! -------------------------------------------------------------------------------- /units/ko/unit1/quiz2.mdx: -------------------------------------------------------------------------------- 1 | # 셀프 체크! (업데이트됨) [[quiz2]] 2 | 3 | 4 | 뭐라고요?! 또 퀴즈라고요? 우리도 알아요... 😅 하지만 걱정 마세요! 이 퀴즈는 **방금 배운 핵심 개념을 확실히 이해**하는 데 도움을 주기 위해 준비되었습니다. 5 | 6 | 이번 퀴즈에서는 대규모 언어 모델(LLM), 메시지 시스템, 도구(tool) 등 AI 에이전트를 이해하고 구축하는 데 필수적인 요소들을 다룹니다. 7 | 8 | ### Q1: AI 도구(tool)를 가장 잘 설명하는 것은 무엇인가요? [[q1-which-of-the-following-best-describes-an-ai-tool]] 9 | 10 | 27 | 28 | --- 29 | 30 | ### Q2: AI 에이전트는 환경에서 "행동(act)"하기 위해 도구를 어떻게 활용하나요? [[q2-how-do-ai-agents-use-tools-as-a-form-of-acting-in-an-environment]] 31 | 32 | 49 | 50 | --- 51 | 52 | ### Q3: 대규모 언어 모델(LLM)이란? [[q3-what-is-a-large-language-model-llm]] 53 | 54 | 71 | 72 | --- 73 | 74 | ### Q4: LLM에서 특수 토큰(special tokens)의 역할을 가장 잘 설명하는 것은 무엇인가요? [[q4-which-of-the-following-best-describes-the-role-of-special-tokens-in-llms]] 75 | 76 | 93 | 94 | --- 95 | 96 | ### Q5: AI 챗봇 모델은 사용자 메시지를 내부적으로 어떻게 처리하나요? [[q5-how-do-ai-chat-models-process-user-messages-internally]] 97 | 98 | 115 | 116 | --- 117 | 118 | 119 | 이해되셨나요? 좋습니다! 이제 **전체 에이전트의 흐름을 살펴보고, 직접 AI 에이전트를 만들어 봅시다!** 120 | -------------------------------------------------------------------------------- /units/en/unit2/llama-index/introduction.mdx: -------------------------------------------------------------------------------- 1 | # Introduction to LlamaIndex 2 | 3 | Welcome to this module, where you’ll learn how to build LLM-powered agents using the [LlamaIndex](https://www.llamaindex.ai/) toolkit. 4 | 5 | LlamaIndex is **a complete toolkit for creating LLM-powered agents over your data using indexes and workflows**. For this course we'll focus on three main parts that help build agents in LlamaIndex: **Components**, **Agents and Tools** and **Workflows**. 6 | 7 | ![LlamaIndex](https://huggingface.co/datasets/agents-course/course-images/resolve/main/en/unit2/llama-index/thumbnail.png) 8 | 9 | Let's look at these key parts of LlamaIndex and how they help with agents: 10 | 11 | - **Components**: Are the basic building blocks you use in LlamaIndex. These include things like prompts, models, and databases. Components often help connect LlamaIndex with other tools and libraries. 12 | - **Tools**: Tools are components that provide specific capabilities like searching, calculating, or accessing external services. They are the building blocks that enable agents to perform tasks. 13 | - **Agents**: Agents are autonomous components that can use tools and make decisions. They coordinate tool usage to accomplish complex goals. 14 | - **Workflows**: Are step-by-step processes that process logic together. Workflows or agentic workflows are a way to structure agentic behaviour without the explicit use of agents. 15 | 16 | 17 | ## What Makes LlamaIndex Special? 18 | 19 | While LlamaIndex does some things similar to other frameworks like smolagents, it has some key benefits: 20 | 21 | - **Clear Workflow System**: Workflows help break down how agents should make decisions step by step using an event-driven and async-first syntax. This helps you clearly compose and organize your logic. 22 | - **Advanced Document Parsing with LlamaParse**: LlamaParse was made specifically for LlamaIndex, so the integration is seamless, although it is a paid feature. 23 | - **Many Ready-to-Use Components**: LlamaIndex has been around for a while, so it works with lots of other frameworks. This means it has many tested and reliable components, like LLMs, retrievers, indexes, and more. 24 | - **LlamaHub**: is a registry of hundreds of these components, agents, and tools that you can use within LlamaIndex. 25 | 26 | All of these concepts are required in different scenarios to create useful agents. 27 | In the following sections, we will go over each of these concepts in detail. 28 | After mastering the concepts, we will use our learnings to **create applied use cases with Alfred the agent**! 29 | 30 | Getting our hands on LlamaIndex is exciting, right? So, what are we waiting for? Let's get started with **finding and installing the integrations we need using LlamaHub! 🚀** -------------------------------------------------------------------------------- /units/en/unit1/observations.mdx: -------------------------------------------------------------------------------- 1 | # Observe: Integrating Feedback to Reflect and Adapt 2 | 3 | Observations are **how an Agent perceives the consequences of its actions**. 4 | 5 | They provide crucial information that fuels the Agent's thought process and guides future actions. 6 | 7 | They are **signals from the environment**—whether it’s data from an API, error messages, or system logs—that guide the next cycle of thought. 8 | 9 | In the observation phase, the agent: 10 | 11 | - **Collects Feedback:** Receives data or confirmation that its action was successful (or not). 12 | - **Appends Results:** Integrates the new information into its existing context, effectively updating its memory. 13 | - **Adapts its Strategy:** Uses this updated context to refine subsequent thoughts and actions. 14 | 15 | For example, if a weather API returns the data *"partly cloudy, 15°C, 60% humidity"*, this observation is appended to the agent’s memory (at the end of the prompt). 16 | 17 | The Agent then uses it to decide whether additional information is needed or if it’s ready to provide a final answer. 18 | 19 | This **iterative incorporation of feedback ensures the agent remains dynamically aligned with its goals**, constantly learning and adjusting based on real-world outcomes. 20 | 21 | These observations **can take many forms**, from reading webpage text to monitoring a robot arm's position. This can be seen like Tool "logs" that provide textual feedback of the Action execution. 22 | 23 | | Type of Observation | Example | 24 | |---------------------|---------------------------------------------------------------------------| 25 | | System Feedback | Error messages, success notifications, status codes | 26 | | Data Changes | Database updates, file system modifications, state changes | 27 | | Environmental Data | Sensor readings, system metrics, resource usage | 28 | | Response Analysis | API responses, query results, computation outputs | 29 | | Time-based Events | Deadlines reached, scheduled tasks completed | 30 | 31 | ## How Are the Results Appended? 32 | 33 | After performing an action, the framework follows these steps in order: 34 | 35 | 1. **Parse the action** to identify the function(s) to call and the argument(s) to use. 36 | 2. **Execute the action.** 37 | 3. **Append the result** as an **Observation**. 38 | 39 | --- 40 | We've now learned the Agent's Thought-Action-Observation Cycle. 41 | 42 | If some aspects still seem a bit blurry, don't worry—we'll revisit and deepen these concepts in future Units. 43 | 44 | Now, it's time to put your knowledge into practice by coding your very first Agent! 45 | -------------------------------------------------------------------------------- /units/en/unit2/introduction.mdx: -------------------------------------------------------------------------------- 1 | # Introduction to Agentic Frameworks 2 | 3 | Thumbnail 4 | 5 | Welcome to this second unit, where **we'll explore different agentic frameworks** that can be used to build powerful agentic applications. 6 | 7 | We will study: 8 | 9 | - In Unit 2.1: [smolagents](https://huggingface.co/docs/smolagents/en/index) 10 | - In Unit 2.2: [LlamaIndex](https://www.llamaindex.ai/) 11 | - In Unit 2.3: [LangGraph](https://www.langchain.com/langgraph) 12 | 13 | Let's dive in! 🕵 14 | 15 | ## When to Use an Agentic Framework 16 | 17 | An agentic framework is **not always needed when building an application around LLMs**. They provide flexibility in the workflow to efficiently solve a specific task, but they're not always necessary. 18 | 19 | Sometimes, **predefined workflows are sufficient** to fulfill user requests, and there is no real need for an agentic framework. If the approach to build an agent is simple, like a chain of prompts, using plain code may be enough. The advantage is that the developer will have **full control and understanding of their system without abstractions**. 20 | 21 | However, when the workflow becomes more complex, such as letting an LLM call functions or using multiple agents, these abstractions start to become helpful. 22 | 23 | Considering these ideas, we can already identify the need for some features: 24 | 25 | * An *LLM engine* that powers the system. 26 | * A *list of tools* the agent can access. 27 | * A *parser* for extracting tool calls from the LLM output. 28 | * A *system prompt* synced with the parser. 29 | * A *memory system*. 30 | * *Error logging and retry mechanisms* to control LLM mistakes. 31 | 32 | We'll explore how these topics are resolved in various frameworks, including `smolagents`, `LlamaIndex`, and `LangGraph`. 33 | 34 | ## Agentic Frameworks Units 35 | 36 | | Framework | Description | Unit Author | 37 | |------------|----------------|----------------| 38 | | [smolagents](./smolagents/introduction) | Agents framework developed by Hugging Face. | Sergio Paniego - [HF](https://huggingface.co/sergiopaniego) - [X](https://x.com/sergiopaniego) - [Linkedin](https://www.linkedin.com/in/sergio-paniego-blanco) | 39 | | [Llama-Index](./llama-index/introduction) | End-to-end tooling to ship a context-augmented AI agent to production | David Berenstein - [HF](https://huggingface.co/davidberenstein1957) - [X](https://x.com/davidberenstei) - [Linkedin](https://www.linkedin.com/in/davidberenstein) | 40 | | [LangGraph](./langgraph/introduction) | Agents allowing stateful orchestration of agents | Joffrey THOMAS - [HF](https://huggingface.co/Jofthomas) - [X](https://x.com/Jthmas404) - [Linkedin](https://www.linkedin.com/in/joffrey-thomas) | 41 | --------------------------------------------------------------------------------