逐日AI

面试题库

共 328 题,当前筛选 1 题。

标签
还有 235 个标签
#idempotency5#streaming5#structured-output5#chunking4#deployment4#distributed-systems4#rag4#system-prompt4#tool-calling4#client3#embeddings3#failure-modes3#ingestion3#mcp3#message-bus3#operations3#progressive-disclosure3#ranking3#timeline3#agent-loop2#agentic-rag2#agents-sdk2#caching2#citations2#code-review2#communication2#concurrency2#consistency2#context2#context-engineering2#context-rot2#cost-control2#data-modeling2#grounding2#hybrid-search2#langgraph2#latency2#model-migration2#model-routing2#multi-agent2#ordering2#pipeline-design2#prompt-basics2#prompt-engineering2#protocol2#rate-limiting2#react2#redis-streams2#responses-api2#retrieval2#retrieval-quality2#routing2#runtime2#sse2#state-management2#statelessness2#subagents2#system-design2#tool-design2#tooling2#tracing2#trade-offs2#transport2#vector-database2#versioning2#workflow2#abstention1#access-control1#agent-design1#agent-quality1#altitude1#approvals1#async1#async-task1#atomicity1#attention-budget1#auth1#av-sync1#behavioral1#bm251#candidate-selection1#capacity-planning1#chain-of-thought1#checkpointing1#ci1#citation-verification1#claude-code1#cli-design1#cloud1#compaction1#compression1#content-hash1#context-compression1#context-window1#contextual-retrieval1#cost-optimization1#cross-model1#dag1#data-quality1#database1#decision-making1#decomposition1#degradation1#deliberate-practice1#design1#diagnostics1#dimensions1#distribution1#docker1#documentation1#engineering-judgement1#engineering-tradeoffs1#eval1#event-driven1#fallback1#fan-out1#ffmpeg1#forking1#four-elements1#framework-design1#framework-selection1#golden-set1#hallucination1#handoffs1#headless1#hnsw1#hybrid1#hyde1#image-generation1#incremental-recompute1#incremental-sync1#index-maintenance1#index-routing1#indexing1#information-retrieval1#instruction-hierarchy1#intent-routing1#interrupt-merge1#interview-prep1#invalidation1#isolation1#ivfflat1#just-in-time1#knowledge-organization1#lease1#llm-as-judge1#llm-output-quality1#long-context1#loop-guard1#media-pipeline1#metadata1#metrics1#mobile1#model-selection1#multi-tenancy1#multimodal1#nodejs1#orchestration1#pagination1#parent-child1#pdf-parsing1#performance1#permissions1#persistence1#pgvector1#pipeline-reliability1#portfolio1#prioritization1#production-readiness1#prompt-assembly1#prompt-caching1#prompt-injection1#prompt-limits1#prompt-techniques1#prompt-template1#prompt-versioning1#provider-abstraction1#quality-check1#quantization1#query-transformation1#quiet-hours1#rank-fusion1#reasoning1#recall1#redis1#reflection1#refusal1#reporting1#reproducibility1#rerank1#retrieval-failure1#retrieval-metrics1#retry1#retry-semantics1#retry-strategy1#review1#rollback1#rrf1#sandbox1#sandboxing1#scalability1#scheduling1#schema-design1#scoping1#scripts1#secrets-management1#self-assessment1#self-presentation1#self-reflection1#service-architecture1#session-management1#sessions1#sharding1#skill-authoring1#skill-description1#skills1#spec1#state-machine1#stateless1#stopping-criteria1#subtitles1#task-graph1#team-governance1#testing1#tool-budget1#tool-execution1#tool-naming1#tools1#tts1#tuning1#ux1#validation1#vector-index1#verification1#workflow-engine1

Claude 高效使用:从对话到 Claude Code

D1 提示词进阶与 Claude 的「性格」:system prompt、XML 标签、让模型先思考、结构化输出

  • 为什么用 XML 标签组织长提示词对 Claude 特别有效?和用 Markdown 分段比有什么区别?Why does organizing long prompts with XML tags work so well for Claude, and how does it differ from using Markdown sections?
    国内高频海外高频进阶#xml-tags#long-context

    分析过程 · 先想清楚再作答

    1. 题眼在「为什么」。只答「官方推荐」等于没答;要能从「模型如何分辨内容边界」这个角度解释。
    2. 拆法:长提示词的核心风险是不同性质的内容(材料、指令、示例)混在一起,模型分错边界就会把材料里的句子当指令执行、或把示例当成事实。成对的标签给每一段一个明确的起止和名字,模型分辨边界的准确率更高,也能在回答里精确引用「哪一段」。
    3. 与 Markdown 的区别:Markdown 靠标题和围栏分段,但没有显式的结束标记;当贴进去的材料本身含 Markdown(比如一份 README)时容易串位。XML 标签成对、可嵌套、名字自定义,材料越杂优势越大。
    4. 补一条工程习惯:标签名前后一致,指令放在材料之后,回答时要求引用标签名。三到六个顶层标签是常态,不要过度包装。
    5. 可预期的追问:标签名有没有固定词表?没有,模型看的是结构和语义,但同一个提示词内要一致;另一个追问是「材料本身含 XML 怎么办」——换一个不会撞的标签名,或用 CDATA 式的转义说明。

    How to reason about it · think before answering

    1. The keyword is why. Citing the docs is not an answer; explain it in terms of how the model detects content boundaries.
    2. Breakdown: the core risk in a long prompt is mixing material, instructions, and examples. Paired tags give each part an explicit start, end, and name, so the model separates them reliably and can reference a specific section in its reply.
    3. Versus Markdown: headings and fences delimit but have no explicit closing marker, so pasted material that itself contains Markdown breaks the structure. XML tags are paired, nestable, and freely named, and the benefit grows with messier input.
    4. Add the engineering habits: consistent tag names, instructions after the material, and asking the model to cite tags in its answer. Three to six top-level tags is typical.
    5. Follow-ups: is there a fixed tag vocabulary? No — structure and semantics matter, consistency within one prompt matters. What if the material contains XML? Pick non-colliding names.

    答题要点

    • 长提示词的风险是材料、指令、示例混在一起;成对标签给每段明确的起止和名字
    • 模型分辨边界更准,也能在回答里精确引用某一段
    • Markdown 没有显式结束标记,材料含 Markdown 时会串位;XML 标签成对、可嵌套、可自定义
    • 习惯:标签名一致、指令放材料之后、要求引用标签、顶层标签三到六个

    Key points

    • Long prompts mix material, instructions, and examples; paired tags give each an explicit boundary and name
    • Boundary detection becomes reliable and the model can cite a specific section
    • Markdown has no closing marker and breaks when pasted material contains Markdown; XML tags are paired, nestable, and freely named
    • Habits: consistent names, instructions after material, ask for tag citations, three to six top-level tags