Why architecture matters here
Few-shot fails on stale exemplars, inconsistent formatting, and too many or too few shots. Architecture matters because storage + selection + eval must be automated.
The architecture: every piece explained
The top strip is the pipeline. Task arrives. Exemplar pool curated. Selection similarity + diversity. Ordering curriculum or random.
The middle row is choice. Retrieval few-shot dynamic per query. Number of shots — K trade-off with tokens. Formatting consistent template. Evaluation per-task lift.
The lower rows are practice. Storage + versioning in registry. Cost tokens matter. Ops — refresh + regression + monitor.
End-to-end flow
End-to-end: task "classify email". Retriever finds top-K similar exemplars. Formatted consistently. Prompt sent. Response back. Eval shows F1 +3% vs zero-shot. Cost measured. Registry tracks exemplar version.