concept

Cypher

Facts (26)

Sources
Leveraging Knowledge Graphs and LLM Reasoning to Identify ... arxiv.org arXiv Jul 23, 2025 13 facts
codeThe Cypher query 'MATCH (s:SUPPLIER) WHERE s.arrival_time IN [timeframe] RETURN s.id, duration.between(s.arrival, s.discharge_start);...avg(...)' is used to calculate the breakdown of time taken for each stage of the package unload process for each supplier within a specific timeframe.
codeThe Cypher query to calculate AGV utilization is: MATCH (w:WORKER)-[]->(a:AGV)-[]->... RETURN a.id, SUM(dur_proc) / dur_active AS util
procedureThe LLM agent's query processing procedure follows these steps: (1) The agent receives a complex natural language query regarding warehouse performance or planning. (2) The agent autonomously generates a sequence of sub-questions, formulated one at a time and conditioned on evidence from previous sub-question answers. (3) For each sub-question, the agent generates a precise NL-to-Graph Cypher query for Knowledge Graph interaction, as referenced in Hornsteiner et al. (2024) and Mandilara et al. (2025). (4) The agent retrieves relevant information. (5) The agent performs self-reflection, as referenced in Huang et al. (2022) and Madaan et al. (2023), to validate findings and correct errors in the analytical pathway.
codeThe Cypher query to calculate forklift utilization is: MATCH (a:AGV)-[]->(fl:FL)-[]->... RETURN fl.id, SUM(dur_proc) / dur_active AS util; ...avg(util)
claimThe proposed Guided Iterative Steps approach for operational question answering consistently outperforms both the single-pass Cypher generation baseline and the enhanced baseline that adds post-answer self-reflection, particularly in achieving comprehensive correctness as measured by maximum Pass@4 scores.
referenceThe experimental evaluation of the LLM agent framework utilized OpenAI’s GPT-4o via Langchain QA chains, interacting with a Neo4j knowledge graph through LLM-generated Cypher queries, with configuration settings of temperature 0.0, top_p 0.95, and a 4096-token limit.
procedureThe proposed technique for knowledge-graph-enhanced LLMs avoids the brittleness of using a single, monolithic Cypher query by implementing a layer based on question decomposition and structured step-wise guidance generation. This agent breaks down each query into a sequence of analytical steps, where each step involves targeted Cypher query formulation, execution, and an immediate self-reflection phase to assess and refine the output before proceeding.
referenceThe paper 'Q2Cypher: Converting Natural Language Questions to Cypher with Fine-Tuned Large Language Models' by Yunqi Zou, Yongli Wang, and Dongmei Liu was published in the 2024 5th International Conference on Artificial Intelligence and Computer Engineering (ICAICE).
claimThe authors' framework uses Cypher instead of SQL to query Knowledge Graphs because Cypher leverages the native graph structure, allows for more expressive queries on complex operational patterns, and avoids the cumbersome joins typical of SQL on graph-like data, a distinction supported by Sivasubramaniam et al. (2024).
procedureThe operational query process employs a QA chain guided by a step-wise approach that decomposes input questions into structured steps, where each step involves Cypher generation, knowledge graph querying, and self-reflection.
procedureFor each sub-question, the framework generates Cypher queries for Knowledge Graph interaction, extracts information, and performs self-reflection to identify and correct potential errors.
codeMATCH (s:SUPPLIER {supplier_id:'CamelCargo'}) RETURN duration.between(s.discharge_start, s.discharge_end);
referenceThe proposed framework for warehouse operational analysis consists of two main components: the ontological construction of a Knowledge Graph from Discrete Event Simulation output data, and an LLM-agent equipped with an iterative reasoning mechanism that features sequential sub-questioning, Cypher generation for Knowledge Graph interaction, and self-reflection.
Enhancing LLMs with Knowledge Graphs: A Case Study - LinkedIn linkedin.com LinkedIn Nov 7, 2023 3 facts
procedureThe authors linked coverage nodes in the ontology to the taxonomy services by generating a list of services and coverages using Cypher queries and programmatically creating relationships between them.
codeMATCH (n:PlanModification {cid:'{doc id}'})--(m) RETURN m.description
procedureTo fact-check the LLM, the authors use the Cypher query language to return relevant coverage nodes and their descriptions from the knowledge graph, then perform a similarity match between the LLM response and the retrieved knowledge graph information using embeddings.
Construction of Knowledge Graphs: State and Challenges - arXiv arxiv.org arXiv 2 facts
claimProperty Graph Models serve as the base data model for graph query languages including G-Core, Gremlin, PGQL, Cypher, SQL/PGQ, and GQL.
referenceCypher is an evolving query language for property graphs, presented at the 2018 International Conference on Management of Data (SIGMOD Conference 2018).
Context Graph vs Knowledge Graph: Key Differences for AI - Atlan atlan.com Atlan Jan 27, 2026 2 facts
claimKnowledge graphs utilize SPARQL or Cypher for semantic traversal and inference, while context graphs utilize graph traversal with operational and policy-aware filters.
referenceKnowledge graphs are queried using SPARQL for triple stores or Cypher for property graphs, whereas context graphs utilize graph queries combined with operational filters to find assets based on quality, certification, and modification history.
KG-RAG: Bridging the Gap Between Knowledge and Creativity - arXiv arxiv.org arXiv May 20, 2024 2 facts
procedureThe CoE exploration process involves a cyclical lookup phase consisting of four steps: (1) executing Cypher queries to retrieve connected nodes and relationships in the knowledge graph, (2) ranking nodes or relationships by relevance using dense vector embeddings, (3) utilizing an LLM to filter and select the most relevant nodes or relationships for continuing exploration hops, and (4) evaluating the alignment of the current traversal with the initial plan to decide whether to continue, adjust, or synthesize a response.
procedureThe CoE exploration process involves a cyclical lookup phase consisting of four steps: (1) executing Cypher queries to retrieve connected nodes and relationships in the knowledge graph, (2) ranking nodes or relationships by relevance using dense vector embeddings, (3) utilizing an LLM to filter and select the most relevant nodes or relationships for continuing exploration hops, and (4) evaluating the alignment of the current traversal with the initial plan to decide whether to continue, adjust, or synthesize a response.
LLM Knowledge Graph: Merging AI with Structured Data - PuppyGraph puppygraph.com PuppyGraph Feb 19, 2026 2 facts
claimGraphRAG systems abstract traditional database interactions, allowing users to query systems using natural language instead of specialized query languages like Cypher, Gremlin, or SPARQL.
procedureThe GraphRAG pipeline operates in four steps: (1) Natural Language Processing and Hybrid Retrieval Strategy, where the system analyzes a user's natural language question to determine if a structured knowledge graph query is required; (2) Formal Query Code Generation, where the LLM reads the graph schema (ontology, entity types, and relationships) and generates the precise formal query code (e.g., Cypher or Gremlin) based on system prompts; (3) Query Execution and Result Return, where the knowledge graph engine performs structured traversal and multi-hop pathfinding to retrieve connected data points; and (4) Synthesis and Final Answer Generation, where the LLM uses the retrieved, verified, and structured results to formulate a coherent, context-rich, and grounded final answer.
A survey on augmenting knowledge graphs (KGs) with large ... link.springer.com Springer Nov 4, 2024 1 fact
claimNeo4j has integrated natural language processing tools that translate user queries into Cypher, the native graph query language of Neo4j, to increase the accessibility and usability of graph database systems for users without deep technical expertise.
LLM-KG4QA: Large Language Models and Knowledge Graphs for ... github.com GitHub 1 fact
referenceThe field of Natural Language to Graph Query Language (NL2GQL) research focuses on translating natural language questions into graph query languages like Cypher or SPARQL, often utilizing Large Language Models to bridge the gap between natural language and structured graph databases.