Query which we ask the LLM is referred to as prompt. The way in which we provide prompt to LLM makes a difference and there are different ways to to provide a prompt. This is referred to as prompting styles or prompt engineering. Now lets see some of the commonly used styles :
1. Zero shot prompting
This is a no brainer, We will simply just give a query to llm. i.e A task will alone be provided to llm. However this style is not that good.

2. Few shot prompting
Along with the basic prompt, Few examples will be provided. i.e inputs and its respective output of how it should be are included. LLM will generate output to our query based on the provided examples.
If one example is provided, then it is referred to as one shot prompting. If two or more examples is provided then it is referred to as few shot prompting.
3. System prompting
We will provide some governing laws(instructions). i.e setting some constraints, boundaries etc for the given prompt to the LLM.

4. Role based prompting
We will make the LLM to adopt a specific persona.

5. Contextual prompting
- If someone asks me a question like "Have you ate ?" and if i am replying it as sun rises in the east. provided answer is not a lie but it is not relevant to the question asked. provided answer is out of context.
- Context means Background information or extra information. Feeding more and more context to prompt will yield better result.


Top comments (0)