Skip to content

Search is only available in production builds. Try building and previewing the site to test it out locally.

Prompt Cypher

Cypher is the query language of the graph database that stores your knowledge graph. You do not need it to use the assistant, but if you know it, you can use it directly in the prompt.

Run a Cypher query

Type or paste a Cypher query in the input field, then submit. The assistant runs it and returns the graph associated with the query, so you can see the objects and relations it returns.

Example:

MATCH (p:PART)-[_ar0:purchased_via]->(c:CONTRACT)-[_ar1:negociated_with]->(s:SUPPLIER)
RETURN DISTINCT p AS n1, c AS n2, s AS n3, p.ID_NODE AS ID_NODE, labels(p)[0] AS label
UNION
MATCH (b:BRAND)-[_ar2:produces]->(m:MODEL)
RETURN DISTINCT b AS n1, m AS n2, null AS n3, m.ID_NODE AS ID_NODE, labels(m)[0] AS label

The assistant runs the query and returns the graph: the parts with their contracts and suppliers, and the brands with the models they produce.

Run a Cypher query

To see the query behind any other answer, use the Show Cypher option (see Ask a question).

help with a complex query

The assistant can also guide you when a query becomes complex, and correct it: paste a query that fails or does not return what you expect, or describe what you are trying to retrieve, and the assistant explains the issue and proposes a corrected version.

Example: the relation between a part and its contract is purchased_via, not purchased_by.

Fix this query:
MATCH (c:CONTRACT)-[:negotiated_with]->(s:SUPPLIER {name: 'Bosch'})
MATCH (p:PART)-[:purchased_by]->(c)
RETURN p, c.unit_price

The assistant points out that purchased_by does not exist in the ontology, and proposes the corrected query:

MATCH (c:CONTRACT)-[:negotiated_with]->(s:SUPPLIER {name: 'Bosch'})
MATCH (p:PART)-[:purchased_via]->(c)
RETURN p, c.unit_price

Fix a Cypher query