liveBook · Manning

Multi-step reasoning

As explained in Knowledge Graphs and LLMs in Action

Reasoning is the process of analyzing information, applying rules, and drawing conclusions from evidence or premises.

Reasoning analyzes information, applies rules, and draws conclusions from evidence or premises. In an intelligent system, a reasoning engine uses one or more knowledge bases to produce insights and suggestions for user goals. section 2.1 section 2.4

Distinguish reasoning modes by how they move from available knowledge to conclusions:

  • Deductive reasoning starts with general statements or hypotheses and derives a specific logical conclusion, assuming the premises are true. section 2.4
  • Inductive reasoning generalizes from individual examples, such as labeled spam messages, to classify previously unseen cases. section 2.4
  • Practical reasoning must account for uncertain, inaccurate, or ambiguous information and determine how missing knowledge can be inferred. section 2.4

Knowledge representation constrains reasoning: richer representations can be harder to process efficiently, while domain-appropriate knowledge graphs provide structured entities, relationships, and properties for inference. Multiple knowledge bases and reasoning engines may operate sequentially or in parallel, passing outputs between processes. section 2.1 section 1.1

For natural-language questions over a knowledge graph, reasoning becomes an implementation pipeline: detect intent, extract and annotate the schema, identify relevant relationships, generate a query, execute it, handle errors, visualize results, and summarize important patterns. Structured intermediate outputs—potential relationships, a reasoning plan, then the Cypher query—reduce hallucinated relationships and make generation more reliable. section 14.4 section 14.7.3

Testing multistep reasoning

A farmer must transport himself and a sheep across a river using a boat that holds one person and one animal. Solving the smallest-trip puzzle tests whether a model plans intermediate steps instead of jumping directly to an answer. Chain-of-thought and scratchpad prompting similarly provide intermediate workings before the final response. section 14.7

How Knowledge Graphs and LLMs in Action covers it

How deep it goes
Explains deductive and inductive forms, uncertainty, and a query-generation pipeline, while stopping short of formal reasoning algorithms.
Examples
Uses spam filtering, a river-crossing puzzle, and natural-language-to-Cypher knowledge-graph querying as concrete reasoning examples.
What it assumes
Assumes familiarity with intelligent systems and knowledge graphs while defining reasoning, deductive reasoning, and inductive reasoning from foundational examples.
What you can do after
Build reliable query-generation workflows by supplying schema context, checking relationships, structuring reasoning steps, and using execution feedback.
How it connects
Connects reasoning with knowledge representation, knowledge graphs, LLMs, inductive reasoning, deductive reasoning, prompt engineering, and Cypher queries.

Also explained in

Compare how 10 books explain multi-step reasoning →

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.