liveBook · Manning

Zero-shot learning

As explained in Knowledge Graphs and LLMs in Action

Zero-shot learning is performing a task without task-specific examples, relying on a task description and pretrained knowledge.

Zero-shot learning performs a task from a task description alone, without task-specific examples. It relies on a pretrained language model’s broad linguistic understanding and general knowledge. section 5.3.3

A practical zero-shot workflow is:

  • Describe the extraction task and provide clean, complete relation and entity specifications. section 5.3.3
  • Run a small iteration, produce a mini knowledge graph, and inspect it for systematic errors. section 5.3.3
  • Improve the prompt briefly; switch to fine-tuning when prompt changes stop producing satisfactory results. section 5.3.3

Domain extraction

A prompt can ask an LLM to extract relations from unstructured text without examples. The model may resolve “Prof. Chem.” as Professor of Chemistry and “Stanford” as Stanford University from context, but complex reasoning and dataset ambiguities can still cause errors. section 5.3.3

How Knowledge Graphs and LLMs in Action covers it

How deep it goes
Defines the technique and gives an iterative validation workflow, but stops short of implementation details or formal analysis.
Examples
Uses contextual interpretation of titles and organizations, plus mini-knowledge-graph inspection, as practical extraction examples.
What it assumes
Assumes access to a pretrained language model and basic prompt construction, while teaching task specification from zero examples.
What you can do after
Apply it via prompt engineering, inspect intermediate knowledge graphs, and recognize when fine-tuning is preferable.
How it connects
Connects zero-shot learning with prompt engineering, one-shot learning, fine-tuning, entity resolution, and knowledge graphs.

Also explained in

Compare how 10 books explain zero-shot learning →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Knowledge Graphs and LLMs in Action. The section links point to the parts of the book it draws on.