
Dynamic Few-Shot Selection — Retrieve Relevant Examples
Delivery in
4 days
- Views 3
Amount of days required to complete work for this Offer as set by the freelancer.
Rating of the Offer as calculated from other buyers' reviews.
Average time for the freelancer to first reply on the workstream after purchase or contact on this Offer.
What you get with this Offer
I will implement dynamic few-shot example selection — building an example library with semantic embeddings, and selecting the most relevant examples for each query at inference time based on input similarity, rather than using the same static examples for every query. Static few-shot examples are a compromise — the same examples cannot be equally relevant for every input in a diverse distribution; dynamic selection that retrieves the examples most similar to the current input consistently outperforms static selection on tasks with high input variability, because the model is shown the most relevant demonstrations for each specific input it needs to process.
The implementation covers example library construction with embeddings, similarity-based retrieval at inference time, example count optimisation for context window budget, diversity-balanced retrieval preventing redundant examples, and performance comparison against static few-shot.
The implementation covers example library construction with embeddings, similarity-based retrieval at inference time, example count optimisation for context window budget, diversity-balanced retrieval preventing redundant examples, and performance comparison against static few-shot.
What the Freelancer needs to start the work
Please share your example library (input-output pairs), your LLM provider, your embedding model preference, your context window budget, and your input distribution characteristics.
We collect cookies to enable the proper functioning and security of our website, and to enhance your experience. By clicking on 'Accept All Cookies', you consent to the use of these cookies. You can change your 'Cookies Settings' at any time. For more information, please read ourCookie Policy
Cookie Settings
Accept All Cookies