liveBook · Manning

Few-shot learning

As explained in Building Specialized AI Systems

Few-shot learning is the ability to perform a new task from a small number of examples provided at inference time.

Few-shot learning adapts a large language model to a new task at inference time by providing a small number of examples in the prompt. This capability emerges from model scale rather than from explicit task-specific programming. section 1.1.1

It is especially useful when labeled training data is limited. Unlike fine-tuning, it guides behavior through carefully crafted examples without updating the model’s parameters. section 1.5.1

Choose few-shot learning when:

  • Training data is limited and high accuracy is desirable, but full parameter updates are not justified. section 1.5.1
  • External knowledge is required and retrieved information can be combined with examples that guide style or behavior. section 1.5.1
  • Sufficient high-quality examples exist for fine-tuning, because fine-tuning may provide stronger task adaptation than few-shot prompting. section 1.5.1

How Building Specialized AI Systems covers it

How deep it goes
Defines inference-time adaptation through prompt examples and contrasts it with parameter-updating fine-tuning, but omits implementation procedure.
Examples
Uses prompt-provided examples and combines them with retrieved information in limited-data RAG workflows.
What you can do after
Apply it via carefully crafted examples to guide model behavior without full parameter updates when data is limited.
How it connects
Connects prompt engineering, retrieval-augmented generation, and fine-tuning through data-availability and accuracy trade-offs.

Also explained in

Compare how 24 books explain few-shot learning →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Building Specialized AI Systems. The section links point to the parts of the book it draws on.