Cypher
Cypher is a declarative graph query language for expressing patterns and retrieving, creating, or modifying property-graph data.
Graph Algorithms for Data Science
Cypher syntax is the grammatical system governing how Cypher queries represent graph elements and operations.
- How it is used
- Supports modeling, importing, querying, and exploratory analysis of labeled-property graph data.
- How deep it goes
- Explains node and relationship notation, variables, major clauses, aggregation, filtering, and pattern-counting queries without optimization details.
- Examples
- Uses a Thomas–Elaine friendship, sampled Twitter FOLLOWS paths, and ranked co-occurring hashtag pairs.
- What you can do after
- Apply it via Neo4j to create, retrieve, filter, aggregate, update, and visualize graph patterns.
Read how Graph Algorithms for Data Science explains Cypher →
Knowledge Graphs and LLMs in Action
Cypher is a declarative graph query language for matching patterns and reading or modifying property-graph data.
- How it is used
- Supports readable querying, ingestion, enrichment, cleanup, and natural-language question answering over property-graph knowledge graphs.
- How deep it goes
- Explains pattern matching, filtering, returning, loading, conditional updates, batching, and deletion, but does not detail language internals.
- Examples
- Uses disease–phenotype metadata queries, HPOA tabular ingestion, relationship enrichment, graph cleanup, and structured query-generation prompts.
- What you can do after
- Builds and queries annotated LPG knowledge graphs, including loading data, enriching relationships, and generating queries from structured questions.
Read how Knowledge Graphs and LLMs in Action explains Cypher →
Data Analysis with LLMs
A Cypher query is a declarative statement written in Cypher that requests or manipulates graph data.
- How it is used
- Uses graph databases to answer natural-language questions by expressing graph-data operations as executable queries.
- How deep it goes
- Explains MATCH, RETURN, labels, properties, relationships, and direction through simple examples, while deferring full language coverage.
- Examples
- Demonstrates Person and Movie nodes, ACTED_IN relationships, Tom Cruise filtering, returned titles, and result counting.
- What you can do after
- Evaluate/understand simple Cypher queries and inspect queries generated from natural-language questions.
AI Agents and Applications
Cypher is a declarative graph query language associated with Neo4j for querying and manipulating connected data.
- How it is used
- Translates natural-language questions into graph queries for knowledge-graph retrieval and routed data-access systems.
- How deep it goes
- Defines graph querying and demonstrates one generated statement, but defers broader Cypher syntax and database operations.
- Examples
- Uses a Top Gun actor-count query, graph nodes and edges, schema-constrained prompts, and routed graph questions.
- What you can do after
- Apply it via Neo4j integration by generating schema-constrained queries and routing graph questions to the appropriate retriever.
Also covered in
- Building Specialized AI SystemsIn early access (MEAP)
- Essential GraphRAG
- Digital Twins in Action
What to know first
- graph databaseA graph database is a database system that represents data as entities and their relationships, typically using nodes and edges, and supports queries over that structure.
- language modelA language model is a computational model that represents patterns in linguistic sequences to assign probabilities, predict, generate, or evaluate language.
- natural languageNatural language is a human communication system that develops through social use and is expressed in spoken or written form.
- regular expressionA regular expression is a formal pattern notation that describes sets of strings and specifies how text can be matched, searched, or transformed.
Related concepts
- graph databaseuses · A graph database is a database system that represents data as entities and their relationships, typically using nodes and edges, and supports queries over that structure.
- traversalused by · Traversal is the systematic process of visiting elements or nodes in a data structure according to a specified order or rule.
- automated query generationused by · Automated query generation is the process of producing an executable database query from natural-language requests, structured intent, declarations, or other specifications.
- property graphuses · A property graph is a graph data model in which nodes and the edges connecting them can have labels and key-value properties.
Questions about Cypher
What is Cypher?
Cypher is a declarative graph query language for expressing patterns and retrieving, creating, or modifying property-graph data.
Which Manning books explain Cypher?
Graph Algorithms for Data Science, Knowledge Graphs and LLMs in Action, Data Analysis with LLMs and AI Agents and Applications.
What should I know before learning Cypher?
Manning books that teach Cypher usually introduce graph database, language model, natural language and regular expression first.
What are the parts of Cypher?
Cypher includes Cypher clause.
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.



