面试题库
共 328 题,当前筛选 1 题。
课程全部30 天从前端工程师到 Agent 工程师5 天提示词工程零基础Claude 高效使用:从对话到 Claude CodeCodex 与 OpenAI Agents SDK 高效使用7 天 MCP:把工具接进任何 Agent7 天 Agent Skills:把经验做成可复用能力5 天上下文工程14 天 RAG:从检索到可信回答14 天用 Agent 搭一条 AI 短剧生产线
标签
全部#prompt1#architecture4#multi-agent4#llm-basics3#security3#agent-loop2#behavioral2#cost2#distributed-systems2#framework-design2#interview-prep2#interview-process2
还有 48 个标签收起标签
#memory2#orchestration2#rag2#resume2#scalability2#sse2#streaming2#system-design2#tool-calling2#agent-basics1#agent-design1#api-design1#auth1#career1#communication1#concurrency1#configuration1#consistent-hashing1#context1#context-engineering1#context-management1#frontend1#global-market1#hybrid-search1#jwt1#langgraph1#long-term-memory1#mcp1#message-bus1#model-routing1#operations1#prioritization1#proactive-messaging1#product-engineering1#prompt-engineering1#prompt-injection1#protocol1#rate-limiting1#redis-streams1#reliability1#retrieval1#routing1#sampling1#scheduling1#sharding1#star1#state-machine1#tool-design1
30 天从前端工程师到 Agent 工程师
D1 LLM API 基础:messages/roles、token、流式、temperature;Agent 到底是什么
messages 里的 system / user / assistant 三种角色各起什么作用?为什么要有 system?What do the system / user / assistant roles do, and why does system exist?
国内高频海外高频基础#llm-basics#prompt分析过程 · 先想清楚再作答
- 题眼在后半句「为什么要有 system」——前半句是送分,后半句才是区分度所在。
- 先说清三者构成一段可被模型续写的完整文本,角色是给这段文本打的结构化标记。
- 再回答「为什么」:如果把规则写进 user,它就只是对话里的一句话,会被后续几十轮对话稀释;放进 system 才能保持稳定权重,且便于产品侧统一管控、单独灰度。
- 补一条生产视角:真实的 system prompt 通常是模板拼出来的——人设 + 工具说明 + 记忆片段 + 当前时间,而不是一个写死的字符串。
- 常见追问:能不能把 system 放在最后?可以但不推荐,多数模型对靠前的指令更敏感,且会破坏缓存前缀。
How to reason about it · think before answering
- The discriminating half is 'why does system exist'; the first half is a warm-up.
- Explain that the three roles are structural markers over one continuous text the model continues.
- Then the why: rules placed in user are just another turn and get diluted over dozens of turns; system keeps stable weight and can be governed centrally.
- Add production nuance: a real system prompt is templated — persona plus tool docs plus memory plus runtime facts.
- Likely follow-up: can system go last? Possible but unwise — models weight earlier instructions more and it breaks prompt-cache prefixes.
答题要点
- system 设定身份、边界与输出格式,通常放在最前面,权重高于普通对话
- user 是用户输入,assistant 是模型历史回复,两者交替构成对话记录
- 把规则放 system 而不是 user,是为了让规则不被后续对话冲淡,也便于产品统一管控
- 生产里 system prompt 往往由模板拼接:人设 + 工具说明 + 记忆 + 当前时间等动态信息
Key points
- system sets identity, constraints and output format; it sits first and carries more weight
- user is the human turn, assistant is the model's prior replies; they alternate
- Rules live in system so they are not diluted by later turns and can be controlled centrally
- In production the system prompt is templated: persona + tool docs + memory + runtime facts