AI Whispering 101.2

AI Whispering 101.2

Hello there my AI Whisperers! I hope that the previous 6 tips were of good use...While we work on a few security blogs for you since there has been a ton of bad actor activity, today we are going to continue our advice for prompts! 

As a reminder, we are still referencing this paper, and while I am sure that we will have modifications to these rules as time goes by, these rules seem to be the best path forward to getting better results from the ANI LLMs out there! Also, please note that the first part of the recommendation in bold is copied directly from the referenced paper (Bsharat, Sondos Mahmoud, Aidar Myrzakhan, and Zhiqiang Shen. "Principled Instructions Are All You Need for Questioning LLaMA-1/2, GPT-3.5/4." arXiv preprint arXiv:2312.16171 (2023).  

So lets begin! 

Prompt Tip #7: Implement example-driven prompting (use few-shot prompting)...What exactly does that mean? This one admittedly took me a while to fully understand...admittedly its way simpler to digest than I was giving it credit for...essentially all this says is to use examples of the answer you are looking for to help guide the LLM to get you the result you are looking for. 

For example: 

Prompt: Please follow the examples given to write a marketing campaign for a younger demographic regarding the pros and cons of using MFA...(there should be no cons, but this is an example!)... 

Example 1: Yoooooo, be a hero to your customers and protect them from the dangers of bad actors by implementing this technology. 

Example 2: Look at all that rizz dripping from Morgan after he implemented a secure process for his company. 

Helping the LLM with the format, tone, and word usage of the response will help you guide the LLM to form a response if you want to sound like a totally rad young person speaking in the coolest, latest slang... 

 

Prompt Tip #8: When formatting your prompt, start with ‘###Instruction###’, followed by either ‘###Example###’ or ‘###Question###’ if relevant. Subsequently, present your content. Use one or more line breaks to separate instructions, examples, questions, context, and input data. 

For those of you who are familiar with Boolean logic as it pertains to Google will get a kick out of this! The readers digest version (for those of us who remember what this term means...sorry young people!)...the use of these separators will allow you to format the data easier so that the LLM can more easily digest the data in a way that's intended. You really have to imagine that you are talking to a human and you are merely organizing your request in a more digestible way. 

Example:  

###Instruction### - Please write me guide to helping the poor in Oklahoma which covers things like...job training,  

###Example### - Yooooooo...We are CompanyX and we are here to destroy homelessness 

###Question### - What are the top 10 best ways to help the poor? 

This allows the LLM to clearly understand what' is a question, what's an instruction and what's an example...and just like speaking to a human, that clarification makes it easier for the LLM to quantify what you are asking and to respond appropriately. 

 

Prompt Tip #9 : Incorporate the following phrases, "Your task is" and "You must" 

This one is kind of self descriptive...it seems just like humans that LLM's do better when given a direct commend. 

 

Prompt Tip #10 : Incorporate the following phrases, "You will be punished" 

Also kind of self descriptive, and a little bit abusive! Sadly, threats also work short term with humans as well, so its not a surprise that this works for LLM's. 

 

Prompt Tip #11 : Use the phrase, "Answer the question given, in a natural human like manner" in your prompts. 

Pretty self descriptive.  I just want to take this time to note that you don't need to use all these prompt tips on every request...but you can layer them such as: 

Example: 

###Question### : Your task is to list all the OSI layers with a description of each...please answer the question given in a human like manner, and you will be punished if you miss a layer. 

 

Prompt Tip #12 : Use Leading words like writing “think step by step.” 

This is another prompt tip that guides the LLM to methodically go through steps and to respond with more detail than would have been given without the prompt.  Its very much related to prompt tip #5. 

 

Prompt tip #13 : Add to your prompt the following phrase, "Ensure that your answer is unbiased and does not rely on stereotypes". 

Yet another prompt tip that is easy to understand...It helps guide the LLM as to what data you want it to present.  It has the ability to remove some data that might be considered biased and to focus on non-biased responses. 

 

That's all for today, and we will continue in the next blog with prompt tips #14-#20. 

Thanks for your time and looking forward to our next blog! 

As always, Contact Us to learn more!

Back to blog

Leave a comment

Please note, comments need to be approved before they are published.