liveBook · Manning

One-shot learning

One-shot learning is a machine-learning setting in which a system learns or adapts to perform a task from a single example.

How 2 Manning books explain it

Knowledge Graphs and LLMs in Action

One-shot learning is performing a task after receiving one task-specific example.

How it is used
Deploys one example to guide domain-specific knowledge extraction and knowledge-graph construction with a pretrained language model.
How deep it goes
Defines the prompting pattern, gives iteration and validation advice, and stops short of solving complex reasoning ambiguities.
Examples
Uses contextual interpretations of “Prof. Chem.” and “Stanford,” plus mini-knowledge-graph inspection.
What you can do after
Apply it via prompt engineering, validate outputs through small knowledge graphs, and switch to fine-tuning when necessary.

Read how Knowledge Graphs and LLMs in Action explains one-shot learning →

Fight Fraud with Machine Learning

One-shot learning is a learning setting in which a model must recognize or learn a new pattern from a single example.

How it is used
Uses a single example in prompt engineering to adapt ChatGPT's phishing classification to a previously missed pattern.
How deep it goes
Defines one-shot and few-shot learning, demonstrates prompt-based correction, and names Siamese networks without detailing their implementation.
Examples
Uses a misclassified phishing email, a genuine-and-phishing demonstration pair, and a specific ghost-domain pattern.
What you can do after
Apply it via prompt engineering to classify phishing emails after supplying representative genuine and phishing examples.

Read how Fight Fraud with Machine Learning explains one-shot learning →

Also covered in

What to know first

Related concepts

Questions about one-shot learning

What is one-shot learning?

One-shot learning is a machine-learning setting in which a system learns or adapts to perform a task from a single example.

Which Manning books explain one-shot learning?

Knowledge Graphs and LLMs in Action and Fight Fraud with Machine Learning.

What should I know before learning one-shot learning?

Manning books that teach one-shot learning usually introduce language model, prompt, fine-tuning and pretraining first.

What is the difference between one-shot learning and zero-shot learning?

One-shot learning is a machine-learning setting in which a system learns or adapts to perform a task from a single example. Zero-shot learning is the application of a model to a task or classes without task-specific examples or demonstrations, relying on prior learned knowledge and available task information.

What is one-shot learning a kind of?

One-shot learning is a kind of machine learning. Machine learning is a field of computational methods in which systems learn patterns or relationships from data to make predictions, decisions, or other outputs.

These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.