[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"detail-sidebar-cat-1-en-105":3,"doc-seo-572582-105":53,"doc-detail-572582-en":126},{"code":4,"msg":5,"data":6},0,"success",[7,14,19,24,29,34,39,44,49],{"id":8,"doc_module":9,"doc_module_name":10,"category_name":11,"show_sort_weight":12,"slug":13},11,1,"Template","Presentations",90,"presentations",{"id":15,"doc_module":9,"doc_module_name":10,"category_name":16,"show_sort_weight":17,"slug":18},12,"Resumes",80,"resumes",{"id":20,"doc_module":9,"doc_module_name":10,"category_name":21,"show_sort_weight":22,"slug":23},14,"Invoices",70,"invoices",{"id":25,"doc_module":9,"doc_module_name":10,"category_name":26,"show_sort_weight":27,"slug":28},15,"Posters",60,"posters",{"id":30,"doc_module":9,"doc_module_name":10,"category_name":31,"show_sort_weight":32,"slug":33},16,"Social Media",50,"social-media",{"id":35,"doc_module":9,"doc_module_name":10,"category_name":36,"show_sort_weight":37,"slug":38},17,"Forms",40,"forms",{"id":40,"doc_module":9,"doc_module_name":10,"category_name":41,"show_sort_weight":42,"slug":43},18,"Letters",30,"letters",{"id":45,"doc_module":9,"doc_module_name":10,"category_name":46,"show_sort_weight":47,"slug":48},21,"Paper Templates",5,"papers-templates",{"id":50,"doc_module":9,"doc_module_name":10,"category_name":51,"show_sort_weight":4,"slug":52},158,"General","general-158",{"code":4,"msg":54,"data":55},"ok",{"site_id":56,"language":57,"slug":58,"title":59,"keywords":60,"description":61,"schema_data":62,"social_meta":119,"head_meta":121,"extra_data":123,"updated_unix":125},105,"en","prompt-engineering-cheatsheet-quick-reference","Prompt Engineering Cheatsheet - Quick Reference","","Prompt Engineering Cheatsheet is a practical guide for working effectively with Large Language Models (LLMs). It frames prompt writing as an iterative, analytical, and creative engineering process, then distills core techniques such as system prompting, step-back prompting, chain-of-thought, self-consistency, and ReAct. The cheatsheet also covers sampling and decoding controls (temperature, top-k/top-p, token limits), versioning and feedback, plus best practices for structured outputs, examples, and repairing malformed JSON.",{"@graph":63,"@context":118},[64,80,101],{"@type":65,"itemListElement":66},"BreadcrumbList",[67,71,74,77],{"item":68,"name":69,"@type":70,"position":9},"https://docshare.wps.com","Home","ListItem",{"item":72,"name":10,"@type":70,"position":73},"https://docshare.wps.com/template/",2,{"item":75,"name":11,"@type":70,"position":76},"https://docshare.wps.com/template/presentations/",3,{"item":78,"name":59,"@type":70,"position":79},"https://docshare.wps.com/template/prompt-engineering-cheatsheet-quick-reference/572582/",4,{"url":78,"name":59,"@type":81,"image":82,"author":87,"headline":59,"publisher":90,"fileFormat":93,"inLanguage":57,"description":61,"dateModified":94,"datePublished":95,"encodingFormat":93,"isAccessibleForFree":96,"interactionStatistic":97},"DigitalDocument",{"url":83,"@type":84,"width":85,"height":86},"https://docshare.wps.com/thumbnails/prompt-engineering-cheatsheet-quick-reference/572582.png","ImageObject",442,249,{"name":88,"@type":89},"nayy☆","Person",{"url":68,"name":91,"@type":92},"DocShare","Organization","application/pdf","2026-10-21","2026-10-13",true,{"@type":98,"interactionType":99,"userInteractionCount":47},"InteractionCounter",{"@type":100},"ViewAction",{"@type":102,"mainEntity":103},"FAQPage",[104,110,114],{"name":105,"@type":106,"acceptedAnswer":107},"How should prompt engineering be approached when working with LLMs?","Question",{"text":108,"@type":109},"Prompt engineering is treated as an iterative, analytical, and creative process. The guide emphasizes experimenting, evaluating outputs, and refining prompts to improve reasoning, precision, and control.","Answer",{"name":111,"@type":106,"acceptedAnswer":112},"What are the differences between zero-shot, one-shot, and few-shot prompting?",{"text":113,"@type":109},"Zero-shot directly instructs the model without examples, one-shot adds a single example, and few-shot provides 3–5 examples to support pattern recognition for more structured or complex tasks.",{"name":115,"@type":106,"acceptedAnswer":116},"How can malformed JSON outputs be handled?",{"text":117,"@type":109},"The guide suggests using repair techniques/tools to fix broken or truncated outputs. It also recommends defining structured output formats and schemas to reduce formatting failures in pipelines.","https://schema.org",{"og:url":78,"og:type":120,"og:title":59,"og:site_name":91,"og:description":61},"article",{"robots":122,"canonical":78},"index,follow",{"doc_id":124,"site_id":56},572582,1792268818,{"code":4,"msg":5,"data":127},{"doc_id":124,"user_id":128,"nickname":88,"user_avatar":129,"doc_module":9,"category_id":8,"category_name":11,"doc_title":59,"doc_description":61,"doc_content":130,"file_id":131,"file_url":132,"file_type":133,"file_size":134,"view_count":47,"is_deleted":4,"is_public":9,"is_downloadable":9,"audit_status":9,"page_count":76,"language":135,"language_code":57,"site_id":56,"html_lang":57,"table_of_contents":136,"faqs":137,"seo_title":138,"seo_description":61,"update_tm":139,"read_time":9},962090893153,"https://ap-avatar.wpscdn.com/davatar_9964176cb1d06d4a9deccf72a44ae3dc","Prompt Engineering Cheatsheet  \nIn the age of generative AI, prompt writing has become a core engineering skill. Whether building a chatbot, generating code, or designing autonomous agents, the prompt is your most powerful interface with a Large Language Model (LLM) .  \nThis post distills the key ideas from Lee Boonstra’s excellent “Prompt Engineering”(Google Cloud) whitepaper, adding my structure and visuals to offer you a practical cheat sheet and mind map. It’s ideal forAI developers, product engineers, and anyone working with LLMs.  \nPrompt engineering isn’t just writing instructions—it’s an iterative, analytical, and creative process. Techniques like Chain of Thought , ReAct, or Step-Back Prompting push LLMs beyond surface-level output and unlock deeper reasoning, precision, and control.  \nTools &amp; Tips  \nOutput Sampling  \nSystem Prompting  \nStep-Back Prompting  \nCoT  \nTranslate Code  \nUse Instructions Over Constraints  \nExperiment with Output Formats  \nRepair Malformed JSON  \nDocument Prompt Versions  \njson-repair  \nlogging  \nVertex AI Studio  \nLangChain Agents  \nTemperature  \nTop-K / Top-P  \nToken Limit  \nGreedy Decoding  \nNucleus Sampling  \nJSON  \nXML  \nVersioning  \nFeedback  \nEvaluation Results  \nI decided to share this cheat sheet and mind map because I’ve seen firsthand how powerful prompt engineering can be—but also how easy it is to get lost in the noise of examples, techniques, and model quirks. Whether you're building products with LLMs or just exploring what's possible, having an explicit, structured reference helps cut through trial and error and brings clarity to experimentation. This is my way of consolidating what works, inspired by real-world use cases and backed by proven strategies—hoping it saves others time and helps push ideas forward faster.  \nThe Cheatsheet  \n\n| Technique / Best Practice | Description | When to Use | Example |\n| --- | --- | --- | --- |\n| Zero-Shot\u003Cbr>Prompting | Directly instructs the model without examples. | Simple tasks, clear intent. | \"Classify this review as POSITIVE, NEUTRAL, or NEGATIVE.\" |\n| One-Shot\u003Cbr>Prompting | Includes one example in the prompt. | Slightly\u003Cbr>ambiguous tasks. | \"Translate: Bonjour → Hello\" with one example before. |\n\n\n| Technique / Best Practice | Description | When to Use | Example |\n| --- | --- | --- | --- |\n| Few-Shot\u003Cbr>Prompting | Includes 3–5 examples. Helps pattern recognition. | Complex tasks needing structure or format guidance. | Parsing pizza orders into JSON with multiple examples. |\n| System Prompting | Defines model’s global behavior or rules. | To shape response style/format. | \"You are a JSON API. Always return valid JSON.\" |\n| Role Prompting | Assigns a persona or role to the model. | For tone, domain knowledge, or consistency. | \"Act as a travel guide and recommend places in Rome.\" |\n| Contextual\u003Cbr>Prompting | Supplies relevant background or task details. | When the model needs situational context. | \"You are writing for a retro gaming blog...\" |\n| Step-Back\u003Cbr>Prompting | Starts with abstraction before solving the task. | When stuck or needing creativity and reasoning. | \"What makes a good FPS level? Now write one using that.\" |\n| Chain of\u003Cbr>Thought (CoT) | Encourages the model to explain reasoning steps. | Logic, math, planning tasks. | \"Let’s think step by step...\" |\n| Self\u003Cbr>Consistency | Samples multiple CoTs and picks most frequent answer. | High-stakes reasoning tasks. | Run same prompt 5 times, then majority vote. |\n| Tree of\u003Cbr>Thoughts (ToT) | Explores multiple reasoning branches. | Complex problemsolving. | Used in decision-tree like reasoning problems. |\n| ReAct (Reason + Act) | Combines reasoning with tool use (API, search) . | Interactive agents. | LangChain agents using search to answer real-world queries. |\n| Automatic Prompt Engineering (APE) | LLM generates variations of a prompt. | Exploratory\u003Cbr>prompt generation. | \"Give 10 ways to phrase: 'Order one Metallica T-shirt size S'\" |\n| Use Examples | Provide exem","cbCaioSbaAkwMZdR","https://ap.wps.com/l/cbCaioSbaAkwMZdR","pdf",185584,"English","# Prompt Engineering Cheatsheet\n## Core Ideas and Best Practices\n## Prompting Techniques\n## Tools, Sampling, and Decoding Controls\n## Cheatsheet Tables","[{\"question\":\"How should prompt engineering be approached when working with LLMs?\",\"answer\":\"Prompt engineering is treated as an iterative, analytical, and creative process. The guide emphasizes experimenting, evaluating outputs, and refining prompts to improve reasoning, precision, and control.\"},{\"question\":\"What are the differences between zero-shot, one-shot, and few-shot prompting?\",\"answer\":\"Zero-shot directly instructs the model without examples, one-shot adds a single example, and few-shot provides 3–5 examples to support pattern recognition for more structured or complex tasks.\"},{\"question\":\"How can malformed JSON outputs be handled?\",\"answer\":\"The guide suggests using repair techniques/tools to fix broken or truncated outputs. It also recommends defining structured output formats and schemas to reduce formatting failures in pipelines.\"}]","Prompt Engineering Cheatsheet - Quick Reference | PDF",1791928242]