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.

Advertisement

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.

Few-shot prompting — exemplar selection + ordering + retrieval + curriculum + evalin-context examples that lift qualityTaskgoal + inputExemplar poolcuratedSelectionsimilarity / diversityOrderingcurriculum / randomRetrieval few-shotdynamic per queryNumber of shotsK tradeFormattingconsistent templateEvaluationper-task liftStorage + versioningin registryCosttokens matterOps — refresh + regression + monitordynamicsizeformatmeasurestorebudgetbudgetoperateoperate
Few-shot prompting pipeline with retrieval + eval.
Advertisement

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.