Skip to content

1.2 Few-Shot Prompting

Classification and labelling

You need the AI to sort, tag, or categorise items and you can show it a few correct examples.

Consistent formatting

You want the output to follow a specific pattern and showing examples is easier than describing the rules.


  1. Task – Clearly state what you want the model to do.
  2. Context – Provide the relevant context necessary to carry out the task.
  3. Demonstration – Give at least one example of what you want the model’s reply to look like.
  4. Consistent formatting – Format your examples consistently so the model picks up the pattern.

Prompt: Label NIOO publications by research theme
At the Netherlands Institute of Ecology (NIOO), all publications
are labelled with one or more of our research themes.
The themes are Biodiversity, Climate Change and Sustainable Use
of Land and Water.
In rare cases, we opt for 'No theme'.
The publications below have already been labelled with the
appropriate themes:
- https://doi.org/10.18194/ws.00345, Biodiversity
- https://doi.org/10.1111/geb.13901, Climate Change
- https://doi.org/10.1007/s13593-024-00991-3, Sustainable Use of Land and Water
- https://doi.org/10.1002/2688-8319.12303, Biodiversity & Climate Change
- https://doi.org/10.1016/j.scitotenv.2024.173699, Biodiversity & Sustainable Use of Land and Water
- https://doi.org/10.1016/j.watres.2024.122193, Climate Change & Sustainable Use of Land and Water
- https://doi.org/10.3390/microorganisms12040760, Biodiversity & Climate Change & Sustainable Use of Land and Water
- https://doi.org/10.1186/s40462-024-00489-3, No theme
Assign one or more of NIOO's research theme(s) to this
publication: https://doi.org/10.1111/brv.13164.

Based on materials from Prompt Engineering Guide and Software Guide.