面试题库
共 328 题,当前筛选 1 题。
课程全部30 天从前端工程师到 Agent 工程师5 天提示词工程零基础Claude 高效使用:从对话到 Claude CodeCodex 与 OpenAI Agents SDK 高效使用7 天 MCP:把工具接进任何 Agent7 天 Agent Skills:把经验做成可复用能力5 天上下文工程14 天 RAG:从检索到可信回答14 天用 Agent 搭一条 AI 短剧生产线
标签
全部#sampling1#architecture8#cost4#multi-agent4#agent-skills3#context3#evaluation3#llm-basics3#pipeline-design3#security3#system-design3#tool-design3
还有 125 个标签收起标签
#abstention2#agent-loop2#behavioral2#claude-md2#coding-agent2#consistency2#context-engineering2#context-window2#distributed-systems2#embeddings2#framework-design2#interview-prep2#interview-process2#mcp2#memory2#observability2#orchestration2#prompt-engineering2#provider-abstraction2#rag2#resume2#scalability2#scheduling2#skills2#sse2#streaming2#structured-output2#tool-calling2#agent-basics1#agent-design1#agent-sdk1#agentic-rag1#agents-md1#api-design1#async-task1#auth1#backoff1#bi-encoder1#build-vs-buy1#career1#chunking1#communication1#concurrency1#configuration1#consistent-hashing1#content-safety1#context-assembly1#context-management1#coreference1#cost-accounting1#cost-analysis1#cross-encoder1#data-quality1#encoding1#failure-analysis1#fairness1#few-shot1#ffmpeg1#fine-tuning1#frontend1#global-market1#golden-set1#hooks1#human-in-the-loop1#hybrid-search1#image-generation1#ingestion1#json-schema1#jwt1#langgraph1#long-context1#long-term-memory1#maintenance1#mcp-basics1#media-pipeline1#mental-model1#message-bus1#messages-api1#migration1#model-routing1#moderation1#modularity1#multi-turn1#normalisation1#openai1#operations1#ordering1#overlap1#primitives1#prioritization1#priority-queue1#proactive-messaging1#product-engineering1#project-storytelling1#prompt1#prompt-basics1#prompt-bloat1#prompt-design1#prompt-injection1#prompt-surface1#prompt-techniques1#prompting1#protocol1#query-rewriting1#rag-basics1#rate-limiting1#redis-streams1#reliability1#responses-api1#retrieval1#routing1#schema-validation1#scripts1#server-design1#sharding1#similarity1#skill-design1#stakeholder-communication1#star1#state-machine1#system-prompt1#test-set1#token-budget1#tts1#workflow-engine1
30 天从前端工程师到 Agent 工程师
D1 LLM API 基础:messages/roles、token、流式、temperature;Agent 到底是什么
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分析过程 · 先想清楚再作答
- 先说清两者作用在同一个地方——模型算出的下一个 token 概率分布——但作用方式不同,这是区分度所在。
- temperature 是缩放整个分布:越低越尖锐、越确定;top_p 是截断——只保留累计概率达到 p 的那一小圈候选再采样。
- 由此推出实践建议:一般只调其中一个,两个同时调会互相干扰,出了问题分不清是谁造成的。
- 选值不按「创意程度」凭感觉,按「这一步的输出要不要可复现」来定:工具参数、分类判断、结构化输出必须可复现,用 0。
- 补一句 Agent 视角:Agent 的规划与工具调用环节几乎都用低温,只有最终面向用户的自然语言回复才考虑调高。
How to reason about it · think before answering
- Establish that both act on the same next-token distribution but in different ways — that is the discriminator.
- temperature rescales the whole distribution; top_p truncates it to the smallest set reaching cumulative probability p.
- Hence the practical rule: tune one, not both, or you cannot attribute a regression.
- Choose by reproducibility, not by vibes: tool arguments, classification and structured output must be reproducible, so use 0.
- Add the agent angle: planning and tool-calling steps stay cold; only the final user-facing prose warrants higher values.
答题要点
- temperature 缩放下一个 token 的概率分布:越低越确定,越高越随机
- top_p 只从累计概率达到 p 的候选里采样,是另一种截断随机性的方式;一般只调其中一个
- 结构化输出、工具参数、分类判断用 0 或接近 0,保证可复现
- 创意写作、头脑风暴用 0.7–1.0;生产 Agent 的规划步骤通常也偏低温
Key points
- temperature rescales the next-token distribution: lower is more deterministic, higher more random
- top_p samples only from the smallest set whose cumulative probability reaches p; tune one, not both
- Use ~0 for structured output, tool arguments and classification to keep results reproducible
- Use 0.7–1.0 for creative writing; planning steps in production agents usually stay low