[{"data":1,"prerenderedAt":1412},["ShallowReactive",2],{"page-\u002Fprompt-engineering\u002F15-working-with-claude":3},{"id":4,"title":5,"body":6,"description":1405,"extension":1406,"meta":1407,"navigation":52,"path":1408,"seo":1409,"stem":1410,"__hash__":1411},"content\u002Fprompt-engineering\u002F15-working-with-claude.md","15 — Working with Claude",{"type":7,"value":8,"toc":1394},"minimark",[9,13,18,151,215,219,295,407,411,743,747,868,872,900,956,960,1069,1073,1177,1181,1239,1270,1274,1390],[10,11,5],"h1",{"id":12},"_15-working-with-claude",[14,15,17],"h2",{"id":16},"system-prompt-structure","System Prompt Structure",[19,20,23],"code-wrapper",{"filename":21,"language":22},"claude_system_prompt.md","markdown",[24,25,29],"pre",{"className":26,"code":27,"language":22,"meta":28,"style":28},"language-markdown shiki shiki-themes github-light github-dark","You are a technical support assistant for a home networking equipment\ncompany.\n\n## Your role\nHelp customers diagnose and resolve connectivity issues with their\nrouters and mesh systems. You have access to a knowledge base search\ntool and a device-diagnostics tool.\n\n## Tone\nPatient, plain-language, no jargon unless the customer uses it first.\nAssume the customer is not technical unless they demonstrate otherwise.\n\n## Constraints\n- Never ask for or record a customer's Wi-Fi password.\n- If a fix requires a factory reset, warn the customer this erases their\n  saved settings before proceeding.\n- If the issue appears to be a hardware fault, direct the customer to\n  the returns process rather than attempting further troubleshooting.\n","",[30,31,32,41,47,54,61,67,73,79,84,90,96,102,107,113,123,131,137,145],"code",{"__ignoreMap":28},[33,34,37],"span",{"class":35,"line":36},"line",1,[33,38,40],{"class":39},"ssxIu","You are a technical support assistant for a home networking equipment\n",[33,42,44],{"class":35,"line":43},2,[33,45,46],{"class":39},"company.\n",[33,48,50],{"class":35,"line":49},3,[33,51,53],{"emptyLinePlaceholder":52},true,"\n",[33,55,57],{"class":35,"line":56},4,[33,58,60],{"class":59},"sXvq9","## Your role\n",[33,62,64],{"class":35,"line":63},5,[33,65,66],{"class":39},"Help customers diagnose and resolve connectivity issues with their\n",[33,68,70],{"class":35,"line":69},6,[33,71,72],{"class":39},"routers and mesh systems. You have access to a knowledge base search\n",[33,74,76],{"class":35,"line":75},7,[33,77,78],{"class":39},"tool and a device-diagnostics tool.\n",[33,80,82],{"class":35,"line":81},8,[33,83,53],{"emptyLinePlaceholder":52},[33,85,87],{"class":35,"line":86},9,[33,88,89],{"class":59},"## Tone\n",[33,91,93],{"class":35,"line":92},10,[33,94,95],{"class":39},"Patient, plain-language, no jargon unless the customer uses it first.\n",[33,97,99],{"class":35,"line":98},11,[33,100,101],{"class":39},"Assume the customer is not technical unless they demonstrate otherwise.\n",[33,103,105],{"class":35,"line":104},12,[33,106,53],{"emptyLinePlaceholder":52},[33,108,110],{"class":35,"line":109},13,[33,111,112],{"class":59},"## Constraints\n",[33,114,116,120],{"class":35,"line":115},14,[33,117,119],{"class":118},"sCrzJ","-",[33,121,122],{"class":39}," Never ask for or record a customer's Wi-Fi password.\n",[33,124,126,128],{"class":35,"line":125},15,[33,127,119],{"class":118},[33,129,130],{"class":39}," If a fix requires a factory reset, warn the customer this erases their\n",[33,132,134],{"class":35,"line":133},16,[33,135,136],{"class":39},"  saved settings before proceeding.\n",[33,138,140,142],{"class":35,"line":139},17,[33,141,119],{"class":118},[33,143,144],{"class":39}," If the issue appears to be a hardware fault, direct the customer to\n",[33,146,148],{"class":35,"line":147},18,[33,149,150],{"class":39},"  the returns process rather than attempting further troubleshooting.\n",[19,152,155],{"filename":153,"language":154},"claude_system_structure.py","python",[24,156,159],{"className":157,"code":158,"language":154,"meta":28,"style":28},"language-python shiki shiki-themes github-light github-dark","# Claude models treat the system prompt as a DISTINCT, HIGH-PRIORITY channel.\n# Instructions there are weighted more heavily and held more consistently across\n# a long conversation than the same instruction placed in the first user turn.\n\n# Anthropic's own guidance: structure a Claude system prompt with clearly\n# delineated sections (headers) rather than one undifferentiated paragraph.\n# This is Chapter 2's anatomy-of-a-prompt (role, context, task, constraints)\n# rendered as explicit headers — Claude responds well to visibly segmented structure.\n\n# The segmentation also makes the system prompt easier for a HUMAN to review and\n# maintain, which matters as much in practice as the model-facing effect.\n",[30,160,161,167,172,177,181,186,191,196,201,205,210],{"__ignoreMap":28},[33,162,163],{"class":35,"line":36},[33,164,166],{"class":165},"sdCPZ","# Claude models treat the system prompt as a DISTINCT, HIGH-PRIORITY channel.\n",[33,168,169],{"class":35,"line":43},[33,170,171],{"class":165},"# Instructions there are weighted more heavily and held more consistently across\n",[33,173,174],{"class":35,"line":49},[33,175,176],{"class":165},"# a long conversation than the same instruction placed in the first user turn.\n",[33,178,179],{"class":35,"line":56},[33,180,53],{"emptyLinePlaceholder":52},[33,182,183],{"class":35,"line":63},[33,184,185],{"class":165},"# Anthropic's own guidance: structure a Claude system prompt with clearly\n",[33,187,188],{"class":35,"line":69},[33,189,190],{"class":165},"# delineated sections (headers) rather than one undifferentiated paragraph.\n",[33,192,193],{"class":35,"line":75},[33,194,195],{"class":165},"# This is Chapter 2's anatomy-of-a-prompt (role, context, task, constraints)\n",[33,197,198],{"class":35,"line":81},[33,199,200],{"class":165},"# rendered as explicit headers — Claude responds well to visibly segmented structure.\n",[33,202,203],{"class":35,"line":86},[33,204,53],{"emptyLinePlaceholder":52},[33,206,207],{"class":35,"line":92},[33,208,209],{"class":165},"# The segmentation also makes the system prompt easier for a HUMAN to review and\n",[33,211,212],{"class":35,"line":98},[33,213,214],{"class":165},"# maintain, which matters as much in practice as the model-facing effect.\n",[14,216,218],{"id":217},"xml-tags-for-structuring-input","XML Tags for Structuring Input",[19,220,222],{"filename":221,"language":22},"claude_xml_tags.md",[24,223,225],{"className":26,"code":224,"language":22,"meta":28,"style":28},"\u003Cdocument>\n{{full text of the contract}}\n\u003C\u002Fdocument>\n\n\u003Cinstructions>\nReview the document above for any clause that obligates the company to\nexclusive dealing with a single supplier. Quote the exact clause text if\nfound.\n\u003C\u002Finstructions>\n\n\u003Coutput_format>\nRespond with either \"No exclusivity clause found\" or a direct quote of\nthe relevant clause, followed by its section number.\n\u003C\u002Foutput_format>\n",[30,226,227,232,237,242,246,251,256,261,266,271,275,280,285,290],{"__ignoreMap":28},[33,228,229],{"class":35,"line":36},[33,230,231],{"class":39},"\u003Cdocument>\n",[33,233,234],{"class":35,"line":43},[33,235,236],{"class":39},"{{full text of the contract}}\n",[33,238,239],{"class":35,"line":49},[33,240,241],{"class":39},"\u003C\u002Fdocument>\n",[33,243,244],{"class":35,"line":56},[33,245,53],{"emptyLinePlaceholder":52},[33,247,248],{"class":35,"line":63},[33,249,250],{"class":39},"\u003Cinstructions>\n",[33,252,253],{"class":35,"line":69},[33,254,255],{"class":39},"Review the document above for any clause that obligates the company to\n",[33,257,258],{"class":35,"line":75},[33,259,260],{"class":39},"exclusive dealing with a single supplier. Quote the exact clause text if\n",[33,262,263],{"class":35,"line":81},[33,264,265],{"class":39},"found.\n",[33,267,268],{"class":35,"line":86},[33,269,270],{"class":39},"\u003C\u002Finstructions>\n",[33,272,273],{"class":35,"line":92},[33,274,53],{"emptyLinePlaceholder":52},[33,276,277],{"class":35,"line":98},[33,278,279],{"class":39},"\u003Coutput_format>\n",[33,281,282],{"class":35,"line":104},[33,283,284],{"class":39},"Respond with either \"No exclusivity clause found\" or a direct quote of\n",[33,286,287],{"class":35,"line":109},[33,288,289],{"class":39},"the relevant clause, followed by its section number.\n",[33,291,292],{"class":35,"line":115},[33,293,294],{"class":39},"\u003C\u002Foutput_format>\n",[19,296,298],{"filename":297,"language":154},"xml_tags_explained.py",[24,299,301],{"className":157,"code":300,"language":154,"meta":28,"style":28},"# The SINGLE most distinctive Claude-specific convention: heavy use of XML tags\n# to delimit sections — document content, examples, instructions, expected output.\n\n# Claude was extensively trained on XML-tagged data of this shape, making it\n# UNUSUALLY RELIABLE at respecting tag boundaries. Referring back to \"the document\"\n# later in a long prompt reliably resolves to the content inside \u003Cdocument> tags,\n# rather than getting confused with instruction text nearby.\n\n# This matters MOST where Chapter 8's context-management concerns are sharpest:\n# long prompts mixing reference material, instructions, and examples benefit\n# disproportionately from tags that make the boundary between \"content to act on\"\n# and \"instructions about how to act\" unambiguous.\n\n# Tag names are NOT a fixed vocabulary. \u003Cdocument>, \u003Cinstructions>, \u003Cexamples>,\n# \u003Coutput_format>, \u003Cthinking> are common, but a well-named custom tag works as\n# well: \u003Ccustomer_email>, \u003Cprevious_turn_summary>, \u003Cuntrusted_content>\n\n# ANTI-PATTERN: over-tagging a short prompt\n# A two-sentence request wrapped in five nested XML tags is harder for a human\n# to review and doesn't help the model, which handles short unambiguous prompts\n# fine without scaffolding. Reserve heavy tagging for long\u002Fcomplex prompts.\n",[30,302,303,308,313,317,322,327,332,337,341,346,351,356,361,365,370,375,380,384,389,395,401],{"__ignoreMap":28},[33,304,305],{"class":35,"line":36},[33,306,307],{"class":165},"# The SINGLE most distinctive Claude-specific convention: heavy use of XML tags\n",[33,309,310],{"class":35,"line":43},[33,311,312],{"class":165},"# to delimit sections — document content, examples, instructions, expected output.\n",[33,314,315],{"class":35,"line":49},[33,316,53],{"emptyLinePlaceholder":52},[33,318,319],{"class":35,"line":56},[33,320,321],{"class":165},"# Claude was extensively trained on XML-tagged data of this shape, making it\n",[33,323,324],{"class":35,"line":63},[33,325,326],{"class":165},"# UNUSUALLY RELIABLE at respecting tag boundaries. Referring back to \"the document\"\n",[33,328,329],{"class":35,"line":69},[33,330,331],{"class":165},"# later in a long prompt reliably resolves to the content inside \u003Cdocument> tags,\n",[33,333,334],{"class":35,"line":75},[33,335,336],{"class":165},"# rather than getting confused with instruction text nearby.\n",[33,338,339],{"class":35,"line":81},[33,340,53],{"emptyLinePlaceholder":52},[33,342,343],{"class":35,"line":86},[33,344,345],{"class":165},"# This matters MOST where Chapter 8's context-management concerns are sharpest:\n",[33,347,348],{"class":35,"line":92},[33,349,350],{"class":165},"# long prompts mixing reference material, instructions, and examples benefit\n",[33,352,353],{"class":35,"line":98},[33,354,355],{"class":165},"# disproportionately from tags that make the boundary between \"content to act on\"\n",[33,357,358],{"class":35,"line":104},[33,359,360],{"class":165},"# and \"instructions about how to act\" unambiguous.\n",[33,362,363],{"class":35,"line":109},[33,364,53],{"emptyLinePlaceholder":52},[33,366,367],{"class":35,"line":115},[33,368,369],{"class":165},"# Tag names are NOT a fixed vocabulary. \u003Cdocument>, \u003Cinstructions>, \u003Cexamples>,\n",[33,371,372],{"class":35,"line":125},[33,373,374],{"class":165},"# \u003Coutput_format>, \u003Cthinking> are common, but a well-named custom tag works as\n",[33,376,377],{"class":35,"line":133},[33,378,379],{"class":165},"# well: \u003Ccustomer_email>, \u003Cprevious_turn_summary>, \u003Cuntrusted_content>\n",[33,381,382],{"class":35,"line":139},[33,383,53],{"emptyLinePlaceholder":52},[33,385,386],{"class":35,"line":147},[33,387,388],{"class":165},"# ANTI-PATTERN: over-tagging a short prompt\n",[33,390,392],{"class":35,"line":391},19,[33,393,394],{"class":165},"# A two-sentence request wrapped in five nested XML tags is harder for a human\n",[33,396,398],{"class":35,"line":397},20,[33,399,400],{"class":165},"# to review and doesn't help the model, which handles short unambiguous prompts\n",[33,402,404],{"class":35,"line":403},21,[33,405,406],{"class":165},"# fine without scaffolding. Reserve heavy tagging for long\u002Fcomplex prompts.\n",[14,408,410],{"id":409},"extended-thinking","Extended Thinking",[19,412,414],{"filename":413,"language":154},"claude_extended_thinking.py",[24,415,417],{"className":157,"code":416,"language":154,"meta":28,"style":28},"from anthropic import Anthropic\n\nclient = Anthropic()\n\n# Extended thinking is a DEDICATED reasoning phase with its own token budget,\n# distinct from prompted CoT (Chapter 5). The model reasons in a separate channel\n# BEFORE producing its user-facing answer.\n\nresponse = client.messages.create(\n    model=\"claude-opus-5\",\n    max_tokens=4096,\n    thinking={\n        \"type\": \"enabled\",\n        \"budget_tokens\": 2048,  # the model uses up to 2048 tokens for reasoning\n    },\n    messages=[{\n        \"role\": \"user\",\n        \"content\": \"Given these three vendor contracts, which has the most \"\n                   \"unfavorable termination clause, and why?\",\n    }],\n)\n\n# Response contains SEPARATE blocks:\nthinking_block = next(b for b in response.content if b.type == \"thinking\")\nanswer_block = next(b for b in response.content if b.type == \"text\")\n\n# Practical difference from prompted CoT:\n# - Extended thinking has its OWN allocated budget, not \"more tokens in the same response\"\n# - More effective for genuinely hard multi-step problems without hand-crafted \"think step by step\"\n# - The model was specifically TRAINED to use this budget well\n# - Does NOT replace earlier techniques wholesale: for tasks needing a SPECIFIC reasoning\n#   structure (Chapter 5's worked examples, Chapter 11's verification), explicitly prompt\n#   that structure — even alongside extended thinking\n# - Extended thinking raises the CEILING on unaided reasoning; it doesn't substitute for\n#   telling the model HOW to reason when you know a specific approach works better\n",[30,418,419,434,438,449,453,458,463,468,472,482,496,509,519,532,548,553,563,575,585,592,597,602,607,613,653,684,689,695,701,707,713,719,725,731,737],{"__ignoreMap":28},[33,420,421,425,428,431],{"class":35,"line":36},[33,422,424],{"class":423},"svdQ7","from",[33,426,427],{"class":39}," anthropic ",[33,429,430],{"class":423},"import",[33,432,433],{"class":39}," Anthropic\n",[33,435,436],{"class":35,"line":43},[33,437,53],{"emptyLinePlaceholder":52},[33,439,440,443,446],{"class":35,"line":49},[33,441,442],{"class":39},"client ",[33,444,445],{"class":423},"=",[33,447,448],{"class":39}," Anthropic()\n",[33,450,451],{"class":35,"line":56},[33,452,53],{"emptyLinePlaceholder":52},[33,454,455],{"class":35,"line":63},[33,456,457],{"class":165},"# Extended thinking is a DEDICATED reasoning phase with its own token budget,\n",[33,459,460],{"class":35,"line":69},[33,461,462],{"class":165},"# distinct from prompted CoT (Chapter 5). The model reasons in a separate channel\n",[33,464,465],{"class":35,"line":75},[33,466,467],{"class":165},"# BEFORE producing its user-facing answer.\n",[33,469,470],{"class":35,"line":81},[33,471,53],{"emptyLinePlaceholder":52},[33,473,474,477,479],{"class":35,"line":86},[33,475,476],{"class":39},"response ",[33,478,445],{"class":423},[33,480,481],{"class":39}," client.messages.create(\n",[33,483,484,487,489,493],{"class":35,"line":92},[33,485,486],{"class":118},"    model",[33,488,445],{"class":423},[33,490,492],{"class":491},"sJ6F3","\"claude-opus-5\"",[33,494,495],{"class":39},",\n",[33,497,498,501,503,507],{"class":35,"line":98},[33,499,500],{"class":118},"    max_tokens",[33,502,445],{"class":423},[33,504,506],{"class":505},"snvgF","4096",[33,508,495],{"class":39},[33,510,511,514,516],{"class":35,"line":104},[33,512,513],{"class":118},"    thinking",[33,515,445],{"class":423},[33,517,518],{"class":39},"{\n",[33,520,521,524,527,530],{"class":35,"line":109},[33,522,523],{"class":491},"        \"type\"",[33,525,526],{"class":39},": ",[33,528,529],{"class":491},"\"enabled\"",[33,531,495],{"class":39},[33,533,534,537,539,542,545],{"class":35,"line":115},[33,535,536],{"class":491},"        \"budget_tokens\"",[33,538,526],{"class":39},[33,540,541],{"class":505},"2048",[33,543,544],{"class":39},",  ",[33,546,547],{"class":165},"# the model uses up to 2048 tokens for reasoning\n",[33,549,550],{"class":35,"line":125},[33,551,552],{"class":39},"    },\n",[33,554,555,558,560],{"class":35,"line":133},[33,556,557],{"class":118},"    messages",[33,559,445],{"class":423},[33,561,562],{"class":39},"[{\n",[33,564,565,568,570,573],{"class":35,"line":139},[33,566,567],{"class":491},"        \"role\"",[33,569,526],{"class":39},[33,571,572],{"class":491},"\"user\"",[33,574,495],{"class":39},[33,576,577,580,582],{"class":35,"line":147},[33,578,579],{"class":491},"        \"content\"",[33,581,526],{"class":39},[33,583,584],{"class":491},"\"Given these three vendor contracts, which has the most \"\n",[33,586,587,590],{"class":35,"line":391},[33,588,589],{"class":491},"                   \"unfavorable termination clause, and why?\"",[33,591,495],{"class":39},[33,593,594],{"class":35,"line":397},[33,595,596],{"class":39},"    }],\n",[33,598,599],{"class":35,"line":403},[33,600,601],{"class":39},")\n",[33,603,605],{"class":35,"line":604},22,[33,606,53],{"emptyLinePlaceholder":52},[33,608,610],{"class":35,"line":609},23,[33,611,612],{"class":165},"# Response contains SEPARATE blocks:\n",[33,614,616,619,621,624,627,630,633,636,639,642,645,648,651],{"class":35,"line":615},24,[33,617,618],{"class":39},"thinking_block ",[33,620,445],{"class":423},[33,622,623],{"class":505}," next",[33,625,626],{"class":39},"(b ",[33,628,629],{"class":423},"for",[33,631,632],{"class":39}," b ",[33,634,635],{"class":423},"in",[33,637,638],{"class":39}," response.content ",[33,640,641],{"class":423},"if",[33,643,644],{"class":39}," b.type ",[33,646,647],{"class":423},"==",[33,649,650],{"class":491}," \"thinking\"",[33,652,601],{"class":39},[33,654,656,659,661,663,665,667,669,671,673,675,677,679,682],{"class":35,"line":655},25,[33,657,658],{"class":39},"answer_block ",[33,660,445],{"class":423},[33,662,623],{"class":505},[33,664,626],{"class":39},[33,666,629],{"class":423},[33,668,632],{"class":39},[33,670,635],{"class":423},[33,672,638],{"class":39},[33,674,641],{"class":423},[33,676,644],{"class":39},[33,678,647],{"class":423},[33,680,681],{"class":491}," \"text\"",[33,683,601],{"class":39},[33,685,687],{"class":35,"line":686},26,[33,688,53],{"emptyLinePlaceholder":52},[33,690,692],{"class":35,"line":691},27,[33,693,694],{"class":165},"# Practical difference from prompted CoT:\n",[33,696,698],{"class":35,"line":697},28,[33,699,700],{"class":165},"# - Extended thinking has its OWN allocated budget, not \"more tokens in the same response\"\n",[33,702,704],{"class":35,"line":703},29,[33,705,706],{"class":165},"# - More effective for genuinely hard multi-step problems without hand-crafted \"think step by step\"\n",[33,708,710],{"class":35,"line":709},30,[33,711,712],{"class":165},"# - The model was specifically TRAINED to use this budget well\n",[33,714,716],{"class":35,"line":715},31,[33,717,718],{"class":165},"# - Does NOT replace earlier techniques wholesale: for tasks needing a SPECIFIC reasoning\n",[33,720,722],{"class":35,"line":721},32,[33,723,724],{"class":165},"#   structure (Chapter 5's worked examples, Chapter 11's verification), explicitly prompt\n",[33,726,728],{"class":35,"line":727},33,[33,729,730],{"class":165},"#   that structure — even alongside extended thinking\n",[33,732,734],{"class":35,"line":733},34,[33,735,736],{"class":165},"# - Extended thinking raises the CEILING on unaided reasoning; it doesn't substitute for\n",[33,738,740],{"class":35,"line":739},35,[33,741,742],{"class":165},"#   telling the model HOW to reason when you know a specific approach works better\n",[14,744,746],{"id":745},"literal-instruction-following","Literal Instruction-Following",[19,748,750],{"filename":749,"language":154},"claude_literalness.py",[24,751,753],{"className":157,"code":752,"language":154,"meta":28,"style":28},"# Claude tends to follow instructions quite LITERALLY — including instructions a\n# human would read as implicitly negotiable. This cuts both ways:\n\n# ADVANTAGE: a precisely-worded constraint is unusually reliable\nGOOD_CONSTRAINT = \"\"\"\nNever include a call-to-action, sign-off, or closing pleasantry in your\nresponse. End immediately after the last substantive sentence.\n\"\"\"\n# Claude follows this exactly. A vaguer instruction (\"keep it brief\") leaves\n# more room for the model's own judgment about what counts as \"brief.\"\n\n# DANGER: an overly narrow or poorly-scoped instruction produces exactly the\n# narrow, poorly-scoped behavior you asked for, not what you intended\nBAD_CONSTRAINT = \"Never use the word 'error'\"\n# Taken literally → awkward circumlocutions: \"the operation did not complete as expected\"\n# State the INTENT behind the constraint, not just the constraint itself.\n\n# WHEN A LITERAL READING COULD GO SOMEWHERE YOU DON'T WANT:\n# Instead of: \"Never use the word 'error'\"\n# Use: \"Describe failures in user-friendly terms. Instead of 'error', use phrases\n# like 'something went wrong' or 'this action couldn't be completed.'\"\n",[30,754,755,760,765,769,774,785,790,795,800,805,810,814,819,824,834,839,844,848,853,858,863],{"__ignoreMap":28},[33,756,757],{"class":35,"line":36},[33,758,759],{"class":165},"# Claude tends to follow instructions quite LITERALLY — including instructions a\n",[33,761,762],{"class":35,"line":43},[33,763,764],{"class":165},"# human would read as implicitly negotiable. This cuts both ways:\n",[33,766,767],{"class":35,"line":49},[33,768,53],{"emptyLinePlaceholder":52},[33,770,771],{"class":35,"line":56},[33,772,773],{"class":165},"# ADVANTAGE: a precisely-worded constraint is unusually reliable\n",[33,775,776,779,782],{"class":35,"line":63},[33,777,778],{"class":505},"GOOD_CONSTRAINT",[33,780,781],{"class":423}," =",[33,783,784],{"class":491}," \"\"\"\n",[33,786,787],{"class":35,"line":69},[33,788,789],{"class":491},"Never include a call-to-action, sign-off, or closing pleasantry in your\n",[33,791,792],{"class":35,"line":75},[33,793,794],{"class":491},"response. End immediately after the last substantive sentence.\n",[33,796,797],{"class":35,"line":81},[33,798,799],{"class":491},"\"\"\"\n",[33,801,802],{"class":35,"line":86},[33,803,804],{"class":165},"# Claude follows this exactly. A vaguer instruction (\"keep it brief\") leaves\n",[33,806,807],{"class":35,"line":92},[33,808,809],{"class":165},"# more room for the model's own judgment about what counts as \"brief.\"\n",[33,811,812],{"class":35,"line":98},[33,813,53],{"emptyLinePlaceholder":52},[33,815,816],{"class":35,"line":104},[33,817,818],{"class":165},"# DANGER: an overly narrow or poorly-scoped instruction produces exactly the\n",[33,820,821],{"class":35,"line":109},[33,822,823],{"class":165},"# narrow, poorly-scoped behavior you asked for, not what you intended\n",[33,825,826,829,831],{"class":35,"line":115},[33,827,828],{"class":505},"BAD_CONSTRAINT",[33,830,781],{"class":423},[33,832,833],{"class":491}," \"Never use the word 'error'\"\n",[33,835,836],{"class":35,"line":125},[33,837,838],{"class":165},"# Taken literally → awkward circumlocutions: \"the operation did not complete as expected\"\n",[33,840,841],{"class":35,"line":133},[33,842,843],{"class":165},"# State the INTENT behind the constraint, not just the constraint itself.\n",[33,845,846],{"class":35,"line":139},[33,847,53],{"emptyLinePlaceholder":52},[33,849,850],{"class":35,"line":147},[33,851,852],{"class":165},"# WHEN A LITERAL READING COULD GO SOMEWHERE YOU DON'T WANT:\n",[33,854,855],{"class":35,"line":391},[33,856,857],{"class":165},"# Instead of: \"Never use the word 'error'\"\n",[33,859,860],{"class":35,"line":397},[33,861,862],{"class":165},"# Use: \"Describe failures in user-friendly terms. Instead of 'error', use phrases\n",[33,864,865],{"class":35,"line":403},[33,866,867],{"class":165},"# like 'something went wrong' or 'this action couldn't be completed.'\"\n",[14,869,871],{"id":870},"encouraging-pushback","Encouraging Pushback",[19,873,875],{"filename":874,"language":22},"claude_pushback.md",[24,876,878],{"className":26,"code":877,"language":22,"meta":28,"style":28},"If any part of this task seems ambiguous, based on a mistaken premise,\nor likely to produce a worse outcome than an alternative approach, say\nso explicitly before proceeding rather than making a silent assumption\nand continuing.\n",[30,879,880,885,890,895],{"__ignoreMap":28},[33,881,882],{"class":35,"line":36},[33,883,884],{"class":39},"If any part of this task seems ambiguous, based on a mistaken premise,\n",[33,886,887],{"class":35,"line":43},[33,888,889],{"class":39},"or likely to produce a worse outcome than an alternative approach, say\n",[33,891,892],{"class":35,"line":49},[33,893,894],{"class":39},"so explicitly before proceeding rather than making a silent assumption\n",[33,896,897],{"class":35,"line":56},[33,898,899],{"class":39},"and continuing.\n",[19,901,903],{"filename":902,"language":154},"pushback_rationale.py",[24,904,906],{"className":157,"code":905,"language":154,"meta":28,"style":28},"# Claude models are trained to be willing to disagree, flag concerns, or decline\n# a request outright when something in the prompt seems mistaken, harmful, or\n# underspecified. Prompting that EXPLICITLY INVITES this surfaces more of it.\n\n# A system prompt that only asks for compliance (\"complete the following task\")\n# implicitly DISCOURAGES the model from raising a concern, even when it has one —\n# raising it wasn't modeled as an acceptable response shape.\n\n# Explicitly authorizing pushback measurably changes how often a model exercises it.\n# This connects directly to Chapter 11's honest uncertainty reporting.\n",[30,907,908,913,918,923,927,932,937,942,946,951],{"__ignoreMap":28},[33,909,910],{"class":35,"line":36},[33,911,912],{"class":165},"# Claude models are trained to be willing to disagree, flag concerns, or decline\n",[33,914,915],{"class":35,"line":43},[33,916,917],{"class":165},"# a request outright when something in the prompt seems mistaken, harmful, or\n",[33,919,920],{"class":35,"line":49},[33,921,922],{"class":165},"# underspecified. Prompting that EXPLICITLY INVITES this surfaces more of it.\n",[33,924,925],{"class":35,"line":56},[33,926,53],{"emptyLinePlaceholder":52},[33,928,929],{"class":35,"line":63},[33,930,931],{"class":165},"# A system prompt that only asks for compliance (\"complete the following task\")\n",[33,933,934],{"class":35,"line":69},[33,935,936],{"class":165},"# implicitly DISCOURAGES the model from raising a concern, even when it has one —\n",[33,938,939],{"class":35,"line":75},[33,940,941],{"class":165},"# raising it wasn't modeled as an acceptable response shape.\n",[33,943,944],{"class":35,"line":81},[33,945,53],{"emptyLinePlaceholder":52},[33,947,948],{"class":35,"line":86},[33,949,950],{"class":165},"# Explicitly authorizing pushback measurably changes how often a model exercises it.\n",[33,952,953],{"class":35,"line":92},[33,954,955],{"class":165},"# This connects directly to Chapter 11's honest uncertainty reporting.\n",[14,957,959],{"id":958},"tips-tricks","💡 Tips & Tricks",[19,961,963],{"filename":962,"language":154},"tips.py",[24,964,966],{"className":157,"code":965,"language":154,"meta":28,"style":28},"# [Idiom] Use closing tags that echo the opening tag name exactly\n# (\u003Cdocument>...\u003C\u002Fdocument>, NOT \u003Cdocument>...\u003C\u002Fend>). Mismatched or vague\n# closing tags are more likely to be misread as content rather than structure.\n\n# [Structure] When a prompt needs the model to reference multiple distinct pieces\n# of content, give each its own uniquely-named tag (\u003Cdocument_1>, \u003Cdocument_2>)\n# rather than repeating a generic tag. This lets you unambiguously ask\n# \"compare \u003Cdocument_1> and \u003Cdocument_2>\" later in the same prompt.\n\n# [Debug] If a Claude response ignores a constraint you're sure you wrote clearly,\n# check whether it's buried in the middle of a long undifferentiated system prompt\n# rather than its own clearly labeled section. Literalness doesn't help if the\n# instruction gets lost in unstructured prose first.\n\n# [Performance] For genuinely hard reasoning tasks, try extended thinking with a\n# meaningful token budget BEFORE reaching for an elaborate hand-crafted CoT prompt.\n# It's often the lower-effort first attempt; reserve hand-crafted reasoning\n# scaffolds for cases where you know a specific structure outperforms.\n\n# [Idiom] Explicitly inviting pushback (\"tell me if this seems wrong\") costs one\n# sentence and measurably increases how often a real problem gets surfaced.\n",[30,967,968,973,978,983,987,992,997,1002,1007,1011,1016,1021,1026,1031,1035,1040,1045,1050,1055,1059,1064],{"__ignoreMap":28},[33,969,970],{"class":35,"line":36},[33,971,972],{"class":165},"# [Idiom] Use closing tags that echo the opening tag name exactly\n",[33,974,975],{"class":35,"line":43},[33,976,977],{"class":165},"# (\u003Cdocument>...\u003C\u002Fdocument>, NOT \u003Cdocument>...\u003C\u002Fend>). Mismatched or vague\n",[33,979,980],{"class":35,"line":49},[33,981,982],{"class":165},"# closing tags are more likely to be misread as content rather than structure.\n",[33,984,985],{"class":35,"line":56},[33,986,53],{"emptyLinePlaceholder":52},[33,988,989],{"class":35,"line":63},[33,990,991],{"class":165},"# [Structure] When a prompt needs the model to reference multiple distinct pieces\n",[33,993,994],{"class":35,"line":69},[33,995,996],{"class":165},"# of content, give each its own uniquely-named tag (\u003Cdocument_1>, \u003Cdocument_2>)\n",[33,998,999],{"class":35,"line":75},[33,1000,1001],{"class":165},"# rather than repeating a generic tag. This lets you unambiguously ask\n",[33,1003,1004],{"class":35,"line":81},[33,1005,1006],{"class":165},"# \"compare \u003Cdocument_1> and \u003Cdocument_2>\" later in the same prompt.\n",[33,1008,1009],{"class":35,"line":86},[33,1010,53],{"emptyLinePlaceholder":52},[33,1012,1013],{"class":35,"line":92},[33,1014,1015],{"class":165},"# [Debug] If a Claude response ignores a constraint you're sure you wrote clearly,\n",[33,1017,1018],{"class":35,"line":98},[33,1019,1020],{"class":165},"# check whether it's buried in the middle of a long undifferentiated system prompt\n",[33,1022,1023],{"class":35,"line":104},[33,1024,1025],{"class":165},"# rather than its own clearly labeled section. Literalness doesn't help if the\n",[33,1027,1028],{"class":35,"line":109},[33,1029,1030],{"class":165},"# instruction gets lost in unstructured prose first.\n",[33,1032,1033],{"class":35,"line":115},[33,1034,53],{"emptyLinePlaceholder":52},[33,1036,1037],{"class":35,"line":125},[33,1038,1039],{"class":165},"# [Performance] For genuinely hard reasoning tasks, try extended thinking with a\n",[33,1041,1042],{"class":35,"line":133},[33,1043,1044],{"class":165},"# meaningful token budget BEFORE reaching for an elaborate hand-crafted CoT prompt.\n",[33,1046,1047],{"class":35,"line":139},[33,1048,1049],{"class":165},"# It's often the lower-effort first attempt; reserve hand-crafted reasoning\n",[33,1051,1052],{"class":35,"line":147},[33,1053,1054],{"class":165},"# scaffolds for cases where you know a specific structure outperforms.\n",[33,1056,1057],{"class":35,"line":391},[33,1058,53],{"emptyLinePlaceholder":52},[33,1060,1061],{"class":35,"line":397},[33,1062,1063],{"class":165},"# [Idiom] Explicitly inviting pushback (\"tell me if this seems wrong\") costs one\n",[33,1065,1066],{"class":35,"line":403},[33,1067,1068],{"class":165},"# sentence and measurably increases how often a real problem gets surfaced.\n",[14,1070,1072],{"id":1071},"️-edge-cases-gotchas","⚠️ Edge Cases & Gotchas",[19,1074,1076],{"filename":1075,"language":154},"edge_cases.py",[24,1077,1079],{"className":157,"code":1078,"language":154,"meta":28,"style":28},"# [Gotcha] Over-tagging a short prompt adds structure with no benefit and some\n# cost. A two-sentence request in five nested tags is harder for a human to\n# review and doesn't help the model. Reserve heavy tagging for long\u002Fcomplex prompts.\n\n# [Gotcha] A system prompt section that CONTRADICTS itself across headers gets\n# applied inconsistently. \"## Tone: always be concise\" + \"## Constraints: always\n# include a lengthy mandatory disclaimer\" are in tension. Which wins varies by turn.\n# Resolve contradictions EXPLICITLY rather than trusting the model to prioritize.\n\n# [Gotcha] Extended thinking budget is NOT a substitute for a well-scoped task.\n# Giving a large thinking budget to an underspecified prompt (Chapter 4) produces\n# more elaborate reasoning toward the WRONG goal, not a correct answer.\n\n# [Gotcha] Claude's literalness can produce a technically-compliant but absurd\n# result on a badly-scoped constraint. \"never use the word 'error'\" → \"the operation\n# did not complete as expected.\" State the intent, not just the prohibition.\n\n# [Gotcha] Prefilled or tag-anchored output can silently fail if the model's\n# response doesn't close the tag you expected — particularly under a strict\n# max_tokens cutoff. A response truncated mid-tag will fail naive parsing.\n",[30,1080,1081,1086,1091,1096,1100,1105,1110,1115,1120,1124,1129,1134,1139,1143,1148,1153,1158,1162,1167,1172],{"__ignoreMap":28},[33,1082,1083],{"class":35,"line":36},[33,1084,1085],{"class":165},"# [Gotcha] Over-tagging a short prompt adds structure with no benefit and some\n",[33,1087,1088],{"class":35,"line":43},[33,1089,1090],{"class":165},"# cost. A two-sentence request in five nested tags is harder for a human to\n",[33,1092,1093],{"class":35,"line":49},[33,1094,1095],{"class":165},"# review and doesn't help the model. Reserve heavy tagging for long\u002Fcomplex prompts.\n",[33,1097,1098],{"class":35,"line":56},[33,1099,53],{"emptyLinePlaceholder":52},[33,1101,1102],{"class":35,"line":63},[33,1103,1104],{"class":165},"# [Gotcha] A system prompt section that CONTRADICTS itself across headers gets\n",[33,1106,1107],{"class":35,"line":69},[33,1108,1109],{"class":165},"# applied inconsistently. \"## Tone: always be concise\" + \"## Constraints: always\n",[33,1111,1112],{"class":35,"line":75},[33,1113,1114],{"class":165},"# include a lengthy mandatory disclaimer\" are in tension. Which wins varies by turn.\n",[33,1116,1117],{"class":35,"line":81},[33,1118,1119],{"class":165},"# Resolve contradictions EXPLICITLY rather than trusting the model to prioritize.\n",[33,1121,1122],{"class":35,"line":86},[33,1123,53],{"emptyLinePlaceholder":52},[33,1125,1126],{"class":35,"line":92},[33,1127,1128],{"class":165},"# [Gotcha] Extended thinking budget is NOT a substitute for a well-scoped task.\n",[33,1130,1131],{"class":35,"line":98},[33,1132,1133],{"class":165},"# Giving a large thinking budget to an underspecified prompt (Chapter 4) produces\n",[33,1135,1136],{"class":35,"line":104},[33,1137,1138],{"class":165},"# more elaborate reasoning toward the WRONG goal, not a correct answer.\n",[33,1140,1141],{"class":35,"line":109},[33,1142,53],{"emptyLinePlaceholder":52},[33,1144,1145],{"class":35,"line":115},[33,1146,1147],{"class":165},"# [Gotcha] Claude's literalness can produce a technically-compliant but absurd\n",[33,1149,1150],{"class":35,"line":125},[33,1151,1152],{"class":165},"# result on a badly-scoped constraint. \"never use the word 'error'\" → \"the operation\n",[33,1154,1155],{"class":35,"line":133},[33,1156,1157],{"class":165},"# did not complete as expected.\" State the intent, not just the prohibition.\n",[33,1159,1160],{"class":35,"line":139},[33,1161,53],{"emptyLinePlaceholder":52},[33,1163,1164],{"class":35,"line":147},[33,1165,1166],{"class":165},"# [Gotcha] Prefilled or tag-anchored output can silently fail if the model's\n",[33,1168,1169],{"class":35,"line":391},[33,1170,1171],{"class":165},"# response doesn't close the tag you expected — particularly under a strict\n",[33,1173,1174],{"class":35,"line":397},[33,1175,1176],{"class":165},"# max_tokens cutoff. A response truncated mid-tag will fail naive parsing.\n",[14,1178,1180],{"id":1179},"spot-the-bug","🧠 Spot the Bug",[19,1182,1184],{"filename":1183,"language":22},"spot_the_bug.md",[24,1185,1187],{"className":26,"code":1186,"language":22,"meta":28,"style":28},"You are a helpful assistant.\n\nBe concise. Also, always provide a thorough, detailed explanation of\nyour reasoning before giving the final answer, covering all\nconsiderations exhaustively.\n\n\u003Cdocument>\n{{50-page policy manual}}\n\u003C\u002Fdocument>\n\nSummarize the key points.\n",[30,1188,1189,1194,1198,1203,1208,1213,1217,1221,1226,1230,1234],{"__ignoreMap":28},[33,1190,1191],{"class":35,"line":36},[33,1192,1193],{"class":39},"You are a helpful assistant.\n",[33,1195,1196],{"class":35,"line":43},[33,1197,53],{"emptyLinePlaceholder":52},[33,1199,1200],{"class":35,"line":49},[33,1201,1202],{"class":39},"Be concise. Also, always provide a thorough, detailed explanation of\n",[33,1204,1205],{"class":35,"line":56},[33,1206,1207],{"class":39},"your reasoning before giving the final answer, covering all\n",[33,1209,1210],{"class":35,"line":63},[33,1211,1212],{"class":39},"considerations exhaustively.\n",[33,1214,1215],{"class":35,"line":69},[33,1216,53],{"emptyLinePlaceholder":52},[33,1218,1219],{"class":35,"line":75},[33,1220,231],{"class":39},[33,1222,1223],{"class":35,"line":81},[33,1224,1225],{"class":39},"{{50-page policy manual}}\n",[33,1227,1228],{"class":35,"line":86},[33,1229,241],{"class":39},[33,1231,1232],{"class":35,"line":92},[33,1233,53],{"emptyLinePlaceholder":52},[33,1235,1236],{"class":35,"line":98},[33,1237,1238],{"class":39},"Summarize the key points.\n",[1240,1241,1242,1246,1250,1267],"details",{},[1243,1244,1245],"summary",{},"Answer",[1247,1248,1249],"p",{},"Two compounding problems:",[1251,1252,1253,1261],"ol",{},[1254,1255,1256,1260],"li",{},[1257,1258,1259],"strong",{},"Self-contradicting instructions",": \"be concise\" and \"always provide a thorough, detailed explanation covering all considerations exhaustively\" ask for opposite response shapes with no resolution rule. Which instruction the model leans on is inconsistent per call.",[1254,1262,1263,1266],{},[1257,1264,1265],{},"No structural separation between instructions and document content",": \"be concise,\" the reasoning instruction, and \"summarize the key points\" are flat prose sitting directly next to a 50-page document with no tags or headers distinguishing \"things to do\" from \"content to act on.\" This is exactly the long, undifferentiated-context scenario where Claude's XML-tagging convention earns its keep — and it's conspicuously absent here.",[1247,1268,1269],{},"The fix: resolve the contradiction explicitly (decide: concise or exhaustive, or specify which applies to which part — e.g., \"exhaustive reasoning, then a concise 3-bullet summary\") and wrap the document and instructions in separate named tags so a 50-page reference document isn't competing with instructions for the same undifferentiated attention.",[14,1271,1273],{"id":1272},"key-takeaways","Key Takeaways",[19,1275,1277],{"filename":1276,"language":154},"key_takeaways.py",[24,1278,1280],{"className":157,"code":1279,"language":154,"meta":28,"style":28},"\"\"\"\nWorking with Claude — model-specific conventions.\n\"\"\"\n\n# 1. Model-specific conventions are a LAYER on top of model-agnostic fundamentals\n#    (clarity, structure, decomposition). A Claude-optimized prompt that's vague\n#    or contradictory still fails for the same reasons any vague prompt fails.\n\n# 2. Claude system prompts respond well to explicit, clearly-labeled sections\n#    (role, tone, constraints) rather than one undifferentiated paragraph.\n\n# 3. XML tags are Claude's most distinctive convention — reliably delimit content\n#    from instructions, especially in long prompts. Enable clean prefill\u002Fparsing\n#    boundaries. Don't over-tag short prompts.\n\n# 4. Extended thinking is a dedicated reasoning phase with its own token budget,\n#    distinct from prompted CoT. Raises the ceiling on unaided reasoning but\n#    doesn't replace a specific reasoning structure you know works better.\n\n# 5. Claude follows instructions LITERALLY — precise constraints are unusually\n#    reliable, but poorly-scoped constraints fail in exactly the narrow way written.\n#    Explicitly inviting pushback measurably increases how often a real problem\n#    surfaces rather than being silently worked around.\n",[30,1281,1282,1286,1291,1295,1299,1304,1309,1314,1318,1323,1328,1332,1337,1342,1347,1351,1356,1361,1366,1370,1375,1380,1385],{"__ignoreMap":28},[33,1283,1284],{"class":35,"line":36},[33,1285,799],{"class":491},[33,1287,1288],{"class":35,"line":43},[33,1289,1290],{"class":491},"Working with Claude — model-specific conventions.\n",[33,1292,1293],{"class":35,"line":49},[33,1294,799],{"class":491},[33,1296,1297],{"class":35,"line":56},[33,1298,53],{"emptyLinePlaceholder":52},[33,1300,1301],{"class":35,"line":63},[33,1302,1303],{"class":165},"# 1. Model-specific conventions are a LAYER on top of model-agnostic fundamentals\n",[33,1305,1306],{"class":35,"line":69},[33,1307,1308],{"class":165},"#    (clarity, structure, decomposition). A Claude-optimized prompt that's vague\n",[33,1310,1311],{"class":35,"line":75},[33,1312,1313],{"class":165},"#    or contradictory still fails for the same reasons any vague prompt fails.\n",[33,1315,1316],{"class":35,"line":81},[33,1317,53],{"emptyLinePlaceholder":52},[33,1319,1320],{"class":35,"line":86},[33,1321,1322],{"class":165},"# 2. Claude system prompts respond well to explicit, clearly-labeled sections\n",[33,1324,1325],{"class":35,"line":92},[33,1326,1327],{"class":165},"#    (role, tone, constraints) rather than one undifferentiated paragraph.\n",[33,1329,1330],{"class":35,"line":98},[33,1331,53],{"emptyLinePlaceholder":52},[33,1333,1334],{"class":35,"line":104},[33,1335,1336],{"class":165},"# 3. XML tags are Claude's most distinctive convention — reliably delimit content\n",[33,1338,1339],{"class":35,"line":109},[33,1340,1341],{"class":165},"#    from instructions, especially in long prompts. Enable clean prefill\u002Fparsing\n",[33,1343,1344],{"class":35,"line":115},[33,1345,1346],{"class":165},"#    boundaries. Don't over-tag short prompts.\n",[33,1348,1349],{"class":35,"line":125},[33,1350,53],{"emptyLinePlaceholder":52},[33,1352,1353],{"class":35,"line":133},[33,1354,1355],{"class":165},"# 4. Extended thinking is a dedicated reasoning phase with its own token budget,\n",[33,1357,1358],{"class":35,"line":139},[33,1359,1360],{"class":165},"#    distinct from prompted CoT. Raises the ceiling on unaided reasoning but\n",[33,1362,1363],{"class":35,"line":147},[33,1364,1365],{"class":165},"#    doesn't replace a specific reasoning structure you know works better.\n",[33,1367,1368],{"class":35,"line":391},[33,1369,53],{"emptyLinePlaceholder":52},[33,1371,1372],{"class":35,"line":397},[33,1373,1374],{"class":165},"# 5. Claude follows instructions LITERALLY — precise constraints are unusually\n",[33,1376,1377],{"class":35,"line":403},[33,1378,1379],{"class":165},"#    reliable, but poorly-scoped constraints fail in exactly the narrow way written.\n",[33,1381,1382],{"class":35,"line":604},[33,1383,1384],{"class":165},"#    Explicitly inviting pushback measurably increases how often a real problem\n",[33,1386,1387],{"class":35,"line":609},[33,1388,1389],{"class":165},"#    surfaces rather than being silently worked around.\n",[1391,1392,1393],"style",{},"html pre.shiki code .ssxIu, html code.shiki .ssxIu{--shiki-default:#24292E;--shiki-github-dark:#E1E4E8}html pre.shiki code .sXvq9, html code.shiki .sXvq9{--shiki-default:#005CC5;--shiki-default-font-weight:bold;--shiki-github-dark:#79B8FF;--shiki-github-dark-font-weight:bold}html pre.shiki code .sCrzJ, html code.shiki .sCrzJ{--shiki-default:#E36209;--shiki-github-dark:#FFAB70}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .github-dark .shiki span {color: var(--shiki-github-dark);background: var(--shiki-github-dark-bg);font-style: var(--shiki-github-dark-font-style);font-weight: var(--shiki-github-dark-font-weight);text-decoration: var(--shiki-github-dark-text-decoration);}html.github-dark .shiki span {color: var(--shiki-github-dark);background: var(--shiki-github-dark-bg);font-style: var(--shiki-github-dark-font-style);font-weight: var(--shiki-github-dark-font-weight);text-decoration: var(--shiki-github-dark-text-decoration);}html pre.shiki code .sdCPZ, html code.shiki .sdCPZ{--shiki-default:#6A737D;--shiki-github-dark:#6A737D}html pre.shiki code .svdQ7, html code.shiki .svdQ7{--shiki-default:#D73A49;--shiki-github-dark:#F97583}html pre.shiki code .sJ6F3, html code.shiki .sJ6F3{--shiki-default:#032F62;--shiki-github-dark:#9ECBFF}html pre.shiki code .snvgF, html code.shiki .snvgF{--shiki-default:#005CC5;--shiki-github-dark:#79B8FF}",{"title":28,"searchDepth":43,"depth":43,"links":1395},[1396,1397,1398,1399,1400,1401,1402,1403,1404],{"id":16,"depth":43,"text":17},{"id":217,"depth":43,"text":218},{"id":409,"depth":43,"text":410},{"id":745,"depth":43,"text":746},{"id":870,"depth":43,"text":871},{"id":958,"depth":43,"text":959},{"id":1071,"depth":43,"text":1072},{"id":1179,"depth":43,"text":1180},{"id":1272,"depth":43,"text":1273},"Claude-specific conventions — system prompt structure, XML tags for input delimiting, extended thinking mode, literal instruction-following, and pushback encouragement. Code-first reference for mid-to-senior engineers.","md",{},"\u002Fprompt-engineering\u002F15-working-with-claude",{"title":5,"description":1405},"prompt-engineering\u002F15-working-with-claude","kBVJq6zZVJ1qC3yZ1wBIlSgicqGgtfG0uY_xj924RoQ",1789924651072]