{"id":231,"date":"2024-07-07T17:40:16","date_gmt":"2024-07-07T17:40:16","guid":{"rendered":"https:\/\/blogs.dickinson.edu\/academic-technology\/?p=231"},"modified":"2024-08-15T14:33:19","modified_gmt":"2024-08-15T14:33:19","slug":"prompt-engineering-and-basics-of-ai-2","status":"publish","type":"post","link":"https:\/\/blogs.dickinson.edu\/academic-technology\/2024\/07\/07\/prompt-engineering-and-basics-of-ai-2\/","title":{"rendered":"Prompt Engineering and Basics  of AI"},"content":{"rendered":"<p><b><span data-contrast=\"auto\">Prompt Engineering<\/span><\/b><span data-ccp-props=\"{&quot;201341983&quot;:0,&quot;335559739&quot;:160,&quot;335559740&quot;:279}\">\u00a0<\/span><\/p>\n<p><span data-contrast=\"auto\">\u201cPrompt engineering\u201d may be the most common new term created with the growth of AI. \u00a0It also suggests more complexity than is involved. However, if like most people, you\u2019re limiting your AI prompts to one or two sentence questions or requests for text, a basic understanding of writing effective prompts can improve your results exponentially.<\/span><span data-ccp-props=\"{&quot;201341983&quot;:0,&quot;335559739&quot;:160,&quot;335559740&quot;:279}\">\u00a0<\/span><\/p>\n<p><span data-contrast=\"auto\">The basis much of the content in this section comes from this article, <\/span><a href=\"https:\/\/towardsdatascience.com\/how-i-won-singapores-gpt-4-prompt-engineering-competition-34c195a93d41#1cfa\"><span data-contrast=\"none\">How I Won Singapore\u2019s GPT-4 Prompt Engineering Competition<\/span><\/a><span data-contrast=\"auto\"> by Sheila Teo. If you\u2019re intrigued by the end of this post, I\u2019d encourage you to continue\u00a0reading there.<\/span><span data-ccp-props=\"{&quot;201341983&quot;:0,&quot;335559739&quot;:160,&quot;335559740&quot;:279}\">\u00a0<\/span><\/p>\n<p><span data-contrast=\"auto\">When writing a prompt, it\u2019s important to give the AI as much context and detail as possible. Because they are prediction engines, their output is by default very general and vague. Details and context are what allow them to produce higher quality and more targeted output. The article linked above uses an acronym to suggest elements to be included in every prompt, CO-STAR. \u00a0The first two you should probably have in every prompt. The last four only if you don\u2019t want what the AI tends assume by default.<\/span><span data-ccp-props=\"{&quot;201341983&quot;:0,&quot;335559739&quot;:160,&quot;335559740&quot;:279}\">\u00a0<\/span><\/p>\n<ul>\n<li data-leveltext=\"\uf0b7\" data-font=\"Symbol\" data-listid=\"1\" data-list-defn-props=\"{&quot;335552541&quot;:1,&quot;335559683&quot;:0,&quot;335559684&quot;:-2,&quot;335559685&quot;:720,&quot;335559991&quot;:360,&quot;469769226&quot;:&quot;Symbol&quot;,&quot;469769242&quot;:[8226],&quot;469777803&quot;:&quot;left&quot;,&quot;469777804&quot;:&quot;\uf0b7&quot;,&quot;469777815&quot;:&quot;hybridMultilevel&quot;}\" aria-setsize=\"-1\" data-aria-posinset=\"1\" data-aria-level=\"1\"><span data-contrast=\"auto\">Context \u2013 The more detail you can provide here, the less generic and more useful the response you\u2019ll receive. Include background information, who you are, relevant facts, related examples, and reasoning for the request should all be included. Error on the side of verbosity.<\/span><span data-ccp-props=\"{&quot;201341983&quot;:0,&quot;335559739&quot;:160,&quot;335559740&quot;:279}\">\u00a0<\/span><\/li>\n<\/ul>\n<ul>\n<li data-leveltext=\"\uf0b7\" data-font=\"Symbol\" data-listid=\"1\" data-list-defn-props=\"{&quot;335552541&quot;:1,&quot;335559683&quot;:0,&quot;335559684&quot;:-2,&quot;335559685&quot;:720,&quot;335559991&quot;:360,&quot;469769226&quot;:&quot;Symbol&quot;,&quot;469769242&quot;:[8226],&quot;469777803&quot;:&quot;left&quot;,&quot;469777804&quot;:&quot;\uf0b7&quot;,&quot;469777815&quot;:&quot;hybridMultilevel&quot;}\" aria-setsize=\"-1\" data-aria-posinset=\"2\" data-aria-level=\"1\"><span data-contrast=\"auto\">Objective \u2013 Be very specific and don\u2019t assume. I recently asked an AI to produce an exam for a German textbook, which it did, but in English. Specify as many requirements as you can. Nothing is too obvious.<\/span><span data-ccp-props=\"{&quot;201341983&quot;:0,&quot;335559739&quot;:160,&quot;335559740&quot;:279}\">\u00a0<\/span><\/li>\n<\/ul>\n<ul>\n<li data-leveltext=\"\uf0b7\" data-font=\"Symbol\" data-listid=\"1\" data-list-defn-props=\"{&quot;335552541&quot;:1,&quot;335559683&quot;:0,&quot;335559684&quot;:-2,&quot;335559685&quot;:720,&quot;335559991&quot;:360,&quot;469769226&quot;:&quot;Symbol&quot;,&quot;469769242&quot;:[8226],&quot;469777803&quot;:&quot;left&quot;,&quot;469777804&quot;:&quot;\uf0b7&quot;,&quot;469777815&quot;:&quot;hybridMultilevel&quot;}\" aria-setsize=\"-1\" data-aria-posinset=\"3\" data-aria-level=\"1\"><span data-contrast=\"auto\">Style and Tone \u2013 Here we start with optional parameters. \u00a0AI\u2019s tend to write in what I consider \u201cWikipedia\u201d style and tone. Maybe that\u2019s what you want, if so, you\u2019re fine. If you want it to sound more conversational, academic, compelling, etc. specify it here.<\/span><span data-ccp-props=\"{&quot;201341983&quot;:0,&quot;335559739&quot;:160,&quot;335559740&quot;:279}\">\u00a0<\/span><\/li>\n<\/ul>\n<ul>\n<li data-leveltext=\"\uf0b7\" data-font=\"Symbol\" data-listid=\"1\" data-list-defn-props=\"{&quot;335552541&quot;:1,&quot;335559683&quot;:0,&quot;335559684&quot;:-2,&quot;335559685&quot;:720,&quot;335559991&quot;:360,&quot;469769226&quot;:&quot;Symbol&quot;,&quot;469769242&quot;:[8226],&quot;469777803&quot;:&quot;left&quot;,&quot;469777804&quot;:&quot;\uf0b7&quot;,&quot;469777815&quot;:&quot;hybridMultilevel&quot;}\" aria-setsize=\"-1\" data-aria-posinset=\"4\" data-aria-level=\"1\"><span data-contrast=\"auto\">Audience \u2013 It will assume a generic public audience as you would see on the internet. For my AI queries, I\u00a0am frequently requesting dialogue or texts for introductory language learners, so I specify that my audience is a class of beginning students or native speaking children in the target language.<\/span><span data-ccp-props=\"{&quot;201341983&quot;:0,&quot;335559739&quot;:160,&quot;335559740&quot;:279}\">\u00a0<\/span><\/li>\n<\/ul>\n<ul>\n<li data-leveltext=\"\uf0b7\" data-font=\"Symbol\" data-listid=\"1\" data-list-defn-props=\"{&quot;335552541&quot;:1,&quot;335559683&quot;:0,&quot;335559684&quot;:-2,&quot;335559685&quot;:720,&quot;335559991&quot;:360,&quot;469769226&quot;:&quot;Symbol&quot;,&quot;469769242&quot;:[8226],&quot;469777803&quot;:&quot;left&quot;,&quot;469777804&quot;:&quot;\uf0b7&quot;,&quot;469777815&quot;:&quot;hybridMultilevel&quot;}\" aria-setsize=\"-1\" data-aria-posinset=\"5\" data-aria-level=\"1\"><span data-contrast=\"auto\">Response \u2013 You&#8217;ll often want to include the length of the text here. Keep in mind, AI\u2019s can do more than plain text. Maybe you\u2019d like html to paste into a Moodle page, information formatted as a table, etc.<\/span><span data-ccp-props=\"{&quot;201341983&quot;:0,&quot;335559739&quot;:160,&quot;335559740&quot;:279}\">\u00a0<\/span><\/li>\n<\/ul>\n<p><b><span data-contrast=\"auto\">System prompts<\/span><\/b><span data-ccp-props=\"{&quot;201341983&quot;:0,&quot;335559739&quot;:160,&quot;335559740&quot;:279}\">\u00a0<\/span><\/p>\n<p><span data-contrast=\"auto\">Behind every AI, there is something called a system prompt that governs the AI\u2019s behavior. They are always something along the lines of \u201cYou are a helpful assistant &#8230;\u201d. In theory, these are secret, but they\u2019ve been reverse engineered at some point on the major platforms.\u00a0 These cannot be changed, however, if you\u2019re using ChatGPT they do give you a way to add them. Click your profile icon top right and then Customize ChatGPT<\/span><span data-ccp-props=\"{&quot;201341983&quot;:0,&quot;335559685&quot;:0,&quot;335559739&quot;:160,&quot;335559740&quot;:279}\">\u00a0<\/span><\/p>\n<p><span data-contrast=\"auto\">This can be a powerful feature because of what is called the \u201ccontext window\u201d. AI bots will remember previous parts of your conversation when providing a response. This is why iterative queries are effective; however, there are limitations. Once the total number of words\/tokens exceeds AI\u2019s context window, the bot will begin to \u201cforget\u201d text at the beginning of your conversation, which may include your most important initial prompt. By adding information here, you can remind the bot before each query to that information is not lost.<\/span><span data-ccp-props=\"{&quot;201341983&quot;:0,&quot;335559685&quot;:0,&quot;335559739&quot;:160,&quot;335559740&quot;:279}\">\u00a0<\/span><\/p>\n<p><strong>Delimiters<\/strong><\/p>\n<p>AI will understand the use of delimiters within your text. This is useful when you&#8217;re trying to create a longer documents or one with defined sections you&#8217;d like to include. For example, I created this <a href=\"https:\/\/docs.google.com\/document\/d\/1VPoCFK3aNzeX9kqWBTD7Fq8d60q19HuTKGc4FTS0s8Q\/edit?usp=sharing\" target=\"_blank\" rel=\"noopener\">prompt<\/a> to generate a draft a an exam for beginning German with the usual sections on reading, grammar, listening comprehension, etc.<\/p>\n<p><b><span data-contrast=\"auto\">Less common but useful AI functions<\/span><\/b><span data-ccp-props=\"{&quot;201341983&quot;:0,&quot;335559685&quot;:0,&quot;335559739&quot;:160,&quot;335559740&quot;:279}\">\u00a0<\/span><\/p>\n<p><span data-contrast=\"auto\">Data cleaning formatting \u2013 Most examples you\u2019ll find are from those who work daily with data using json, xml, and other formats. All of us, though, have at some point received tables or lists in Word that wished to import into Excel, or we received data with formatting errors. \u00a0AI can help with both, taking text and formating to .csv for the Excel or .html for Moodle, websites, and blog posts. It will also understand natural language, so you could ask it to combine first and last names into a single column, extract the city from an address line, etc.<\/span><span data-ccp-props=\"{&quot;201341983&quot;:0,&quot;335559739&quot;:160,&quot;335559740&quot;:279}\">\u00a0<\/span><\/p>\n<p><span data-contrast=\"auto\">AI as explainer \u2013 Again you\u2019ll likely see most examples include explanations of computer code. AI does very well at explaining and documenting code, but it can do the same for text with unfamiliar technical terms, foreign languages, and more. The only caveat I\u2019ll include is you should be able to understand the text well enough that after hearing the explanation you can decide if it\u2019s accurate. This is an area where AI\u2019s expressed confidence can be misplaced.<\/span><span data-ccp-props=\"{&quot;201341983&quot;:0,&quot;335559739&quot;:160,&quot;335559740&quot;:279}\">\u00a0<\/span><\/p>\n<p><span data-contrast=\"auto\">AI for simulations \u2013 I am big fan for the potential for chatbots for foreign language practice. They can be made to be far more open-ended, informal, and conversational than chatbots even six months ago with further improvements to voice communication on the way. AI is also useful for any other situation where role-playing could be useful: practice interviews, business scenarios, debates, even recreating hypothetical historical interactions.<\/span><span data-ccp-props=\"{&quot;201341983&quot;:0,&quot;335559739&quot;:160,&quot;335559740&quot;:279}\">\u00a0<\/span><\/p>\n<p><span data-contrast=\"auto\">As always, if you have other suggestions, leave a comment below or send us an email at <\/span><a href=\"mailto:academictechnology@dickinson.edu\"><span data-contrast=\"none\">academictechnology@dickinson.edu<\/span><\/a><span data-contrast=\"auto\">. <\/span><span data-ccp-props=\"{&quot;201341983&quot;:0,&quot;335559731&quot;:0,&quot;335559739&quot;:160,&quot;335559740&quot;:279}\">\u00a0<\/span><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Prompt Engineering\u00a0 \u201cPrompt engineering\u201d may be the most common new term created with the growth of AI. \u00a0It also suggests more complexity than is involved. However, if like most people, you\u2019re limiting your AI prompts to one or two sentence questions or requests for text, a basic understanding of writing effective prompts can improve your [&hellip;]<\/p>\n","protected":false},"author":776,"featured_media":232,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-231","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/blogs.dickinson.edu\/academic-technology\/wp-json\/wp\/v2\/posts\/231","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blogs.dickinson.edu\/academic-technology\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blogs.dickinson.edu\/academic-technology\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blogs.dickinson.edu\/academic-technology\/wp-json\/wp\/v2\/users\/776"}],"replies":[{"embeddable":true,"href":"https:\/\/blogs.dickinson.edu\/academic-technology\/wp-json\/wp\/v2\/comments?post=231"}],"version-history":[{"count":0,"href":"https:\/\/blogs.dickinson.edu\/academic-technology\/wp-json\/wp\/v2\/posts\/231\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/blogs.dickinson.edu\/academic-technology\/wp-json\/wp\/v2\/media\/232"}],"wp:attachment":[{"href":"https:\/\/blogs.dickinson.edu\/academic-technology\/wp-json\/wp\/v2\/media?parent=231"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blogs.dickinson.edu\/academic-technology\/wp-json\/wp\/v2\/categories?post=231"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blogs.dickinson.edu\/academic-technology\/wp-json\/wp\/v2\/tags?post=231"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}