My go to concerning effective ai prompting
None of the line below nor the thoughts behind them were generated or influenced by AI whatsoever.
I am not an AI prompt engineer by any mean, still I only share my learnings and practices I found useful during my journey through generative AIs and LLMs. Great reading!
Using LLMs and generative AIs frequently, I was wondering what were the best practices to get the most of them by putting efforts into creating the most effective prompts for them.
What is a prompt?
A prompt is basically data you input to a model - your trained AI - which influences its behaviour and get you a token - an unique answer - based on the model's training AND its interpretation of your prompt.
Sometimes you can't get your hands on better-trained models or ones with a gretter number of parameters (the bill, computer ressources needed...), but you can arrange your prompts to get the most of your current model and be more accurate.
~ and maybe it was all you needed
Prompts can take multiple forms, but in most cases for LLMs, it is most likely arrays of text and sometime images : I will focus on those two.
I will also focus on text-to-text models, text-to-image and text-to-video generative AI models only.
Task
In fact, we want the models to do something for us. So we should use the clearest and most accurate verbs for our desired action, instead of using basic verbs for all demands.
AIs are one if not the best tools to do tasks based on a set of instructions (yes, humans included for me) - which is why, in my opinion it is wiser to use our words wisely in order to transmit the most informations in the shortest amount of words in the context window.
We can use active verbs, also dividing the actions wanted by active verbs and transit from generic and basic verbs to precise and sharp ones.
Switching from
1
2 =
3
4 = 5 6 7
8
9
To
6 =
context
- background (stated info)
- environment (what people will most relate to context)
- success, what would you want at tghe end
persona
à quelle personne tu voudrais t'adresser
tone
it is a ai with no emmotions, but it knows what formula (adjectives, adverbs) to use to seem more enthusiasm, pessimistic...
implied context
demander pour du végétarien
prompt strategies/framework
zero-shot prompts vs few-shot prompts
chain of thoughts
divise tasks -> more accurate
bonus
"bold changes" "use markdown compatible format" prefer using table format instead of text to prevent ultra long tokens Pareto principles within 200 words prompt db (continuous learning)
limitations
despite all of this, there can always be limitations:
- not enough training data/information, or underlaying data is not suitable for what you need
- hallucinations (toujours savoir, quite à mentir)