Skip to main content

Command Palette

Search for a command to run...

In-Context Few-Shots Prompting Approach

Updated
1 min read
In-Context Few-Shots Prompting Approach

In the Few-Shot Prompting approach, through a few demonstrations, generative models quickly adapt to a specific domain and learn to follow the task format. However, the few-shots examples are fixed for all test examples (during inference). This necessitates that the few-shot examples selected are broadly representative and relevant to a wide distribution of text examples.

In the alternative, we can have a few-more-shots, and then during the inference, we dynamically select few-shots of them and provide them to the LLM. the criteria for selecting the examples are based on their embedding similarity to the query (KNN). This method is called In-Context few-shots.

Paper: https://arxiv.org/abs/2101.06804

More from this blog

Mundher's blog

19 posts

Mundher Al-Shabi