{"id":4184,"date":"2024-02-27T07:53:31","date_gmt":"2024-02-27T07:53:31","guid":{"rendered":"https:\/\/toshareproject.it\/artmakerblog\/?p=4184"},"modified":"2024-02-27T07:53:31","modified_gmt":"2024-02-27T07:53:31","slug":"the-tall-weeds-of-llm-prompts","status":"publish","type":"post","link":"https:\/\/toshareproject.it\/artmakerblog\/the-tall-weeds-of-llm-prompts\/","title":{"rendered":"The tall weeds of LLM prompts"},"content":{"rendered":"<p>*It&#8217;s interesting that the cost of prompts and platforms is becoming a major issue.<\/p>\n<p>From: The Prompt newsletter <\/p>\n<p>https:\/\/www.theprompt.io\/p\/write-great-llm-prompt<\/p>\n<p>I\u2019m seeing four things with folks who use LLMs in production right now:<\/p>\n<p>GPT-4 can do many things very well, but it can become quite expensive for production.<\/p>\n<p>Builders turn to GPT-3.5 Turbo for cost savings, but struggle with results;<br \/>\nThey then want to test models for other providers like Google and Anthropic, or an open-sourced model but they don&#8217;t get the same results.<\/p>\n<p>And lastly, they start thinking whether to fine-tune their own model.<\/p>\n<p>Let\u2019s talk about the strategies and how to go through this process.<\/p>\n<p>How to lower costs with GPT-4<\/p>\n<p>If you have a more complex LLM workflow, and you\u2019re using GPT-4 for every step of that workflow, the costs can start to rise.<br \/>\nTo reduce the cost, ask yourself this question:<\/p>\n<p>Which part of my workflow can I do with a secondary model?<\/p>\n<p>For example, GPT-3 will do great with summarization, but it won\u2019t do that well at capturing intent from a customer message. You\u2019ll definitely need GPT-4 for that.<\/p>\n<p>Depending on the use-case, you might end up using GPT-3.5 for more complex tasks. To do that, you need to create prompts that are similar to how the model was trained.<\/p>\n<p>In the next section we\u2019ll share some best practices that can improve your output.<\/p>\n<p>How to get better results with GPT-3.5<\/p>\n<p>Below are some tips to make GPT-3.5 work more like GPT-4:<\/p>\n<p>Use \u201cDo\u201d instead of \u201cDon\u2019t\u201d<\/p>\n<p>Separate Instructions from Context with ### or \u201c\u201c\u201c<\/p>\n<p>Be direct: Use \u201cYou must\u201d, or \u201cYour task is\u201d\u2026<\/p>\n<p>Assign a role<\/p>\n<p>Instead of just writing \u201cconversational style\u201d, add a sentence that follow that style, and ask the model to replicate that<\/p>\n<p>Add info about the end-user<\/p>\n<p>Provide the format structure of the output<\/p>\n<p>Give examples (use Chain of thought prompting for more complex reasoning tasks)<\/p>\n<p>Use emotion prompts like \u201cThis is very important for my career\u201d. (((Why does this work?)))<\/p>\n<p>If your prompt is complex, split it into more prompts and chain them together (it will be easier for GPT-3.5 to follow multiple but simpler prompts)<\/p>\n<p>Please refer to my original post for additional information and examples.<\/p>\n<p>How to prompt Claude?<\/p>\n<p>It\u2019s really interesting to me that we always default to prompting Claude the same way that we\u2019re prompting OpenAI\u2019s models. The reality is that this is a model that has been trained using a completely different set of techniques and methodologies, and requires a prompt design that adheres to those settings.<\/p>\n<p>Here\u2019s a quick rundown on how you should prompt Claude:<\/p>\n<p>Use XML tags like <instructions><\/instructions> to separate instructions from content<\/p>\n<p>Use \u201cDo\u201d instead of \u201cDon\u2019t\u201d, and be direct<\/p>\n<p>Start the Assistant output with the first token of the expected response<\/p>\n<p>Assign a role, and pass it in the Assistant output as well<\/p>\n<p>Ask Claude to reason through the problem before providing the answer<\/p>\n<p>Provide Examples (few-shot, chain of thought prompting)<\/p>\n<p>If you\u2019re dealing with longer documents, always ask your question at the end of the prompt<\/p>\n<p>Break complex prompts into multiple prompts<\/p>\n<p>If this seems a bit confusing, read my prompting guide for Claude, which includes detailed examples and instructions.<\/p>\n<p>I\u2019m currently working on a prompting guide for Gemini and Mixtral, and will share it soon&#8230;.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>*It&#8217;s interesting that the cost of prompts and platforms is becoming a major issue. From: The Prompt newsletter https:\/\/www.theprompt.io\/p\/write-great-llm-prompt I\u2019m seeing four things with folks who use LLMs in production right now: GPT-4 can do many things very well, but it can become quite expensive for production. Builders turn to GPT-3.5 Turbo for cost savings, [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-4184","post","type-post","status-publish","format-standard","hentry","category-uncategorised"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v17.0 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>The tall weeds of LLM prompts | Artmaker Blog<\/title>\n<meta name=\"description\" content=\"The tall weeds of LLM prompts | Artmaker Blog\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/toshareproject.it\/artmakerblog\/the-tall-weeds-of-llm-prompts\/\" \/>\n<meta property=\"og:locale\" content=\"en_GB\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"The tall weeds of LLM prompts | Artmaker Blog\" \/>\n<meta property=\"og:description\" content=\"The tall weeds of LLM prompts | Artmaker Blog\" \/>\n<meta property=\"og:url\" content=\"https:\/\/toshareproject.it\/artmakerblog\/the-tall-weeds-of-llm-prompts\/\" \/>\n<meta property=\"og:site_name\" content=\"Artmaker Blog\" \/>\n<meta property=\"article:published_time\" content=\"2024-02-27T07:53:31+00:00\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Bruce Sterling\" \/>\n\t<meta name=\"twitter:label2\" content=\"Estimated reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"3 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebSite\",\"@id\":\"https:\/\/toshareproject.it\/artmakerblog\/#website\",\"url\":\"https:\/\/toshareproject.it\/artmakerblog\/\",\"name\":\"Artmaker Blog\",\"description\":\"on Toshareproject.it - curated by Bruce Sterling\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/toshareproject.it\/artmakerblog\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"en-GB\"},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/toshareproject.it\/artmakerblog\/the-tall-weeds-of-llm-prompts\/#webpage\",\"url\":\"https:\/\/toshareproject.it\/artmakerblog\/the-tall-weeds-of-llm-prompts\/\",\"name\":\"The tall weeds of LLM prompts | Artmaker Blog\",\"isPartOf\":{\"@id\":\"https:\/\/toshareproject.it\/artmakerblog\/#website\"},\"datePublished\":\"2024-02-27T07:53:31+00:00\",\"dateModified\":\"2024-02-27T07:53:31+00:00\",\"author\":{\"@id\":\"https:\/\/toshareproject.it\/artmakerblog\/#\/schema\/person\/6f20726ed2761431f3e0ff4e096c3085\"},\"description\":\"The tall weeds of LLM prompts | Artmaker Blog\",\"breadcrumb\":{\"@id\":\"https:\/\/toshareproject.it\/artmakerblog\/the-tall-weeds-of-llm-prompts\/#breadcrumb\"},\"inLanguage\":\"en-GB\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/toshareproject.it\/artmakerblog\/the-tall-weeds-of-llm-prompts\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/toshareproject.it\/artmakerblog\/the-tall-weeds-of-llm-prompts\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/toshareproject.it\/artmakerblog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"The tall weeds of LLM prompts\"}]},{\"@type\":\"Person\",\"@id\":\"https:\/\/toshareproject.it\/artmakerblog\/#\/schema\/person\/6f20726ed2761431f3e0ff4e096c3085\",\"name\":\"Bruce Sterling\",\"image\":{\"@type\":\"ImageObject\",\"@id\":\"https:\/\/toshareproject.it\/artmakerblog\/#personlogo\",\"inLanguage\":\"en-GB\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/c390e8ed4db57a34278dcf667f928a643cf769a865c8a8632dcd310412bb9a99?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/c390e8ed4db57a34278dcf667f928a643cf769a865c8a8632dcd310412bb9a99?s=96&d=mm&r=g\",\"caption\":\"Bruce Sterling\"},\"description\":\"Art director at Share Festival, author and journalist\",\"sameAs\":[\"http:\/\/toshareproject.it\/tomorrowart\"],\"url\":\"https:\/\/toshareproject.it\/artmakerblog\/author\/brucesterling\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"The tall weeds of LLM prompts | Artmaker Blog","description":"The tall weeds of LLM prompts | Artmaker Blog","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/toshareproject.it\/artmakerblog\/the-tall-weeds-of-llm-prompts\/","og_locale":"en_GB","og_type":"article","og_title":"The tall weeds of LLM prompts | Artmaker Blog","og_description":"The tall weeds of LLM prompts | Artmaker Blog","og_url":"https:\/\/toshareproject.it\/artmakerblog\/the-tall-weeds-of-llm-prompts\/","og_site_name":"Artmaker Blog","article_published_time":"2024-02-27T07:53:31+00:00","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Bruce Sterling","Estimated reading time":"3 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebSite","@id":"https:\/\/toshareproject.it\/artmakerblog\/#website","url":"https:\/\/toshareproject.it\/artmakerblog\/","name":"Artmaker Blog","description":"on Toshareproject.it - curated by Bruce Sterling","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/toshareproject.it\/artmakerblog\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"en-GB"},{"@type":"WebPage","@id":"https:\/\/toshareproject.it\/artmakerblog\/the-tall-weeds-of-llm-prompts\/#webpage","url":"https:\/\/toshareproject.it\/artmakerblog\/the-tall-weeds-of-llm-prompts\/","name":"The tall weeds of LLM prompts | Artmaker Blog","isPartOf":{"@id":"https:\/\/toshareproject.it\/artmakerblog\/#website"},"datePublished":"2024-02-27T07:53:31+00:00","dateModified":"2024-02-27T07:53:31+00:00","author":{"@id":"https:\/\/toshareproject.it\/artmakerblog\/#\/schema\/person\/6f20726ed2761431f3e0ff4e096c3085"},"description":"The tall weeds of LLM prompts | Artmaker Blog","breadcrumb":{"@id":"https:\/\/toshareproject.it\/artmakerblog\/the-tall-weeds-of-llm-prompts\/#breadcrumb"},"inLanguage":"en-GB","potentialAction":[{"@type":"ReadAction","target":["https:\/\/toshareproject.it\/artmakerblog\/the-tall-weeds-of-llm-prompts\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/toshareproject.it\/artmakerblog\/the-tall-weeds-of-llm-prompts\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/toshareproject.it\/artmakerblog\/"},{"@type":"ListItem","position":2,"name":"The tall weeds of LLM prompts"}]},{"@type":"Person","@id":"https:\/\/toshareproject.it\/artmakerblog\/#\/schema\/person\/6f20726ed2761431f3e0ff4e096c3085","name":"Bruce Sterling","image":{"@type":"ImageObject","@id":"https:\/\/toshareproject.it\/artmakerblog\/#personlogo","inLanguage":"en-GB","url":"https:\/\/secure.gravatar.com\/avatar\/c390e8ed4db57a34278dcf667f928a643cf769a865c8a8632dcd310412bb9a99?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/c390e8ed4db57a34278dcf667f928a643cf769a865c8a8632dcd310412bb9a99?s=96&d=mm&r=g","caption":"Bruce Sterling"},"description":"Art director at Share Festival, author and journalist","sameAs":["http:\/\/toshareproject.it\/tomorrowart"],"url":"https:\/\/toshareproject.it\/artmakerblog\/author\/brucesterling\/"}]}},"_links":{"self":[{"href":"https:\/\/toshareproject.it\/artmakerblog\/wp-json\/wp\/v2\/posts\/4184","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/toshareproject.it\/artmakerblog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/toshareproject.it\/artmakerblog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/toshareproject.it\/artmakerblog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/toshareproject.it\/artmakerblog\/wp-json\/wp\/v2\/comments?post=4184"}],"version-history":[{"count":1,"href":"https:\/\/toshareproject.it\/artmakerblog\/wp-json\/wp\/v2\/posts\/4184\/revisions"}],"predecessor-version":[{"id":4185,"href":"https:\/\/toshareproject.it\/artmakerblog\/wp-json\/wp\/v2\/posts\/4184\/revisions\/4185"}],"wp:attachment":[{"href":"https:\/\/toshareproject.it\/artmakerblog\/wp-json\/wp\/v2\/media?parent=4184"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/toshareproject.it\/artmakerblog\/wp-json\/wp\/v2\/categories?post=4184"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/toshareproject.it\/artmakerblog\/wp-json\/wp\/v2\/tags?post=4184"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}