Aussie AI
Prompt Engineering: Types and Optimizations
-
Last Updated 12 December, 2024
-
by David Spuler, Ph.D.
Optimizing Prompt Engineering
There are various simple ways to get better results from LLMs with prompt engineering techniques with a single prompt:
- Be specific
- Give examples
- Write longer prompts
Some more advanced approaches include:
- Give multiple examples (few-shot prompting)
- Negative prompting (tell the AI what not to do)
- Personas
- Chain-of-thought ("step-by-step" requests)
- Specify an output format
- Specify a tone, reading level, or other text meta-attribute.
There are various ways to follow up with additional prompts:
- Iterative prompting (improve the next prompt based on the previous answer)
- Ask the LLM to explain its reasoning
- Ask the LLM to evaluate its own answer ("reflection")
Types of Prompt Engineering
The general categories of prompt engineering techniques are:
- Zero-shot prompting — no examples.
- One-shot prompting — one example.
- Few-shot prompting — multiple examples in the prompt.
There are various known effective ways to improve the results in terms of answer accuracy/perplexity using prompt engineering:
- Emotional prompting
- "Step-by-step" prompting (zero-shot CoT)
- Skeleton-of-thought
- Chain-of-Thought (CoT) (few-shot)
- Tree-of-Thought (ToT)
Surveys on Prompting Techniques
Survey papers on prompt engineering:
- Sander Schulhoff, Michael Ilie, Nishant Balepur, Konstantine Kahadze, Amanda Liu, Chenglei Si, Yinheng Li, Aayush Gupta, HyoJung Han, Sevien Schulhoff, Pranav Sandeep Dulepet, Saurav Vidyadhara, Dayeon Ki, Sweta Agrawal, Chau Pham, Gerson Kroiz, Feileen Li, Hudson Tao, Ashay Srivastava, Hevander Da Costa, Saloni Gupta, Megan L. Rogers, Inna Goncearenco, Giuseppe Sarli, Igor Galynker, Denis Peskoff, Marine Carpuat, Jules White, Shyamal Anadkat, Alexander Hoyle, Philip Resnik, 6 Jun 2024, The Prompt Report: A Systematic Survey of Prompting Techniques, https://arxiv.org/abs/2406.06608
- Xiaoxia Liu, Jingyi Wang, Jun Sun, Xiaohan Yuan, Guoliang Dong, Peng Di, Wenhai Wang, Dongxia Wang, 21 Nov 2023, Prompting Frameworks for Large Language Models: A Survey, https://arxiv.org/abs/2311.12785
- Pranab Sahoo, Ayush Kumar Singh, Sriparna Saha, Vinija Jain, Samrat Mondal, Aman Chadha, 5 Feb 2024, A Systematic Survey of Prompt Engineering in Large Language Models: Techniques and Applications, https://arxiv.org/abs/2402.07927
- Yuan-Feng Song, Yuan-Qin He, Xue-Fang Zhao, Han-Lin Gu, Di Jiang, Hai-Jun Yang, Li-Xin Fan, July 2024, A communication theory perspective on prompting engineering methods for large lan guage models. JOURNAL OF COMPUTER SCIENCE AND TECHNOLOGY 39(4): 984−1004 July 2024. DOI: 10.1007/s11390-024-4058-8, https://doi.org/10.1007/s11390-024-4058-8 https://jcst.ict.ac.cn/en/article/pdf/preview/10.1007/s11390-024-4058-8.pdf
- Vishal Rajput, Oct 2024, The Prompt Report: Prompt Engineering Techniques, https://medium.com/aiguys/the-prompt-report-prompt-engineering-techniques-254464b0b32b
Emotional Prompting
Researchers discovered a weird technique: adding emotion to prompts makes LLMs do better. It's unclear how or why this works, but perhaps it triggers more attention paid to more important sources (i.e., tokens and weights), or perhaps it reduces attention to casual type documents.
Research papers on emotional prompting:
- Cheng Li, Jindong Wang, Yixuan Zhang, Kaijie Zhu, Wenxin Hou, Jianxun Lian, Fang Luo, Qiang Yang, Xing Xie, 12 Nov 2023 (v7), Large Language Models Understand and Can be Enhanced by Emotional Stimuli, https://arxiv.org/abs/2307.11760 https://llm-enhance.github.io/
- Pranab Sahoo, Ayush Kumar Singh, Sriparna Saha, Vinija Jain, Samrat Mondal, Aman Chadha, 5 Feb 2024, A Systematic Survey of Prompt Engineering in Large Language Models: Techniques and Applications, https://arxiv.org/abs/2402.07927
- Chenggian Ma, Xiangyu Zhao, Chunhui Zhang, Yanzhao Qin, Wentao Zhang, 16 Apr 2024, When Emotional Stimuli meet Prompt Designing: An Auto-Prompt Graphical Paradigm, https://arxiv.org/abs/2404.10500
- Yarik Menchaca Resendiz, Roman Klinger, 9 Aug 2023, Emotion-Conditioned Text Generation through Automatic Prompt Optimization, https://arxiv.org/abs/2308.04857
- Cheng Li, Jindong Wang, Yixuan Zhang, Kaijie Zhu, Xinyi Wang, Wenxin Hou, Jianxun Lian, Fang Luo, Qiang Yang, Xing Xie, 7 Jun 2024 (v3), The Good, The Bad, and Why: Unveiling Emotions in Generative AI, https://arxiv.org/abs/2312.11111
- Mike Taylor Oct 29, 2024, Five proven prompt engineering techniques (and a few more-advanced tactics), https://www.lennysnewsletter.com/p/five-proven-prompt-engineering-techniques
Chain-of-Thought (CoT)
Chain-of-thought prompting is a "step-by-step" prompting method. As a zero-shot technique, it involves just adding an encouragement like "Let's try this step-by-step." to the prompt given to the LLM. As a few-shot prompting technique, it can involve running the LLM through multiple steps to finalize an answer.
Research papers on chain-of-thought:
- Jacob Pfau, William Merrill, Samuel R. Bowman, 24 Apr 2024, Let's Think Dot by Dot: Hidden Computation in Transformer Language Models, https://arxiv.org/abs/2404.15758
- Hongxuan Zhang, Zhining Liu, Jiaqi Zheng, Chenyi Zhuang, Jinjie Gu, Guihai Chen, Nov 2023, Fast Chain-of-Thought: A Glance of Future from Parallel Decoding Leads to Answers Faster, https://arxiv.org/abs/2311.08263
- Hunter Lightman, Vineet Kosaraju, Yura Burda, Harri Edwards, Bowen Baker, Teddy Lee, Jan Leike, John Schulman, Ilya Sutskever, Karl Cobbe, May 2023, Let's Verify Step by Step, https://arxiv.org/abs/2305.20050
- Xuan Zhang, Chao Du, Tianyu Pang, Qian Liu, Wei Gao, Min Lin, 13 Jun 2024, Chain of Preference Optimization: Improving Chain-of-Thought Reasoning in LLMs, https://arxiv.org/abs/2406.09136 Code: https://github.com/sail-sg/CPO
- kipply's blog, 2023-03-30, Transformer Taxonomy (the last lit review), https://kipp.ly/transformer-taxonomy/ (Papers for all the Transformer architectures and milestone papers for the major optimization improvements on them.)
- Daniel Lopes, June 21, 2024, A Comprehensive Guide to Text Prompt Engineering Techniques, https://journal.daniellopes.dev/p/practical-prompt-engineering-notes
- Wenxiao Wang, Wei Chen, Yicong Luo, Yongliu Long, Zhengkai Lin, Liye Zhang, Binbin Lin, Deng Cai, Xiaofei He, 15 Feb 2024, Model Compression and Efficient Inference for Large Language Models: A Survey, https://arxiv.org/abs/2402.09748
- Hao Zhou, Chengming Hu, Ye Yuan, Yufei Cui, Yili Jin, Can Chen, Haolun Wu, Dun Yuan, Li Jiang, Di Wu, Xue Liu, Charlie Zhang, Xianbin Wang, Jiangchuan Liu, 17 May 2024, Large Language Model (LLM) for Telecommunications: A Comprehensive Survey on Principles, Key Techniques, and Opportunities, https://arxiv.org/abs/2405.10825
- Yu Wang, Shiwan Zhao, Zhihu Wang, Heyuan Huang, Ming Fan, Yubo Zhang, Zhixing Wang, Haijun Wang, Ting Liu, 5 Sep 2024, Strategic Chain-of-Thought: Guiding Accurate Reasoning in LLMs through Strategy Elicitation, https://arxiv.org/abs/2409.03271
- Asankhaya Sharma (codelion), Sep 2024, Optillm: Optimizing inference proxy for LLMs, https://github.com/codelion/optillm
- Ziqi Jin, Wei Lu, 6 Sep 2024, Self-Harmonized Chain of Thought, https://arxiv.org/abs/2409.04057
- Pranab Sahoo, Ayush Kumar Singh, Sriparna Saha, Vinija Jain, Samrat Mondal, Aman Chadha, 5 Feb 2024, A Systematic Survey of Prompt Engineering in Large Language Models: Techniques and Applications, https://arxiv.org/abs/2402.07927
- Shizhe Diao, Pengcheng Wang, Yong Lin, Rui Pan, Xiang Liu, Tong Zhang, 21 Jul 2024 (v5), Active Prompting with Chain-of-Thought for Large Language Models, https://arxiv.org/abs/2302.12246 https://github.com/shizhediao/active-prompt
- Zhuosheng Zhang, Aston Zhang, Mu Li, Alex Smola, 7 Oct 2022, Automatic Chain of Thought Prompting in Large Language Models, https://arxiv.org/abs/2210.03493 https://github.com/amazon-research/auto-cot
- Maciej Besta, Florim Memedi, Zhenyu Zhang, Robert Gerstenberger, Guangyuan Piao, Nils Blach, Piotr Nyczyk, Marcin Copik, Grzegorz Kwaśniewski, Jürgen Müller, Lukas Gianinazzi, Ales Kubicek, Hubert Niewiadomski, Aidan O'Mahony, Onur Mutlu, Torsten Hoefler, 5 Apr 2024, Demystifying Chains, Trees, and Graphs of Thoughts, https://arxiv.org/abs/2401.14295 http://htor.ethz.ch/publications/img/besta-topologies.pdf
- Louis Bouchard, Sep 12, 2024, OpenAI's o1 Model: The Future of Reasoning AI? What Sets It Apart, How OpenAI's o1 Model Thinks Through Problems (And Why It's Slower), https://www.louisbouchard.ai/openai-o1/
- OpenAI, September 12, 2024, Learning to Reason with LLMs, https://openai.com/index/learning-to-reason-with-llms/
- Emilia David, September 12, 2024, How to prompt on OpenAI’s new o1 models, https://venturebeat.com/ai/how-to-prompt-on-openai-o1/ (Prompt engineering is different for o1, such as "don't use chain of thought.")
- Du Phan, Matthew D. Hoffman, David Dohan, Sholto Douglas, Tuan Anh Le, Aaron Parisi, Pavel Sountsov, Charles Sutton, Sharad Vikram, Rif A. Saurous, 28 Nov 2023, Training Chain-of-Thought via Latent-Variable Inference, https://arxiv.org/abs/2312.02179
- Trung Quoc Luong, Xinbo Zhang, Zhanming Jie, Peng Sun, Xiaoran Jin, Hang Li, 27 Jun 2024 (v2), ReFT: Reasoning with Reinforced Fine-Tuning, https://arxiv.org/abs/2401.08967
- Tianqiao Liu, Zui Chen, Zitao Liu, Mi Tian, Weiqi Luo, 13 Sep 2024, Expediting and Elevating Large Language Model Reasoning via Hidden Chain-of-Thought Decoding, https://arxiv.org/abs/2409.08561
- Zayne Sprague, Fangcong Yin, Juan Diego Rodriguez, Dongwei Jiang, Manya Wadhwa, Prasann Singhal, Xinyu Zhao, Xi Ye, Kyle Mahowald, Greg Durrett, 18 Sep 2024, To CoT or not to CoT? Chain-of-thought helps mainly on math and symbolic reasoning, https://arxiv.org/abs/2409.12183
- Santosh Kumar Radha, Yasamin Nouri Jelyani, Ara Ghukasyan, Oktay Goktas, 19 Sep 2024, Iteration of Thought: Leveraging Inner Dialogue for Autonomous Large Language Model Reasoning, https://arxiv.org/abs/2409.12618
- Artem Shelamanov, Sep 2024, Why OpenAI’s o1 Model Is A Scam, https://pub.towardsai.net/why-openais-o1-model-is-a-scam-eb3356c3d70e
- Chung-Yu Wang, Alireza DaghighFarsoodeh, Hung Viet Pham, 24 Sep 2024, Task-oriented Prompt Enhancement via Script Generation, https://arxiv.org/abs/2409.16418
- Cassandra A. Cohen, William W. Cohen, 17 Sep 2024, Watch Your Steps: Observable and Modular Chains of Thought, https://arxiv.org/abs/2409.15359
- Tongxuan Liu, Wenjiang Xu, Weizhe Huang, Xingyu Wang, Jiaxing Wang, Hailong Yang, Jing Li, 26 Sep 2024, Logic-of-Thought: Injecting Logic into Contexts for Full Reasoning in Large Language Models, https://arxiv.org/abs/2409.17539
- Zhenwen Liang, Ye Liu, Tong Niu, Xiangliang Zhang, Yingbo Zhou, Semih Yavuz, 5 Oct 2024, Improving LLM Reasoning through Scaling Inference Computation with Collaborative Verification, https://arxiv.org/abs/2410.05318
- Qiguang Chen, Libo Qin, Jiaqi Wang, Jinxuan Zhou, Wanxiang Che, 8 Oct 2024, Unlocking the Boundaries of Thought: A Reasoning Granularity Framework to Quantify and Optimize Chain-of-Thought, https://arxiv.org/abs/2410.05695 https://github.com/LightChen233/reasoning-granularity
- Yingqian Cui, Pengfei He, Xianfeng Tang, Qi He, Chen Luo, Jiliang Tang, Yue Xing, 21 Oct 2024, A Theoretical Understanding of Chain-of-Thought: Coherent Reasoning and Error-Aware Demonstration, https://arxiv.org/abs/2410.16540
- Banghao Chen, Zhaofeng Zhang, Nicolas Langrené, Shengxin Zhu, 5 Sep 2024 (v5), Unleashing the potential of prompt engineering in Large Language Models: a comprehensive review, https://arxiv.org/abs/2310.14735
- Data Camp, Jul 10, 2024, Chain-of-Thought Prompting: Step-by-Step Reasoning with LLMs, https://www.datacamp.com/tutorial/chain-of-thought-prompting
- Pankaj, Dec 21, 2023, Chain of Thought Prompting: Guiding LLMs Step-by-Step, https://medium.com/@pankaj_pandey/chain-of-thought-prompting-guiding-llms-step-by-step-e6eac32d02d8
- Jason Wei and Denny Zhou, May 11, 2022, Language Models Perform Reasoning via Chain of Thought, https://research.google/blog/language-models-perform-reasoning-via-chain-of-thought/
- Cameron R. Wolfe, Jul 24, 2023, Chain of Thought Prompting for LLMs: A practical and simple approach for “reasoning” with LLMs, https://towardsdatascience.com/chain-of-thought-prompting-for-llms-33c963eead38
- Siwei Wu, Zhongyuan Peng, Xinrun Du, Tuney Zheng, Minghao Liu, Jialong Wu, Jiachen Ma, Yizhi Li, Jian Yang, Wangchunshu Zhou, Qunshu Lin, Junbo Zhao, Zhaoxiang Zhang, Wenhao Huang, Ge Zhang, Chenghua Lin, J.H. Liu, 22 Oct 2024 (v2), A Comparative Study on Reasoning Patterns of OpenAI's o1 Model, https://arxiv.org/abs/2410.13639
- Tanay Jaipuria, Oct 29, 2024, OpenAI's o-1 and inference-time scaling laws, https://www.tanayj.com/p/openais-o-1-and-inference-time-scaling
- Junda Wu, Xintong Li, Ruoyu Wang, Yu Xia, Yuxin Xiong, Jianing Wang, Tong Yu, Xiang Chen, Branislav Kveton, Lina Yao, Jingbo Shang, Julian McAuley, 31 Oct 2024, OCEAN: Offline Chain-of-thought Evaluation and Alignment in Large Language Models, https://arxiv.org/abs/2410.23703
- Siyun Zhao, Yuqing Yang, Zilong Wang, Zhiyuan He, Luna K. Qiu, Lili Qiu, 23 Sep 2024, Retrieval Augmented Generation (RAG) and Beyond: A Comprehensive Survey on How to Make your LLMs use External Data More Wisely, https://arxiv.org/abs/2409.14924
- Guowei Xu, Peng Jin, Li Hao, Yibing Song, Lichao Sun, Li Yuan, 15 Nov 2024, LLaVA-o1: Let Vision Language Models Reason Step-by-Step, https://arxiv.org/abs/2411.10440
- Carl Franzen, November 20, 2024, DeepSeek’s first reasoning model R1-Lite-Preview turns heads, beating OpenAI o1 performance, https://venturebeat.com/ai/deepseeks-first-reasoning-model-r1-lite-preview-turns-heads-beating-openai-o1-performance/
- Yu Zhao, Huifeng Yin, Bo Zeng, Hao Wang, Tianqi Shi, Chenyang Lyu, Longyue Wang, Weihua Luo, Kaifu Zhang, 21 Nov 2024, Marco-o1: Towards Open Reasoning Models for Open-Ended Solutions, https://arxiv.org/abs/2411.14405
- Jun Gao, Yongqi Li, Ziqiang Cao, Wenjie Li, 29 Nov 2024, Interleaved-Modal Chain-of-Thought, https://arxiv.org/abs/2411.19488 (Using CoT on a multimodal/vision model.)
- Hieu Tran, Zonghai Yao, Junda Wang, Yifan Zhang, Zhichao Yang, Hong Yu, 5 Dec 2024 (v2), RARE: Retrieval-Augmented Reasoning Enhancement for Large Language Models, https://arxiv.org/abs/2412.02830
- Tiernan Ray, Dec. 10, 2024, How Cerebras boosted Meta's Llama to 'frontier model' performance The company also demonstrates initial training of a one-trillion-parameter AI model on a single machine using conventional DDR5 memory chips. https://www.zdnet.com/article/how-cerebras-boosted-metas-llama-to-frontier-model-performance/
- Shibo Hao, Sainbayar Sukhbaatar, DiJia Su, Xian Li, Zhiting Hu, Jason Weston, Yuandong Tian, 9 Dec 2024, Training Large Language Models to Reason in a Continuous Latent Space, https://arxiv.org/abs/2412.06769
- Ben Dickson, December 10, 2024, OpenAI’s o1 model doesn’t show its thinking, giving open source an advantage, https://venturebeat.com/ai/heres-how-openai-o1-might-lose-ground-to-open-source-models/
- Zhe Chen, Weiyun Wang, Yue Cao, Yangzhou Liu, Zhangwei Gao, Erfei Cui, Jinguo Zhu, Shenglong Ye, Hao Tian, Zhaoyang Liu, Lixin Gu, Xuehui Wang, Qingyun Li, Yimin Ren, Zixuan Chen, Jiapeng Luo, Jiahao Wang, Tan Jiang, Bo Wang, Conghui He, Botian Shi, Xingcheng Zhang, Han Lv, Yi Wang, Wenqi Shao, Pei Chu, Zhongying Tu, Tong He, Zhiyong Wu, Huipeng Deng, Jiaye Ge, Kai Chen, Min Dou, Lewei Lu, Xizhou Zhu, Tong Lu, Dahua Lin, Yu Qiao, Jifeng Dai, Wenhai Wang, 6 Dec 2024, Expanding Performance Boundaries of Open-Source Multimodal Models with Model, Data, and Test-Time Scaling, https://arxiv.org/abs/2412.05271
Tree-of-Thought (ToT)
Research papers on Tree-of-Thought (ToT) prompting:
- Shunyu Yao, Dian Yu, Jeffrey Zhao, Izhak Shafran, Thomas L. Griffiths, Yuan Cao, Karthik Narasimhan, 3 Dec 2023 (v2), Tree of Thoughts: Deliberate Problem Solving with Large Language Models, https://arxiv.org/abs/2305.10601 Code: https://github.com/princeton-nlp/tree-of-thought-llm
- Antonis Iliakis, Jul 5, 2024, Amazing Chat GPT Prompts That Will Take You to The Next Level — Part 3, https://generativeai.pub/i-asked-chat-gpt-to-think-like-a-human-heres-what-i-found-out-7a6017109d66
- Alan Boyle, Isha Gupta, Sebastian Hönig, Lukas Mautner, Kenza Amara, Furui Cheng, Mennatallah El-Assady, 31 Aug 2024, iToT: An Interactive System for Customized Tree-of-Thought Generation, https://arxiv.org/abs/2409.00413
- Pranab Sahoo, Ayush Kumar Singh, Sriparna Saha, Vinija Jain, Samrat Mondal, Aman Chadha, 5 Feb 2024, A Systematic Survey of Prompt Engineering in Large Language Models: Techniques and Applications, https://arxiv.org/abs/2402.07927
- Emile J, May 28, 2023, Tree of Thoughts (ToT) Prompting: The Basics, https://medium.com/@emile.jonkers/tree-of-thought-tot-prompting-simply-explained-dca7e719752
- Qiqi Chen, Xinpeng Wang, Philipp Mondorf, Michael A. Hedderich, Barbara Plank, 24 Oct 2024 (v2), Understanding When Tree of Thoughts Succeeds: Larger Models Excel in Generation, Not Discrimination, https://arxiv.org/abs/2410.17820 http://github.com/mainlp/tot-eval
- Cameron R. Wolfe, Dec 23, 2023, Tree of Thoughts Prompting. Solving multi-step problems with LLMs via deliberate planning and exploration, https://towardsdatascience.com/tree-of-thoughts-prompting-65a3e51f9ac4
- Cameron R. Wolfe, Aug 21, 2023, Tree of Thoughts Prompting. Solving multi-step problems with LLMs via deliberate planning and exploration, https://cameronrwolfe.substack.com/p/tree-of-thoughts-prompting
Skeleton-of-Thought
Skeleton-of-thought is a technique that aims not only to improve accuracy, but also to improve speed and cost efficiency of inference by splitting a single prompt into multiple, smaller sub-prompts. These can be executed in parallel, to reduce overall latency.
The basic speedup works like this:
- Generate an outline quickly (short LLM answer)
- For each outline point, generate a brief answer (multiple focused LLM queries to compute short answers in parallel)
- Combine them into a final, longer answer (possibly with an LLM, but this will be a long text, so heuristic packing/merging of sub-answers is faster)
Research papers on skeleton-of-thought:
- L. Zheng, L. Yin, Z. Xie, J. Huang, C. Sun, C. H. Yu, S. Cao, C. Kozyrakis, I. Stoica, J. E. Gonzalez et al., Dec 2023, Efficiently programming large language models using SGLang, arXiv preprint arXiv:2312.07104, 2023, https://arxiv.org/abs/2312.07104 (Uses a radix attention method, a trie or prefix tree, for KV caching.)
- Xuefei Ning , Zinan Lin , November 17, 2023 Skeleton-of-Thought: Parallel decoding speeds up and improves LLM output, Microsoft Research Blog, https://www.microsoft.com/en-us/research/blog/skeleton-of-thought-parallel-decoding-speeds-up-and-improves-llm-output/ Code: https://github.com/imagination-research/sot/
- S. Jin, Y. Wu, H. Zheng, Q. Zhang, M. Lentz, Z. M. Mao, A. Prakash, F. Qian, and D. Zhuo, “Adaptive skeleton graph decoding,” arXiv preprint arXiv:2402.12280, 2024. https://arxiv.org/abs/2402.12280
- M. Liu, A. Zeng, B. Wang, P. Zhang, J. Tang, and Y. Dong, “Apar: Llms can do auto-parallel auto-regressive decoding,” arXiv preprint arXiv:2401.06761, 2024. https://arxiv.org/abs/2401.06761
- 8 Jun 2024 (v2), A Survey on Efficient Inference for Large Language Models, Zixuan Zhou, Xuefei Ning, Ke Hong, Tianyu Fu, Jiaming Xu, Shiyao Li, Yuming Lou, Luning Wang, Zhihang Yuan, Xiuhong Li, Shengen Yan, Guohao Dai, Xiao-Ping Zhang, Yuhan Dong, Yu Wang, https://arxiv.org/abs/2404.14294
- Mahsa Khoshnoodi, Vinija Jain, Mingye Gao, Malavika Srikanth, Aman Chadha, 24 May 2024 (v2), A Comprehensive Survey of Accelerated Generation Techniques in Large Language Models, https://arxiv.org/abs/2405.13019
- Steven Kolawole, KeshavSanthanam, Virginia Smith, Pratiksha Thaker, Nov 2024, Extracting Parallelism from LargeLanguageModelQueries, https://openreview.net/pdf?id=CZHt9kLS5S
Programmatic Prompt Engineering
Programmatic prompting or "auto prompting" is the use of software automation, such as an extra LLM step, to auto-create better prompts for users based on their original query text. The results should be better prompt structures and better answers.
Research on programmatic prompt engineering:
- Asankhaya Sharma (codelion), Sep 2024, Optillm: Optimizing inference proxy for LLMs, https://github.com/codelion/optillm
- Anthropic, 2024, Automatically generate first draft prompt templates, https://docs.anthropic.com/en/docs/build-with-claude/prompt-engineering/prompt-generator
- David Gewirtz, April 19, 2024, Logitech's free AI Prompt Builder is surprisingly handy, https://www.zdnet.com/article/logitechs-free-ai-prompt-builder-is-surprisingly-handy-heres-how-im-using-it/
- Julian Yip, May 6, 2024, Prompt Like a Data Scientist: Auto Prompt Optimization and Testing with DSPy: Applying machine learning methodology to prompt building, Towards Data Science, https://towardsdatascience.com/prompt-like-a-data-scientist-auto-prompt-optimization-and-testing-with-dspy-ff699f030cb7
- Anthropic, 21 May 2024, Generate better prompts in the developer console, https://www.anthropic.com/news/prompt-generator
- Heiko Hotz, Sep 2024, Automated Prompt Engineering: The Definitive Hands-On Guide, https://towardsdatascience.com/automated-prompt-engineering-the-definitive-hands-on-guide-1476c8cd3c50
- Pranab Sahoo, Ayush Kumar Singh, Sriparna Saha, Vinija Jain, Samrat Mondal, Aman Chadha, 5 Feb 2024, A Systematic Survey of Prompt Engineering in Large Language Models: Techniques and Applications, https://arxiv.org/abs/2402.07927
- Zhuosheng Zhang, Aston Zhang, Mu Li, Alex Smola, 7 Oct 2022, Automatic Chain of Thought Prompting in Large Language Models, https://arxiv.org/abs/2210.03493 https://github.com/amazon-research/auto-cot
- Rinon Gal, Adi Haviv, Yuval Alaluf, Amit H. Bermano, Daniel Cohen-Or, Gal Chechik, 2 Oct 2024, ComfyGen: Prompt-Adaptive Workflows for Text-to-Image Generation, https://arxiv.org/abs/2410.01731 https://comfygen-paper.github.io/
- Jose Antonio Lanz, Oct 15, 2024, OpenAI Unveils Secret Meta Prompt—And It’s Very Different From Anthropic's Approach, Under the hood, OpenAI’s structured approach to prompt generation sets it apart from Anthropic’s human-like, chatbot approach. https://decrypt.co/285854/openai-secret-meta-prompt-anthropic
- Jordan Gibbs, Oct 2024, Become a Master Prompt Engineer with ChatGPT Canvas. Write perfect prompts in a fraction of the time with my new GPT Canvas workflow. https://medium.com/@jordan_gibbs/become-a-master-prompt-engineer-with-chatgpt-canvas-c4eebb8e4c23
- Cameron R. Wolfe, Nov 04, 2024, Automatic Prompt Optimization. Practical techniques for improving prompt quality without manual effort, https://cameronrwolfe.substack.com/p/automatic-prompt-optimization
- Manpreet Singh, Oct 31, 2024, Let's Simplifying How We Talk to AI Using Prompt Declaration Language (PDL), https://pub.towardsai.net/lets-simplifying-how-we-talk-to-ai-using-prompt-declaration-language-pdl-b1824c4de833
- Ian Drosos, Jack Williams, Advait Sarkar, Nicholas Wilson, 3 Dec 2024, Dynamic Prompt Middleware: Contextual Prompt Refinement Controls for Comprehension Tasks, https://arxiv.org/abs/2412.02357
- Stephen MacNeil, Andrew Tran, Joanne Kim, Ziheng Huang, Seth Bernstein, Dan Mogil, 3 Jul 2023, Prompt Middleware: Mapping Prompts for Large Language Models to UI Affordances, https://arxiv.org/abs/2307.01142
Advanced Prompt Engineering Techniques
Research papers on advanced prompting methods:
- Heiko Hotz, Sep 2024, Automated Prompt Engineering: The Definitive Hands-On Guide, https://towardsdatascience.com/automated-prompt-engineering-the-definitive-hands-on-guide-1476c8cd3c50
- Bijit Ghosh Feb 2024, Advanced Prompt Engineering for Reducing Hallucination, https://medium.com/@bijit211987/advanced-prompt-engineering-for-reducing-hallucination-bb2c8ce62fc6
- Louis-François Bouchard, Aug 03, 2024, The Myth of Advanced Prompting: Making Simple Things Sound Complicated, https://louisbouchard.substack.com/p/the-myth-of-advanced-prompting-making
- Asankhaya Sharma (codelion), Sep 2024, Optillm: Optimizing inference proxy for LLMs, https://github.com/codelion/optillm
- Sander Schulhoff, Michael Ilie, Nishant Balepur, Konstantine Kahadze, Amanda Liu, Chenglei Si, Yinheng Li, Aayush Gupta, HyoJung Han, Sevien Schulhoff, Pranav Sandeep Dulepet, Saurav Vidyadhara, Dayeon Ki, Sweta Agrawal, Chau Pham, Gerson Kroiz, Feileen Li, Hudson Tao, Ashay Srivastava, Hevander Da Costa, Saloni Gupta, Megan L. Rogers, Inna Goncearenco, Giuseppe Sarli, Igor Galynker, Denis Peskoff, Marine Carpuat, Jules White, Shyamal Anadkat, Alexander Hoyle, Philip Resnik, 17 Jun 2024 (v2), The Prompt Report: A Systematic Survey of Prompting Techniques, https://arxiv.org/abs/2406.06608 https://trigaten.github.io/Prompt_Survey_Site/
- Xiaohan Xu, Chongyang Tao, Tao Shen, Can Xu, Hongbo Xu, Guodong Long, Jian-guang Lou, 29 Feb 2024 (v2), Re-Reading Improves Reasoning in Large Language Models, https://arxiv.org/abs/2309.06275
- Latent Space, Sep 20, 2024, The Ultimate Guide to Prompting: Why DSPy is underrated, how to do few-shots properly, why role based prompting doesn't work, and how to HackAPrompt https://www.latent.space/p/learn-prompting
- Yuan-Feng Song, Yuan-Qin He, Xue-Fang Zhao, Han-Lin Gu, Di Jiang, Hai-Jun Yang, Li-Xin Fan, July 2024, A communication theory perspective on prompting engineering methods for large lan guage models. JOURNAL OF COMPUTER SCIENCE AND TECHNOLOGY 39(4): 984−1004 July 2024. DOI: 10.1007/s11390-024-4058-8, https://doi.org/10.1007/s11390-024-4058-8 https://jcst.ict.ac.cn/en/article/pdf/preview/10.1007/s11390-024-4058-8.pdf
- Daphne van Zandvoort, Laura Wiersema, Tom Huibers, Sandra van Dulmen, Sjaak Brinkkemper, 19 Jan 2024 (v2), Enhancing Summarization Performance through Transformer-Based Prompt Engineering in Automated Medical Reporting, https://arxiv.org/abs/2311.13274
- Chung-Yu Wang, Alireza DaghighFarsoodeh, Hung Viet Pham, 24 Sep 2024, Task-oriented Prompt Enhancement via Script Generation, https://arxiv.org/abs/2409.16418
- Tongxuan Liu, Wenjiang Xu, Weizhe Huang, Xingyu Wang, Jiaxing Wang, Hailong Yang, Jing Li, 26 Sep 2024, Logic-of-Thought: Injecting Logic into Contexts for Full Reasoning in Large Language Models, https://arxiv.org/abs/2409.17539
- Yi Cheng, Xiao Liang, Yeyun Gong, Wen Xiao, Song Wang, Yuji Zhang, Wenjun Hou, Kaishuai Xu, Wenge Liu, Wenjie Li, Jian Jiao, Qi Chen, Peng Cheng, Wayne Xiong, Integrative Decoding: Improve Factuality via Implicit Self-consistency, 3 Oct 2024 (v2), https://arxiv.org/abs/2410.01556 (Prepends a previous response to improve decoding accuracy.)
- Jose Antonio Lanz, Oct 15, 2024, OpenAI Unveils Secret Meta Prompt—And It’s Very Different From Anthropic's Approach, Under the hood, OpenAI’s structured approach to prompt generation sets it apart from Anthropic’s human-like, chatbot approach. https://decrypt.co/285854/openai-secret-meta-prompt-anthropic
- Vishal Rajput, Oct 2024, The Prompt Report: Prompt Engineering Techniques, https://medium.com/aiguys/the-prompt-report-prompt-engineering-techniques-254464b0b32b
- Till Döhmen, 2024/10/17, Introducing the prompt() Function: Use the Power of LLMs with SQL! https://motherduck.com/blog/sql-llm-prompt-function-gpt-models/
- Afghan Bitani, Sep 4, 2024, How to Make ChatGPT Write Like a Human: (7-Step Prompt) to Make Your Content Come Alive! I tried a total of 58 different prompts in my experiments, Out of these, 7 truly stand out. https://medium.com/@afghanbitani/how-to-make-chatgpt-write-like-a-human-7-step-prompt-to-make-your-content-come-alive-98e0cd51894f
- Mohi Reza, Ioannis Anastasopoulos, Shreya Bhandari, Zachary A. Pardos, 21 Oct 2024], PromptHive: Bringing Subject Matter Experts Back to the Forefront with Collaborative Prompt Engineering for Educational Content Creation, https://arxiv.org/abs/2410.16547
- Foundry AI, Oct 2024, When Should You Move Beyond Prompting and Start Fine-Tuning? https://thefoundryai.com/blog/fine-tuning
- Banghao Chen, Zhaofeng Zhang, Nicolas Langrené, Shengxin Zhu, 5 Sep 2024 (v5), Unleashing the potential of prompt engineering in Large Language Models: a comprehensive review, https://arxiv.org/abs/2310.14735
- Cobus Greyling, Aug 2, 2023, 12 Prompt Engineering Techniques, https://cobusgreyling.medium.com/12-prompt-engineering-techniques-644481c857aa
- Mike Taylor Oct 29, 2024, Five proven prompt engineering techniques (and a few more-advanced tactics), https://www.lennysnewsletter.com/p/five-proven-prompt-engineering-techniques
- Mandana Vaziri, Louis Mandel, Claudio Spiess, Martin Hirzel, 24 Oct 2024, PDL: A Declarative Prompt Programming Language, https://arxiv.org/abs/2410.19135
- Jordan Gibbs, Oct 2024, Become a Master Prompt Engineer with ChatGPT Canvas. Write perfect prompts in a fraction of the time with my new GPT Canvas workflow. https://medium.com/@jordan_gibbs/become-a-master-prompt-engineer-with-chatgpt-canvas-c4eebb8e4c23
- Cameron R. Wolfe, Nov 04, 2024, Automatic Prompt Optimization. Practical techniques for improving prompt quality without manual effort, https://cameronrwolfe.substack.com/p/automatic-prompt-optimization
- Manpreet Singh, Oct 31, 2024, Let's Simplifying How We Talk to AI Using Prompt Declaration Language (PDL), https://pub.towardsai.net/lets-simplifying-how-we-talk-to-ai-using-prompt-declaration-language-pdl-b1824c4de833
- Salvatore Raieli, Nov 2024, What Is The Best Therapy For a Hallucinating AI Patient? Exploring the Art and Science of Prompt Engineering to Cure LLM Hallucinations, https://levelup.gitconnected.com/what-is-the-best-therapy-for-a-hallucinating-ai-patient-acf0cb9b3e00
- Hanqing Li, Diego Klabjan, 11 Nov 2024, Reverse Prompt Engineering, https://arxiv.org/abs/2411.06729
- Ethan Mollick, Nov 24, 2024, Getting started with AI: Good enough prompting. Don't make this hard. https://www.oneusefulthing.org/p/getting-started-with-ai-good-enough
- Dynomight, Nov 2024, OK, I can partly explain the LLM chess weirdness now, https://dynomight.net/more-chess/
- Harsha Nori, Naoto Usuyama, Nicholas King, Scott Mayer McKinney, Xavier Fernandes, Sheng Zhang, Eric Horvitz, 6 Nov 2024, From Medprompt to o1: Exploration of Run-Time Strategies for Medical Challenge Problems and Beyond, https://arxiv.org/abs/2411.03590
- Ian Drosos, Jack Williams, Advait Sarkar, Nicholas Wilson, 3 Dec 2024, Dynamic Prompt Middleware: Contextual Prompt Refinement Controls for Comprehension Tasks, https://arxiv.org/abs/2412.02357
- Gagan Bansal, Jennifer Wortman Vaughan, Saleema Amershi, Eric Horvitz, Adam Fourney, Hussein Mozannar, Victor Dibia, and Daniel S. Weld, Dec 2024, Challenges in Human-Agent Communication, https://www.microsoft.com/en-us/research/uploads/prod/2024/12/HCAI_Agents.pdf
- Krishnasai Addala, Kabir Dev Paul Baghel, Chhavi Kirtani, Avinash Anand, Rajiv Ratn Shah, 6 Dec 2024, Steps are all you need: Rethinking STEM Education with Prompt Engineering, https://arxiv.org/abs/2412.05023
Prompt Efficiency Optimizations
There are several types of speed optimizations of LLM inference that involve prompt tokens. The main ideas are:
- Prompt compression — fewer tokens to process.
- Prompt caching — storing and reusing the outputs or KV cache data.
- Parallel processing — e.g., skeleton-of-thought prompting.
Prompt compression research. Various prompt compression techniques include:
- Prompt compression
- Context compression
- Input token pruning
- Dynamic token pruning
- Token skipping
- Token dropping
- Token merging
Prompt caching research. The various types of caching may include:
- Prompt caching
- Inference cache
- Semantic cache
- Global KV caching
- Prefix KV caching
- Substring KV caching
- Session-based KV caching
- RAG caching
- KV cache compression
General Research on Prompt Engineering
- David Gewirtz, April 19, 2024, Logitech's free AI Prompt Builder is surprisingly handy, https://www.zdnet.com/article/logitechs-free-ai-prompt-builder-is-surprisingly-handy-heres-how-im-using-it/
- Jinliang Yuan, Chen Yang, Dongqi Cai, Shihe Wang, Xin Yuan, Zeling Zhang, Xiang Li, Dingge Zhang, Hanzi Mei, Xianqing Jia, Shangguang Wang, Mengwei Xu, 12 Mar 2024, Mobile Foundation Model as Firmware (v4), https://arxiv.org/abs/2308.14363 (Runs a 10B LLM named "M4" based on Llama and Llama-2 on a Google Pixel 7 Pro, including use of 4-bit, 8-bit and 16-bit quantized versions of the M4 model.)
- Ayush Thakur, 2024, The Art of Prompting: Unleashing the Power of Large Language Models, PDF: https://www.researchgate.net/profile/Ayush-Thakur-9/publication/379044941_The_Art_of_Prompting_Unleashing_the_Power_of_Large_Language_Models/links/65f85d0e32321b2cff8c3104/The-Art-of-Prompting-Unleashing-the-Power-of-Large-Language-Models.pdf
- Yehui Tang, Yunhe Wang, Jianyuan Guo, Zhijun Tu, Kai Han, Hailin Hu, Dacheng Tao, 5 Feb 2024. A Survey on Transformer Compression. https://arxiv.org/abs/2402.05964 (Model compression survey paper with focus on pruning, quantization, knowledge distillation, and efficient architecture design.)
- Omar Khattab, Arnav Singhvi, Paridhi Maheshwari, Zhiyuan Zhang, Keshav Santhanam, Sri Vardhamanan, Saiful Haq, Ashutosh Sharma, Thomas T. Joshi, Hanna Moazam, Heather Miller, Matei Zaharia, Christopher Potts, 5 Oct 2023, DSPy: Compiling Declarative Language Model Calls into Self-Improving Pipelines, https://arxiv.org/abs/2310.03714 Code: https://github.com/stanfordnlp/dspy
- Bijit Ghosh Feb 2024, Advanced Prompt Engineering for Reducing Hallucination, https://medium.com/@bijit211987/advanced-prompt-engineering-for-reducing-hallucination-bb2c8ce62fc6
- Yuechen Zhang, Shengju Qian, Bohao Peng, Shu Liu, Jiaya Jia, 7 Dec 2023, Prompt Highlighter: Interactive Control for Multi-Modal LLMs, https://arxiv.org/abs/2312.04302 Code: https://github.com/dvlab-research/Prompt-Highlighter/ (Allows users to highlight part of their prompt for more specificity.)
- Jinyu Chen, Wenchao Xu, Zicong Hong, Song Guo, Haozhao Wang, Jie Zhang, Deze Zeng, 10 Jan 2024, OTAS: An Elastic Transformer Serving System via Token Adaptation, https://arxiv.org/abs/2401.05031
- Cobus Greyling, Dec 2023, A Comprehensive Survey of Large Language Models (LLMs), https://cobusgreyling.medium.com/a-comprehensive-survey-of-large-language-models-llms-946a30d9288e
- Sander Schulhoff, Michael Ilie, Nishant Balepur, Konstantine Kahadze, Amanda Liu, Chenglei Si, Yinheng Li, Aayush Gupta, HyoJung Han, Sevien Schulhoff, Pranav Sandeep Dulepet, Saurav Vidyadhara, Dayeon Ki, Sweta Agrawal, Chau Pham, Gerson Kroiz, Feileen Li, Hudson Tao, Ashay Srivastava, Hevander Da Costa, Saloni Gupta, Megan L. Rogers, Inna Goncearenco, Giuseppe Sarli, Igor Galynker, Denis Peskoff, Marine Carpuat, Jules White, Shyamal Anadkat, Alexander Hoyle, Philip Resnik, 6 Jun 2024, The Prompt Report: A Systematic Survey of Prompting Techniques, https://arxiv.org/abs/2406.06608
- Alexey Evdokimov, May 7, 2024, Do Prompt Structures Improve Output Quality? Testing Zero-Shot Prompts with GPT-4, Claude 3 and Gemini 1.5, https://ai.gopubby.com/do-prompt-structures-improve-output-quality-testing-prompts-with-gpt-4-claude-3-and-gemini-1-5-4b0eaa286625
- Julian Yip, May 6, 2024, Prompt Like a Data Scientist: Auto Prompt Optimization and Testing with DSPy: Applying machine learning methodology to prompt building, Towards Data Science, https://towardsdatascience.com/prompt-like-a-data-scientist-auto-prompt-optimization-and-testing-with-dspy-ff699f030cb7
- Practicus AI, Jun 11, 2024, The 5 Prompt Engineering Techniques AI Engineers Need to Know, https://levelup.gitconnected.com/the-5-prompt-engineering-techniques-ai-engineers-need-to-know-a208af13d8e4
- Bin Xiao, Burak Kantarci, Jiawen Kang, Dusit Niyato, Mohsen Guizani, 18 Jun 2024 (v2), Efficient Prompting for LLM-based Generative Internet of Things, https://arxiv.org/abs/2406.10382
- Lak Lakshmanan, March 7, 2024, Building an AI Assistant with DSPy: A way to program and tune prompt-agnostic LLM agent pipelines, https://towardsdatascience.com/building-an-ai-assistant-with-dspy-2e1e749a1a95
- Sachit Menon, Richard Zemel, Carl Vondrick, 20 Jun 2024, Whiteboard-of-Thought: Thinking Step-by-Step Across Modalities, https://arxiv.org/abs/2406.14562
- Honghua Dong, Qidong Su, Yubo Gao, Zhaoyu Li, Yangjun Ruan, Gennady Pekhimenko, Chris J. Maddison, Xujie Si, 19 Jun 2024, APPL: A Prompt Programming Language for Harmonious Integration of Programs and Large Language Model Prompts, https://arxiv.org/abs/2406.13161 Code: https://github.com/appl-team/appl (A Python-like script language for prompt engineering integration into applications and agents.)
- Harsha Nori, Yin Tat Lee, Sheng Zhang, Dean Carignan, Richard Edgar, Nicolo Fusi, Nicholas King, Jonathan Larson, Yuanzhi Li, Weishung Liu, Renqian Luo, Scott Mayer McKinney, Robert Osazuwa Ness, Hoifung Poon, Tao Qin, Naoto Usuyama, Chris White, Eric Horvitz, 28 Nov 2023, Can Generalist Foundation Models Outcompete Special-Purpose Tuning? Case Study in Medicine, https://arxiv.org/abs/2311.16452
- Cheng Li, Jindong Wang, Yixuan Zhang, Kaijie Zhu, Wenxin Hou, Jianxun Lian, Fang Luo, Qiang Yang, Xing Xie, 12 Nov 2023 (v7), Large Language Models Understand and Can be Enhanced by Emotional Stimuli, https://arxiv.org/abs/2307.11760 https://llm-enhance.github.io/
- Chengrun Yang, Xuezhi Wang, Yifeng Lu, Hanxiao Liu, Quoc V. Le, Denny Zhou, Xinyun Chen, 15 Apr 2024 (v3), Large Language Models as Optimizers, https://arxiv.org/abs/2309.03409
- Teknium, 2024, Prompt Engineering Tool, https://github.com/teknium1/Prompt-Engineering-Toolkit
- Mykel Nahorniak, June 12th, 2024, LLM Prompting for Software Development, https://www.mykel.org/notes/llm-prompting-for-software-development Code: https://github.com/mykeln/todo-example
- Daniel Lopes, June 21, 2024, A Comprehensive Guide to Text Prompt Engineering Techniques, https://journal.daniellopes.dev/p/practical-prompt-engineering-notes
- Eugene Yan, 2024, Prompting Fundamentals and How to Apply them Effectively, https://eugeneyan.com/writing/prompting/
- Louis-François Bouchard, Louie Peters, May 2024, Chapter 4: Prompting, and Chapter 6, Prompting with LangChain, Building LLMs for Production: Enhancing LLM Abilities and Reliability with Prompting, Fine-Tuning, and RAG, https://www.amazon.com/Building-LLMs-Production-Reliability-Fine-Tuning/dp/B0D4FFPFW8/
- Valentina Alto, 2024, Chapter 4: Prompt Engineering, Building LLM-Powered Applications: Create intelligence apps and agents with large language models, Packt Publishing, https://www.amazon.com/Building-LLM-Apps-Intelligent-Language/dp/1835462316/
- Aarushi Kansal, Chapter 8: Prompt Engineering Techniques, Building Generative AI-Powered Apps: A Hands-on Guide for Developers, Apress, https://www.amazon.com/Building-Generative-AI-Powered-Apps-Hands-ebook/dp/B0CTXXP1S4/
- Google, 2024, Use system instructions to steer the behavior of a model, https://ai.google.dev/gemini-api/docs/system-instructions?lang=python
- Yi Zhou, Dec 16, 2023, Optimizing GenAI: Comparing Model Training, Fine-Tuning, RAG, and Prompt Engineering, https://medium.com/generative-ai-revolution-ai-native-transformation/optimizing-genai-comparing-model-training-fine-tuning-rag-and-prompt-engineering-7a7c6c65e0f0
- Alexey Evdokimov, Jun 8, 2024, 12 Questions to Consider When Using AI: Path to AI Power User, https://ai.gopubby.com/12-questions-to-consider-when-using-ai-path-to-ai-power-user-9c7e8de1f8b7
- Simon Bisson, Jul 25, 2024, Build and manage LLM prompts with Prompty, https://www.infoworld.com/article/3477435/build-and-manage-llm-prompts-with-prompty.html
- James Groeneveld, Aug 1, 2024, Prompt Design at Character.AI, Character.AI blog, https://research.character.ai/prompt-design-at-character-ai/
- Louis-François Bouchard, Aug 03, 2024, The Myth of Advanced Prompting: Making Simple Things Sound Complicated, https://louisbouchard.substack.com/p/the-myth-of-advanced-prompting-making
- Marko Zivkovic, Aug 06, 2024, Discovered Apple Intelligence prompts show Apple's attempt at preventing AI disaster, https://appleinsider.com/articles/24/08/06/discovered-apple-intelligence-prompts-show-apples-attempt-at-preventing-ai-disaster
- Gilbert Mizrahi, Jan 2024, Unlocking the Secrets of Prompt Engineering: Master the art of creative language generation to accelerate your journey from novice to pro, Packt Publishing, https://www.amazon.com/Unlocking-Secrets-Prompt-Engineering-generation/dp/1835083838/
- Aymen El Amri, Aug 2023, LLM Prompt Engineering For Developers: The Art and Science of Unlocking LLMs' True Potential, Faun, https://www.amazon.com/dp/B0CH43Q839/
- Russel Grant, November 28, 2023 Prompt Engineering and ChatGPT: How to Easily 10X Your Productivity, Creativity, and Make More Money Without Working Harder, https://www.amazon.com/dp/1962079066/
- Nathan Hunter, January 19, 2023 The Art of Prompt Engineering with chatGPT: A Hands-On Guide (Learn AI Tools the Fun Way!), https://www.amazon.com/Art-Prompt-Engineering-chatGPT-Hands/dp/1739296710/
- Yi Zhou, Oct 2023, Prompt Design Patterns: Mastering the Art and Science of Prompt Engineering (Generative AI Revolution Series), https://www.amazon.com/Prompt-Design-Patterns-Engineering-Generative/dp/B0CL2JP16V/
- Vajo Lukic, May 2024, Practical Prompt Engineering: A Step-by-Step Guide to Using AI Language Models, https://www.amazon.com/Practical-Prompt-Engineering-Step-Step/dp/B0D367JBHT/
- Dr. Lance Eliot, March 20, 2024 Advances In Prompt Engineering For Generative AI: Practical Advances In Artificial Intelligence And Machine Learning, https://www.amazon.com/Advances-Prompt-Engineering-Generative-Intelligence/dp/1957386177/
- Ethan James Whitfield, Jan 2024, ChatGPT Prompt Engineering: Advanced Prompts Strategies and Expert Tips for Achieving Financial Success Through AI, https://www.amazon.com/ChatGPT-Prompt-Engineering-Strategies-Achieving-ebook/dp/B0CT73T2M5/
- David Scott Bernstein, Aug 2023, Prompt Engineering for Everyone: A Comprehensive Guide to Unlock the Potential of ChatGPT and AI-Language Models, https://www.amazon.com/Prompt-Engineering-Everyone-Comprehensive-AI-Language/dp/B0CFCZCJNG/
- John Berryman, Albert Ziegler, January 28, 2025, Prompt Engineering for LLMs: The Art and Science of Building Large Language Model-Based Applications, O'Reilly Media, https://www.amazon.com/Prompt-Engineering-LLMs-Model-Based-Applications/dp/1098156153/
- Apurv Sibal, February 26, 2025, Hands-On Prompt Engineering: Learning to Program ChatGPT Using OpenAI APIs, Wiley, https://www.amazon.com/Hands-Prompt-Engineering-Learning-Program/dp/1394210760/
- James Phoenix, Mike Taylor, June 25, 2024, Prompt Engineering for Generative AI: Future-Proof Inputs for Reliable AI Outputs, O'Reilly Media, https://www.amazon.com/Prompt-Engineering-Generative-AI-Future-Proof/dp/109815343X/
- Sivesh Sukumar, Nov 21, 2023, We’ve got the picks and shovels — so what’s stopping the gold miners? https://medium.com/balderton/weve-got-the-picks-and-shovels-so-what-s-stopping-the-gold-miners-f39544f0f321
- Google, Aug 2024, Prompt gallery, https://ai.google.dev/gemini-api/prompts
- Antonis Iliakis, Jul 5, 2024, Amazing Chat GPT Prompts That Will Take You to The Next Level — Part 3, https://generativeai.pub/i-asked-chat-gpt-to-think-like-a-human-heres-what-i-found-out-7a6017109d66
- https://levelup.gitconnected.com/zero-to-hero-crafting-a-custom-gpt-e2ef22653b1f
- Emilia David, September 3, 2024, Anthropic to release system prompts for Artifacts, latest Claude family prompts found incomplete, https://venturebeat.com/ai/anthropic-to-release-system-prompts-for-artifacts-latest-claude-family-prompts-found-incomplete/
- Emilia David, August 27, 2024, Anthropic releases AI model system prompts, winning praise for transparency, https://venturebeat.com/ai/anthropic-releases-ai-model-system-prompts-winning-praise-for-transparency/
- Tiernan Ray, Sept. 4, 2024, Google's Gems are a gentle introduction to AI prompt engineering: Google's pre-built Gems offer prompt examples you can modify to get started with your own custom bot, https://www.zdnet.com/article/googles-gems-are-a-gentle-introduction-to-ai-prompt-engineering/
- David Gewirtz, Sept. 5, 2024, 6 ways to write better ChatGPT prompts - and get the results you want faster, https://www.zdnet.com/article/6-ways-to-write-better-chatgpt-prompts-and-get-the-results-you-want-faster/
- Kris Ograbek, Aug 30, 2024, 6 Hard-learned Lessons from My First Project as a Freelance AI Engineer, https://ai.gopubby.com/6-hard-learned-lessons-from-my-first-project-as-a-freelance-ai-engineer-9519e6edee90
- Heiko Hotz, Sep 2024, Automated Prompt Engineering: The Definitive Hands-On Guide, https://towardsdatascience.com/automated-prompt-engineering-the-definitive-hands-on-guide-1476c8cd3c50
- Emilia David, September 10, 2024, ServiceNow introduces a library of enterprise AI agents you can customize to fit your workflow, https://venturebeat.com/ai/servicenow-introduces-a-library-of-enterprise-ai-agents-you-can-customize-to-fit-your-workflow/
- Asankhaya Sharma (codelion), Sep 2024, Optillm: Optimizing inference proxy for LLMs, https://github.com/codelion/optillm
- Pranab Sahoo, Ayush Kumar Singh, Sriparna Saha, Vinija Jain, Samrat Mondal, Aman Chadha, 5 Feb 2024, A Systematic Survey of Prompt Engineering in Large Language Models: Techniques and Applications, https://arxiv.org/abs/2402.07927
- Hunter Lightman, Vineet Kosaraju, Yura Burda, Harri Edwards, Bowen Baker, Teddy Lee, Jan Leike, John Schulman, Ilya Sutskever, Karl Cobbe, 31 May 2023, Let's Verify Step by Step, https://arxiv.org/abs/2305.20050
- Emilia David, September 12, 2024, How to prompt on OpenAI’s new o1 models, https://venturebeat.com/ai/how-to-prompt-on-openai-o1/ (Prompt engineering is different for o1, such as "don't use chain of thought.")
- Xiaohan Xu, Chongyang Tao, Tao Shen, Can Xu, Hongbo Xu, Guodong Long, Jian-guang Lou, 29 Feb 2024 (v2), Re-Reading Improves Reasoning in Large Language Models, https://arxiv.org/abs/2309.06275
- Latent Space, Sep 20, 2024, The Ultimate Guide to Prompting: Why DSPy is underrated, how to do few-shots properly, why role based prompting doesn't work, and how to HackAPrompt https://www.latent.space/p/learn-prompting
- Daphne van Zandvoort, Laura Wiersema, Tom Huibers, Sandra van Dulmen, Sjaak Brinkkemper, 19 Jan 2024 (v2), Enhancing Summarization Performance through Transformer-Based Prompt Engineering in Automated Medical Reporting, https://arxiv.org/abs/2311.13274
- Deven Panchal, September 22, 2024, Why prompt engineering is one of the most valuable skills today, https://venturebeat.com/ai/why-prompt-engineering-is-one-of-the-most-valuable-skills-today/
- Matt Asay, Sep 23, 2024, Too much assembly required for AI, https://www.infoworld.com/article/3536292/too-much-assembly-required-for-ai.html
- Laria Reynolds, Kyle McDonell, 15 Feb 2021, Prompt Programming for Large Language Models: Beyond the Few-Shot Paradigm, https://arxiv.org/abs/2102.07350
- Banghao Chen, Zhaofeng Zhang, Nicolas Langrené, Shengxin Zhu, 5 Sep 2024 (v5), Unleashing the potential of prompt engineering in Large Language Models: a comprehensive review, https://arxiv.org/abs/2310.14735
- Cobus Greyling, Aug 2, 2023, 12 Prompt Engineering Techniques, https://cobusgreyling.medium.com/12-prompt-engineering-techniques-644481c857aa
- Mike Taylor Oct 29, 2024, Five proven prompt engineering techniques (and a few more-advanced tactics), https://www.lennysnewsletter.com/p/five-proven-prompt-engineering-techniques
- Ethan Mollick, Nov 24, 2024, Getting started with AI: Good enough prompting. Don't make this hard. https://www.oneusefulthing.org/p/getting-started-with-ai-good-enough
More AI Research
Read more about:
- Advanced AI Mathematics
- Matrix Algebra
- Zero-Multiplication Models
- Approximate Computing
- Inference Optimizations
- Loop Optimizations
- Code Optimizations
- « Research Home