1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[31899],{93454:function(e,n,a){(window.__NEXT_P=window.__NEXT_P||[]).push(["/applications/pf.en",function(){return a(43975)}])},43975:function(e,n,a){"use strict";a.r(n),a.d(n,{__toc:function(){return l}});var t=a(52676),i=a(45118),o=a(23742),s=a(40241);a(21729),a(29814);var r=a(41619);let l=[{depth:2,value:"Introduction",id:"introduction"},{depth:2,value:"Examples",id:"examples"},{depth:3,value:"English study assistant",id:"english-study-assistant"},{depth:4,value:"Function description",id:"function-description"},{depth:3,value:"Multiple params function",id:"multiple-params-function"},{depth:3,value:"Thought",id:"thought"}];function _createMdxContent(e){let n=Object.assign({h1:"h1",h2:"h2",p:"p",em:"em",blockquote:"blockquote",strong:"strong",br:"br",pre:"pre",code:"code",span:"span",h3:"h3",h4:"h4",ul:"ul",li:"li",a:"a"},(0,r.a)(),e.components);return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(n.h1,{children:"Prompt Function"}),"\n",(0,t.jsx)(n.h2,{id:"introduction",children:"Introduction"}),"\n",(0,t.jsx)(n.p,{children:"When we draw a parallel between GPT's dialogue interface and a programming language's shell, the encapsulation prompt can be thought of as forming a function. This function has a unique name, and when we call this name with the input text, it produces results based on the set internal rules. In a nutshell, we build a reusable prompt with a name that makes it easy to engage with GPT. It's like having a handy tool that lets GPT carry out particular tasks on our behalf â we just need to give the input, and we receive the desired output."}),"\n",(0,t.jsx)(n.p,{children:"By encapsulating prompts into functions, you can create a series of functions to establish a workflow. Each function represents a specific step or task, and when combined in a particular order, they can automate complex processes or solve problems more efficiently. This approach allows for a more structured and streamlined interaction with GPT, ultimately enhancing its capabilities and making it a powerful tool to accomplish a wide range of tasks."}),"\n",(0,t.jsx)(n.p,{children:"So before we can use a function, we need to let GPT know about it. Here is a prompt that defines the function."}),"\n",(0,t.jsx)(n.p,{children:(0,t.jsx)(n.em,{children:"Prompt:"})}),"\n",(0,t.jsxs)(n.blockquote,{children:["\n",(0,t.jsxs)(n.p,{children:["Let's call this prompt with ",(0,t.jsx)(n.strong,{children:"meta prompt"}),".",(0,t.jsx)(n.br,{}),"\n","This prompt has been tested on GPT3.5 and performs even better on GPT4"]}),"\n"]}),"\n",(0,t.jsx)(n.pre,{"data-language":"text","data-theme":"default",children:(0,t.jsxs)(n.code,{"data-language":"text","data-theme":"default",children:[(0,t.jsx)(n.span,{className:"line",children:(0,t.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"Hello, ChatGPT! I hope you are doing well. I am reaching out to you for assistance with a specific function. I understand that you have the capability to process information and perform various tasks based on the instructions provided. In order to help you understand my request more easily, I will be using a template to describe the function, input, and instructions on what to do with the input. Please find the details below:"})}),"\n",(0,t.jsx)(n.span,{className:"line",children:(0,t.jsx)(n.span,{style:{color:"var(--shiki-color-text)"}})}),"\n",(0,t.jsx)(n.span,{className:"line",children:(0,t.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"function_name: [Function Name]"})}),"\n",(0,t.jsx)(n.span,{className:"line",children:(0,t.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"input: [Input]"})}),"\n",(0,t.jsx)(n.span,{className:"line",children:(0,t.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"rule: [Instructions on how to process the input]"})}),"\n",(0,t.jsx)(n.span,{className:"line",children:(0,t.jsx)(n.span,{style:{color:"var(--shiki-color-text)"}})}),"\n",(0,t.jsx)(n.span,{className:"line",children:(0,t.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"I kindly request you to provide the output for this function, based on the details I have provided. Your assistance is greatly appreciated. Thank y
1ou!"})}),"\n",(0,t.jsx)(n.span,{className:"line",children:(0,t.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"I will replace the text inside the brackets with the relevant information for the function I want you to perform. This detailed introduction should help you understand my request more efficiently and provide the desired output. The format is function_name(input) If you understand, just answer one word with ok."})}),"\n",(0,t.jsx)(n.span,{className:"line",children:(0,t.jsx)(n.span,{style:{color:"var(--shiki-color-text)"}})})]})}),"\n",(0,t.jsx)(n.h2,{id:"examples",children:"Examples"}),"\n",(0,t.jsx)(n.h3,{id:"english-study-assistant",children:"English study assistant"}),"\n",(0,t.jsx)(n.p,{children:"For example, let's say we want to use GPT to aid us in our English studies. We can simplify the process by creating a series of functions."}),"\n",(0,t.jsx)(n.p,{children:"This example has been tested on GPT3.5 and performs even better on GPT4"}),"\n",(0,t.jsx)(n.h4,{id:"function-description",children:"Function description"}),"\n",(0,t.jsxs)(n.p,{children:["We need to paste the ",(0,t.jsx)(n.strong,{children:"meta prompt"})," that was defined above the section in GPT"]}),"\n",(0,t.jsxs)(n.p,{children:["Then we will create a function ",(0,t.jsx)(n.code,{children:"trans_word"}),".",(0,t.jsx)(n.br,{}),"\n","This function prompts GPT to translate Chinese into English."]}),"\n",(0,t.jsx)(n.p,{children:(0,t.jsx)(n.em,{children:"Prompt:"})}),"\n",(0,t.jsx)(n.pre,{"data-language":"text","data-theme":"default",children:(0,t.jsxs)(n.code,{"data-language":"text","data-theme":"default",children:[(0,t.jsx)(n.span,{className:"line",children:(0,t.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"function_name: [trans_word]"})}),"\n",(0,t.jsx)(n.span,{className:"line",children:(0,t.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:'input: ["text"]'})}),"\n",(0,t.jsx)(n.span,{className:"line",children:(0,t.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:'rule: [I want you to act as an English translator, spelling corrector and improver. I will provide you with input forms including "text" in any language and you will detect the language, translate it and answer in the corrected of my text, in English.]'})})]})}),"\n",(0,t.jsx)(n.p,{children:"Write a function that expands text."}),"\n",(0,t.jsx)(n.p,{children:(0,t.jsx)(n.em,{children:"Prompt:"})}),"\n",(0,t.jsx)(n.pre,{"data-language":"text","data-theme":"default",children:(0,t.jsxs)(n.code,{"data-language":"text","data-theme":"default",children:[(0,t.jsx)(n.span,{className:"line",children:(0,t.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"function_name: [expand_word]"})}),"\n",(0,t.jsx)(n.span,{className:"line",children:(0,t.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:'input: ["text"]'})}),"\n",(0,t.jsx)(n.span,{className:"line",children:(0,t.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:'rule: [Please serve as a Chatterbox, spelling corrector, and language enhancer. I will provide you with input forms including "text" in any language, and output the original language.I want you to Keep the meaning same, but make them more literary.]'})})]})}),"\n",(0,t.jsx)(n.p,{children:"Write a function that corrects text."}),"\n",(0,t.jsx)(n.p,{children:(0,t.jsx)(n.em,{children:"Prompt:"})}),"\n",(0,t.jsx)(n.pre,{"data-language":"text","data-theme":"default",children:(0,t.jsxs)(n.code,{"data-language":"text","data-theme":"default",children:[(0,t.jsx)(n.span,{className:"line",children:(0,t.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"function_name: [fix_english]"})}),"\n",(0,t.jsx)(n.span,{className:"line",children:(0,t.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:'input: ["text"]'})}),"\n",(0,t.jsx)(n.span,{className:"line",children:(0,t.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:'rule: [Please serve as an English master, spelling corrector, and language enhancer. I will provide you with input forms including "text", I want you to improve the text\'s vocabulary and sentences with more natural and elegent. Keep the meaning same.]'})})]})}),"\n",(0,t.jsx)(n.p,{children:"Finally, you can run the function independently or chain them together."}),"\n",(0,t.jsx)(n.p,{children:(0,t.jsx)(n.em,{children:"Prompt:"})}),"\n",(0,t.jsx)(n.pre,{"data-language":"text","data-theme":"default",children:(0,t.jsxs)(n.code,{"data-language":"text","data-theme":"default",children:[(0,t.jsx)(n.span,{className:"line",children:(0,t.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"trans_word('å©ç½æ©ç«å±±å¤äºäº«æâåå²ä¹å½âç¾ç§°çå°åº¦å°¼è¥¿äº. å¤å²ä¹å½å°å°¼æ4500座ä¹å¤çç«å±±, ä¸çèåçå大活ç«å±±æä¸åº§å¨è¿é.')"})}),"\n",(0,t.jsx)(n.span,{className:"line",children:(0,t.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"fix_english('Finally, you can run the function independently or chain them together.')"})}),"\n",(0,t.jsx)(n.span,{className:"line",children:(0,t.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"fix_english(expand_word(trans_word('å©ç½æ©ç«å±±å¤äºäº«æâåå²ä¹å½âç¾ç§°çå°åº¦å°¼è¥¿äº. å¤å²ä¹å½å°å°¼æ4500座ä¹å¤çç«å±±, ä¸çèåçå大活ç«å±±æä¸åº§å¨è¿é.')))"})})]})}),"\n",(0,t.jsx)(n.p,{children:"By representing the functions in this format, you can clearly see each function's name, input, and the rule to process the input. It provides an organized way to understand the functionality and purpose of each step in the workflow"}),"\n",(0,t.jsxs)(n.p,{children:[(0,t.jsx)(n.em,{children:"tips:"}),"\nIf you don't want ChatGPT to output excessive information, you can simply add a sentence after defining the function's rules."]}),"\n",(0,t.jsx)(n.pre,{"data-language":"text","data-theme":"default",children:(0,t.jsx)(n.code,{"data-language":"text","data-theme":"default",children:(0,t.jsx)(n.span,{className:"line",children:(0,t.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"DO NOT SAY THINGS ELSE OK, UNLESS YOU DONT UNDERSTAND THE FUNCTION"})})})}),"\n",(0,t.jsx)(n.h3,{id:"multiple-params-function",children:"Multiple params function"}),"\n",(0,t.jsx)(n.p,{children:"Let's create a function that generates a password by taking five input parameters, and outputs the generated password."}),"\n",(0,t.jsx)(n.p,{children:(0,t.jsx)(n.em,{children:"Prompt:"})}),"\n",(0,t.jsx)(n.pre,{"data-language":"text","data-theme":"default",children:(0,t.jsxs)(n.code,{"data-language":"text","data-theme":"default",children:[(0,t.jsx)(n.span,{className:"line",children:(0,t.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"function_name: [pg]"})}),"\n",(0,t.jsx)(n.span,{className:"line",children:(0,t.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:'input: ["length", "capitalized", "lowercase", "numbers", "special"]'})}),"\n",(0,t.jsx)(n.span,{className:"line",children:(0,t.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:'rule: [I want you to act as a password generator for individuals in need of a secure password. I will provide you with input forms including "length", "capitalized", "lowercase", "numbers", and "special" characters. Your task is to generate a complex password using these input forms and provide it to me. Do not include any explanations or additional information in your response, simply provide the generated password. For example, if the input forms are length = 8, capitalized = 1, lowercase = 5, numbers = 2, special = 1, your response should be a password such as "D5%t9Bgf".]'})})]})}),"\n",(0,t.jsx)(n.pre,{"data-language":"text","data-theme":"default",children:(0,t.jsxs)(n.code,{"data-language":"text","data-theme":"default",children:[(0,t.jsx)(n.span,{className:"line",children:(0,t.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"pg(length = 10, capitalized = 1, lowercase = 5, numbers = 2, special = 1)"})}),"\n",(0,t.jsx)(n.span,{className:"line",children:(0,t.jsx)(n.span,{style:{color:"var(--shiki-color-text)"}
1,children:"pg(10,1,5,2,1)"})})]})}),"\n",(0,t.jsx)(n.h3,{id:"thought",children:"Thought"}),"\n",(0,t.jsx)(n.p,{children:"Now, there already have many projects that are working on programming GPT, such as:"}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsx)(n.li,{children:(0,t.jsx)(n.a,{href:"https://github.com/features/copilot",children:"GitHub Copilot"})}),"\n",(0,t.jsx)(n.li,{children:(0,t.jsx)(n.a,{href:"https://www.microsoft.com/en-us/ai",children:"Microsoft AI"})}),"\n",(0,t.jsx)(n.li,{children:(0,t.jsx)(n.a,{href:"https://openai.com/blog/chatgpt-plugins",children:"chatgpt-plugins"})}),"\n",(0,t.jsx)(n.li,{children:(0,t.jsx)(n.a,{href:"https://github.com/hwchase17/langchain",children:"LangChain"})}),"\n",(0,t.jsx)(n.li,{children:(0,t.jsx)(n.a,{href:"https://github.com/PrefectHQ/marvin",children:"marvin"})}),"\n"]}),"\n",(0,t.jsxs)(n.p,{children:["But those projects are designed either for product customer or for users who can code with Python or other programming languages.\nFor the average user, use this easy template for daily work and iterate a couple of times. Use a note application to document the function, and it can even be updated to a library.\nAlternatively, some open source ChatGPT tools, such as ",(0,t.jsx)(n.a,{href:"https://github.com/Yidadaa/ChatGPT-Next-Web",children:"ChatGPT-Next-Web"}),", ",(0,t.jsx)(n.a,{href:"https://github.com/Bin-Huang/chatbox",children:"chatbox"}),", ",(0,t.jsx)(n.a,{href:"https://github.com/mleoking/PromptAppGPT",children:"PromptAppGPT"}),", and ",(0,t.jsx)(n.a,{href:"https://github.com/lencx/ChatGPT",children:"ChatGPT-Desktop"}),", can be used. Currently, ChatGPT-Next-Web allows adding a few shots before initializing the new chat. And PromptAppGPT supports low-code development of web applications based on prompt templates and enables anyone to develop AutoGPT-like applications with a few lines of prompts.\nWe can use this feature to add our function, which can then be used."]})]})}let d={MDXContent:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{wrapper:n}=Object.assign({},(0,r.a)(),e.components);return n?(0,t.jsx)(n,{...e,children:(0,t.jsx)(_createMdxContent,{...e})}):_createMdxContent(e)},pageOpts:{filePath:"pages/applications/pf.en.mdx",route:"/applications/pf",timestamp:1766942504e3,pageMap:[{kind:"Meta",locale:"en",data:{index:"Prompt Engineering",introduction:"Introduction",techniques:"Prompting Techniques",agents:"AI Agents",guides:"Guides",applications:"Applications",prompts:"Prompt Hub",models:"Models",risks:"Risks & Misuses",research:"LLM Research Findings",papers:"Papers",tools:"Tools",notebooks:"Notebooks",datasets:"Datasets",readings:"Additional Readings",courses:{title:"\uD83C\uDF93 Courses",type:"menu",items:{"intro-prompt-engineering":{title:"Intro to Prompt Engineering",href:"https://academy.dair.ai/courses/introduction-prompt-engineering"},"advanced-prompt-engineering":{title:"Advanced Prompt Engineering",href:"https://academy.dair.ai/courses/advanced-prompt-engineering"},"intro-ai-agents":{title:"Intro to AI Agents",href:"https://academy.dair.ai/courses/introduction-ai-agents"},"agents-with-n8n":{title:"Building Effective AI Agents with n8n",href:"https://academy.dair.ai/courses/building-effective-ai-agents"},"rag-systems":{title:"Build RAG Systems",href:"https://academy.dair.ai/courses/introduction-to-rag"},"advanced-agents":{title:"Building Advanced AI Agents",href:"https://academy.dair.ai/courses/advanced-ai-agents"},"all-courses":{title:"See all â",href:"https://academy.dair.ai/courses"}}},about:{title:"About",type:"page"},services:"Services"}},{kind:"MdxPage",name:"about",route:"/about",locale:"en"},{kind:"Folder",name:"agents",route:"/agents",children:[{kind:"Meta",locale:"en",data:{introduction:"Introduction to Agents",components:"Agent Components","ai-workflows-vs-ai-agents":"AI Workflows vs AI Agents","context-engineering":"Context Engineering for AI Agents","context-engineering-deep-dive":"Context Engineering Deep Dive","function-calling":"Function Calling","deep-agents":"Deep Agents"}},{kind:"MdxPage",name:"ai-workflows-vs-ai-agents",route:"/agents/ai-workflows-vs-ai-agents",locale:"en"},{kind:"MdxPage",name:"components",route:"/agents/components",locale:"en"},{kind:"MdxPage",name:"context-engineering-deep-dive",route:"/agents/context-engineering-deep-dive",locale:"en"},{kind:"MdxPage",name:"context-engineering",route:"/agents/context-engineering",locale:"en"},{kind:"MdxPage",name:"deep-agents",route:"/agents/deep-agents",locale:"en"},{kind:"MdxPage",name:"function-calling",route:"/agents/function-calling",locale:"en"},{kind:"MdxPage",name:"introduction",route:"/agents/introduction",locale:"en"}]},{kind:"MdxPage",name:"agents",route:"/agents",locale:"en"},{kind:"Folder",name:"applications",route:"/applications",children:[{kind:"Meta",locale:"en",data:{"finetuning-gpt4o":"Fine-tuning GPT-4o",function_calling:"Function Calling","context-caching":"Context Caching with LLMs",generating:"Generating Data",synthetic_rag:"Generating Synthetic Dataset for RAG",generating_textbooks:"Tackling Generated Datasets Diversity",coding:"Generating Code",workplace_casestudy:"Graduate Job Classification Case Study",pf:"Prompt Function"}},{kind:"MdxPage",name:"coding",route:"/applications/coding",locale:"en"},{kind:"MdxPage",name:"context-caching",route:"/applications/context-caching",locale:"en"},{kind:"MdxPage",name:"finetuning-gpt4o",route:"/applications/finetuning-gpt4o",locale:"en"},{kind:"MdxPage",name:"function_calling",route:"/applications/function_calling",locale:"en"},{kind:"MdxPage",name:"generating",route:"/applications/generating",locale:"en"},{kind:"MdxPage",name:"generating_textbooks",route:"/applications/generating_textbooks",locale:"en"},{kind:"MdxPage",name:"pf",route:"/applications/pf",locale:"en"},{kind:"MdxPage",name:"synthetic_rag",route:"/applications/synthetic_rag",locale:"en"},{kind:"MdxPage",name:"workplace_casestudy",route:"/applications/workplace_casestudy",locale:"en"}]},{kind:"MdxPage",name:"applications",route:"/applications",locale:"en"},{kind:"MdxPage",name:"courses",route:"/courses",locale:"en"},{kind:"MdxPage",name:"datasets",route:"/datasets",locale:"en"},{kind:"Folder",name:"guides",route:"/guides",children:[{kind:"MdxPage",name:"4o-image-generation",route:"/guides/4o-image-generation",locale:"en"},{kind:"Meta",locale:"en",data:{"optimizing-prompts":"Optimizing Prompts","deep-research":"OpenAI Deep Research","reasoning-llms":"Reasoning LLMs","4o-image-generation":"4o Image Generation","context-engineering-guide":"Context Engineering Guide"}},{kind:"MdxPage",name:"context-engineering-guide",route:"/guides/context-engineering-guide",locale:"en"},{kind:"MdxPage",name:"deep-research",route:"/guides/deep-research",locale:"en"},{kind:"MdxPage",name:"optimizing-prompts",route:"/guides/optimizing-prompts",locale:"en"},{kind:"MdxPage",name:"reasoning-llms",route:"/guides/reasoning-llms",locale:"en"}]},{kind:"MdxPage",name:"index",route:"/",locale:"en"},{kind:"Folder",name:"introduction",route:"/introduction",children:[{kind:"Meta",locale:"en",data:{settings:"LLM
1Settings",basics:"Basics of Prompting",elements:"Prompt Elements",tips:"General Tips for Designing Prompts",examples:"Examples of Prompts"}},{kind:"MdxPage",name:"basics",route:"/introduction/basics",locale:"en"},{kind:"MdxPage",name:"elements",route:"/introduction/elements",locale:"en"},{kind:"MdxPage",name:"examples",route:"/introduction/examples",locale:"en"},{kind:"MdxPage",name:"settings",route:"/introduction/settings",locale:"en"},{kind:"MdxPage",name:"tips",route:"/introduction/tips",locale:"en"}]},{kind:"MdxPage",name:"introduction",route:"/introduction",locale:"en"},{kind:"Folder",name:"models",route:"/models",children:[{kind:"Meta",locale:"en",data:{chatgpt:"ChatGPT","claude-3":"Claude 3","code-llama":"Code Llama",flan:"Flan",gemini:"Gemini","gemini-advanced":"Gemini Advanced","gemini-pro":"Gemini 1.5 Pro",gemma:"Gemma","gpt-4":"GPT-4","grok-1":"Grok-1","kimi-k2.5":"Kimi K2.5",llama:"LLaMA","llama-3":"Llama 3","mistral-7b":"Mistral 7B","mistral-large":"Mistral Large",mixtral:"Mixtral","mixtral-8x22b":"Mixtral 8x22B",olmo:"OLMo","phi-2":"Phi-2",sora:"Sora",collection:"LLM Collection"}},{kind:"MdxPage",name:"chatgpt",route:"/models/chatgpt",locale:"en"},{kind:"MdxPage",name:"claude-3",route:"/models/claude-3",locale:"en"},{kind:"MdxPage",name:"code-llama",route:"/models/code-llama",locale:"en"},{kind:"MdxPage",name:"collection",route:"/models/collection",locale:"en"},{kind:"MdxPage",name:"flan",route:"/models/flan",locale:"en"},{kind:"MdxPage",name:"gemini-advanced",route:"/models/gemini-advanced",locale:"en"},{kind:"MdxPage",name:"gemini-pro",route:"/models/gemini-pro",locale:"en"},{kind:"MdxPage",name:"gemini",route:"/models/gemini",locale:"en"},{kind:"MdxPage",name:"gemma",route:"/models/gemma",locale:"en"},{kind:"MdxPage",name:"gpt-4",route:"/models/gpt-4",locale:"en"},{kind:"MdxPage",name:"grok-1",route:"/models/grok-1",locale:"en"},{kind:"MdxPage",name:"kimi-k2.5",route:"/models/kimi-k2.5",locale:"en"},{kind:"MdxPage",name:"llama-3",route:"/models/llama-3",locale:"en"},{kind:"MdxPage",name:"llama",route:"/models/llama",locale:"en"},{kind:"MdxPage",name:"mistral-7b",route:"/models/mistral-7b",locale:"en"},{kind:"MdxPage",name:"mistral-large",route:"/models/mistral-large",locale:"en"},{kind:"MdxPage",name:"mixtral-8x22b",route:"/models/mixtral-8x22b",locale:"en"},{kind:"MdxPage",name:"mixtral",route:"/models/mixtral",locale:"en"},{kind:"MdxPage",name:"olmo",route:"/models/olmo",locale:"en"},{kind:"MdxPage",name:"phi-2",route:"/models/phi-2",locale:"en"},{kind:"MdxPage",name:"sora",route:"/models/sora",locale:"en"}]},{kind:"MdxPage",name:"models",route:"/models",locale:"en"},{kind:"MdxPage",name:"notebooks",route:"/notebooks",locale:"en"},{kind:"MdxPage",name:"papers",route:"/papers",locale:"en"},{kind:"Folder",name:"prompts",route:"/prompts",children:[{kind:"Meta",locale:"en",data:{classification:"Classification",coding:"Coding",creativity:"Creativity",evaluation:"Evaluation","information-extraction":"Information Extraction","image-generation":"Image Generation",mathematics:"Mathematics","question-answering":"Question Answering",reasoning:"Reasoning","text-summarization":"Text Summarization",truthfulness:"Truthfulness","adversarial-prompting":"Adversarial Prompting"}},{kind:"Folder",name:"adversarial-prompting",route:"/prompts/adversarial-prompting",children:[{kind:"Meta",locale:"en",data:{"prompt-injection":"Prompt Injection","prompt-leaking":"Prompt Leaking","jailbreaking-llms":"Jailbreaking"}},{kind:"MdxPage",name:"jailbreaking-llms",route:"/prompts/adversarial-prompting/jailbreaking-llms",locale:"en"},{kind:"MdxPage",name:"prompt-injection",route:"/prompts/adversarial-prompting/prompt-injection",locale:"en"},{kind:"MdxPage",name:"prompt-leaking",route:"/prompts/adversarial-prompting/prompt-leaking",locale:"en"}]},{kind:"MdxPage",name:"adversarial-prompting",route:"/prompts/adversarial-prompting",locale:"en"},{kind:"Folder",name:"classification",route:"/prompts/classification",children:[{kind:"Meta",locale:"en",data:{sentiment:"Sentiment Classification","sentiment-fewshot":"Few-Shot Sentiment Classification"}}
1,{kind:"MdxPage",name:"sentiment-fewshot",route:"/prompts/classification/sentiment-fewshot",locale:"en"},{kind:"MdxPage",name:"sentiment",route:"/prompts/classification/sentiment",locale:"en"}]},{kind:"MdxPage",name:"classification",route:"/prompts/classification",locale:"en"},{kind:"Folder",name:"coding",route:"/prompts/coding",children:[{kind:"Meta",locale:"en",data:{"code-snippet":"Generate Code Snippet","mysql-query":"Generate MySQL Query",tikz:"Draw TiKZ Diagram"}},{kind:"MdxPage",name:"code-snippet",route:"/prompts/coding/code-snippet",locale:"en"},{kind:"MdxPage",name:"mysql-query",route:"/prompts/coding/mysql-query",locale:"en"},{kind:"MdxPage",name:"tikz",route:"/prompts/coding/tikz",locale:"en"}]},{kind:"MdxPage",name:"coding",route:"/prompts/coding",locale:"en"},{kind:"Folder",name:"creativity",route:"/prompts/creativity",children:[{kind:"Meta",locale:"en",data:{rhymes:"Rhymes","infinite-primes":"Infinite Primes",interdisciplinary:"Interdisciplinary","new-words":"Inventing New Words"}},{kind:"MdxPage",name:"infinite-primes",route:"/prompts/creativity/infinite-primes",locale:"en"},{kind:"MdxPage",name:"interdisciplinary",route:"/prompts/creativity/interdisciplinary",locale:"en"},{kind:"MdxPage",name:"new-words",route:"/prompts/creativity/new-words",locale:"en"},{kind:"MdxPage",name:"rhymes",route:"/prompts/creativity/rhymes",locale:"en"}]},{kind:"MdxPage",name:"creativity",route:"/prompts/creativity",locale:"en"},{kind:"Folder",name:"evaluation",route:"/prompts/evaluation",children:[{kind:"Meta",locale:"en",data:{"plato-dialogue":"Evaluate Plato's Dialogue"}},{kind:"MdxPage",name:"plato-dialogue",route:"/prompts/evaluation/plato-dialogue",locale:"en"}]},{kind:"MdxPage",name:"evaluation",route:"/prompts/evaluation",locale:"en"},{kind:"Folder",name:"image-generation",route:"/prompts/image-generation",children:[{kind:"Meta",locale:"en",data:{"alphabet-person":"Draw a Person Using Alphabet"}},{kind:"MdxPage",name:"alphabet-person",route:"/prompts/image-generation/alphabet-person",locale:"en"}]},{kind:"MdxPage",name:"image-generation",route:"/prompts/image-generation",locale:"en"},{kind:"Folder",name:"information-extraction",route:"/prompts/information-extraction",children:[{kind:"Meta",locale:"en",data:{"extract-models":"Extract Model Names"}},{kind:"MdxPage",name:"extract-models",route:"/prompts/information-extraction/extract-models",locale:"en"}]},{kind:"MdxPage",name:"information-extraction",route:"/prompts/information-extraction",locale:"en"},{kind:"Folder",name:"mathematics",route:"/prompts/mathematics",children:[{kind:"Meta",locale:"en",data:{"composite-functions":"Evaluating Composite Functions","odd-numbers":"Adding Odd Numbers"}},{kind:"MdxPage",name:"composite-functions",route:"/prompts/mathematics/composite-functions",locale:"en"},{kind:"MdxPage",name:"odd-numbers",route:"/prompts/mathematics/odd-numbers",locale:"en"}]},{kind:"MdxPage",name:"mathematics",route:"/prompts/mathematics",locale:"en"},{kind:"Folder",name:"question-answering",route:"/prompts/question-answering",children:[{kind:"Meta",locale:"en",data:{"closed-domain":"Closed Domain Question Answering","open-domain":"Open Domain Question Answering","science-qa":"Science Question Answering"}},{kind:"MdxPage",name:"closed-domain",route:"/prompts/question-answering/closed-domain",locale:"en"},{kind:"MdxPage",name:"open-domain",route:"/prompts/question-answering/open-domain",locale:"en"},{kind:"MdxPage",name:"science-qa",route:"/prompts/question-answering/science-qa",locale:"en"}]},{kind:"MdxPage",name:"question-answering",route:"/prompts/question-answering",locale:"en"},{kind:"Folder",name:"reasoning",route:"/prompts/reasoning",children:[{kind:"Meta",locale:"en",data:{"indirect-reasoning":"Indirect Reasoning","physical-reasoning":"Physical Reasoning"}},{kind:"MdxPage",name:"indirect-reasoning",route:"/prompts/reasoning/indirect-reasoning",locale:"en"},{kind:"MdxPage",name:"physical-reasoning",route:"/prompts/reasoning/physical-reasoning",locale:"en"}]},{kind:"MdxPage",name:"reasoning",route:"/prompts/reasoning",locale:"en"},{kind:"Folder",name:"text-summarization",route:"/prompts/text-summarization",children:[{kind:"Meta",locale:"en",data:{"explain-concept":"Explain A Concept"}},{kind:"MdxPage",name:"explain-concept",route:"/prompts/text-summarization/explain-concept",locale:"en"}]},{kind:"MdxPage",name:"text-summarization",route:"/prompts/text-summarization",locale:"en"},{kind:"Folder",name:"truthfulness",route:"/prompts/truthfulness",children:[{kind:"Meta",locale:"en",data:{"identify-hallucination":"Hallucination Identification"}},{kind:"MdxPage",name:"identify-hallucination",route:"/prompts/truthfulness/identify-hallucination",locale:"en"}]},{kind:"MdxPage",name:"truthfulness",route:"/prompts/truthfulness",locale:"en"}]},{kind:"MdxPage",name:"prompts",route:"/prompts",locale:"en"},{kind:"MdxPage",name:"readings",route:"/readings",locale:"en"},{kind:"Folder",name:"research",route:"/research",children:[{kind:"Meta",locale:"en",data:{"llm-agents":"LLM Agents",rag:"RAG for LLMs","llm-reasoning":"LLM Reasoning","rag-faithfulness":"RAG Faithfulness","llm-recall":"LLM In-Context Recall",rag_hallucinations:"RAG Reduces Hallucination",synthetic_data:"Synthetic Data",thoughtsculpt:"ThoughtSculpt","infini-attention":"Infini-Attention","guided-cot":"LM-Guided CoT","trustworthiness-in-llms":"Trustworthiness in LLMs","llm-tokenization":"LLM Tokenization",groq:"What is Groq?"}},{kind:"MdxPage",name:"groq",route:"/research/groq",locale:"en"},{kind:"MdxPage",name:"guided-cot",route:"/research/guided-cot",locale:"en"},{kind:"MdxPage",name:"infini-attention",route:"/research/infini-attention",locale:"en"},{kind:"MdxPage",name:"llm-agents",route:"/research/llm-agents",locale:"en"},{kind:"MdxPage",name:"llm-reasoning",route:"/research/llm-reasoning",locale:"en"},{kind:"MdxPage",name:"llm-recall",route:"/research/llm-recall",locale:"en"},{kind:"MdxPage",name:"llm-tokenization",route:"/research/llm-tokenization",locale:"en"},{kind:"MdxPage",name:"rag-faithfulness",route:"/research/rag-faithfulness",locale:"en"},{kind:"MdxPage",name:"rag",route:"/research/rag",locale:"en"},{kind:"MdxPage",name:"rag_hallucinations",route:"/research/rag_hallucinations",locale:"en"},{kind:"MdxPage",name:"synthetic_data",route:"/research/synthetic_data",locale:"en"},{kind:"MdxPage",name:"thoughtsculpt",route:"/research/thoughtsculpt",locale:"en"},{kind:"MdxPage",name:"trustworthiness-in-llms",route:"/research/trustworthiness-in-llms",locale:"en"}]},{kind:"MdxPage",name:"research",route:"/research",locale:"en"},{kind:"Folder",name:"risks",route:"/risks",children:[{kind:"Meta",locale:"en",data:{adversarial:"Adversarial Prompting",factuality:"Factuality",biases:"Biases"}},{kind:"MdxPage",name:"adversarial",route:"/risks/adversarial",locale:"en"},{kind:"MdxPage",name:"biases",route:"/risks/biases",locale:"en"},{kind:"MdxPage",name:"factuality",route:"/risks/factuality",locale:"en"}]},{kind:"MdxPage",name:"risks",route:"/risks",locale:"en"},{kind:"MdxPage",name:"services",route:"/services",locale:"en"},{kind:"Folder",name:"techniques",route:"/techniques",children:[{kind:"Meta",locale:"en",data:{zeroshot:"Zero-shot Prompting",fewshot:"Few-shot Prompting",cot:"Chain-of-Thought Prompting","meta-prompting":"Meta Prompting",consistency:"Self-Consistency",knowledge:"Generate Knowledge Prompting",prompt_chaining:"Prompt Chaining",tot:"Tree of Thoughts",rag:"Retrieval Augmented Generation",art:"Automatic Reasoning and Tool-use",ape:"Automatic Prompt Engineer",activeprompt:"Active-Prompt",dsp:"Directional Stimulus Prompting",pal:"Program-Aided Language Models",react:"ReAct",reflexion:"Reflexion",multimodalcot:"Multimodal CoT",graph:"Graph Prompting"}},{kind:"MdxPage",name:"activeprompt",route:"/techniques/activeprompt",locale:"en"},{kind:"MdxPage",name:"ape",route:"/techniques/ape",locale:"en"},{kind:"MdxPage",name:"art",route:"/techniques/art",locale:"en"},{kind:"MdxPage",name:"consistency",route:"/techniques/consistency",locale:"en"},{kind:"MdxPage",name:"cot",route:"/techniques/cot",locale:"en"},{kind:"MdxPage",name:"dsp",route:"/techniques/dsp",locale:"en"},{kind:"MdxPage",name:"fewshot",route:"/techniques/fewshot",locale:"en"},{kind:"MdxPage",name:"graph",route:"/techniques/graph",locale:"en"},{kind:"MdxPage",name:"knowledge",route:"/techniques/knowledge",locale:"en"},{kind:"MdxPage",name:"meta-prompting",route:"/techniques/meta-prompting",locale:"en"},{kind:"MdxPage",name:"multimodalcot",route:"/techniques/multimodalcot",locale:"en"},{kind:"MdxPage",name:"pal",route:"/techniques/pal",locale:"en"},{kind:"MdxPage",name:"prompt_chaining",route:"/techniques/prompt_chaining",locale:"en"},{kind:"MdxPage",name:"rag",route:"/techniques/rag",locale:"en"},{kind:"MdxPage",name:"react",route:"/techniques/react",locale:"en"},{kind:"MdxPage",name:"reflexion",route:"/techniques/reflexion",locale:"en"},{kind:"MdxPage",name:"tot",route:"/techniques/tot",locale:"en"},{kind:"MdxPage",name:"zeroshot",route:"/techniques/zeroshot",locale:"en"}]},{kind:"MdxPage",name:"techniques",route:"/techniques",locale:"en"},{kind:"MdxPage",name:"tools",route:"/tools",locale:"en"}],flexsearch:{codeblocks:!0},title:"Prompt Function",headings:l},pageNextRoute:"/applications/pf.en",nextraLayout:o.ZP,themeConfig:s.Z};n.default=(0,i.j)(d)}},function(e){e.O(0,[57914,26494,49774,92888,40179],function(){return e(e.s=93454)}),_N_E=e.O()}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.