liveBook · Manning

Query execution

As explained in Knowledge Graphs and LLMs in Action

Query execution is the process of running a database query and processing the records or errors it produces.

Query execution runs a generated Cypher query against Neo4j, formats successful results for the requested visualization, and records failures for recovery. section 15.1.5

A reliable execution stage follows this pipeline:

  • Keep graph and map results as records; convert tabular results to a pandas DataFrame. section 15.1.5
  • On a client error, preserve the error, log it, include the attempted query in diagnostic information, and increment retries. section 15.1.5

How Knowledge Graphs and LLMs in Action covers it

How deep it goes
Implements execution, output conversion, exception capture, retry counting, and conditional post-execution routing.
Examples
Uses graph, map, and tabular outputs, including native record lists, DataFrames, syntax errors, and schema mismatches.
What it assumes
Assumes an agent state containing a generated query and output type, plus an available Neo4j schema connection.
What you can do after
Operate/configure a query agent that formats results, diagnoses execution failures, and routes retries or summaries.
How it connects
Connects Cypher, Neo4j, LangGraph, visualization intent, pandas DataFrame conversion, error handling, and retry logic.

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.