Skip to content

Text2Cypher

Required Graph Shape

Domain Graph

Description

The user question is translated to a cypher query by the LLM which is then executed against the database. The data returned by the execution is provided to the LLM.

Usage

The two related GraphRAG patterns Cypher Templates and Dynamic Cypher Generation are both limited by the queries / query snippets that are defined during implementation. This pattern is highly flexible. There are no predefined queries and (in theory) the LLM can generate any query. However, this pattern is not 100% reliable. LLMs are not perfect when translating text to cypher. If the LLM is not able to translate the given user query correctly, it will not be able to provide any answer.

Further reading

Existing Implementations

Example Implementations