Introduction to Prompt Engineering using GenAI (generative artificial intelligence)
ChatGPT, a virtual chatbot is based on GenAI technology that can mimic the grammar and structure of writing, becoming a very large language model. Prompt Engineering provides prompts strategically crafted to facilitate retrieval of complex responses without having to write a single line of code.
Prompt Engineering involves several key principles (Lo, 204-205, 2023):
• Clarity and Precision can lead to more relevant responses
• Providing context within prompts can improve the quality of generated output
• Desired Format can be anticipated
• Verbosity Control can be managed
These principles represent the foundation by which an individual can influence the performance of GenAI models. However, according to Lo there is another aspect to the prompt engineering, which he is referring to as “Artistry.”
The Artistry in prompt engineering stimulates “more engaging, contextually rich, and effective prompts” (Lo, 205, 2023). I will discuss this subject in a cursory manner. It includes: creativity, intuition, iterative refinement, personalization and adaptation, collaboration and interdisciplinarity knowledge, and integrating the CLEAR framework.
ChatGPT prompt engineering 101 may use a very simple dialog, for example, which can then be revised according to your needs many times, keeping in mind that revisions may push you down the path of hallucinations (false information).
For example, take this simple formula: Acting as a [ROLE] perform [TASK] in [FORMAT] (Collins and Mohr, 79-80, 2024)
ROLE: manager, therapist, journalist, financial officer TASK: write an essay, book outline, email, create social media post, production description, write a cover letter, blog post, summarize this video script, create advertising copy and so on FORMAT spreadsheets, programing code, file types such as pdf, html, and markdown, Autoformat output, table, list, summary, cvs, plain text, rich text, pdf, and so on.
At this point you need to refine your input to be more specific, as per authors’ specifications (Collins and Mohr, 80, 2024).
Rewrite [YOUR TASK] in the [STYLE], [TONE], [VOICE] and [PERSONALITY]. You can also rewrite it in the first, second and third person, along with specifying word counts (ibid).
The authors recommend that you follow the “Chain of Thought” proposed in a paper cited below (Yao et. Al. 2023), to understand better the entire process.
References
Collins, B., & Mohr, N. (2024). Make AI work for you. Linux Format, 314, 78–81.
Lo, L. S. (2023). The art and science of prompt engineering: A new literacy in the information age. Internet Reference Services Quarterly, 27(4), 203-210.
Yao, S., Yu, D., Zhao, J., Shafran, I., Griffiths, T., Cao, Y., & Narasimhan, K. (2023). Tree of thoughts: Deliberate problem solving with large language models. Advances in neural information processing systems, 36, 11809-11822. Available at: https://arxiv.org/abs/2305.10601
0 Comments.