640 [1].png

id: 5ee455eae5644e93b29cb8ba3fee67ba
mime: image/png
filename: 
created_time: 2025-11-28T16:55:40.236Z
updated_time: 2025-11-30T13:13:40.569Z
user_created_time: 2025-11-28T16:55:40.236Z
user_updated_time: 2025-11-30T13:13:40.569Z
file_extension: png
encryption_cipher_text: 
encryption_applied: 0
encryption_blob_encrypted: 0
size: 457996
is_shared: 0
share_id: 
master_key_id: 
user_data: 
blob_updated_time: 1764348940236
ocr_text: Introduction 6\nPrompt engineering 7\nLLM output configuration 8\nOutput length 8\nSampling controls 9\nTemperature 9\nTop-K and top-P 10\nPutting it all together 1\nPrompting techniques 3\nGeneral prompting / zero shot 13\nOne-shot & few-shot 15\nSystem, contextual and role prompting 18\nSystem prompting 19\nRole prompting pal\nContextual prompting 23\nStep-back prompting 25\nChain of Thought (CoT) 29\nSelf-consistency 32\nTree of Thoughts (ToT) 36\nReAct (reason & act) 37\nAutomatic Prompt Engineering 40\nCode prompting 42\nPrompts for writing code 42\nPrompts for explaining code 44\nPrompts for translating code 46\nPrompts for debugging and reviewing code 48\nWhat about multimodal prompting? 54\nBest Practices 54\nProvide examples 54\nDesign with simplicity 55\nBe specific about the output 56\nUse Instructions over Constraints 56\nControl the max token length 58\nUse variables in prompts 58\nExperiment with input formats and writing styles 59\nFor few-shot prompting with classification tasks, mix up the classes 59\nAdapt to model updates 60\nExperiment with output formats 60\nJSON Repair 61\nWorking with Schemas 62\nExperiment together with other prompt engineers 63\nCoT Best practices 64\nDocument the various prompt attempts 64\nSummary 66\nEndnotes 68
ocr_details: [{"words":[{"t":"Introduction","bb":[39,153,13,43],"bl":[39,153,33,33]},{"t":"6","bb":[870,880,18,33],"bl":[870,880,33,33]}]},{"words":[{"t":"Prompt","bb":[39,106,58,77],"bl":[39,106,73,73]},{"t":"engineering","bb":[113,222,57,78],"bl":[113,222,73,73]},{"t":"7","bb":[871,880,58,73],"bl":[871,880,73,73]}]},{"words":[{"t":"LLM","bb":[39,76,99,114],"bl":[39,76,114,114]},{"t":"output","bb":[83,145,100,118],"bl":[83,145,114,114]},{"t":"configuration","bb":[151,275,98,118],"bl":[151,275,114,114]},{"t":"8","bb":[870,880,99,114],"bl":[870,880,114,114]}]},{"words":[{"t":"Output","bb":[69,132,139,158],"bl":[69,132,154,154]},{"t":"length","bb":[138,193,138,158],"bl":[138,193,154,154]},{"t":"8","bb":[870,879,139,154],"bl":[870,879,154,154]}]},{"words":[{"t":"Sampling","bb":[69,151,178,199],"bl":[69,151,194,194]},{"t":"controls","bb":[157,230,179,195],"bl":[157,230,194,194]},{"t":"9","bb":[870,880,179,194],"bl":[870,880,194,194]}]},{"words":[{"t":"Temperature","bb":[100,214,216,243],"bl":[100,214,235,235]},{"t":"9","bb":[870,880,220,235],"bl":[870,880,235,235]}]},{"words":[{"t":"Top-K","bb":[100,154,261,279],"bl":[100,154,275,275]},{"t":"and","bb":[159,191,259,275],"bl":[159,191,275,275]},{"t":"top-P","bb":[198,249,261,279],"bl":[198,249,275,275]},{"t":"10","bb":[861,880,260,275],"bl":[861,880,275,275]}]},{"words":[{"t":"Putting","bb":[101,162,300,320],"bl":[101,162,316,316]},{"t":"it","bb":[169,179,300,316],"bl":[169,179,316,316]},{"t":"all","bb":[186,203,300,316],"bl":[186,203,316,316]},{"t":"together","bb":[210,287,300,320],"bl":[210,287,316,316]},{"t":"1","bb":[867,879,301,316],"bl":[867,879,316,316]}]},{"words":[{"t":"Prompting","bb":[39,134,340,361],"bl":[39,134,356,356]},{"t":"techniques","bb":[141,244,340,361],"bl":[141,244,356,357]},{"t":"3","bb":[862,880,341,357],"bl":[862,880,360,360]}]},{"words":[{"t":"General","bb":[69,138,381,397],"bl":[69,138,396,396]},{"t":"prompting","bb":[146,237,381,401],"bl":[146,237,396,396]},{"t":"/","bb":[243,250,382,396],"bl":[243,250,396,396]},{"t":"zero","bb":[255,293,385,397],"bl":[255,293,396,396]},{"t":"shot","bb":[300,338,381,397],"bl":[300,338,396,396]},{"t":"13","bb":[863,880,382,397],"bl":[863,880,396,396]}]},{"words":[{"t":"One-shot","bb":[69,154,421,437],"bl":[69,154,437,437]},{"t":"&","bb":[161,173,422,437],"bl":[161,173,437,437]},{"t":"few-shot","bb":[179,259,421,437],"bl":[179,259,437,437]},{"t":"15","bb":[863,880,423,437],"bl":[863,880,437,437]}]},{"words":[{"t":"System,","bb":[69,139,463,482],"bl":[69,139,478,479]},{"t":"contextual","bb":[146,239,462,478],"bl":[146,239,478,478]},{"t":"and","bb":[246,278,462,478],"bl":[246,278,478,478]},{"t":"role","bb":[286,318,462,478],"bl":[286,318,478,478]},{"t":"prompting","bb":[325,417,462,482],"bl":[325,417,478,478]},{"t":"18","bb":[863,879,463,478],"bl":[863,879,478,478]}]},{"words":[{"t":"System","bb":[100,164,503,522],"bl":[100,164,518,518]},{"t":"prompting","bb":[172,263,502,522],"bl":[172,263,518,518]},{"t":"19","bb":[863,880,503,518],"bl":[863,880,518,518]}]},{"words":[{"t":"Role","bb":[101,138,543,559],"bl":[101,138,558,558]},{"t":"prompting","bb":[145,236,543,563],"bl":[145,236,558,558]},{"t":"pal","bb":[863,879,544,558],"bl":[863,879,558,558]}]},{"words":[{"t":"Contextual","bb":[100,196,583,599],"bl":[100,196,599,599]},{"t":"prompting","bb":[203,295,584,604],"bl":[203,295,599,599]},{"t":"23","bb":[860,880,584,599],"bl":[860,880,599,599]}]},{"words":[{"t":"Step-back","bb":[68,160,625,645],"bl":[68,160,641,641]},{"t":"prompting","bb":[167,258,625,645],"bl":[167,258,641,641]},{"t":"25","bb":[859,879,626,641],"bl":[859,879,641,641]}]},{"words":[{"t":"Chain","bb":[68,118,665,681],"bl":[68,118,681,681]},{"t":"of","bb":[125,142,665,681],"bl":[125,142,681,681]},{"t":"Thought","bb":[148,223,665,685],"bl":[148,223,681,681]},{"t":"(CoT)","bb":[230,276,665,684],"bl":[230,276,681,681]},{"t":"29","bb":[859,879,666,681],"bl":[859,879,681,681]}]},{"words":[{"t":"Self-consistency","bb":[68,217,701,730],"bl":[68,217,722,722]},{"t":"32","bb":[859,879,707,722],"bl":[859,879,722,722]}]},{"words":[{"t":"Tree","bb":[67,105,747,762],"bl":[67,105,762,762]},{"t":"of","bb":[112,130,746,762],"bl":[112,130,762,762]},{"t":"Thoughts","bb":[135,220,746,767],"bl":[135,220,762,762]},{"t":"(ToT)","bb":[227,270,746,765],"bl":[227,270,762,762]},{"t":"36","bb":[858,879,747,762],"bl":[858,879,762,762]}]},{"words":[{"t":"ReAct","bb":[68,120,788,803],"bl":[68,120,802,802]},{"t":"(reason","bb":[127,193,786,805],"bl":[127,193,802,803]},{"t":"&","bb":[200,212,787,803],"bl":[200,212,803,803]},{"t":"act)","bb":[218,252,786,805],"bl":[218,252,803,803]},{"t":"37","bb":[860,879,787,803],"bl":[860,879,803,802]}]},{"words":[{"t":"Automatic","bb":[67,158,827,844],"bl":[67,158,843,843]},{"t":"Prompt","bb":[165,230,829,847],"bl":[165,230,843,843]},{"t":"Engineering","bb":[237,341,828,848],"bl":[237,341,843,843]},{"t":"40","bb":[855,879,828,844],"bl":[855,879,843,843]}]},{"words":[{"t":"Code","bb":[68,115,868,884],"bl":[68,115,884,884]},{"t":"prompting","bb":[122,213,868,888],"bl":[122,213,884,884]},{"t":"42","bb":[859,879,869,884],"bl":[859,879,884,884]}]},{"words":[{"t":"Prompts","bb":[99,173,909,928],"bl":[99,173,924,924]},{"t":"for","bb":[179,204,908,924],"bl":[179,204,924,924]},{"t":"writing","bb":[210,270,908,929],"bl":[210,270,924,924]},{"t":"code","bb":[276,321,908,924],"bl":[276,321,924,924]},{"t":"42","bb":[859,879,909,924],"bl":[859,879,924,924]}]},{"words":[{"t":"Prompts","bb":[99,173,950,969],"bl":[99,173,965,965]},{"t":"for","bb":[179,204,949,965],"bl":[179,204,965,965]},{"t":"explaining","bb":[211,300,949,970],"bl":[211,300,965,965]},{"t":"code","bb":[307,351,949,965],"bl":[307,351,965,965]},{"t":"44","bb":[857,879,950,965],"bl":[857,879,965,965]}]},{"words":[{"t":"Prompts","bb":[99,173,991,1010],"bl":[99,173,1006,1006]},{"t":"for","bb":[179,204,990,1006],"bl":[179,204,1006,1006]},{"t":"translating","bb":[210,305,990,1010],"bl":[210,305,1006,1006]},{"t":"code","bb":[312,356,990,1006],"bl":[312,356,1006,1006]},{"t":"46","bb":[858,879,991,1006],"bl":[858,879,1006,1006]}]},{"words":[{"t":"Prompts","bb":[99,173,1031,1050],"bl":[99,173,1046,1046]},{"t":"for","bb":[179,204,1030,1046],"bl":[179,204,1046,1046]},{"t":"debugging","bb":[211,306,1030,1050],"bl":[211,306,1046,1046]},{"t":"and","bb":[313,345,1030,1046],"bl":[313,345,1046,1046]},{"t":"reviewing","bb":[352,436,1030,1050],"bl":[352,436,1046,1046]},{"t":"code","bb":[443,487,1030,1046],"bl":[443,487,1046,1046]},{"t":"48","bb":[858,878,1031,1046],"bl":[858,878,1046,1046]}]},{"words":[{"t":"What","bb":[98,144,1071,1087],"bl":[98,144,1087,1087]},{"t":"about","bb":[150,202,1071,1087],"bl":[150,202,1087,1087]},{"t":"multimodal","bb":[209,306,1071,1087],"bl":[209,306,1087,1087]},{"t":"prompting?","bb":[313,415,1071,1091],"bl":[313,415,1087,1087]},{"t":"54","bb":[858,879,1072,1087],"bl":[858,879,1087,1087]}]},{"words":[{"t":"Best","bb":[37,77,1113,1128],"bl":[37,77,1128,1128]},{"t":"Practices","bb":[85,171,1111,1128],"bl":[85,171,1128,1128]},{"t":"54","bb":[857,879,1113,1128],"bl":[857,879,1128,1128]}]},{"words":[{"t":"Provide","bb":[68,134,1152,1168],"bl":[68,134,1168,1168]},{"t":"examples","bb":[140,225,1152,1172],"bl":[140,225,1168,1168]},{"t":"54","bb":[858,879,1153,1168],"bl":[858,879,1168,1168]}]},{"words":[{"t":"Design","bb":[68,128,1193,1213],"bl":[68,128,1208,1208]},{"t":"with","bb":[134,171,1193,1209],"bl":[134,171,1208,1208]},{"t":"simplicity","bb":[178,261,1193,1213],"bl":[178,261,1208,1208]},{"t":"55","bb":[858,879,1194,1209],"bl":[858,879,1209,1209]}]},{"words":[{"t":"Be","bb":[68,90,1234,1249],"bl":[68,90,1249,1249]},{"t":"specific","bb":[96,166,1232,1253],"bl":[96,166,1249,1249]},{"t":"about","bb":[172,224,1233,1249],"bl":[172,224,1249,1249]},{"t":"the","bb":[230,258,1233,1249],"bl":[230,258,1249,1249]},{"t":"output","bb":[264,323,1235,1253],"bl":[264,323,1249,1249]},{"t":"56","bb":[858,879,1234,1249],"bl":[858,879,1249,1249]}]},{"words":[{"t":"Use","bb":[68,101,1275,1289],"bl":[68,101,1289,1289]},{"t":"Instructions","bb":[108,212,1274,1289],"bl":[108,212,1289,1289]},{"t":"over","bb":[219,257,1278,1289],"bl":[219,257,1289,1289]},{"t":"Constraints","bb":[263,366,1273,1289],"bl":[263,366,1289,1289]},{"t":"56","bb":[858,879,1274,1289],"bl":[858,879,1289,1289]}]},{"words":[{"t":"Control","bb":[67,132,1314,1330],"bl":[67,132,1330,1330]},{"t":"the","bb":[139,168,1314,1330],"bl":[139,168,1330,1330]},{"t":"max","bb":[175,210,1319,1330],"bl":[175,210,1330,1330]},{"t":"token","bb":[217,266,1314,1330],"bl":[217,266,1330,1330]},{"t":"length","bb":[273,328,1314,1335],"bl":[273,328,1330,1330]},{"t":"58","bb":[858,878,1315,1330],"bl":[858,878,1330,1330]}]},{"words":[{"t":"Use","bb":[68,101,1356,1371],"bl":[68,101,1370,1371]},{"t":"variables","bb":[107,186,1354,1371],"bl":[107,186,1371,1371]},{"t":"in","bb":[193,207,1355,1370],"bl":[193,207,1371,1371]},{"t":"prompts","bb":[214,289,1357,1375],"bl":[214,289,1371,1371]},{"t":"58","bb":[858,878,1355,1371],"bl":[858,878,1371,1371]}]},{"words":[{"t":"Experiment","bb":[68,169,1395,1415],"bl":[68,169,1411,1411]},{"t":"with","bb":[175,211,1395,1411],"bl":[175,211,1411,1411]},{"t":"input","bb":[218,262,1395,1415],"bl":[218,262,1411,1411]},{"t":"formats","bb":[269,338,1395,1411],"bl":[269,338,1411,1411]},{"t":"and","bb":[344,376,1395,1411],"bl":[344,376,1411,1411]},{"t":"writing","bb":[383,442,1395,1416],"bl":[383,442,1411,1411]},{"t":"styles","bb":[449,501,1395,1415],"bl":[449,501,1411,1411]},{"t":"59","bb":[859,879,1396,1411],"bl":[859,879,1411,1411]}]},{"words":[{"t":"For","bb":[68,96,1437,1452],"bl":[68,96,1452,1452]},{"t":"few-shot","bb":[102,182,1435,1452],"bl":[102,182,1452,1452]},{"t":"prompting","bb":[189,280,1436,1456],"bl":[189,280,1452,1452]},{"t":"with","bb":[287,323,1436,1452],"bl":[287,323,1452,1452]},{"t":"classification","bb":[330,446,1435,1452],"bl":[330,446,1452,1452]},{"t":"tasks,","bb":[453,504,1436,1454],"bl":[453,504,1452,1453]},{"t":"mix","bb":[512,541,1436,1452],"bl":[512,541,1452,1452]},{"t":"up","bb":[547,569,1441,1456],"bl":[547,569,1452,1452]},{"t":"the","bb":[575,603,1436,1452],"bl":[575,603,1452,1452]},{"t":"classes","bb":[610,676,1436,1452],"bl":[610,676,1452,1452]},{"t":"59","bb":[859,879,1437,1452],"bl":[859,879,1452,1452]}]},{"words":[{"t":"Adapt","bb":[67,120,1476,1496],"bl":[67,120,1492,1492]},{"t":"to","bb":[126,144,1478,1492],"bl":[126,144,1492,1492]},{"t":"model","bb":[151,204,1476,1492],"bl":[151,204,1492,1492]},{"t":"updates","bb":[212,284,1476,1496],"bl":[212,284,1492,1492]},{"t":"60","bb":[856,879,1477,1492],"bl":[856,879,1492,1492]}]},{"words":[{"t":"Experiment","bb":[68,169,1517,1537],"bl":[68,169,1533,1533]},{"t":"with","bb":[175,211,1517,1533],"bl":[175,211,1533,1533]},{"t":"output","bb":[218,276,1519,1537],"bl":[218,276,1533,1533]},{"t":"formats","bb":[282,352,1517,1533],"bl":[282,352,1533,1533]},{"t":"60","bb":[856,879,1518,1533],"bl":[856,879,1533,1533]}]},{"words":[{"t":"JSON","bb":[67,116,1557,1574],"bl":[67,116,1574,1574]},{"t":"Repair","bb":[124,181,1556,1578],"bl":[124,181,1574,1574]},{"t":"61","bb":[864,880,1558,1574],"bl":[864,880,1573,1573]}]},{"words":[{"t":"Working","bb":[66,139,1600,1622],"bl":[66,139,1617,1617]},{"t":"with","bb":[145,182,1600,1617],"bl":[145,182,1617,1617]},{"t":"Schemas","bb":[189,270,1600,1617],"bl":[189,270,1617,1617]},{"t":"62","bb":[860,880,1601,1617],"bl":[860,880,1617,1617]}]},{"words":[{"t":"Experiment","bb":[68,169,1644,1666],"bl":[68,169,1661,1661]},{"t":"together","bb":[175,252,1644,1666],"bl":[175,252,1661,1661]},{"t":"with","bb":[258,294,1644,1661],"bl":[258,294,1661,1661]},{"t":"other","bb":[301,349,1644,1662],"bl":[301,349,1661,1661]},{"t":"prompt","bb":[356,420,1646,1666],"bl":[356,420,1661,1661]},{"t":"engineers","bb":[427,515,1644,1666],"bl":[427,515,1661,1662]},{"t":"63","bb":[860,880,1645,1662],"bl":[860,880,1662,1662]}]},{"words":[{"t":"CoT","bb":[67,101,1689,1706],"bl":[67,101,1706,1706]},{"t":"Best","bb":[108,147,1690,1706],"bl":[108,147,1706,1706]},{"t":"practices","bb":[154,237,1689,1710],"bl":[154,237,1706,1706]},{"t":"64","bb":[859,880,1690,1706],"bl":[859,880,1706,1706]}]},{"words":[{"t":"Document","bb":[68,159,1733,1749],"bl":[68,159,1749,1749]},{"t":"the","bb":[166,194,1732,1749],"bl":[166,194,1749,1749]},{"t":"various","bb":[200,265,1732,1750],"bl":[200,265,1749,1749]},{"t":"prompt","bb":[271,336,1734,1754],"bl":[271,336,1749,1749]},{"t":"attempts","bb":[343,422,1734,1754],"bl":[343,422,1749,1749]},{"t":"64","bb":[859,880,1733,1749],"bl":[859,880,1749,1749]}]},{"words":[{"t":"Summary","bb":[36,124,1773,1802],"bl":[36,124,1793,1794]},{"t":"66","bb":[859,880,1777,1794],"bl":[859,880,1794,1794]}]},{"words":[{"t":"Endnotes","bb":[37,123,1816,1848],"bl":[37,123,1838,1838]},{"t":"68","bb":[859,880,1821,1838],"bl":[859,880,1838,1838]}]}]
ocr_status: 2
ocr_error: 
ocr_driver_id: 1
type_: 4