Instead of hardcoding static few-shot examples, dynamic retrieval uses vector embeddings to calculate similarity between the incoming user query and a large database of labeled examples.
The prompt is then populated with the most semantically relevant examples, maximizing in-context learning relevance and saving context window space.