Pattern
Text2Cypher / Text2SPARQL
activeNeeds verification
An LLM translates a natural-language question into a graph query (Cypher, SPARQL or GQL) using the schema, executes it, and verbalises the results.
Problem
Users cannot write graph queries, and retrieval of unstructured text loses exact aggregates.
Solution
Schema-aware prompting (plus few-shot examples) → generated query → validation/read-only execution → answer.
Trade-offs
Generated queries can be wrong or unsafe; enforce read-only roles and validate against the schema.
Profile
| Category | graphrag |
|---|
Relationships
- Part of
- Implemented by
- LlamaIndex(Library / framework)
- Neo4j GraphRAG for Python(Library / framework)
- Prerequisites
- Cypher(Query language)