Example retrieval

save tokens, improve output
Popularity:
Ease-of-Use:

Description

A technique that searches and retrieves similar programs or code examples based on requirements. A selector then filters these examples to identify the most relevant and informative ones, which are used as context for code generation.

Example Prompt

Retrieve code examples similar to:
[Requirement]
From a corpus of code, use a retriever to find top matches, then filter with a selector to choose the best examples.