逐日AI微信小程序
30 天从前端工程师到 Agent 工程师
第 1 周 · D1🔒 锁定约 6 小时

LLM API 基础:messages/roles、token、流式、temperature;Agent 到底是什么

从 messages/roles、token、流式和 temperature 出发,搞清楚大模型 API 在做什么,以及 Agent 比聊天多了哪几样东西。

今日目标 0/3

登录后可以勾选并保存进度。

从 messages/roles、token、流式和 temperature 出发,搞清楚大模型 API 在做什么,以及 Agent 比聊天多了哪几样东西。

登录并关联后阅读全文

请先登录网页,并在账户页关联微信小程序账号。关联后每天可免费阅读 1 篇;额外文章需在小程序看广告解锁。

小程序码

微信扫码打开「逐日AI」,进入相同课程和章节,选择看广告解锁,完成后刷新本页。

面试题库

  • 什么是 token 和上下文窗口?它们如何影响 Agent 的设计?What are tokens and the context window, and how do they shape agent design?
    国内高频海外高频基础#llm-basics#context

    🔒 解锁本章后查看答题要点。

  • messages 里的 system / user / assistant 三种角色各起什么作用?为什么要有 system?What do the system / user / assistant roles do, and why does system exist?
    国内高频海外高频基础#llm-basics#prompt

    🔒 解锁本章后查看答题要点。

  • 为什么 LLM 应用几乎都用流式输出?SSE 和 WebSocket 该怎么选?Why do LLM apps stream responses, and how do you choose between SSE and WebSockets?
    国内高频海外高频进阶#streaming#protocol

    🔒 解锁本章后查看答题要点。

  • 聊天机器人和 Agent 的本质区别是什么?What fundamentally separates a chatbot from an agent?
    国内高频海外高频基础#agent-basics

    🔒 解锁本章后查看答题要点。

  • temperature 和 top_p 分别控制什么?什么场景用 0,什么场景用 0.7?What do temperature and top_p control, and when would you use 0 versus 0.7?
    海外高频基础#llm-basics#sampling

    🔒 解锁本章后查看答题要点。

  • 流式回复到一半网络断了,前端和后端各要做什么?EventSource 的自动重连能用上吗?A streaming reply is cut off mid-way. What do the client and server each do, and can EventSource auto-reconnect help?
    国内高频海外高频进阶#streaming#reliability#sse

    🔒 解锁本章后查看答题要点。

  • 用户切到后台或者直接关掉网页,回来后怎么恢复那条还在生成的回复?The user backgrounds the app or closes the tab. How do you restore a reply that was still being generated?
    国内高频海外高频深入#streaming#reliability#architecture

    🔒 解锁本章后查看答题要点。

  • 断线重试之后,怎么保证不重复计费、也不重复执行已经做过的工具调用?After a retry, how do you avoid double billing and re-executing tool calls that already ran?
    国内高频海外高频深入#reliability#tools#idempotency

    🔒 解锁本章后查看答题要点。

  • 移动端 App 里的对话,网络频繁抖动,你会怎么设计重连策略?On mobile, connectivity is flaky. How would you design the reconnection strategy for a chat feature?
    国内高频海外高频进阶#reliability#mobile#streaming

    🔒 解锁本章后查看答题要点。

  • 用户主动点「停止生成」和网络意外断开,在服务端看起来都是连接没了,怎么区分处理?A user pressing stop and a dropped connection both look like a closed connection server-side. How do you tell them apart?
    国内高频海外高频深入#streaming#reliability#ux

    🔒 解锁本章后查看答题要点。

评论