You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hop.apache.org by mc...@apache.org on 2026/10/11 21:36:23 UTC

(hop) branch main updated: Fixes #8857 : Add GraphRAG samples, integration tests and how-to (#8858)

This is an automated email from the ASF dual-hosted git repository.

mattcasters pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/hop.git


The following commit(s) were added to refs/heads/main by this push:
     new aa3e864f19 Fixes #8857 : Add GraphRAG samples, integration tests and how-to (#8858)
aa3e864f19 is described below

commit aa3e864f194beab03ccab0511446d3bd599d3cc3
Author: Bart Maertens <ba...@know.bi>
AuthorDate: Sun Oct 11 23:36:17 2026 +0200

    Fixes #8857 : Add GraphRAG samples, integration tests and how-to (#8858)
---
 docs/hop-user-manual/modules/ROOT/nav.adoc         |   1 +
 .../modules/ROOT/pages/how-to-guides/graphrag.adoc | 102 +++
 .../modules/ROOT/pages/how-to-guides/index.adoc    |   1 +
 .../datasets/graphrag-facts-validation-golden.csv  |   4 +
 .../datasets/graphrag-graph-validation-golden.csv  |   8 +
 .../dataset/graphrag-facts-validation-golden.json  |  24 +
 .../dataset/graphrag-graph-validation-golden.json  |  24 +
 .../age/metadata/neo4j-graph-model/graphrag.json   | 189 ++++++
 .../unit-test/graphrag-facts-validation UNIT.json  |  32 +
 .../unit-test/graphrag-graph-validation UNIT.json  |  32 +
 .../age/tests/graphrag/graphrag-build.hpl          | 671 +++++++++++++++++++
 .../tests/graphrag/graphrag-facts-validation.hpl   | 271 ++++++++
 .../tests/graphrag/graphrag-graph-validation.hpl   | 185 ++++++
 .../age/tests/graphrag/main-graphrag.hwf           | 156 +++++
 .../datasets/graphrag-graph-validation-golden.csv  |   8 +
 .../graphrag-retrieve-validation-golden.csv        |   5 +
 .../dataset/graphrag-graph-validation-golden.json  |  24 +
 .../graphrag-retrieve-validation-golden.json       |  40 ++
 .../metadata/neo4j-graph-model/graphrag.json       | 189 ++++++
 .../unit-test/graphrag-graph-validation UNIT.json  |  32 +
 .../graphrag-retrieve-validation UNIT.json         |  40 ++
 .../falkordb/tests/graphrag/graphrag-build.hpl     | 688 +++++++++++++++++++
 .../tests/graphrag/graphrag-graph-validation.hpl   | 185 ++++++
 .../graphrag/graphrag-retrieve-validation.hpl      | 363 ++++++++++
 .../falkordb/tests/graphrag/main-graphrag.hwf      | 310 +++++++++
 .../datasets/graphrag-graph-validation-golden.csv  |   8 +
 .../graphrag-retrieve-validation-golden.csv        |   5 +
 .../dataset/graphrag-graph-validation-golden.json  |  24 +
 .../graphrag-retrieve-validation-golden.json       |  40 ++
 .../metadata/neo4j-graph-model/graphrag.json       | 189 ++++++
 .../unit-test/graphrag-graph-validation UNIT.json  |  32 +
 .../graphrag-retrieve-validation UNIT.json         |  40 ++
 .../memgraph/tests/graphrag/graphrag-build.hpl     | 688 +++++++++++++++++++
 .../tests/graphrag/graphrag-graph-validation.hpl   | 185 ++++++
 .../graphrag/graphrag-retrieve-validation.hpl      | 363 ++++++++++
 .../memgraph/tests/graphrag/main-graphrag.hwf      | 310 +++++++++
 .../datasets/graphrag-graph-validation-golden.csv  |   8 +
 .../graphrag-retrieve-validation-golden.csv        |   5 +
 .../dataset/graphrag-graph-validation-golden.json  |  24 +
 .../graphrag-retrieve-validation-golden.json       |  40 ++
 .../metadata/neo4j-graph-model/graphrag.json       | 189 ++++++
 .../unit-test/graphrag-graph-validation UNIT.json  |  32 +
 .../graphrag-retrieve-validation UNIT.json         |  40 ++
 .../neo4j-bolt/tests/graphrag/graphrag-build.hpl   | 688 +++++++++++++++++++
 .../tests/graphrag/graphrag-graph-validation.hpl   | 185 ++++++
 .../graphrag/graphrag-retrieve-validation.hpl      | 363 ++++++++++
 .../neo4j-bolt/tests/graphrag/main-graphrag.hwf    | 310 +++++++++
 .../metadata/neo4j-graph-model/graphrag.json       | 189 ++++++
 .../samples/transforms/graphrag-ask-hybrid.hpl     | 530 +++++++++++++++
 .../src/main/samples/transforms/graphrag-ask.hpl   | 541 +++++++++++++++
 .../samples/transforms/graphrag-index-hybrid.hpl   | 728 +++++++++++++++++++++
 .../src/main/samples/transforms/graphrag-index.hpl | 695 ++++++++++++++++++++
 .../src/main/samples/transforms/graphrag-index.hwf | 164 +++++
 53 files changed, 10199 insertions(+)

diff --git a/docs/hop-user-manual/modules/ROOT/nav.adoc b/docs/hop-user-manual/modules/ROOT/nav.adoc
index 2b01d8c1fc..73922ce413 100644
--- a/docs/hop-user-manual/modules/ROOT/nav.adoc
+++ b/docs/hop-user-manual/modules/ROOT/nav.adoc
@@ -638,6 +638,7 @@ under the License.
 *** xref:how-to-guides/cdc-filtered-selection.adoc[CDC: filtered selection]
 *** xref:how-to-guides/cdc-snapshot-comparison.adoc[CDC: comparing snapshots]
 ** xref:how-to-guides/joins-lookups.adoc[Joins and lookups]
+** xref:how-to-guides/graphrag.adoc[GraphRAG: answer questions from a knowledge graph]
 ** xref:how-to-guides/high-volume-scd2.adoc[High-volume SCD2 loads]
 ** xref:how-to-guides/logging-pipeline-log.adoc[Logging pipeline data with pipeline log]
 ** xref:how-to-guides/logging-workflow-log.adoc[Logging workflow data with workflow log]
diff --git a/docs/hop-user-manual/modules/ROOT/pages/how-to-guides/graphrag.adoc b/docs/hop-user-manual/modules/ROOT/pages/how-to-guides/graphrag.adoc
new file mode 100644
index 0000000000..cf43e59ec4
--- /dev/null
+++ b/docs/hop-user-manual/modules/ROOT/pages/how-to-guides/graphrag.adoc
@@ -0,0 +1,102 @@
+////
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+  http://www.apache.org/licenses/LICENSE-2.0
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
+////
+[[GraphRAG]]
+:imagesdir: ../../assets/images
+:description: Index documents into a knowledge graph with chunks, embeddings, entities and relationships, and answer questions from it with a language model.
+
+= GraphRAG: answer questions from a knowledge graph
+
+Retrieval-augmented generation (RAG) answers a question with the passages of your documents that are closest to it. GraphRAG also uses what a knowledge graph knows about the entities in those passages, so a language model can connect facts that are spread over several documents.
+
+This guide walks through the GraphRAG samples in the `samples` project. They use standard Hop transforms only: xref:pipeline/transforms/textchunker.adoc[Text chunker], xref:pipeline/transforms/embedtext.adoc[Embed text], xref:pipeline/transforms/extractgraph.adoc[Extract graph], xref:pipeline/transforms/graph-output.adoc[Graph output], xref:pipeline/transforms/graph-query.adoc[Graph query], xref:pipeline/transforms/graph-vector-search.adoc[Graph vector search] and xref:pipeline/transform [...]
+
+== The graph
+
+The samples write the graph model `graphrag`:
+
+[source]
+----
+(:Document {id, title})-[:HAS_CHUNK]->(:Chunk {id, chunk_index, text, embedding})
+(:Chunk)-[:MENTIONS]->(:Entity {key, name, type, description})
+(:Entity)-[:RELATED_TO {type, chunk_id, description}]->(:Entity)
+----
+
+* A chunk's id is the document id and the chunk index, for example `ada-lovelace#0`.
+* Entities are merged on their key: the name in lowercase without spaces or punctuation. "Hop Run", "hop run" and "hop-run" are one entity, and an entity that several chunks mention connects them.
+* A RELATED_TO relationship carries the relationship type and the chunk it was read from. There is one per type and source chunk.
+
+== Choose a database
+
+[options="header"]
+|===
+|Database |Samples |Vector search
+|Neo4j 5, Memgraph or FalkorDB |`graphrag-index.hwf`, `graphrag-ask.hpl` |in the graph: a vector index on the chunk embeddings
+|Apache AGE and PostgreSQL with pgvector |`graphrag-index-hybrid.hpl`, `graphrag-ask-hybrid.hpl` |in pgvector
+|===
+
+Apache AGE has no vector index, so the hybrid samples keep the embeddings in pgvector and write the same chunks, without embeddings, to the graph. Both use the chunk id, which joins a pgvector match to its Chunk node. AGE with pgvector is a fully Apache-licensed setup.
+
+FalkorDB works with the samples, but the FalkorDB server is licensed under the SSPL. Hop ships only its client.
+
+== What the samples need
+
+* A graph database connection: the samples use `demo-neo4j` (Neo4j 5.18 or later) and `demo-age` for the hybrid samples, both in the `samples` project. For Memgraph or FalkorDB, select `demo-memgraph` or `demo-falkordb` in the actions and transforms. See xref:metadata-types/graphs/graph-database-connection.adoc[Graph database connection].
+* For the hybrid samples, a relational database connection called `pgvector` to PostgreSQL with the `vector` extension.
+* An xref:metadata-types/ai-provider.adoc[AI provider] called `ollama-embeddings` with an embedding model. The samples expect 768 dimensions, the size of `nomic-embed-text`. For another model, change the dimensions in the Graph index action of `graphrag-index.hwf` and in the pgvector upsert transform.
+* An AI provider called `ollama-local` with a chat model. If the model thinks before it answers (qwen3, qwen3.5, deepseek-r1, …), set *Thinking* to Off: Extract graph calls the model once per chunk, and thinking makes that several times slower.
+
+Use the names of your own connections and providers if they differ: they are set in the transforms.
+
+== Index documents
+
+Run `graphrag-index.hwf`. It first creates the indexes: lookup indexes on `Document.id`, `Chunk.id` and `Entity.key`, and the vector index `graphrag_chunks` on `Chunk.embedding`. Then it runs `graphrag-index.hpl`:
+
+. *Documents* holds three short texts: about Ada Lovelace, the Analytical Engine and Charles Babbage. Replace it with your own documents, for example with a Text file input.
+. *Split into chunks* and *Chunk ID* cut each document into chunks of at most 1,500 characters.
+. *Embed chunks* adds an embedding to each chunk, and *Write documents and chunks* writes the Document and Chunk nodes.
+. Once every chunk is written, *Extract graph* asks the chat model for the entities and relationships in each chunk. The entity and relationship types it looks for are set in the transform: adapt them to your documents.
+. *Write mentions* writes an Entity per key and the chunk's MENTIONS relationship to it. *Write relationships* then writes RELATED_TO with Graph query.
+
+For Apache AGE, run `graphrag-index-hybrid.hpl` instead. It upserts the chunks into the pgvector table `graphrag_chunks` (the transform creates the table and an HNSW index, and deletes a document's old rows before writing its new ones) and writes the graph the same way.
+
+== Ask a question
+
+Run `graphrag-ask.hpl`, or `graphrag-ask-hybrid.hpl` for AGE, with the question in the `QUESTION` parameter. The default question is "In which city did the designer of the machine Ada Lovelace wrote an algorithm for live?". No single sample document answers it.
+
+. *Embed the question* turns the question into an embedding.
+. *Vector search on chunks* finds the three closest chunks: with Graph vector search, or with pgvector search in the hybrid sample.
+. *Facts of the chunk* is a Graph query that returns the entities each chunk mentions and their relationships, as facts such as `Charles Babbage (Person) -LIVED_IN-> London`.
+. *Label the excerpts*, *Context* and *Prompt* build a prompt with each chunk's text and facts.
+. *Answer the question* sends it to the chat model. *Answer* logs the question and the answer, in `llm_output`.
+
+The facts connect the excerpts: Ada Lovelace wrote an algorithm for the Analytical Engine, Charles Babbage designed it, and Babbage lived in London.
+
+== Check the extraction
+
+The graph is only as good as what Extract graph reads from the text. Before you index a large set of documents, run Extract graph on a few dozen chunks and check:
+
+* that the entities appear in the chunk text. Some models invent entities, or copy the examples from the instructions into the graph: don't put named examples in the instructions;
+* that the entity and relationship types fit your documents. Without suitable types, a model files dialog options and settings under whatever type is closest;
+* how long a chunk takes. A hosted model, or a local model with thinking switched off, needs a few seconds per chunk.
+
+== Limits
+
+* The samples name the vector index `graphrag_chunks`. A database can hold only one index with that name, so indexes with different dimensions need different databases, or a different name in the samples.
+* Graph output merges a relationship on its two nodes only, so a second relationship type between the same entities would overwrite the first. That's why the samples write RELATED_TO with Graph query, merging on the type and the chunk id.
+* *Write relationships* runs a Graph query per relationship, one transaction each. That is fine for samples and small sets; for thousands of chunks, write them in batches with the *Use UNWIND to collect parameter values?* option of xref:pipeline/transforms/graph-query.adoc[Graph query].
+* Entities are merged on their key, which only absorbs case, spaces and punctuation: "Babbage" and "Charles Babbage" are two entities.
+* Indexing a changed document again gives it new chunks. The relationships read from its old chunks stay until you remove them: their `chunk_id` tells which ones.
diff --git a/docs/hop-user-manual/modules/ROOT/pages/how-to-guides/index.adoc b/docs/hop-user-manual/modules/ROOT/pages/how-to-guides/index.adoc
index 5a190a80fc..adaef18b37 100644
--- a/docs/hop-user-manual/modules/ROOT/pages/how-to-guides/index.adoc
+++ b/docs/hop-user-manual/modules/ROOT/pages/how-to-guides/index.adoc
@@ -27,6 +27,7 @@ This page contains a collection of how-to guides to perform a variety of tasks,
 ** xref:how-to-guides/cdc-filtered-selection.adoc[CDC: filtered selection]
 ** xref:how-to-guides/cdc-snapshot-comparison.adoc[CDC: comparing snapshots]
 * xref:how-to-guides/joins-lookups.adoc[Joins and lookups in Apache Hop]
+* xref:how-to-guides/graphrag.adoc[GraphRAG: answer questions from a knowledge graph]
 * xref:how-to-guides/high-volume-scd2.adoc[High-volume SCD2 loads]
 * xref:how-to-guides/loops-in-apache-hop.adoc[Loops in Apache Hop]
 * xref:how-to-guides/hdfs-parquet-openshift.adoc[Write Parquet to Cloudera HDFS from OpenShift]
diff --git a/integration-tests/age/datasets/graphrag-facts-validation-golden.csv b/integration-tests/age/datasets/graphrag-facts-validation-golden.csv
new file mode 100644
index 0000000000..b91b3d5d50
--- /dev/null
+++ b/integration-tests/age/datasets/graphrag-facts-validation-golden.csv
@@ -0,0 +1,4 @@
+chunk_id,facts
+d1#0,Ada Lovelace (Person) -WORKED_WITH-> Charles Babbage; Charles Babbage (Person) -CREATED-> Analytical Engine
+d1#1,Analytical Engine (Product); Charles Babbage (Person) -CREATED-> Analytical Engine
+d2#0,
diff --git a/integration-tests/age/datasets/graphrag-graph-validation-golden.csv b/integration-tests/age/datasets/graphrag-graph-validation-golden.csv
new file mode 100644
index 0000000000..aa51e75de2
--- /dev/null
+++ b/integration-tests/age/datasets/graphrag-graph-validation-golden.csv
@@ -0,0 +1,8 @@
+check,n
+1 documents,2
+2 chunks,3
+3 entities,3
+4 has_chunk,3
+5 mentions,4
+6 related_to,2
+7 related_to from a chunk,2
diff --git a/integration-tests/age/metadata/dataset/graphrag-facts-validation-golden.json b/integration-tests/age/metadata/dataset/graphrag-facts-validation-golden.json
new file mode 100644
index 0000000000..292aeab32a
--- /dev/null
+++ b/integration-tests/age/metadata/dataset/graphrag-facts-validation-golden.json
@@ -0,0 +1,24 @@
+{
+  "base_filename": "graphrag-facts-validation-golden.csv",
+  "name": "graphrag-facts-validation-golden",
+  "description": "The facts of each chunk",
+  "dataset_fields": [
+    {
+      "field_comment": "",
+      "field_length": -1,
+      "field_type": 2,
+      "field_precision": -1,
+      "field_format": "",
+      "field_name": "chunk_id"
+    },
+    {
+      "field_comment": "",
+      "field_length": -1,
+      "field_type": 2,
+      "field_precision": -1,
+      "field_format": "",
+      "field_name": "facts"
+    }
+  ],
+  "folder_name": ""
+}
diff --git a/integration-tests/age/metadata/dataset/graphrag-graph-validation-golden.json b/integration-tests/age/metadata/dataset/graphrag-graph-validation-golden.json
new file mode 100644
index 0000000000..1df16ac92a
--- /dev/null
+++ b/integration-tests/age/metadata/dataset/graphrag-graph-validation-golden.json
@@ -0,0 +1,24 @@
+{
+  "base_filename": "graphrag-graph-validation-golden.csv",
+  "name": "graphrag-graph-validation-golden",
+  "description": "Node and relationship counts after graphrag-build",
+  "dataset_fields": [
+    {
+      "field_comment": "",
+      "field_length": -1,
+      "field_type": 2,
+      "field_precision": -1,
+      "field_format": "",
+      "field_name": "check"
+    },
+    {
+      "field_comment": "",
+      "field_length": -1,
+      "field_type": 5,
+      "field_precision": -1,
+      "field_format": "",
+      "field_name": "n"
+    }
+  ],
+  "folder_name": ""
+}
diff --git a/integration-tests/age/metadata/neo4j-graph-model/graphrag.json b/integration-tests/age/metadata/neo4j-graph-model/graphrag.json
new file mode 100644
index 0000000000..fec7bc5dee
--- /dev/null
+++ b/integration-tests/age/metadata/neo4j-graph-model/graphrag.json
@@ -0,0 +1,189 @@
+{
+  "name": "graphrag",
+  "description": "GraphRAG: documents split into chunks with embeddings, the entities the chunks mention, and the relationships between those entities.",
+  "nodes": [
+    {
+      "presentation": {
+        "x": 80,
+        "y": 200
+      },
+      "name": "Document",
+      "description": "A source document",
+      "labels": [
+        "Document"
+      ],
+      "properties": [
+        {
+          "indexed": false,
+          "unique": true,
+          "name": "id",
+          "description": "Document ID",
+          "type": "String",
+          "mandatory": true,
+          "primary": true
+        },
+        {
+          "indexed": false,
+          "unique": false,
+          "name": "title",
+          "description": "Document title",
+          "type": "String",
+          "mandatory": false,
+          "primary": false
+        }
+      ]
+    },
+    {
+      "presentation": {
+        "x": 300,
+        "y": 200
+      },
+      "name": "Chunk",
+      "description": "A part of a document, with its embedding",
+      "labels": [
+        "Chunk"
+      ],
+      "properties": [
+        {
+          "indexed": false,
+          "unique": true,
+          "name": "id",
+          "description": "Chunk ID: document ID and chunk index",
+          "type": "String",
+          "mandatory": true,
+          "primary": true
+        },
+        {
+          "indexed": false,
+          "unique": false,
+          "name": "chunk_index",
+          "description": "Position in the document",
+          "type": "Integer",
+          "mandatory": false,
+          "primary": false
+        },
+        {
+          "indexed": false,
+          "unique": false,
+          "name": "text",
+          "description": "The text of the chunk",
+          "type": "String",
+          "mandatory": false,
+          "primary": false
+        },
+        {
+          "indexed": false,
+          "unique": false,
+          "name": "embedding",
+          "description": "The embedding of the text",
+          "type": "Vector",
+          "mandatory": false,
+          "primary": false
+        }
+      ]
+    },
+    {
+      "presentation": {
+        "x": 520,
+        "y": 200
+      },
+      "name": "Entity",
+      "description": "An entity the Extract graph transform read from a text. Its type is a property.",
+      "properties": [
+        {
+          "indexed": false,
+          "unique": true,
+          "name": "key",
+          "description": "The name in lowercase without spaces or punctuation: spellings of one entity share it",
+          "type": "String",
+          "mandatory": true,
+          "primary": true
+        },
+        {
+          "indexed": false,
+          "unique": false,
+          "name": "name",
+          "description": "The name of the entity, as a text names it",
+          "type": "String",
+          "mandatory": false,
+          "primary": false
+        },
+        {
+          "indexed": false,
+          "unique": false,
+          "name": "type",
+          "description": "The entity type, for example Person",
+          "type": "String",
+          "mandatory": false,
+          "primary": false
+        },
+        {
+          "indexed": false,
+          "unique": false,
+          "name": "description",
+          "description": "One sentence about the entity",
+          "type": "String",
+          "mandatory": false,
+          "primary": false
+        }
+      ],
+      "labels": [
+        "Entity"
+      ]
+    }
+  ],
+  "relationships": [
+    {
+      "nodeSource": "Document",
+      "name": "HAS_CHUNK",
+      "description": "A document consists of chunks",
+      "nodeTarget": "Chunk",
+      "label": "HAS_CHUNK",
+      "properties": []
+    },
+    {
+      "nodeSource": "Chunk",
+      "name": "MENTIONS",
+      "description": "A chunk mentions an entity",
+      "nodeTarget": "Entity",
+      "label": "MENTIONS",
+      "properties": []
+    },
+    {
+      "nodeSource": "Entity",
+      "name": "RELATED_TO",
+      "description": "A relationship the Extract graph transform read between two entities: one per type and source chunk. The GraphRAG samples write it with Graph query, so the type and chunk_id identify it.",
+      "nodeTarget": "Entity",
+      "label": "RELATED_TO",
+      "properties": [
+        {
+          "indexed": false,
+          "unique": false,
+          "name": "type",
+          "description": "The relationship type, for example WORKED_WITH",
+          "type": "String",
+          "mandatory": false,
+          "primary": false
+        },
+        {
+          "indexed": false,
+          "unique": false,
+          "name": "description",
+          "description": "One sentence about the relationship",
+          "type": "String",
+          "mandatory": false,
+          "primary": false
+        },
+        {
+          "indexed": false,
+          "unique": false,
+          "name": "chunk_id",
+          "description": "The chunk the relationship was read from",
+          "type": "String",
+          "mandatory": false,
+          "primary": false
+        }
+      ]
+    }
+  ]
+}
diff --git a/integration-tests/age/metadata/unit-test/graphrag-facts-validation UNIT.json b/integration-tests/age/metadata/unit-test/graphrag-facts-validation UNIT.json
new file mode 100644
index 0000000000..f066d78c06
--- /dev/null
+++ b/integration-tests/age/metadata/unit-test/graphrag-facts-validation UNIT.json	
@@ -0,0 +1,32 @@
+{
+  "variableValues": [],
+  "database_replacements": [],
+  "autoOpening": true,
+  "basePath": "",
+  "golden_data_sets": [
+    {
+      "field_mappings": [
+        {
+          "transform_field": "chunk_id",
+          "data_set_field": "chunk_id"
+        },
+        {
+          "transform_field": "facts",
+          "data_set_field": "facts"
+        }
+      ],
+      "field_order": [
+        "chunk_id"
+      ],
+      "transform_name": "Validation",
+      "data_set_name": "graphrag-facts-validation-golden"
+    }
+  ],
+  "input_data_sets": [],
+  "name": "graphrag-facts-validation UNIT",
+  "description": "",
+  "trans_test_tweaks": [],
+  "persist_filename": "",
+  "pipeline_filename": "./tests/graphrag/graphrag-facts-validation.hpl",
+  "test_type": "UNIT_TEST"
+}
diff --git a/integration-tests/age/metadata/unit-test/graphrag-graph-validation UNIT.json b/integration-tests/age/metadata/unit-test/graphrag-graph-validation UNIT.json
new file mode 100644
index 0000000000..43a00078b9
--- /dev/null
+++ b/integration-tests/age/metadata/unit-test/graphrag-graph-validation UNIT.json	
@@ -0,0 +1,32 @@
+{
+  "variableValues": [],
+  "database_replacements": [],
+  "autoOpening": true,
+  "basePath": "",
+  "golden_data_sets": [
+    {
+      "field_mappings": [
+        {
+          "transform_field": "check",
+          "data_set_field": "check"
+        },
+        {
+          "transform_field": "n",
+          "data_set_field": "n"
+        }
+      ],
+      "field_order": [
+        "check"
+      ],
+      "transform_name": "Validation",
+      "data_set_name": "graphrag-graph-validation-golden"
+    }
+  ],
+  "input_data_sets": [],
+  "name": "graphrag-graph-validation UNIT",
+  "description": "",
+  "trans_test_tweaks": [],
+  "persist_filename": "",
+  "pipeline_filename": "./tests/graphrag/graphrag-graph-validation.hpl",
+  "test_type": "UNIT_TEST"
+}
diff --git a/integration-tests/age/tests/graphrag/graphrag-build.hpl b/integration-tests/age/tests/graphrag/graphrag-build.hpl
new file mode 100644
index 0000000000..d42b53d4d4
--- /dev/null
+++ b/integration-tests/age/tests/graphrag/graphrag-build.hpl
@@ -0,0 +1,671 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+Licensed to the Apache Software Foundation (ASF) under one or more
+contributor license agreements.  See the NOTICE file distributed with
+this work for additional information regarding copyright ownership.
+The ASF licenses this file to You under the Apache License, Version 2.0
+(the "License"); you may not use this file except in compliance with
+the License.  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+
+-->
+<pipeline>
+  <info>
+    <name>graphrag-build</name>
+    <name_sync_with_filename>Y</name_sync_with_filename>
+    <description>Writes fixed chunks and extraction rows the way the GraphRAG samples do</description>
+    <extended_description/>
+    <pipeline_version/>
+    <pipeline_type>Normal</pipeline_type>
+    <parameters>
+    </parameters>
+    <capture_transform_performance>N</capture_transform_performance>
+    <transform_performance_capturing_delay>1000</transform_performance_capturing_delay>
+    <transform_performance_capturing_size_limit>100</transform_performance_capturing_size_limit>
+    <created_user>-</created_user>
+    <created_date>2026/10/10 12:00:00.000</created_date>
+    <modified_user>-</modified_user>
+    <modified_date>2026/10/10 12:00:00.000</modified_date>
+  </info>
+  <notepads>
+  </notepads>
+  <order>
+    <hop>
+      <from>chunks</from>
+      <to>Write documents and chunks</to>
+      <enabled>Y</enabled>
+    </hop>
+    <hop>
+      <from>extracted graph</from>
+      <to>Hold the graph</to>
+      <enabled>Y</enabled>
+    </hop>
+    <hop>
+      <from>Hold the graph</from>
+      <to>Wait for the chunks</to>
+      <enabled>Y</enabled>
+    </hop>
+    <hop>
+      <from>Wait for the chunks</from>
+      <to>Entity keys</to>
+      <enabled>Y</enabled>
+    </hop>
+    <hop>
+      <from>Entity keys</from>
+      <to>Entity?</to>
+      <enabled>Y</enabled>
+    </hop>
+    <hop>
+      <from>Entity?</from>
+      <to>Write mentions</to>
+      <enabled>Y</enabled>
+    </hop>
+    <hop>
+      <from>Entity?</from>
+      <to>Collect relationships</to>
+      <enabled>Y</enabled>
+    </hop>
+    <hop>
+      <from>Collect relationships</from>
+      <to>Wait for the entities</to>
+      <enabled>Y</enabled>
+    </hop>
+    <hop>
+      <from>Wait for the entities</from>
+      <to>Write relationships</to>
+      <enabled>Y</enabled>
+    </hop>
+  </order>
+  <transform>
+    <name>chunks</name>
+    <type>DataGrid</type>
+    <description>Three chunks</description>
+    <distribute>Y</distribute>
+    <custom_distribution/>
+    <copies>1</copies>
+    <partitioning>
+      <method>none</method>
+      <schema_name/>
+    </partitioning>
+    <fields>
+      <field>
+        <set_empty_string>N</set_empty_string>
+        <length>-1</length>
+        <name>document_id</name>
+        <precision>-1</precision>
+        <type>String</type>
+      </field>
+      <field>
+        <set_empty_string>N</set_empty_string>
+        <length>-1</length>
+        <name>title</name>
+        <precision>-1</precision>
+        <type>String</type>
+      </field>
+      <field>
+        <set_empty_string>N</set_empty_string>
+        <length>-1</length>
+        <name>chunk_id</name>
+        <precision>-1</precision>
+        <type>String</type>
+      </field>
+      <field>
+        <set_empty_string>N</set_empty_string>
+        <length>-1</length>
+        <name>chunk_index</name>
+        <precision>-1</precision>
+        <type>Integer</type>
+      </field>
+      <field>
+        <set_empty_string>N</set_empty_string>
+        <length>-1</length>
+        <name>chunk_text</name>
+        <precision>-1</precision>
+        <type>String</type>
+      </field>
+    </fields>
+    <data>
+      <line>
+        <item>d1</item>
+        <item>Analytical Engine</item>
+        <item>d1#0</item>
+        <item>0</item>
+        <item>Ada Lovelace worked with Charles Babbage.</item>
+      </line>
+      <line>
+        <item>d1</item>
+        <item>Analytical Engine</item>
+        <item>d1#1</item>
+        <item>1</item>
+        <item>Babbage designed the Analytical Engine.</item>
+      </line>
+      <line>
+        <item>d2</item>
+        <item>Weather</item>
+        <item>d2#0</item>
+        <item>0</item>
+        <item>The weather in London is fine today.</item>
+      </line>
+    </data>
+    <attributes/>
+    <GUI>
+      <xloc>96</xloc>
+      <yloc>96</yloc>
+    </GUI>
+  </transform>
+  <transform>
+    <name>Write documents and chunks</name>
+    <type>Neo4jGraphOutput</type>
+    <description/>
+    <distribute>Y</distribute>
+    <custom_distribution/>
+    <copies>1</copies>
+    <partitioning>
+      <method>none</method>
+      <schema_name/>
+    </partitioning>
+    <connection>Test</connection>
+    <model>graphrag</model>
+    <batch_size>100</batch_size>
+    <create_indexes>N</create_indexes>
+    <returning_graph>N</returning_graph>
+    <return_graph_field/>
+    <validate_against_model>N</validate_against_model>
+    <out_of_order_allowed>Y</out_of_order_allowed>
+    <mappings>
+      <mapping>
+        <source_field>document_id</source_field>
+        <target_type>Node</target_type>
+        <target_name>Document</target_name>
+        <target_property>id</target_property>
+        <target_hint>None</target_hint>
+      </mapping>
+      <mapping>
+        <source_field>title</source_field>
+        <target_type>Node</target_type>
+        <target_name>Document</target_name>
+        <target_property>title</target_property>
+        <target_hint>None</target_hint>
+      </mapping>
+      <mapping>
+        <source_field>chunk_id</source_field>
+        <target_type>Node</target_type>
+        <target_name>Chunk</target_name>
+        <target_property>id</target_property>
+        <target_hint>None</target_hint>
+      </mapping>
+      <mapping>
+        <source_field>chunk_index</source_field>
+        <target_type>Node</target_type>
+        <target_name>Chunk</target_name>
+        <target_property>chunk_index</target_property>
+        <target_hint>None</target_hint>
+      </mapping>
+      <mapping>
+        <source_field>chunk_text</source_field>
+        <target_type>Node</target_type>
+        <target_name>Chunk</target_name>
+        <target_property>text</target_property>
+        <target_hint>None</target_hint>
+      </mapping>
+    </mappings>
+    <relationship_mappings>
+    </relationship_mappings>
+    <node_mappings>
+    </node_mappings>
+    <attributes/>
+    <GUI>
+      <xloc>320</xloc>
+      <yloc>96</yloc>
+    </GUI>
+  </transform>
+  <transform>
+    <name>extracted graph</name>
+    <type>DataGrid</type>
+    <description>What Extract graph returns for the chunks. 'charles-babbage' merges with 'Charles Babbage'.</description>
+    <distribute>Y</distribute>
+    <custom_distribution/>
+    <copies>1</copies>
+    <partitioning>
+      <method>none</method>
+      <schema_name/>
+    </partitioning>
+    <fields>
+      <field>
+        <set_empty_string>N</set_empty_string>
+        <length>-1</length>
+        <name>chunk_id</name>
+        <precision>-1</precision>
+        <type>String</type>
+      </field>
+      <field>
+        <set_empty_string>N</set_empty_string>
+        <length>-1</length>
+        <name>graph_element</name>
+        <precision>-1</precision>
+        <type>String</type>
+      </field>
+      <field>
+        <set_empty_string>N</set_empty_string>
+        <length>-1</length>
+        <name>name</name>
+        <precision>-1</precision>
+        <type>String</type>
+      </field>
+      <field>
+        <set_empty_string>N</set_empty_string>
+        <length>-1</length>
+        <name>type</name>
+        <precision>-1</precision>
+        <type>String</type>
+      </field>
+      <field>
+        <set_empty_string>N</set_empty_string>
+        <length>-1</length>
+        <name>description</name>
+        <precision>-1</precision>
+        <type>String</type>
+      </field>
+      <field>
+        <set_empty_string>N</set_empty_string>
+        <length>-1</length>
+        <name>source</name>
+        <precision>-1</precision>
+        <type>String</type>
+      </field>
+      <field>
+        <set_empty_string>N</set_empty_string>
+        <length>-1</length>
+        <name>target</name>
+        <precision>-1</precision>
+        <type>String</type>
+      </field>
+    </fields>
+    <data>
+      <line>
+        <item>d1#0</item>
+        <item>ENTITY</item>
+        <item>Ada Lovelace</item>
+        <item>Person</item>
+        <item>Mathematician</item>
+        <item/>
+        <item/>
+      </line>
+      <line>
+        <item>d1#0</item>
+        <item>ENTITY</item>
+        <item>Charles Babbage</item>
+        <item>Person</item>
+        <item>Inventor</item>
+        <item/>
+        <item/>
+      </line>
+      <line>
+        <item>d1#0</item>
+        <item>RELATIONSHIP</item>
+        <item/>
+        <item>WORKED_WITH</item>
+        <item>Ada worked with Babbage</item>
+        <item>Ada Lovelace</item>
+        <item>Charles Babbage</item>
+      </line>
+      <line>
+        <item>d1#1</item>
+        <item>ENTITY</item>
+        <item>Charles Babbage</item>
+        <item>Person</item>
+        <item>Inventor</item>
+        <item/>
+        <item/>
+      </line>
+      <line>
+        <item>d1#1</item>
+        <item>ENTITY</item>
+        <item>Analytical Engine</item>
+        <item>Product</item>
+        <item>A mechanical computer</item>
+        <item/>
+        <item/>
+      </line>
+      <line>
+        <item>d1#1</item>
+        <item>RELATIONSHIP</item>
+        <item/>
+        <item>CREATED</item>
+        <item>Babbage designed it</item>
+        <item>charles-babbage</item>
+        <item>Analytical Engine</item>
+      </line>
+    </data>
+    <attributes/>
+    <GUI>
+      <xloc>96</xloc>
+      <yloc>240</yloc>
+    </GUI>
+  </transform>
+  <transform>
+    <name>Hold the graph</name>
+    <type>BlockingTransform</type>
+    <description/>
+    <distribute>Y</distribute>
+    <custom_distribution/>
+    <copies>1</copies>
+    <partitioning>
+      <method>none</method>
+      <schema_name/>
+    </partitioning>
+    <cache_size>5000</cache_size>
+    <compress>Y</compress>
+    <directory>${java.io.tmpdir}</directory>
+    <pass_all_rows>Y</pass_all_rows>
+    <prefix>graphrag</prefix>
+    <attributes/>
+    <GUI>
+      <xloc>288</xloc>
+      <yloc>240</yloc>
+    </GUI>
+  </transform>
+  <transform>
+    <name>Wait for the chunks</name>
+    <type>BlockUntilTransformsFinish</type>
+    <description/>
+    <distribute>Y</distribute>
+    <custom_distribution/>
+    <copies>1</copies>
+    <partitioning>
+      <method>none</method>
+      <schema_name/>
+    </partitioning>
+    <transforms>
+      <transform>
+        <name>Write documents and chunks</name>
+        <CopyNr>0</CopyNr>
+      </transform>
+    </transforms>
+    <attributes/>
+    <GUI>
+      <xloc>480</xloc>
+      <yloc>240</yloc>
+    </GUI>
+  </transform>
+  <transform>
+    <name>Entity keys</name>
+    <type>ScriptValueMod</type>
+    <description>Lowercase without spaces or punctuation, so 'Hop Run' and 'hop-run' are one entity</description>
+    <distribute>Y</distribute>
+    <custom_distribution/>
+    <copies>1</copies>
+    <partitioning>
+      <method>none</method>
+      <schema_name/>
+    </partitioning>
+    <optimizationLevel>9</optimizationLevel>
+    <jsScripts>
+      <jsScript>
+        <jsScript_type>0</jsScript_type>
+        <jsScript_name>Script 1</jsScript_name>
+        <jsScript_script>function entityKey(name) {
+  if (name == null) {
+    return null;
+  }
+  return ("" + name).toLowerCase().replace(/[^a-z0-9+#]/g, "");
+}
+var key = entityKey(name);
+var source_key = entityKey(source);
+var target_key = entityKey(target);</jsScript_script>
+      </jsScript>
+    </jsScripts>
+    <fields>
+      <field>
+        <name>key</name>
+        <rename>key</rename>
+        <type>String</type>
+        <length>-1</length>
+        <precision>-1</precision>
+        <replace>N</replace>
+      </field>
+      <field>
+        <name>source_key</name>
+        <rename>source_key</rename>
+        <type>String</type>
+        <length>-1</length>
+        <precision>-1</precision>
+        <replace>N</replace>
+      </field>
+      <field>
+        <name>target_key</name>
+        <rename>target_key</rename>
+        <type>String</type>
+        <length>-1</length>
+        <precision>-1</precision>
+        <replace>N</replace>
+      </field>
+    </fields>
+    <attributes/>
+    <GUI>
+      <xloc>672</xloc>
+      <yloc>240</yloc>
+    </GUI>
+  </transform>
+  <transform>
+    <name>Entity?</name>
+    <type>FilterRows</type>
+    <description/>
+    <distribute>Y</distribute>
+    <custom_distribution/>
+    <copies>1</copies>
+    <partitioning>
+      <method>none</method>
+      <schema_name/>
+    </partitioning>
+    <compare>
+      <condition>
+        <conditions>
+        </conditions>
+        <function>=</function>
+        <leftvalue>graph_element</leftvalue>
+        <negated>N</negated>
+        <operator>-</operator>
+        <value>
+          <isnull>N</isnull>
+          <length>-1</length>
+          <mask/>
+          <name>constant</name>
+          <precision>-1</precision>
+          <text>ENTITY</text>
+          <type>String</type>
+        </value>
+      </condition>
+    </compare>
+    <send_false_to>Collect relationships</send_false_to>
+    <send_true_to>Write mentions</send_true_to>
+    <attributes/>
+    <GUI>
+      <xloc>832</xloc>
+      <yloc>240</yloc>
+    </GUI>
+  </transform>
+  <transform>
+    <name>Write mentions</name>
+    <type>Neo4jGraphOutput</type>
+    <description>MERGE an Entity per key and the chunk's MENTIONS relationship to it</description>
+    <distribute>Y</distribute>
+    <custom_distribution/>
+    <copies>1</copies>
+    <partitioning>
+      <method>none</method>
+      <schema_name/>
+    </partitioning>
+    <connection>Test</connection>
+    <model>graphrag</model>
+    <batch_size>100</batch_size>
+    <create_indexes>N</create_indexes>
+    <returning_graph>N</returning_graph>
+    <return_graph_field/>
+    <validate_against_model>N</validate_against_model>
+    <out_of_order_allowed>Y</out_of_order_allowed>
+    <mappings>
+      <mapping>
+        <source_field>chunk_id</source_field>
+        <target_type>Node</target_type>
+        <target_name>Chunk</target_name>
+        <target_property>id</target_property>
+        <target_hint>None</target_hint>
+      </mapping>
+      <mapping>
+        <source_field>key</source_field>
+        <target_type>Node</target_type>
+        <target_name>Entity</target_name>
+        <target_property>key</target_property>
+        <target_hint>None</target_hint>
+      </mapping>
+      <mapping>
+        <source_field>name</source_field>
+        <target_type>Node</target_type>
+        <target_name>Entity</target_name>
+        <target_property>name</target_property>
+        <target_hint>None</target_hint>
+      </mapping>
+      <mapping>
+        <source_field>type</source_field>
+        <target_type>Node</target_type>
+        <target_name>Entity</target_name>
+        <target_property>type</target_property>
+        <target_hint>None</target_hint>
+      </mapping>
+      <mapping>
+        <source_field>description</source_field>
+        <target_type>Node</target_type>
+        <target_name>Entity</target_name>
+        <target_property>description</target_property>
+        <target_hint>None</target_hint>
+      </mapping>
+    </mappings>
+    <relationship_mappings>
+    </relationship_mappings>
+    <node_mappings>
+    </node_mappings>
+    <attributes/>
+    <GUI>
+      <xloc>1024</xloc>
+      <yloc>240</yloc>
+    </GUI>
+  </transform>
+  <transform>
+    <name>Collect relationships</name>
+    <type>BlockingTransform</type>
+    <description>Reads all relationship rows first</description>
+    <distribute>Y</distribute>
+    <custom_distribution/>
+    <copies>1</copies>
+    <partitioning>
+      <method>none</method>
+      <schema_name/>
+    </partitioning>
+    <cache_size>5000</cache_size>
+    <compress>Y</compress>
+    <directory>${java.io.tmpdir}</directory>
+    <pass_all_rows>Y</pass_all_rows>
+    <prefix>graphrag</prefix>
+    <attributes/>
+    <GUI>
+      <xloc>832</xloc>
+      <yloc>384</yloc>
+    </GUI>
+  </transform>
+  <transform>
+    <name>Wait for the entities</name>
+    <type>BlockUntilTransformsFinish</type>
+    <description>Relationships are written once every entity is</description>
+    <distribute>Y</distribute>
+    <custom_distribution/>
+    <copies>1</copies>
+    <partitioning>
+      <method>none</method>
+      <schema_name/>
+    </partitioning>
+    <transforms>
+      <transform>
+        <name>Write mentions</name>
+        <CopyNr>0</CopyNr>
+      </transform>
+    </transforms>
+    <attributes/>
+    <GUI>
+      <xloc>1024</xloc>
+      <yloc>384</yloc>
+    </GUI>
+  </transform>
+  <transform>
+    <name>Write relationships</name>
+    <type>Neo4jCypherOutput</type>
+    <description>One RELATED_TO per type and source chunk. Graph output merges a relationship on its two nodes only, so a second type between the same entities would overwrite the first.</description>
+    <distribute>Y</distribute>
+    <custom_distribution/>
+    <copies>1</copies>
+    <partitioning>
+      <method>none</method>
+      <schema_name/>
+    </partitioning>
+    <connection>Test</connection>
+    <cypher>MATCH (s:Entity {key: $source_key}), (t:Entity {key: $target_key})
+MERGE (s)-[r:RELATED_TO {type: $type, chunk_id: $chunk_id}]-&gt;(t)
+SET r.description = $description</cypher>
+    <batch_size>1</batch_size>
+    <read_only>N</read_only>
+    <nr_retries_on_error/>
+    <retry>N</retry>
+    <cypher_from_field>N</cypher_from_field>
+    <cypher_field/>
+    <unwind>N</unwind>
+    <unwind_map/>
+    <returning_graph>N</returning_graph>
+    <return_graph_field/>
+    <mappings>
+      <mapping>
+        <parameter>source_key</parameter>
+        <field>source_key</field>
+        <type>String</type>
+      </mapping>
+      <mapping>
+        <parameter>target_key</parameter>
+        <field>target_key</field>
+        <type>String</type>
+      </mapping>
+      <mapping>
+        <parameter>type</parameter>
+        <field>type</field>
+        <type>String</type>
+      </mapping>
+      <mapping>
+        <parameter>chunk_id</parameter>
+        <field>chunk_id</field>
+        <type>String</type>
+      </mapping>
+      <mapping>
+        <parameter>description</parameter>
+        <field>description</field>
+        <type>String</type>
+      </mapping>
+    </mappings>
+    <returns>
+
+    </returns>
+    <attributes/>
+    <GUI>
+      <xloc>1216</xloc>
+      <yloc>384</yloc>
+    </GUI>
+  </transform>
+  <transform_error_handling>
+  </transform_error_handling>
+  <attributes/>
+</pipeline>
diff --git a/integration-tests/age/tests/graphrag/graphrag-facts-validation.hpl b/integration-tests/age/tests/graphrag/graphrag-facts-validation.hpl
new file mode 100644
index 0000000000..861e540095
--- /dev/null
+++ b/integration-tests/age/tests/graphrag/graphrag-facts-validation.hpl
@@ -0,0 +1,271 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+Licensed to the Apache Software Foundation (ASF) under one or more
+contributor license agreements.  See the NOTICE file distributed with
+this work for additional information regarding copyright ownership.
+The ASF licenses this file to You under the Apache License, Version 2.0
+(the "License"); you may not use this file except in compliance with
+the License.  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+
+-->
+<pipeline>
+  <info>
+    <name>graphrag-facts-validation</name>
+    <name_sync_with_filename>Y</name_sync_with_filename>
+    <description>The facts of each chunk: the hybrid retrieval of Apache AGE without the pgvector search</description>
+    <extended_description/>
+    <pipeline_version/>
+    <pipeline_type>Normal</pipeline_type>
+    <parameters>
+    </parameters>
+    <capture_transform_performance>N</capture_transform_performance>
+    <transform_performance_capturing_delay>1000</transform_performance_capturing_delay>
+    <transform_performance_capturing_size_limit>100</transform_performance_capturing_size_limit>
+    <created_user>-</created_user>
+    <created_date>2026/10/10 12:00:00.000</created_date>
+    <modified_user>-</modified_user>
+    <modified_date>2026/10/10 12:00:00.000</modified_date>
+  </info>
+  <notepads>
+  </notepads>
+  <order>
+    <hop>
+      <from>chunk ids</from>
+      <to>Facts of the chunk</to>
+      <enabled>Y</enabled>
+    </hop>
+    <hop>
+      <from>Facts of the chunk</from>
+      <to>Fact</to>
+      <enabled>Y</enabled>
+    </hop>
+    <hop>
+      <from>Fact</from>
+      <to>One row per chunk</to>
+      <enabled>Y</enabled>
+    </hop>
+    <hop>
+      <from>One row per chunk</from>
+      <to>Validation</to>
+      <enabled>Y</enabled>
+    </hop>
+  </order>
+  <transform>
+    <name>chunk ids</name>
+    <type>DataGrid</type>
+    <description/>
+    <distribute>Y</distribute>
+    <custom_distribution/>
+    <copies>1</copies>
+    <partitioning>
+      <method>none</method>
+      <schema_name/>
+    </partitioning>
+    <fields>
+      <field>
+        <set_empty_string>N</set_empty_string>
+        <length>-1</length>
+        <name>chunk_id</name>
+        <precision>-1</precision>
+        <type>String</type>
+      </field>
+    </fields>
+    <data>
+      <line>
+        <item>d1#0</item>
+      </line>
+      <line>
+        <item>d1#1</item>
+      </line>
+      <line>
+        <item>d2#0</item>
+      </line>
+    </data>
+    <attributes/>
+    <GUI>
+      <xloc>96</xloc>
+      <yloc>96</yloc>
+    </GUI>
+  </transform>
+  <transform>
+    <name>Facts of the chunk</name>
+    <type>Neo4jCypherOutput</type>
+    <description>The entities the chunk mentions and their relationships: one row per fact</description>
+    <distribute>Y</distribute>
+    <custom_distribution/>
+    <copies>1</copies>
+    <partitioning>
+      <method>none</method>
+      <schema_name/>
+    </partitioning>
+    <connection>Test</connection>
+    <cypher>MATCH (c:Chunk {id: $chunk_id})
+OPTIONAL MATCH (c)-[:MENTIONS]-&gt;(e:Entity)
+OPTIONAL MATCH (e)-[r:RELATED_TO]-&gt;(o:Entity)
+RETURN e.name AS entity, e.type AS entity_type, r.type AS relation, o.name AS related_entity</cypher>
+    <batch_size>1</batch_size>
+    <read_only>Y</read_only>
+    <nr_retries_on_error/>
+    <retry>N</retry>
+    <cypher_from_field>N</cypher_from_field>
+    <cypher_field/>
+    <unwind>N</unwind>
+    <unwind_map/>
+    <returning_graph>N</returning_graph>
+    <return_graph_field/>
+    <mappings>
+      <mapping>
+        <parameter>chunk_id</parameter>
+        <field>chunk_id</field>
+        <type>String</type>
+      </mapping>
+    </mappings>
+    <returns>
+      <return>
+        <name>entity</name>
+        <type>String</type>
+        <source_type>String</source_type>
+      </return>
+      <return>
+        <name>entity_type</name>
+        <type>String</type>
+        <source_type>String</source_type>
+      </return>
+      <return>
+        <name>relation</name>
+        <type>String</type>
+        <source_type>String</source_type>
+      </return>
+      <return>
+        <name>related_entity</name>
+        <type>String</type>
+        <source_type>String</source_type>
+      </return>
+    </returns>
+    <attributes/>
+    <GUI>
+      <xloc>288</xloc>
+      <yloc>96</yloc>
+    </GUI>
+  </transform>
+  <transform>
+    <name>Fact</name>
+    <type>ScriptValueMod</type>
+    <description>Entity (type) -RELATION-&gt; other entity</description>
+    <distribute>Y</distribute>
+    <custom_distribution/>
+    <copies>1</copies>
+    <partitioning>
+      <method>none</method>
+      <schema_name/>
+    </partitioning>
+    <optimizationLevel>9</optimizationLevel>
+    <jsScripts>
+      <jsScript>
+        <jsScript_type>0</jsScript_type>
+        <jsScript_name>Script 1</jsScript_name>
+        <jsScript_script>var fact = null;
+if (entity != null) {
+  fact = entity;
+  if (entity_type != null) {
+    fact = fact + " (" + entity_type + ")";
+  }
+  if (relation != null) {
+    fact = fact + " -" + relation + "-&gt; " + related_entity;
+  }
+}</jsScript_script>
+      </jsScript>
+    </jsScripts>
+    <fields>
+      <field>
+        <name>fact</name>
+        <rename>fact</rename>
+        <type>String</type>
+        <length>-1</length>
+        <precision>-1</precision>
+        <replace>N</replace>
+      </field>
+    </fields>
+    <attributes/>
+    <GUI>
+      <xloc>448</xloc>
+      <yloc>96</yloc>
+    </GUI>
+  </transform>
+  <transform>
+    <name>One row per chunk</name>
+    <type>GroupBy</type>
+    <description>The rows of a chunk are consecutive</description>
+    <distribute>Y</distribute>
+    <custom_distribution/>
+    <copies>1</copies>
+    <partitioning>
+      <method>none</method>
+      <schema_name/>
+    </partitioning>
+    <directory>${java.io.tmpdir}</directory>
+    <prefix>graphrag</prefix>
+    <add_linenr>N</add_linenr>
+    <all_rows>N</all_rows>
+    <fields>
+      <field>
+        <aggregate>facts</aggregate>
+        <subject>fact</subject>
+        <type>CONCAT_DISTINCT</type>
+        <valuefield>; </valuefield>
+      </field>
+    </fields>
+    <give_back_row>N</give_back_row>
+    <group>
+      <field>
+        <name>chunk_id</name>
+      </field>
+    </group>
+    <ignore_aggregate>N</ignore_aggregate>
+    <attributes/>
+    <GUI>
+      <xloc>608</xloc>
+      <yloc>96</yloc>
+    </GUI>
+  </transform>
+  <transform>
+    <name>Validation</name>
+    <type>SelectValues</type>
+    <description/>
+    <distribute>Y</distribute>
+    <custom_distribution/>
+    <copies>1</copies>
+    <partitioning>
+      <method>none</method>
+      <schema_name/>
+    </partitioning>
+    <fields>
+      <field>
+        <name>chunk_id</name>
+        <rename/>
+      </field>
+      <field>
+        <name>facts</name>
+        <rename/>
+      </field>
+      <select_unspecified>N</select_unspecified>
+    </fields>
+    <attributes/>
+    <GUI>
+      <xloc>800</xloc>
+      <yloc>96</yloc>
+    </GUI>
+  </transform>
+  <transform_error_handling>
+  </transform_error_handling>
+  <attributes/>
+</pipeline>
diff --git a/integration-tests/age/tests/graphrag/graphrag-graph-validation.hpl b/integration-tests/age/tests/graphrag/graphrag-graph-validation.hpl
new file mode 100644
index 0000000000..a859fb8027
--- /dev/null
+++ b/integration-tests/age/tests/graphrag/graphrag-graph-validation.hpl
@@ -0,0 +1,185 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+Licensed to the Apache Software Foundation (ASF) under one or more
+contributor license agreements.  See the NOTICE file distributed with
+this work for additional information regarding copyright ownership.
+The ASF licenses this file to You under the Apache License, Version 2.0
+(the "License"); you may not use this file except in compliance with
+the License.  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+
+-->
+<pipeline>
+  <info>
+    <name>graphrag-graph-validation</name>
+    <name_sync_with_filename>Y</name_sync_with_filename>
+    <description>Counts the nodes and relationships graphrag-build wrote</description>
+    <extended_description/>
+    <pipeline_version/>
+    <pipeline_type>Normal</pipeline_type>
+    <parameters>
+    </parameters>
+    <capture_transform_performance>N</capture_transform_performance>
+    <transform_performance_capturing_delay>1000</transform_performance_capturing_delay>
+    <transform_performance_capturing_size_limit>100</transform_performance_capturing_size_limit>
+    <created_user>-</created_user>
+    <created_date>2026/10/10 12:00:00.000</created_date>
+    <modified_user>-</modified_user>
+    <modified_date>2026/10/10 12:00:00.000</modified_date>
+  </info>
+  <notepads>
+  </notepads>
+  <order>
+    <hop>
+      <from>counts to check</from>
+      <to>count</to>
+      <enabled>Y</enabled>
+    </hop>
+    <hop>
+      <from>count</from>
+      <to>Validation</to>
+      <enabled>Y</enabled>
+    </hop>
+  </order>
+  <transform>
+    <name>counts to check</name>
+    <type>DataGrid</type>
+    <description/>
+    <distribute>Y</distribute>
+    <custom_distribution/>
+    <copies>1</copies>
+    <partitioning>
+      <method>none</method>
+      <schema_name/>
+    </partitioning>
+    <fields>
+      <field>
+        <set_empty_string>N</set_empty_string>
+        <length>-1</length>
+        <name>check</name>
+        <precision>-1</precision>
+        <type>String</type>
+      </field>
+      <field>
+        <set_empty_string>N</set_empty_string>
+        <length>-1</length>
+        <name>query</name>
+        <precision>-1</precision>
+        <type>String</type>
+      </field>
+    </fields>
+    <data>
+      <line>
+        <item>1 documents</item>
+        <item>MATCH (n:Document) RETURN count(n) AS n</item>
+      </line>
+      <line>
+        <item>2 chunks</item>
+        <item>MATCH (n:Chunk) RETURN count(n) AS n</item>
+      </line>
+      <line>
+        <item>3 entities</item>
+        <item>MATCH (n:Entity) RETURN count(n) AS n</item>
+      </line>
+      <line>
+        <item>4 has_chunk</item>
+        <item>MATCH (:Document)-[r:HAS_CHUNK]-&gt;(:Chunk) RETURN count(r) AS n</item>
+      </line>
+      <line>
+        <item>5 mentions</item>
+        <item>MATCH (:Chunk)-[r:MENTIONS]-&gt;(:Entity) RETURN count(r) AS n</item>
+      </line>
+      <line>
+        <item>6 related_to</item>
+        <item>MATCH (:Entity)-[r:RELATED_TO]-&gt;(:Entity) RETURN count(r) AS n</item>
+      </line>
+      <line>
+        <item>7 related_to from a chunk</item>
+        <item>MATCH (:Entity)-[r:RELATED_TO]-&gt;(:Entity) WHERE r.chunk_id IS NOT NULL RETURN count(r) AS n</item>
+      </line>
+    </data>
+    <attributes/>
+    <GUI>
+      <xloc>96</xloc>
+      <yloc>96</yloc>
+    </GUI>
+  </transform>
+  <transform>
+    <name>count</name>
+    <type>Neo4jCypherOutput</type>
+    <description>Runs the query of each row</description>
+    <distribute>Y</distribute>
+    <custom_distribution/>
+    <copies>1</copies>
+    <partitioning>
+      <method>none</method>
+      <schema_name/>
+    </partitioning>
+    <connection>Test</connection>
+    <cypher></cypher>
+    <batch_size>1</batch_size>
+    <read_only>Y</read_only>
+    <nr_retries_on_error/>
+    <retry>N</retry>
+    <cypher_from_field>Y</cypher_from_field>
+    <cypher_field>query</cypher_field>
+    <unwind>N</unwind>
+    <unwind_map/>
+    <returning_graph>N</returning_graph>
+    <return_graph_field/>
+    <mappings>
+
+    </mappings>
+    <returns>
+      <return>
+        <name>n</name>
+        <type>Integer</type>
+        <source_type>Integer</source_type>
+      </return>
+    </returns>
+    <attributes/>
+    <GUI>
+      <xloc>288</xloc>
+      <yloc>96</yloc>
+    </GUI>
+  </transform>
+  <transform>
+    <name>Validation</name>
+    <type>SelectValues</type>
+    <description/>
+    <distribute>Y</distribute>
+    <custom_distribution/>
+    <copies>1</copies>
+    <partitioning>
+      <method>none</method>
+      <schema_name/>
+    </partitioning>
+    <fields>
+      <field>
+        <name>check</name>
+        <rename/>
+      </field>
+      <field>
+        <name>n</name>
+        <rename/>
+      </field>
+      <select_unspecified>N</select_unspecified>
+    </fields>
+    <attributes/>
+    <GUI>
+      <xloc>480</xloc>
+      <yloc>96</yloc>
+    </GUI>
+  </transform>
+  <transform_error_handling>
+  </transform_error_handling>
+  <attributes/>
+</pipeline>
diff --git a/integration-tests/age/tests/graphrag/main-graphrag.hwf b/integration-tests/age/tests/graphrag/main-graphrag.hwf
new file mode 100644
index 0000000000..dff3c39b10
--- /dev/null
+++ b/integration-tests/age/tests/graphrag/main-graphrag.hwf
@@ -0,0 +1,156 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+Licensed to the Apache Software Foundation (ASF) under one or more
+contributor license agreements.  See the NOTICE file distributed with
+this work for additional information regarding copyright ownership.
+The ASF licenses this file to You under the Apache License, Version 2.0
+(the "License"); you may not use this file except in compliance with
+the License.  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+
+-->
+<workflow>
+  <name>main-graphrag</name>
+  <name_sync_with_filename>Y</name_sync_with_filename>
+  <description />
+  <extended_description />
+  <workflow_version />
+  <created_user>-</created_user>
+  <created_date>2019/08/07 13:45:04.042</created_date>
+  <modified_user>-</modified_user>
+  <modified_date>2019/08/07 13:45:04.042</modified_date>
+  <parameters>
+    <parameter>
+      <name>TEST_FOLDER</name>
+      <default_value>graphrag</default_value>
+      <description />
+    </parameter>
+  </parameters>
+  <actions>
+    <action>
+      <name>Start</name>
+      <description />
+      <type>SPECIAL</type>
+      <attributes />
+      <repeat>N</repeat>
+      <schedulerType>0</schedulerType>
+      <intervalSeconds>0</intervalSeconds>
+      <intervalMinutes>60</intervalMinutes>
+      <hour>12</hour>
+      <minutes>0</minutes>
+      <weekDay>1</weekDay>
+      <DayOfMonth>1</DayOfMonth>
+      <parallel>N</parallel>
+      <xloc>64</xloc>
+      <yloc>96</yloc>
+      <attributes_hac />
+    </action>
+    <action>
+      <name>cleanup-database.hwf</name>
+      <description />
+      <type>WORKFLOW</type>
+      <attributes />
+      <run_configuration>local</run_configuration>
+      <filename>${PROJECT_HOME}/tests/shared/cleanup-database.hwf</filename>
+      <params_from_previous>N</params_from_previous>
+      <exec_per_row>N</exec_per_row>
+      <set_logfile>N</set_logfile>
+      <logfile />
+      <logext />
+      <add_date>N</add_date>
+      <add_time>N</add_time>
+      <loglevel>Nothing</loglevel>
+      <wait_until_finished>Y</wait_until_finished>
+      <create_parent_folder>N</create_parent_folder>
+      <run_configuration>local</run_configuration>
+      <parameters>
+        <pass_all_parameters>Y</pass_all_parameters>
+      </parameters>
+      <set_append_logfile>N</set_append_logfile>
+      <parallel>N</parallel>
+      <xloc>256</xloc>
+      <yloc>96</yloc>
+      <attributes_hac />
+    </action>
+    <action>
+      <name>graphrag-build.hpl</name>
+      <description />
+      <type>PIPELINE</type>
+      <attributes />
+      <filename>${PROJECT_HOME}/tests/graphrag/graphrag-build.hpl</filename>
+      <params_from_previous>N</params_from_previous>
+      <exec_per_row>N</exec_per_row>
+      <clear_rows>N</clear_rows>
+      <clear_files>N</clear_files>
+      <set_logfile>N</set_logfile>
+      <logfile />
+      <logext />
+      <add_date>N</add_date>
+      <add_time>N</add_time>
+      <loglevel>Basic</loglevel>
+      <set_append_logfile>N</set_append_logfile>
+      <wait_until_finished>Y</wait_until_finished>
+      <create_parent_folder>N</create_parent_folder>
+      <run_configuration>local</run_configuration>
+      <parameters>
+        <pass_all_parameters>Y</pass_all_parameters>
+      </parameters>
+      <parallel>N</parallel>
+      <xloc>448</xloc>
+      <yloc>96</yloc>
+      <attributes_hac />
+    </action>
+    <action>
+      <name>Run graphrag tests</name>
+      <description />
+      <type>RunPipelineTests</type>
+      <attributes />
+      <test_names>
+        <test_name>
+          <name>graphrag-graph-validation UNIT</name>
+        </test_name>
+        <test_name>
+          <name>graphrag-facts-validation UNIT</name>
+        </test_name>
+      </test_names>
+      <parallel>N</parallel>
+      <xloc>640</xloc>
+      <yloc>96</yloc>
+      <attributes_hac />
+    </action>
+  </actions>
+  <hops>
+    <hop>
+      <from>Start</from>
+      <to>cleanup-database.hwf</to>
+      <enabled>Y</enabled>
+      <evaluation>Y</evaluation>
+      <unconditional>Y</unconditional>
+    </hop>
+    <hop>
+      <from>cleanup-database.hwf</from>
+      <to>graphrag-build.hpl</to>
+      <enabled>Y</enabled>
+      <evaluation>Y</evaluation>
+      <unconditional>N</unconditional>
+    </hop>
+    <hop>
+      <from>graphrag-build.hpl</from>
+      <to>Run graphrag tests</to>
+      <enabled>Y</enabled>
+      <evaluation>Y</evaluation>
+      <unconditional>N</unconditional>
+    </hop>
+  </hops>
+  <notepads>
+  </notepads>
+  <attributes />
+</workflow>
diff --git a/integration-tests/falkordb/datasets/graphrag-graph-validation-golden.csv b/integration-tests/falkordb/datasets/graphrag-graph-validation-golden.csv
new file mode 100644
index 0000000000..aa51e75de2
--- /dev/null
+++ b/integration-tests/falkordb/datasets/graphrag-graph-validation-golden.csv
@@ -0,0 +1,8 @@
+check,n
+1 documents,2
+2 chunks,3
+3 entities,3
+4 has_chunk,3
+5 mentions,4
+6 related_to,2
+7 related_to from a chunk,2
diff --git a/integration-tests/falkordb/datasets/graphrag-retrieve-validation-golden.csv b/integration-tests/falkordb/datasets/graphrag-retrieve-validation-golden.csv
new file mode 100644
index 0000000000..fa40e52184
--- /dev/null
+++ b/integration-tests/falkordb/datasets/graphrag-retrieve-validation-golden.csv
@@ -0,0 +1,5 @@
+query_id,rank,chunk_id,facts
+q1,1,d1#0,Ada Lovelace (Person) -WORKED_WITH-> Charles Babbage; Charles Babbage (Person) -CREATED-> Analytical Engine
+q1,2,d1#1,Analytical Engine (Product); Charles Babbage (Person) -CREATED-> Analytical Engine
+q2,3,d2#0,
+q2,4,d1#1,Analytical Engine (Product); Charles Babbage (Person) -CREATED-> Analytical Engine
diff --git a/integration-tests/falkordb/metadata/dataset/graphrag-graph-validation-golden.json b/integration-tests/falkordb/metadata/dataset/graphrag-graph-validation-golden.json
new file mode 100644
index 0000000000..1df16ac92a
--- /dev/null
+++ b/integration-tests/falkordb/metadata/dataset/graphrag-graph-validation-golden.json
@@ -0,0 +1,24 @@
+{
+  "base_filename": "graphrag-graph-validation-golden.csv",
+  "name": "graphrag-graph-validation-golden",
+  "description": "Node and relationship counts after graphrag-build",
+  "dataset_fields": [
+    {
+      "field_comment": "",
+      "field_length": -1,
+      "field_type": 2,
+      "field_precision": -1,
+      "field_format": "",
+      "field_name": "check"
+    },
+    {
+      "field_comment": "",
+      "field_length": -1,
+      "field_type": 5,
+      "field_precision": -1,
+      "field_format": "",
+      "field_name": "n"
+    }
+  ],
+  "folder_name": ""
+}
diff --git a/integration-tests/falkordb/metadata/dataset/graphrag-retrieve-validation-golden.json b/integration-tests/falkordb/metadata/dataset/graphrag-retrieve-validation-golden.json
new file mode 100644
index 0000000000..d7a1c18170
--- /dev/null
+++ b/integration-tests/falkordb/metadata/dataset/graphrag-retrieve-validation-golden.json
@@ -0,0 +1,40 @@
+{
+  "base_filename": "graphrag-retrieve-validation-golden.csv",
+  "name": "graphrag-retrieve-validation-golden",
+  "description": "The chunks per query vector, best first, and their facts",
+  "dataset_fields": [
+    {
+      "field_comment": "",
+      "field_length": -1,
+      "field_type": 2,
+      "field_precision": -1,
+      "field_format": "",
+      "field_name": "query_id"
+    },
+    {
+      "field_comment": "",
+      "field_length": -1,
+      "field_type": 5,
+      "field_precision": -1,
+      "field_format": "",
+      "field_name": "rank"
+    },
+    {
+      "field_comment": "",
+      "field_length": -1,
+      "field_type": 2,
+      "field_precision": -1,
+      "field_format": "",
+      "field_name": "chunk_id"
+    },
+    {
+      "field_comment": "",
+      "field_length": -1,
+      "field_type": 2,
+      "field_precision": -1,
+      "field_format": "",
+      "field_name": "facts"
+    }
+  ],
+  "folder_name": ""
+}
diff --git a/integration-tests/falkordb/metadata/neo4j-graph-model/graphrag.json b/integration-tests/falkordb/metadata/neo4j-graph-model/graphrag.json
new file mode 100644
index 0000000000..fec7bc5dee
--- /dev/null
+++ b/integration-tests/falkordb/metadata/neo4j-graph-model/graphrag.json
@@ -0,0 +1,189 @@
+{
+  "name": "graphrag",
+  "description": "GraphRAG: documents split into chunks with embeddings, the entities the chunks mention, and the relationships between those entities.",
+  "nodes": [
+    {
+      "presentation": {
+        "x": 80,
+        "y": 200
+      },
+      "name": "Document",
+      "description": "A source document",
+      "labels": [
+        "Document"
+      ],
+      "properties": [
+        {
+          "indexed": false,
+          "unique": true,
+          "name": "id",
+          "description": "Document ID",
+          "type": "String",
+          "mandatory": true,
+          "primary": true
+        },
+        {
+          "indexed": false,
+          "unique": false,
+          "name": "title",
+          "description": "Document title",
+          "type": "String",
+          "mandatory": false,
+          "primary": false
+        }
+      ]
+    },
+    {
+      "presentation": {
+        "x": 300,
+        "y": 200
+      },
+      "name": "Chunk",
+      "description": "A part of a document, with its embedding",
+      "labels": [
+        "Chunk"
+      ],
+      "properties": [
+        {
+          "indexed": false,
+          "unique": true,
+          "name": "id",
+          "description": "Chunk ID: document ID and chunk index",
+          "type": "String",
+          "mandatory": true,
+          "primary": true
+        },
+        {
+          "indexed": false,
+          "unique": false,
+          "name": "chunk_index",
+          "description": "Position in the document",
+          "type": "Integer",
+          "mandatory": false,
+          "primary": false
+        },
+        {
+          "indexed": false,
+          "unique": false,
+          "name": "text",
+          "description": "The text of the chunk",
+          "type": "String",
+          "mandatory": false,
+          "primary": false
+        },
+        {
+          "indexed": false,
+          "unique": false,
+          "name": "embedding",
+          "description": "The embedding of the text",
+          "type": "Vector",
+          "mandatory": false,
+          "primary": false
+        }
+      ]
+    },
+    {
+      "presentation": {
+        "x": 520,
+        "y": 200
+      },
+      "name": "Entity",
+      "description": "An entity the Extract graph transform read from a text. Its type is a property.",
+      "properties": [
+        {
+          "indexed": false,
+          "unique": true,
+          "name": "key",
+          "description": "The name in lowercase without spaces or punctuation: spellings of one entity share it",
+          "type": "String",
+          "mandatory": true,
+          "primary": true
+        },
+        {
+          "indexed": false,
+          "unique": false,
+          "name": "name",
+          "description": "The name of the entity, as a text names it",
+          "type": "String",
+          "mandatory": false,
+          "primary": false
+        },
+        {
+          "indexed": false,
+          "unique": false,
+          "name": "type",
+          "description": "The entity type, for example Person",
+          "type": "String",
+          "mandatory": false,
+          "primary": false
+        },
+        {
+          "indexed": false,
+          "unique": false,
+          "name": "description",
+          "description": "One sentence about the entity",
+          "type": "String",
+          "mandatory": false,
+          "primary": false
+        }
+      ],
+      "labels": [
+        "Entity"
+      ]
+    }
+  ],
+  "relationships": [
+    {
+      "nodeSource": "Document",
+      "name": "HAS_CHUNK",
+      "description": "A document consists of chunks",
+      "nodeTarget": "Chunk",
+      "label": "HAS_CHUNK",
+      "properties": []
+    },
+    {
+      "nodeSource": "Chunk",
+      "name": "MENTIONS",
+      "description": "A chunk mentions an entity",
+      "nodeTarget": "Entity",
+      "label": "MENTIONS",
+      "properties": []
+    },
+    {
+      "nodeSource": "Entity",
+      "name": "RELATED_TO",
+      "description": "A relationship the Extract graph transform read between two entities: one per type and source chunk. The GraphRAG samples write it with Graph query, so the type and chunk_id identify it.",
+      "nodeTarget": "Entity",
+      "label": "RELATED_TO",
+      "properties": [
+        {
+          "indexed": false,
+          "unique": false,
+          "name": "type",
+          "description": "The relationship type, for example WORKED_WITH",
+          "type": "String",
+          "mandatory": false,
+          "primary": false
+        },
+        {
+          "indexed": false,
+          "unique": false,
+          "name": "description",
+          "description": "One sentence about the relationship",
+          "type": "String",
+          "mandatory": false,
+          "primary": false
+        },
+        {
+          "indexed": false,
+          "unique": false,
+          "name": "chunk_id",
+          "description": "The chunk the relationship was read from",
+          "type": "String",
+          "mandatory": false,
+          "primary": false
+        }
+      ]
+    }
+  ]
+}
diff --git a/integration-tests/falkordb/metadata/unit-test/graphrag-graph-validation UNIT.json b/integration-tests/falkordb/metadata/unit-test/graphrag-graph-validation UNIT.json
new file mode 100644
index 0000000000..43a00078b9
--- /dev/null
+++ b/integration-tests/falkordb/metadata/unit-test/graphrag-graph-validation UNIT.json	
@@ -0,0 +1,32 @@
+{
+  "variableValues": [],
+  "database_replacements": [],
+  "autoOpening": true,
+  "basePath": "",
+  "golden_data_sets": [
+    {
+      "field_mappings": [
+        {
+          "transform_field": "check",
+          "data_set_field": "check"
+        },
+        {
+          "transform_field": "n",
+          "data_set_field": "n"
+        }
+      ],
+      "field_order": [
+        "check"
+      ],
+      "transform_name": "Validation",
+      "data_set_name": "graphrag-graph-validation-golden"
+    }
+  ],
+  "input_data_sets": [],
+  "name": "graphrag-graph-validation UNIT",
+  "description": "",
+  "trans_test_tweaks": [],
+  "persist_filename": "",
+  "pipeline_filename": "./tests/graphrag/graphrag-graph-validation.hpl",
+  "test_type": "UNIT_TEST"
+}
diff --git a/integration-tests/falkordb/metadata/unit-test/graphrag-retrieve-validation UNIT.json b/integration-tests/falkordb/metadata/unit-test/graphrag-retrieve-validation UNIT.json
new file mode 100644
index 0000000000..2d15688576
--- /dev/null
+++ b/integration-tests/falkordb/metadata/unit-test/graphrag-retrieve-validation UNIT.json	
@@ -0,0 +1,40 @@
+{
+  "variableValues": [],
+  "database_replacements": [],
+  "autoOpening": true,
+  "basePath": "",
+  "golden_data_sets": [
+    {
+      "field_mappings": [
+        {
+          "transform_field": "query_id",
+          "data_set_field": "query_id"
+        },
+        {
+          "transform_field": "rank",
+          "data_set_field": "rank"
+        },
+        {
+          "transform_field": "chunk_id",
+          "data_set_field": "chunk_id"
+        },
+        {
+          "transform_field": "facts",
+          "data_set_field": "facts"
+        }
+      ],
+      "field_order": [
+        "rank"
+      ],
+      "transform_name": "Validation",
+      "data_set_name": "graphrag-retrieve-validation-golden"
+    }
+  ],
+  "input_data_sets": [],
+  "name": "graphrag-retrieve-validation UNIT",
+  "description": "",
+  "trans_test_tweaks": [],
+  "persist_filename": "",
+  "pipeline_filename": "./tests/graphrag/graphrag-retrieve-validation.hpl",
+  "test_type": "UNIT_TEST"
+}
diff --git a/integration-tests/falkordb/tests/graphrag/graphrag-build.hpl b/integration-tests/falkordb/tests/graphrag/graphrag-build.hpl
new file mode 100644
index 0000000000..20c8d6456d
--- /dev/null
+++ b/integration-tests/falkordb/tests/graphrag/graphrag-build.hpl
@@ -0,0 +1,688 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+Licensed to the Apache Software Foundation (ASF) under one or more
+contributor license agreements.  See the NOTICE file distributed with
+this work for additional information regarding copyright ownership.
+The ASF licenses this file to You under the Apache License, Version 2.0
+(the "License"); you may not use this file except in compliance with
+the License.  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+
+-->
+<pipeline>
+  <info>
+    <name>graphrag-build</name>
+    <name_sync_with_filename>Y</name_sync_with_filename>
+    <description>Writes fixed chunks and extraction rows the way the GraphRAG samples do</description>
+    <extended_description/>
+    <pipeline_version/>
+    <pipeline_type>Normal</pipeline_type>
+    <parameters>
+    </parameters>
+    <capture_transform_performance>N</capture_transform_performance>
+    <transform_performance_capturing_delay>1000</transform_performance_capturing_delay>
+    <transform_performance_capturing_size_limit>100</transform_performance_capturing_size_limit>
+    <created_user>-</created_user>
+    <created_date>2026/10/10 12:00:00.000</created_date>
+    <modified_user>-</modified_user>
+    <modified_date>2026/10/10 12:00:00.000</modified_date>
+  </info>
+  <notepads>
+  </notepads>
+  <order>
+    <hop>
+      <from>chunks</from>
+      <to>Write documents and chunks</to>
+      <enabled>Y</enabled>
+    </hop>
+    <hop>
+      <from>extracted graph</from>
+      <to>Hold the graph</to>
+      <enabled>Y</enabled>
+    </hop>
+    <hop>
+      <from>Hold the graph</from>
+      <to>Wait for the chunks</to>
+      <enabled>Y</enabled>
+    </hop>
+    <hop>
+      <from>Wait for the chunks</from>
+      <to>Entity keys</to>
+      <enabled>Y</enabled>
+    </hop>
+    <hop>
+      <from>Entity keys</from>
+      <to>Entity?</to>
+      <enabled>Y</enabled>
+    </hop>
+    <hop>
+      <from>Entity?</from>
+      <to>Write mentions</to>
+      <enabled>Y</enabled>
+    </hop>
+    <hop>
+      <from>Entity?</from>
+      <to>Collect relationships</to>
+      <enabled>Y</enabled>
+    </hop>
+    <hop>
+      <from>Collect relationships</from>
+      <to>Wait for the entities</to>
+      <enabled>Y</enabled>
+    </hop>
+    <hop>
+      <from>Wait for the entities</from>
+      <to>Write relationships</to>
+      <enabled>Y</enabled>
+    </hop>
+  </order>
+  <transform>
+    <name>chunks</name>
+    <type>DataGrid</type>
+    <description>Three chunks with 3-dimensional embeddings</description>
+    <distribute>Y</distribute>
+    <custom_distribution/>
+    <copies>1</copies>
+    <partitioning>
+      <method>none</method>
+      <schema_name/>
+    </partitioning>
+    <fields>
+      <field>
+        <set_empty_string>N</set_empty_string>
+        <length>-1</length>
+        <name>document_id</name>
+        <precision>-1</precision>
+        <type>String</type>
+      </field>
+      <field>
+        <set_empty_string>N</set_empty_string>
+        <length>-1</length>
+        <name>title</name>
+        <precision>-1</precision>
+        <type>String</type>
+      </field>
+      <field>
+        <set_empty_string>N</set_empty_string>
+        <length>-1</length>
+        <name>chunk_id</name>
+        <precision>-1</precision>
+        <type>String</type>
+      </field>
+      <field>
+        <set_empty_string>N</set_empty_string>
+        <length>-1</length>
+        <name>chunk_index</name>
+        <precision>-1</precision>
+        <type>Integer</type>
+      </field>
+      <field>
+        <set_empty_string>N</set_empty_string>
+        <length>-1</length>
+        <name>chunk_text</name>
+        <precision>-1</precision>
+        <type>String</type>
+      </field>
+      <field>
+        <set_empty_string>N</set_empty_string>
+        <length>-1</length>
+        <name>embedding</name>
+        <precision>-1</precision>
+        <type>Vector</type>
+      </field>
+    </fields>
+    <data>
+      <line>
+        <item>d1</item>
+        <item>Analytical Engine</item>
+        <item>d1#0</item>
+        <item>0</item>
+        <item>Ada Lovelace worked with Charles Babbage.</item>
+        <item>[1,0,0]</item>
+      </line>
+      <line>
+        <item>d1</item>
+        <item>Analytical Engine</item>
+        <item>d1#1</item>
+        <item>1</item>
+        <item>Babbage designed the Analytical Engine.</item>
+        <item>[0.6,0,0.8]</item>
+      </line>
+      <line>
+        <item>d2</item>
+        <item>Weather</item>
+        <item>d2#0</item>
+        <item>0</item>
+        <item>The weather in London is fine today.</item>
+        <item>[0,0,1]</item>
+      </line>
+    </data>
+    <attributes/>
+    <GUI>
+      <xloc>96</xloc>
+      <yloc>96</yloc>
+    </GUI>
+  </transform>
+  <transform>
+    <name>Write documents and chunks</name>
+    <type>Neo4jGraphOutput</type>
+    <description/>
+    <distribute>Y</distribute>
+    <custom_distribution/>
+    <copies>1</copies>
+    <partitioning>
+      <method>none</method>
+      <schema_name/>
+    </partitioning>
+    <connection>Test</connection>
+    <model>graphrag</model>
+    <batch_size>100</batch_size>
+    <create_indexes>N</create_indexes>
+    <returning_graph>N</returning_graph>
+    <return_graph_field/>
+    <validate_against_model>N</validate_against_model>
+    <out_of_order_allowed>Y</out_of_order_allowed>
+    <mappings>
+      <mapping>
+        <source_field>document_id</source_field>
+        <target_type>Node</target_type>
+        <target_name>Document</target_name>
+        <target_property>id</target_property>
+        <target_hint>None</target_hint>
+      </mapping>
+      <mapping>
+        <source_field>title</source_field>
+        <target_type>Node</target_type>
+        <target_name>Document</target_name>
+        <target_property>title</target_property>
+        <target_hint>None</target_hint>
+      </mapping>
+      <mapping>
+        <source_field>chunk_id</source_field>
+        <target_type>Node</target_type>
+        <target_name>Chunk</target_name>
+        <target_property>id</target_property>
+        <target_hint>None</target_hint>
+      </mapping>
+      <mapping>
+        <source_field>chunk_index</source_field>
+        <target_type>Node</target_type>
+        <target_name>Chunk</target_name>
+        <target_property>chunk_index</target_property>
+        <target_hint>None</target_hint>
+      </mapping>
+      <mapping>
+        <source_field>chunk_text</source_field>
+        <target_type>Node</target_type>
+        <target_name>Chunk</target_name>
+        <target_property>text</target_property>
+        <target_hint>None</target_hint>
+      </mapping>
+      <mapping>
+        <source_field>embedding</source_field>
+        <target_type>Node</target_type>
+        <target_name>Chunk</target_name>
+        <target_property>embedding</target_property>
+        <target_hint>None</target_hint>
+      </mapping>
+    </mappings>
+    <relationship_mappings>
+    </relationship_mappings>
+    <node_mappings>
+    </node_mappings>
+    <attributes/>
+    <GUI>
+      <xloc>320</xloc>
+      <yloc>96</yloc>
+    </GUI>
+  </transform>
+  <transform>
+    <name>extracted graph</name>
+    <type>DataGrid</type>
+    <description>What Extract graph returns for the chunks. 'charles-babbage' merges with 'Charles Babbage'.</description>
+    <distribute>Y</distribute>
+    <custom_distribution/>
+    <copies>1</copies>
+    <partitioning>
+      <method>none</method>
+      <schema_name/>
+    </partitioning>
+    <fields>
+      <field>
+        <set_empty_string>N</set_empty_string>
+        <length>-1</length>
+        <name>chunk_id</name>
+        <precision>-1</precision>
+        <type>String</type>
+      </field>
+      <field>
+        <set_empty_string>N</set_empty_string>
+        <length>-1</length>
+        <name>graph_element</name>
+        <precision>-1</precision>
+        <type>String</type>
+      </field>
+      <field>
+        <set_empty_string>N</set_empty_string>
+        <length>-1</length>
+        <name>name</name>
+        <precision>-1</precision>
+        <type>String</type>
+      </field>
+      <field>
+        <set_empty_string>N</set_empty_string>
+        <length>-1</length>
+        <name>type</name>
+        <precision>-1</precision>
+        <type>String</type>
+      </field>
+      <field>
+        <set_empty_string>N</set_empty_string>
+        <length>-1</length>
+        <name>description</name>
+        <precision>-1</precision>
+        <type>String</type>
+      </field>
+      <field>
+        <set_empty_string>N</set_empty_string>
+        <length>-1</length>
+        <name>source</name>
+        <precision>-1</precision>
+        <type>String</type>
+      </field>
+      <field>
+        <set_empty_string>N</set_empty_string>
+        <length>-1</length>
+        <name>target</name>
+        <precision>-1</precision>
+        <type>String</type>
+      </field>
+    </fields>
+    <data>
+      <line>
+        <item>d1#0</item>
+        <item>ENTITY</item>
+        <item>Ada Lovelace</item>
+        <item>Person</item>
+        <item>Mathematician</item>
+        <item/>
+        <item/>
+      </line>
+      <line>
+        <item>d1#0</item>
+        <item>ENTITY</item>
+        <item>Charles Babbage</item>
+        <item>Person</item>
+        <item>Inventor</item>
+        <item/>
+        <item/>
+      </line>
+      <line>
+        <item>d1#0</item>
+        <item>RELATIONSHIP</item>
+        <item/>
+        <item>WORKED_WITH</item>
+        <item>Ada worked with Babbage</item>
+        <item>Ada Lovelace</item>
+        <item>Charles Babbage</item>
+      </line>
+      <line>
+        <item>d1#1</item>
+        <item>ENTITY</item>
+        <item>Charles Babbage</item>
+        <item>Person</item>
+        <item>Inventor</item>
+        <item/>
+        <item/>
+      </line>
+      <line>
+        <item>d1#1</item>
+        <item>ENTITY</item>
+        <item>Analytical Engine</item>
+        <item>Product</item>
+        <item>A mechanical computer</item>
+        <item/>
+        <item/>
+      </line>
+      <line>
+        <item>d1#1</item>
+        <item>RELATIONSHIP</item>
+        <item/>
+        <item>CREATED</item>
+        <item>Babbage designed it</item>
+        <item>charles-babbage</item>
+        <item>Analytical Engine</item>
+      </line>
+    </data>
+    <attributes/>
+    <GUI>
+      <xloc>96</xloc>
+      <yloc>240</yloc>
+    </GUI>
+  </transform>
+  <transform>
+    <name>Hold the graph</name>
+    <type>BlockingTransform</type>
+    <description/>
+    <distribute>Y</distribute>
+    <custom_distribution/>
+    <copies>1</copies>
+    <partitioning>
+      <method>none</method>
+      <schema_name/>
+    </partitioning>
+    <cache_size>5000</cache_size>
+    <compress>Y</compress>
+    <directory>${java.io.tmpdir}</directory>
+    <pass_all_rows>Y</pass_all_rows>
+    <prefix>graphrag</prefix>
+    <attributes/>
+    <GUI>
+      <xloc>288</xloc>
+      <yloc>240</yloc>
+    </GUI>
+  </transform>
+  <transform>
+    <name>Wait for the chunks</name>
+    <type>BlockUntilTransformsFinish</type>
+    <description/>
+    <distribute>Y</distribute>
+    <custom_distribution/>
+    <copies>1</copies>
+    <partitioning>
+      <method>none</method>
+      <schema_name/>
+    </partitioning>
+    <transforms>
+      <transform>
+        <name>Write documents and chunks</name>
+        <CopyNr>0</CopyNr>
+      </transform>
+    </transforms>
+    <attributes/>
+    <GUI>
+      <xloc>480</xloc>
+      <yloc>240</yloc>
+    </GUI>
+  </transform>
+  <transform>
+    <name>Entity keys</name>
+    <type>ScriptValueMod</type>
+    <description>Lowercase without spaces or punctuation, so 'Hop Run' and 'hop-run' are one entity</description>
+    <distribute>Y</distribute>
+    <custom_distribution/>
+    <copies>1</copies>
+    <partitioning>
+      <method>none</method>
+      <schema_name/>
+    </partitioning>
+    <optimizationLevel>9</optimizationLevel>
+    <jsScripts>
+      <jsScript>
+        <jsScript_type>0</jsScript_type>
+        <jsScript_name>Script 1</jsScript_name>
+        <jsScript_script>function entityKey(name) {
+  if (name == null) {
+    return null;
+  }
+  return ("" + name).toLowerCase().replace(/[^a-z0-9+#]/g, "");
+}
+var key = entityKey(name);
+var source_key = entityKey(source);
+var target_key = entityKey(target);</jsScript_script>
+      </jsScript>
+    </jsScripts>
+    <fields>
+      <field>
+        <name>key</name>
+        <rename>key</rename>
+        <type>String</type>
+        <length>-1</length>
+        <precision>-1</precision>
+        <replace>N</replace>
+      </field>
+      <field>
+        <name>source_key</name>
+        <rename>source_key</rename>
+        <type>String</type>
+        <length>-1</length>
+        <precision>-1</precision>
+        <replace>N</replace>
+      </field>
+      <field>
+        <name>target_key</name>
+        <rename>target_key</rename>
+        <type>String</type>
+        <length>-1</length>
+        <precision>-1</precision>
+        <replace>N</replace>
+      </field>
+    </fields>
+    <attributes/>
+    <GUI>
+      <xloc>672</xloc>
+      <yloc>240</yloc>
+    </GUI>
+  </transform>
+  <transform>
+    <name>Entity?</name>
+    <type>FilterRows</type>
+    <description/>
+    <distribute>Y</distribute>
+    <custom_distribution/>
+    <copies>1</copies>
+    <partitioning>
+      <method>none</method>
+      <schema_name/>
+    </partitioning>
+    <compare>
+      <condition>
+        <conditions>
+        </conditions>
+        <function>=</function>
+        <leftvalue>graph_element</leftvalue>
+        <negated>N</negated>
+        <operator>-</operator>
+        <value>
+          <isnull>N</isnull>
+          <length>-1</length>
+          <mask/>
+          <name>constant</name>
+          <precision>-1</precision>
+          <text>ENTITY</text>
+          <type>String</type>
+        </value>
+      </condition>
+    </compare>
+    <send_false_to>Collect relationships</send_false_to>
+    <send_true_to>Write mentions</send_true_to>
+    <attributes/>
+    <GUI>
+      <xloc>832</xloc>
+      <yloc>240</yloc>
+    </GUI>
+  </transform>
+  <transform>
+    <name>Write mentions</name>
+    <type>Neo4jGraphOutput</type>
+    <description>MERGE an Entity per key and the chunk's MENTIONS relationship to it</description>
+    <distribute>Y</distribute>
+    <custom_distribution/>
+    <copies>1</copies>
+    <partitioning>
+      <method>none</method>
+      <schema_name/>
+    </partitioning>
+    <connection>Test</connection>
+    <model>graphrag</model>
+    <batch_size>100</batch_size>
+    <create_indexes>N</create_indexes>
+    <returning_graph>N</returning_graph>
+    <return_graph_field/>
+    <validate_against_model>N</validate_against_model>
+    <out_of_order_allowed>Y</out_of_order_allowed>
+    <mappings>
+      <mapping>
+        <source_field>chunk_id</source_field>
+        <target_type>Node</target_type>
+        <target_name>Chunk</target_name>
+        <target_property>id</target_property>
+        <target_hint>None</target_hint>
+      </mapping>
+      <mapping>
+        <source_field>key</source_field>
+        <target_type>Node</target_type>
+        <target_name>Entity</target_name>
+        <target_property>key</target_property>
+        <target_hint>None</target_hint>
+      </mapping>
+      <mapping>
+        <source_field>name</source_field>
+        <target_type>Node</target_type>
+        <target_name>Entity</target_name>
+        <target_property>name</target_property>
+        <target_hint>None</target_hint>
+      </mapping>
+      <mapping>
+        <source_field>type</source_field>
+        <target_type>Node</target_type>
+        <target_name>Entity</target_name>
+        <target_property>type</target_property>
+        <target_hint>None</target_hint>
+      </mapping>
+      <mapping>
+        <source_field>description</source_field>
+        <target_type>Node</target_type>
+        <target_name>Entity</target_name>
+        <target_property>description</target_property>
+        <target_hint>None</target_hint>
+      </mapping>
+    </mappings>
+    <relationship_mappings>
+    </relationship_mappings>
+    <node_mappings>
+    </node_mappings>
+    <attributes/>
+    <GUI>
+      <xloc>1024</xloc>
+      <yloc>240</yloc>
+    </GUI>
+  </transform>
+  <transform>
+    <name>Collect relationships</name>
+    <type>BlockingTransform</type>
+    <description>Reads all relationship rows first</description>
+    <distribute>Y</distribute>
+    <custom_distribution/>
+    <copies>1</copies>
+    <partitioning>
+      <method>none</method>
+      <schema_name/>
+    </partitioning>
+    <cache_size>5000</cache_size>
+    <compress>Y</compress>
+    <directory>${java.io.tmpdir}</directory>
+    <pass_all_rows>Y</pass_all_rows>
+    <prefix>graphrag</prefix>
+    <attributes/>
+    <GUI>
+      <xloc>832</xloc>
+      <yloc>384</yloc>
+    </GUI>
+  </transform>
+  <transform>
+    <name>Wait for the entities</name>
+    <type>BlockUntilTransformsFinish</type>
+    <description>Relationships are written once every entity is</description>
+    <distribute>Y</distribute>
+    <custom_distribution/>
+    <copies>1</copies>
+    <partitioning>
+      <method>none</method>
+      <schema_name/>
+    </partitioning>
+    <transforms>
+      <transform>
+        <name>Write mentions</name>
+        <CopyNr>0</CopyNr>
+      </transform>
+    </transforms>
+    <attributes/>
+    <GUI>
+      <xloc>1024</xloc>
+      <yloc>384</yloc>
+    </GUI>
+  </transform>
+  <transform>
+    <name>Write relationships</name>
+    <type>Neo4jCypherOutput</type>
+    <description>One RELATED_TO per type and source chunk. Graph output merges a relationship on its two nodes only, so a second type between the same entities would overwrite the first.</description>
+    <distribute>Y</distribute>
+    <custom_distribution/>
+    <copies>1</copies>
+    <partitioning>
+      <method>none</method>
+      <schema_name/>
+    </partitioning>
+    <connection>Test</connection>
+    <cypher>MATCH (s:Entity {key: $source_key}), (t:Entity {key: $target_key})
+MERGE (s)-[r:RELATED_TO {type: $type, chunk_id: $chunk_id}]-&gt;(t)
+SET r.description = $description</cypher>
+    <batch_size>1</batch_size>
+    <read_only>N</read_only>
+    <nr_retries_on_error/>
+    <retry>N</retry>
+    <cypher_from_field>N</cypher_from_field>
+    <cypher_field/>
+    <unwind>N</unwind>
+    <unwind_map/>
+    <returning_graph>N</returning_graph>
+    <return_graph_field/>
+    <mappings>
+      <mapping>
+        <parameter>source_key</parameter>
+        <field>source_key</field>
+        <type>String</type>
+      </mapping>
+      <mapping>
+        <parameter>target_key</parameter>
+        <field>target_key</field>
+        <type>String</type>
+      </mapping>
+      <mapping>
+        <parameter>type</parameter>
+        <field>type</field>
+        <type>String</type>
+      </mapping>
+      <mapping>
+        <parameter>chunk_id</parameter>
+        <field>chunk_id</field>
+        <type>String</type>
+      </mapping>
+      <mapping>
+        <parameter>description</parameter>
+        <field>description</field>
+        <type>String</type>
+      </mapping>
+    </mappings>
+    <returns>
+
+    </returns>
+    <attributes/>
+    <GUI>
+      <xloc>1216</xloc>
+      <yloc>384</yloc>
+    </GUI>
+  </transform>
+  <transform_error_handling>
+  </transform_error_handling>
+  <attributes/>
+</pipeline>
diff --git a/integration-tests/falkordb/tests/graphrag/graphrag-graph-validation.hpl b/integration-tests/falkordb/tests/graphrag/graphrag-graph-validation.hpl
new file mode 100644
index 0000000000..a859fb8027
--- /dev/null
+++ b/integration-tests/falkordb/tests/graphrag/graphrag-graph-validation.hpl
@@ -0,0 +1,185 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+Licensed to the Apache Software Foundation (ASF) under one or more
+contributor license agreements.  See the NOTICE file distributed with
+this work for additional information regarding copyright ownership.
+The ASF licenses this file to You under the Apache License, Version 2.0
+(the "License"); you may not use this file except in compliance with
+the License.  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+
+-->
+<pipeline>
+  <info>
+    <name>graphrag-graph-validation</name>
+    <name_sync_with_filename>Y</name_sync_with_filename>
+    <description>Counts the nodes and relationships graphrag-build wrote</description>
+    <extended_description/>
+    <pipeline_version/>
+    <pipeline_type>Normal</pipeline_type>
+    <parameters>
+    </parameters>
+    <capture_transform_performance>N</capture_transform_performance>
+    <transform_performance_capturing_delay>1000</transform_performance_capturing_delay>
+    <transform_performance_capturing_size_limit>100</transform_performance_capturing_size_limit>
+    <created_user>-</created_user>
+    <created_date>2026/10/10 12:00:00.000</created_date>
+    <modified_user>-</modified_user>
+    <modified_date>2026/10/10 12:00:00.000</modified_date>
+  </info>
+  <notepads>
+  </notepads>
+  <order>
+    <hop>
+      <from>counts to check</from>
+      <to>count</to>
+      <enabled>Y</enabled>
+    </hop>
+    <hop>
+      <from>count</from>
+      <to>Validation</to>
+      <enabled>Y</enabled>
+    </hop>
+  </order>
+  <transform>
+    <name>counts to check</name>
+    <type>DataGrid</type>
+    <description/>
+    <distribute>Y</distribute>
+    <custom_distribution/>
+    <copies>1</copies>
+    <partitioning>
+      <method>none</method>
+      <schema_name/>
+    </partitioning>
+    <fields>
+      <field>
+        <set_empty_string>N</set_empty_string>
+        <length>-1</length>
+        <name>check</name>
+        <precision>-1</precision>
+        <type>String</type>
+      </field>
+      <field>
+        <set_empty_string>N</set_empty_string>
+        <length>-1</length>
+        <name>query</name>
+        <precision>-1</precision>
+        <type>String</type>
+      </field>
+    </fields>
+    <data>
+      <line>
+        <item>1 documents</item>
+        <item>MATCH (n:Document) RETURN count(n) AS n</item>
+      </line>
+      <line>
+        <item>2 chunks</item>
+        <item>MATCH (n:Chunk) RETURN count(n) AS n</item>
+      </line>
+      <line>
+        <item>3 entities</item>
+        <item>MATCH (n:Entity) RETURN count(n) AS n</item>
+      </line>
+      <line>
+        <item>4 has_chunk</item>
+        <item>MATCH (:Document)-[r:HAS_CHUNK]-&gt;(:Chunk) RETURN count(r) AS n</item>
+      </line>
+      <line>
+        <item>5 mentions</item>
+        <item>MATCH (:Chunk)-[r:MENTIONS]-&gt;(:Entity) RETURN count(r) AS n</item>
+      </line>
+      <line>
+        <item>6 related_to</item>
+        <item>MATCH (:Entity)-[r:RELATED_TO]-&gt;(:Entity) RETURN count(r) AS n</item>
+      </line>
+      <line>
+        <item>7 related_to from a chunk</item>
+        <item>MATCH (:Entity)-[r:RELATED_TO]-&gt;(:Entity) WHERE r.chunk_id IS NOT NULL RETURN count(r) AS n</item>
+      </line>
+    </data>
+    <attributes/>
+    <GUI>
+      <xloc>96</xloc>
+      <yloc>96</yloc>
+    </GUI>
+  </transform>
+  <transform>
+    <name>count</name>
+    <type>Neo4jCypherOutput</type>
+    <description>Runs the query of each row</description>
+    <distribute>Y</distribute>
+    <custom_distribution/>
+    <copies>1</copies>
+    <partitioning>
+      <method>none</method>
+      <schema_name/>
+    </partitioning>
+    <connection>Test</connection>
+    <cypher></cypher>
+    <batch_size>1</batch_size>
+    <read_only>Y</read_only>
+    <nr_retries_on_error/>
+    <retry>N</retry>
+    <cypher_from_field>Y</cypher_from_field>
+    <cypher_field>query</cypher_field>
+    <unwind>N</unwind>
+    <unwind_map/>
+    <returning_graph>N</returning_graph>
+    <return_graph_field/>
+    <mappings>
+
+    </mappings>
+    <returns>
+      <return>
+        <name>n</name>
+        <type>Integer</type>
+        <source_type>Integer</source_type>
+      </return>
+    </returns>
+    <attributes/>
+    <GUI>
+      <xloc>288</xloc>
+      <yloc>96</yloc>
+    </GUI>
+  </transform>
+  <transform>
+    <name>Validation</name>
+    <type>SelectValues</type>
+    <description/>
+    <distribute>Y</distribute>
+    <custom_distribution/>
+    <copies>1</copies>
+    <partitioning>
+      <method>none</method>
+      <schema_name/>
+    </partitioning>
+    <fields>
+      <field>
+        <name>check</name>
+        <rename/>
+      </field>
+      <field>
+        <name>n</name>
+        <rename/>
+      </field>
+      <select_unspecified>N</select_unspecified>
+    </fields>
+    <attributes/>
+    <GUI>
+      <xloc>480</xloc>
+      <yloc>96</yloc>
+    </GUI>
+  </transform>
+  <transform_error_handling>
+  </transform_error_handling>
+  <attributes/>
+</pipeline>
diff --git a/integration-tests/falkordb/tests/graphrag/graphrag-retrieve-validation.hpl b/integration-tests/falkordb/tests/graphrag/graphrag-retrieve-validation.hpl
new file mode 100644
index 0000000000..3a0781c8bc
--- /dev/null
+++ b/integration-tests/falkordb/tests/graphrag/graphrag-retrieve-validation.hpl
@@ -0,0 +1,363 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+Licensed to the Apache Software Foundation (ASF) under one or more
+contributor license agreements.  See the NOTICE file distributed with
+this work for additional information regarding copyright ownership.
+The ASF licenses this file to You under the Apache License, Version 2.0
+(the "License"); you may not use this file except in compliance with
+the License.  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+
+-->
+<pipeline>
+  <info>
+    <name>graphrag-retrieve-validation</name>
+    <name_sync_with_filename>Y</name_sync_with_filename>
+    <description>Vector search on the chunks, then the facts of each chunk</description>
+    <extended_description/>
+    <pipeline_version/>
+    <pipeline_type>Normal</pipeline_type>
+    <parameters>
+    </parameters>
+    <capture_transform_performance>N</capture_transform_performance>
+    <transform_performance_capturing_delay>1000</transform_performance_capturing_delay>
+    <transform_performance_capturing_size_limit>100</transform_performance_capturing_size_limit>
+    <created_user>-</created_user>
+    <created_date>2026/10/10 12:00:00.000</created_date>
+    <modified_user>-</modified_user>
+    <modified_date>2026/10/10 12:00:00.000</modified_date>
+  </info>
+  <notepads>
+  </notepads>
+  <order>
+    <hop>
+      <from>query vectors</from>
+      <to>Graph vector search</to>
+      <enabled>Y</enabled>
+    </hop>
+    <hop>
+      <from>Graph vector search</from>
+      <to>rank</to>
+      <enabled>Y</enabled>
+    </hop>
+    <hop>
+      <from>rank</from>
+      <to>Facts of the chunk</to>
+      <enabled>Y</enabled>
+    </hop>
+    <hop>
+      <from>Facts of the chunk</from>
+      <to>Fact</to>
+      <enabled>Y</enabled>
+    </hop>
+    <hop>
+      <from>Fact</from>
+      <to>One row per chunk</to>
+      <enabled>Y</enabled>
+    </hop>
+    <hop>
+      <from>One row per chunk</from>
+      <to>Validation</to>
+      <enabled>Y</enabled>
+    </hop>
+  </order>
+  <transform>
+    <name>query vectors</name>
+    <type>DataGrid</type>
+    <description>Close to one chunk each</description>
+    <distribute>Y</distribute>
+    <custom_distribution/>
+    <copies>1</copies>
+    <partitioning>
+      <method>none</method>
+      <schema_name/>
+    </partitioning>
+    <fields>
+      <field>
+        <set_empty_string>N</set_empty_string>
+        <length>-1</length>
+        <name>query_id</name>
+        <precision>-1</precision>
+        <type>String</type>
+      </field>
+      <field>
+        <set_empty_string>N</set_empty_string>
+        <length>-1</length>
+        <name>q</name>
+        <precision>-1</precision>
+        <type>Vector</type>
+      </field>
+    </fields>
+    <data>
+      <line>
+        <item>q1</item>
+        <item>[1,0,0]</item>
+      </line>
+      <line>
+        <item>q2</item>
+        <item>[0,0,1]</item>
+      </line>
+    </data>
+    <attributes/>
+    <GUI>
+      <xloc>96</xloc>
+      <yloc>96</yloc>
+    </GUI>
+  </transform>
+  <transform>
+    <name>Graph vector search</name>
+    <type>GraphVectorSearch</type>
+    <description/>
+    <distribute>Y</distribute>
+    <custom_distribution/>
+    <copies>1</copies>
+    <partitioning>
+      <method>none</method>
+      <schema_name/>
+    </partitioning>
+    <connection>Test</connection>
+    <element_type>NODE</element_type>
+    <index_name>graphrag_it_chunks</index_name>
+    <label>Chunk</label>
+    <vector_property>embedding</vector_property>
+    <similarity>COSINE</similarity>
+    <embedding_field>q</embedding_field>
+    <top_k>2</top_k>
+    <min_score>0</min_score>
+    <eat_row_on_no_match>Y</eat_row_on_no_match>
+    <score_field>score</score_field>
+    <return_properties>
+      <return_property>
+        <property>id</property>
+        <field_name>chunk_id</field_name>
+        <type>String</type>
+      </return_property>
+    </return_properties>
+    <attributes/>
+    <GUI>
+      <xloc>288</xloc>
+      <yloc>96</yloc>
+    </GUI>
+  </transform>
+  <transform>
+    <name>rank</name>
+    <type>Sequence</type>
+    <description/>
+    <distribute>Y</distribute>
+    <custom_distribution/>
+    <copies>1</copies>
+    <partitioning>
+      <method>none</method>
+      <schema_name/>
+    </partitioning>
+    <valuename>rank</valuename>
+    <use_database>N</use_database>
+    <connection/>
+    <schema/>
+    <seqname>SEQ_</seqname>
+    <use_counter>Y</use_counter>
+    <counter_name/>
+    <start_at>1</start_at>
+    <increment_by>1</increment_by>
+    <max_value>999999999</max_value>
+    <attributes/>
+    <GUI>
+      <xloc>448</xloc>
+      <yloc>96</yloc>
+    </GUI>
+  </transform>
+  <transform>
+    <name>Facts of the chunk</name>
+    <type>Neo4jCypherOutput</type>
+    <description>The entities the chunk mentions and their relationships: one row per fact</description>
+    <distribute>Y</distribute>
+    <custom_distribution/>
+    <copies>1</copies>
+    <partitioning>
+      <method>none</method>
+      <schema_name/>
+    </partitioning>
+    <connection>Test</connection>
+    <cypher>MATCH (c:Chunk {id: $chunk_id})
+OPTIONAL MATCH (c)-[:MENTIONS]-&gt;(e:Entity)
+OPTIONAL MATCH (e)-[r:RELATED_TO]-&gt;(o:Entity)
+RETURN e.name AS entity, e.type AS entity_type, r.type AS relation, o.name AS related_entity</cypher>
+    <batch_size>1</batch_size>
+    <read_only>Y</read_only>
+    <nr_retries_on_error/>
+    <retry>N</retry>
+    <cypher_from_field>N</cypher_from_field>
+    <cypher_field/>
+    <unwind>N</unwind>
+    <unwind_map/>
+    <returning_graph>N</returning_graph>
+    <return_graph_field/>
+    <mappings>
+      <mapping>
+        <parameter>chunk_id</parameter>
+        <field>chunk_id</field>
+        <type>String</type>
+      </mapping>
+    </mappings>
+    <returns>
+      <return>
+        <name>entity</name>
+        <type>String</type>
+        <source_type>String</source_type>
+      </return>
+      <return>
+        <name>entity_type</name>
+        <type>String</type>
+        <source_type>String</source_type>
+      </return>
+      <return>
+        <name>relation</name>
+        <type>String</type>
+        <source_type>String</source_type>
+      </return>
+      <return>
+        <name>related_entity</name>
+        <type>String</type>
+        <source_type>String</source_type>
+      </return>
+    </returns>
+    <attributes/>
+    <GUI>
+      <xloc>608</xloc>
+      <yloc>96</yloc>
+    </GUI>
+  </transform>
+  <transform>
+    <name>Fact</name>
+    <type>ScriptValueMod</type>
+    <description>Entity (type) -RELATION-&gt; other entity</description>
+    <distribute>Y</distribute>
+    <custom_distribution/>
+    <copies>1</copies>
+    <partitioning>
+      <method>none</method>
+      <schema_name/>
+    </partitioning>
+    <optimizationLevel>9</optimizationLevel>
+    <jsScripts>
+      <jsScript>
+        <jsScript_type>0</jsScript_type>
+        <jsScript_name>Script 1</jsScript_name>
+        <jsScript_script>var fact = null;
+if (entity != null) {
+  fact = entity;
+  if (entity_type != null) {
+    fact = fact + " (" + entity_type + ")";
+  }
+  if (relation != null) {
+    fact = fact + " -" + relation + "-&gt; " + related_entity;
+  }
+}</jsScript_script>
+      </jsScript>
+    </jsScripts>
+    <fields>
+      <field>
+        <name>fact</name>
+        <rename>fact</rename>
+        <type>String</type>
+        <length>-1</length>
+        <precision>-1</precision>
+        <replace>N</replace>
+      </field>
+    </fields>
+    <attributes/>
+    <GUI>
+      <xloc>768</xloc>
+      <yloc>96</yloc>
+    </GUI>
+  </transform>
+  <transform>
+    <name>One row per chunk</name>
+    <type>GroupBy</type>
+    <description>The rows of a chunk are consecutive</description>
+    <distribute>Y</distribute>
+    <custom_distribution/>
+    <copies>1</copies>
+    <partitioning>
+      <method>none</method>
+      <schema_name/>
+    </partitioning>
+    <directory>${java.io.tmpdir}</directory>
+    <prefix>graphrag</prefix>
+    <add_linenr>N</add_linenr>
+    <all_rows>N</all_rows>
+    <fields>
+      <field>
+        <aggregate>facts</aggregate>
+        <subject>fact</subject>
+        <type>CONCAT_DISTINCT</type>
+        <valuefield>; </valuefield>
+      </field>
+    </fields>
+    <give_back_row>N</give_back_row>
+    <group>
+      <field>
+        <name>query_id</name>
+      </field>
+      <field>
+        <name>rank</name>
+      </field>
+      <field>
+        <name>chunk_id</name>
+      </field>
+    </group>
+    <ignore_aggregate>N</ignore_aggregate>
+    <attributes/>
+    <GUI>
+      <xloc>928</xloc>
+      <yloc>96</yloc>
+    </GUI>
+  </transform>
+  <transform>
+    <name>Validation</name>
+    <type>SelectValues</type>
+    <description/>
+    <distribute>Y</distribute>
+    <custom_distribution/>
+    <copies>1</copies>
+    <partitioning>
+      <method>none</method>
+      <schema_name/>
+    </partitioning>
+    <fields>
+      <field>
+        <name>query_id</name>
+        <rename/>
+      </field>
+      <field>
+        <name>rank</name>
+        <rename/>
+      </field>
+      <field>
+        <name>chunk_id</name>
+        <rename/>
+      </field>
+      <field>
+        <name>facts</name>
+        <rename/>
+      </field>
+      <select_unspecified>N</select_unspecified>
+    </fields>
+    <attributes/>
+    <GUI>
+      <xloc>1120</xloc>
+      <yloc>96</yloc>
+    </GUI>
+  </transform>
+  <transform_error_handling>
+  </transform_error_handling>
+  <attributes/>
+</pipeline>
diff --git a/integration-tests/falkordb/tests/graphrag/main-graphrag.hwf b/integration-tests/falkordb/tests/graphrag/main-graphrag.hwf
new file mode 100644
index 0000000000..8a7ada2cfc
--- /dev/null
+++ b/integration-tests/falkordb/tests/graphrag/main-graphrag.hwf
@@ -0,0 +1,310 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+Licensed to the Apache Software Foundation (ASF) under one or more
+contributor license agreements.  See the NOTICE file distributed with
+this work for additional information regarding copyright ownership.
+The ASF licenses this file to You under the Apache License, Version 2.0
+(the "License"); you may not use this file except in compliance with
+the License.  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+
+-->
+<workflow>
+  <name>main-graphrag</name>
+  <name_sync_with_filename>Y</name_sync_with_filename>
+  <description>Graph vector search on the vector index of nodes</description>
+  <extended_description/>
+  <workflow_version/>
+  <created_user>-</created_user>
+  <created_date>2026/10/07 12:00:00.000</created_date>
+  <modified_user>-</modified_user>
+  <modified_date>2026/10/07 12:00:00.000</modified_date>
+  <parameters>
+    <parameter>
+      <name>TEST_FOLDER</name>
+      <default_value>graphrag</default_value>
+      <description/>
+    </parameter>
+  </parameters>
+  <actions>
+    <action>
+      <name>Start</name>
+      <description/>
+      <type>SPECIAL</type>
+      <attributes/>
+      <repeat>N</repeat>
+      <schedulerType>0</schedulerType>
+      <intervalSeconds>0</intervalSeconds>
+      <intervalMinutes>60</intervalMinutes>
+      <hour>12</hour>
+      <minutes>0</minutes>
+      <weekDay>1</weekDay>
+      <DayOfMonth>1</DayOfMonth>
+      <parallel>N</parallel>
+      <xloc>64</xloc>
+      <yloc>96</yloc>
+      <attributes_hac/>
+    </action>
+    <action>
+      <name>drop indexes before</name>
+      <description/>
+      <type>NEO4J_INDEX</type>
+      <attributes/>
+      <connection>Test</connection>
+      <updates>
+        <update>
+          <index_name>graphrag_it_chunks</index_name>
+          <object_name>Chunk</object_name>
+          <object_properties>embedding</object_properties>
+          <object_type>NODE</object_type>
+          <update_type>DROP</update_type>
+          <index_type>VECTOR</index_type>
+          <vector_dimensions>3</vector_dimensions>
+          <vector_similarity>COSINE</vector_similarity>
+        </update>
+      </updates>
+      <parallel>N</parallel>
+      <xloc>224</xloc>
+      <yloc>96</yloc>
+      <attributes_hac/>
+    </action>
+    <action>
+      <name>cleanup-database.hwf</name>
+      <description/>
+      <type>WORKFLOW</type>
+      <attributes/>
+      <run_configuration>local</run_configuration>
+      <filename>${PROJECT_HOME}/tests/shared/cleanup-database.hwf</filename>
+      <params_from_previous>N</params_from_previous>
+      <exec_per_row>N</exec_per_row>
+      <set_logfile>N</set_logfile>
+      <logfile/>
+      <logext/>
+      <add_date>N</add_date>
+      <add_time>N</add_time>
+      <loglevel>Nothing</loglevel>
+      <wait_until_finished>Y</wait_until_finished>
+      <create_parent_folder>N</create_parent_folder>
+      <parameters>
+        <pass_all_parameters>Y</pass_all_parameters>
+      </parameters>
+      <set_append_logfile>N</set_append_logfile>
+      <parallel>N</parallel>
+      <xloc>384</xloc>
+      <yloc>96</yloc>
+      <attributes_hac/>
+    </action>
+    <action>
+      <name>create indexes</name>
+      <description/>
+      <type>NEO4J_INDEX</type>
+      <attributes/>
+      <connection>Test</connection>
+      <updates>
+        <update>
+          <index_name>graphrag_it_chunks</index_name>
+          <object_name>Chunk</object_name>
+          <object_properties>embedding</object_properties>
+          <object_type>NODE</object_type>
+          <update_type>CREATE</update_type>
+          <index_type>VECTOR</index_type>
+          <vector_dimensions>3</vector_dimensions>
+          <vector_similarity>COSINE</vector_similarity>
+        </update>
+      </updates>
+      <parallel>N</parallel>
+      <xloc>544</xloc>
+      <yloc>96</yloc>
+      <attributes_hac/>
+    </action>
+    <action>
+      <name>graphrag-build.hpl</name>
+      <description/>
+      <type>PIPELINE</type>
+      <attributes/>
+      <filename>${PROJECT_HOME}/tests/graphrag/graphrag-build.hpl</filename>
+      <params_from_previous>N</params_from_previous>
+      <exec_per_row>N</exec_per_row>
+      <clear_rows>N</clear_rows>
+      <clear_files>N</clear_files>
+      <set_logfile>N</set_logfile>
+      <logfile/>
+      <logext/>
+      <add_date>N</add_date>
+      <add_time>N</add_time>
+      <loglevel>Basic</loglevel>
+      <set_append_logfile>N</set_append_logfile>
+      <wait_until_finished>Y</wait_until_finished>
+      <create_parent_folder>N</create_parent_folder>
+      <run_configuration>local</run_configuration>
+      <parameters>
+        <pass_all_parameters>Y</pass_all_parameters>
+      </parameters>
+      <parallel>N</parallel>
+      <xloc>704</xloc>
+      <yloc>96</yloc>
+      <attributes_hac/>
+    </action>
+    <action>
+      <name>Run graphrag tests</name>
+      <description/>
+      <type>RunPipelineTests</type>
+      <attributes/>
+      <test_names>
+        <test_name>
+          <name>graphrag-graph-validation UNIT</name>
+        </test_name>
+        <test_name>
+          <name>graphrag-retrieve-validation UNIT</name>
+        </test_name>
+      </test_names>
+      <parallel>N</parallel>
+      <xloc>864</xloc>
+      <yloc>96</yloc>
+      <attributes_hac/>
+    </action>
+    <action>
+      <name>drop indexes after test</name>
+      <description/>
+      <type>NEO4J_INDEX</type>
+      <attributes/>
+      <connection>Test</connection>
+      <updates>
+        <update>
+          <index_name>graphrag_it_chunks</index_name>
+          <object_name>Chunk</object_name>
+          <object_properties>embedding</object_properties>
+          <object_type>NODE</object_type>
+          <update_type>DROP</update_type>
+          <index_type>VECTOR</index_type>
+          <vector_dimensions>3</vector_dimensions>
+          <vector_similarity>COSINE</vector_similarity>
+        </update>
+      </updates>
+      <parallel>N</parallel>
+      <xloc>1024</xloc>
+      <yloc>96</yloc>
+      <attributes_hac/>
+    </action>
+    <action>
+      <name>drop indexes after failure</name>
+      <description/>
+      <type>NEO4J_INDEX</type>
+      <attributes/>
+      <connection>Test</connection>
+      <updates>
+        <update>
+          <index_name>graphrag_it_chunks</index_name>
+          <object_name>Chunk</object_name>
+          <object_properties>embedding</object_properties>
+          <object_type>NODE</object_type>
+          <update_type>DROP</update_type>
+          <index_type>VECTOR</index_type>
+          <vector_dimensions>3</vector_dimensions>
+          <vector_similarity>COSINE</vector_similarity>
+        </update>
+      </updates>
+      <parallel>N</parallel>
+      <xloc>1024</xloc>
+      <yloc>224</yloc>
+      <attributes_hac/>
+    </action>
+    <action>
+      <name>Success</name>
+      <description/>
+      <type>SUCCESS</type>
+      <attributes/>
+      <parallel>N</parallel>
+      <xloc>1184</xloc>
+      <yloc>96</yloc>
+      <attributes_hac/>
+    </action>
+    <action>
+      <name>Error out</name>
+      <description/>
+      <type>ABORT</type>
+      <attributes/>
+      <message>graphrag failed</message>
+      <parallel>N</parallel>
+      <xloc>1184</xloc>
+      <yloc>224</yloc>
+      <attributes_hac/>
+    </action>
+  </actions>
+  <hops>
+    <hop>
+      <from>Start</from>
+      <to>drop indexes before</to>
+      <enabled>Y</enabled>
+      <evaluation>Y</evaluation>
+      <unconditional>Y</unconditional>
+    </hop>
+    <hop>
+      <from>drop indexes before</from>
+      <to>cleanup-database.hwf</to>
+      <enabled>Y</enabled>
+      <evaluation>Y</evaluation>
+      <unconditional>Y</unconditional>
+    </hop>
+    <hop>
+      <from>cleanup-database.hwf</from>
+      <to>create indexes</to>
+      <enabled>Y</enabled>
+      <evaluation>Y</evaluation>
+      <unconditional>N</unconditional>
+    </hop>
+    <hop>
+      <from>create indexes</from>
+      <to>graphrag-build.hpl</to>
+      <enabled>Y</enabled>
+      <evaluation>Y</evaluation>
+      <unconditional>N</unconditional>
+    </hop>
+    <hop>
+      <from>graphrag-build.hpl</from>
+      <to>Run graphrag tests</to>
+      <enabled>Y</enabled>
+      <evaluation>Y</evaluation>
+      <unconditional>N</unconditional>
+    </hop>
+    <hop>
+      <from>Run graphrag tests</from>
+      <to>drop indexes after test</to>
+      <enabled>Y</enabled>
+      <evaluation>Y</evaluation>
+      <unconditional>N</unconditional>
+    </hop>
+    <hop>
+      <from>drop indexes after test</from>
+      <to>Success</to>
+      <enabled>Y</enabled>
+      <evaluation>Y</evaluation>
+      <unconditional>Y</unconditional>
+    </hop>
+    <hop>
+      <from>Run graphrag tests</from>
+      <to>drop indexes after failure</to>
+      <enabled>Y</enabled>
+      <evaluation>N</evaluation>
+      <unconditional>N</unconditional>
+    </hop>
+    <hop>
+      <from>drop indexes after failure</from>
+      <to>Error out</to>
+      <enabled>Y</enabled>
+      <evaluation>Y</evaluation>
+      <unconditional>Y</unconditional>
+    </hop>
+  </hops>
+  <notepads>
+  </notepads>
+  <attributes/>
+</workflow>
diff --git a/integration-tests/memgraph/datasets/graphrag-graph-validation-golden.csv b/integration-tests/memgraph/datasets/graphrag-graph-validation-golden.csv
new file mode 100644
index 0000000000..aa51e75de2
--- /dev/null
+++ b/integration-tests/memgraph/datasets/graphrag-graph-validation-golden.csv
@@ -0,0 +1,8 @@
+check,n
+1 documents,2
+2 chunks,3
+3 entities,3
+4 has_chunk,3
+5 mentions,4
+6 related_to,2
+7 related_to from a chunk,2
diff --git a/integration-tests/memgraph/datasets/graphrag-retrieve-validation-golden.csv b/integration-tests/memgraph/datasets/graphrag-retrieve-validation-golden.csv
new file mode 100644
index 0000000000..fa40e52184
--- /dev/null
+++ b/integration-tests/memgraph/datasets/graphrag-retrieve-validation-golden.csv
@@ -0,0 +1,5 @@
+query_id,rank,chunk_id,facts
+q1,1,d1#0,Ada Lovelace (Person) -WORKED_WITH-> Charles Babbage; Charles Babbage (Person) -CREATED-> Analytical Engine
+q1,2,d1#1,Analytical Engine (Product); Charles Babbage (Person) -CREATED-> Analytical Engine
+q2,3,d2#0,
+q2,4,d1#1,Analytical Engine (Product); Charles Babbage (Person) -CREATED-> Analytical Engine
diff --git a/integration-tests/memgraph/metadata/dataset/graphrag-graph-validation-golden.json b/integration-tests/memgraph/metadata/dataset/graphrag-graph-validation-golden.json
new file mode 100644
index 0000000000..1df16ac92a
--- /dev/null
+++ b/integration-tests/memgraph/metadata/dataset/graphrag-graph-validation-golden.json
@@ -0,0 +1,24 @@
+{
+  "base_filename": "graphrag-graph-validation-golden.csv",
+  "name": "graphrag-graph-validation-golden",
+  "description": "Node and relationship counts after graphrag-build",
+  "dataset_fields": [
+    {
+      "field_comment": "",
+      "field_length": -1,
+      "field_type": 2,
+      "field_precision": -1,
+      "field_format": "",
+      "field_name": "check"
+    },
+    {
+      "field_comment": "",
+      "field_length": -1,
+      "field_type": 5,
+      "field_precision": -1,
+      "field_format": "",
+      "field_name": "n"
+    }
+  ],
+  "folder_name": ""
+}
diff --git a/integration-tests/memgraph/metadata/dataset/graphrag-retrieve-validation-golden.json b/integration-tests/memgraph/metadata/dataset/graphrag-retrieve-validation-golden.json
new file mode 100644
index 0000000000..d7a1c18170
--- /dev/null
+++ b/integration-tests/memgraph/metadata/dataset/graphrag-retrieve-validation-golden.json
@@ -0,0 +1,40 @@
+{
+  "base_filename": "graphrag-retrieve-validation-golden.csv",
+  "name": "graphrag-retrieve-validation-golden",
+  "description": "The chunks per query vector, best first, and their facts",
+  "dataset_fields": [
+    {
+      "field_comment": "",
+      "field_length": -1,
+      "field_type": 2,
+      "field_precision": -1,
+      "field_format": "",
+      "field_name": "query_id"
+    },
+    {
+      "field_comment": "",
+      "field_length": -1,
+      "field_type": 5,
+      "field_precision": -1,
+      "field_format": "",
+      "field_name": "rank"
+    },
+    {
+      "field_comment": "",
+      "field_length": -1,
+      "field_type": 2,
+      "field_precision": -1,
+      "field_format": "",
+      "field_name": "chunk_id"
+    },
+    {
+      "field_comment": "",
+      "field_length": -1,
+      "field_type": 2,
+      "field_precision": -1,
+      "field_format": "",
+      "field_name": "facts"
+    }
+  ],
+  "folder_name": ""
+}
diff --git a/integration-tests/memgraph/metadata/neo4j-graph-model/graphrag.json b/integration-tests/memgraph/metadata/neo4j-graph-model/graphrag.json
new file mode 100644
index 0000000000..fec7bc5dee
--- /dev/null
+++ b/integration-tests/memgraph/metadata/neo4j-graph-model/graphrag.json
@@ -0,0 +1,189 @@
+{
+  "name": "graphrag",
+  "description": "GraphRAG: documents split into chunks with embeddings, the entities the chunks mention, and the relationships between those entities.",
+  "nodes": [
+    {
+      "presentation": {
+        "x": 80,
+        "y": 200
+      },
+      "name": "Document",
+      "description": "A source document",
+      "labels": [
+        "Document"
+      ],
+      "properties": [
+        {
+          "indexed": false,
+          "unique": true,
+          "name": "id",
+          "description": "Document ID",
+          "type": "String",
+          "mandatory": true,
+          "primary": true
+        },
+        {
+          "indexed": false,
+          "unique": false,
+          "name": "title",
+          "description": "Document title",
+          "type": "String",
+          "mandatory": false,
+          "primary": false
+        }
+      ]
+    },
+    {
+      "presentation": {
+        "x": 300,
+        "y": 200
+      },
+      "name": "Chunk",
+      "description": "A part of a document, with its embedding",
+      "labels": [
+        "Chunk"
+      ],
+      "properties": [
+        {
+          "indexed": false,
+          "unique": true,
+          "name": "id",
+          "description": "Chunk ID: document ID and chunk index",
+          "type": "String",
+          "mandatory": true,
+          "primary": true
+        },
+        {
+          "indexed": false,
+          "unique": false,
+          "name": "chunk_index",
+          "description": "Position in the document",
+          "type": "Integer",
+          "mandatory": false,
+          "primary": false
+        },
+        {
+          "indexed": false,
+          "unique": false,
+          "name": "text",
+          "description": "The text of the chunk",
+          "type": "String",
+          "mandatory": false,
+          "primary": false
+        },
+        {
+          "indexed": false,
+          "unique": false,
+          "name": "embedding",
+          "description": "The embedding of the text",
+          "type": "Vector",
+          "mandatory": false,
+          "primary": false
+        }
+      ]
+    },
+    {
+      "presentation": {
+        "x": 520,
+        "y": 200
+      },
+      "name": "Entity",
+      "description": "An entity the Extract graph transform read from a text. Its type is a property.",
+      "properties": [
+        {
+          "indexed": false,
+          "unique": true,
+          "name": "key",
+          "description": "The name in lowercase without spaces or punctuation: spellings of one entity share it",
+          "type": "String",
+          "mandatory": true,
+          "primary": true
+        },
+        {
+          "indexed": false,
+          "unique": false,
+          "name": "name",
+          "description": "The name of the entity, as a text names it",
+          "type": "String",
+          "mandatory": false,
+          "primary": false
+        },
+        {
+          "indexed": false,
+          "unique": false,
+          "name": "type",
+          "description": "The entity type, for example Person",
+          "type": "String",
+          "mandatory": false,
+          "primary": false
+        },
+        {
+          "indexed": false,
+          "unique": false,
+          "name": "description",
+          "description": "One sentence about the entity",
+          "type": "String",
+          "mandatory": false,
+          "primary": false
+        }
+      ],
+      "labels": [
+        "Entity"
+      ]
+    }
+  ],
+  "relationships": [
+    {
+      "nodeSource": "Document",
+      "name": "HAS_CHUNK",
+      "description": "A document consists of chunks",
+      "nodeTarget": "Chunk",
+      "label": "HAS_CHUNK",
+      "properties": []
+    },
+    {
+      "nodeSource": "Chunk",
+      "name": "MENTIONS",
+      "description": "A chunk mentions an entity",
+      "nodeTarget": "Entity",
+      "label": "MENTIONS",
+      "properties": []
+    },
+    {
+      "nodeSource": "Entity",
+      "name": "RELATED_TO",
+      "description": "A relationship the Extract graph transform read between two entities: one per type and source chunk. The GraphRAG samples write it with Graph query, so the type and chunk_id identify it.",
+      "nodeTarget": "Entity",
+      "label": "RELATED_TO",
+      "properties": [
+        {
+          "indexed": false,
+          "unique": false,
+          "name": "type",
+          "description": "The relationship type, for example WORKED_WITH",
+          "type": "String",
+          "mandatory": false,
+          "primary": false
+        },
+        {
+          "indexed": false,
+          "unique": false,
+          "name": "description",
+          "description": "One sentence about the relationship",
+          "type": "String",
+          "mandatory": false,
+          "primary": false
+        },
+        {
+          "indexed": false,
+          "unique": false,
+          "name": "chunk_id",
+          "description": "The chunk the relationship was read from",
+          "type": "String",
+          "mandatory": false,
+          "primary": false
+        }
+      ]
+    }
+  ]
+}
diff --git a/integration-tests/memgraph/metadata/unit-test/graphrag-graph-validation UNIT.json b/integration-tests/memgraph/metadata/unit-test/graphrag-graph-validation UNIT.json
new file mode 100644
index 0000000000..43a00078b9
--- /dev/null
+++ b/integration-tests/memgraph/metadata/unit-test/graphrag-graph-validation UNIT.json	
@@ -0,0 +1,32 @@
+{
+  "variableValues": [],
+  "database_replacements": [],
+  "autoOpening": true,
+  "basePath": "",
+  "golden_data_sets": [
+    {
+      "field_mappings": [
+        {
+          "transform_field": "check",
+          "data_set_field": "check"
+        },
+        {
+          "transform_field": "n",
+          "data_set_field": "n"
+        }
+      ],
+      "field_order": [
+        "check"
+      ],
+      "transform_name": "Validation",
+      "data_set_name": "graphrag-graph-validation-golden"
+    }
+  ],
+  "input_data_sets": [],
+  "name": "graphrag-graph-validation UNIT",
+  "description": "",
+  "trans_test_tweaks": [],
+  "persist_filename": "",
+  "pipeline_filename": "./tests/graphrag/graphrag-graph-validation.hpl",
+  "test_type": "UNIT_TEST"
+}
diff --git a/integration-tests/memgraph/metadata/unit-test/graphrag-retrieve-validation UNIT.json b/integration-tests/memgraph/metadata/unit-test/graphrag-retrieve-validation UNIT.json
new file mode 100644
index 0000000000..2d15688576
--- /dev/null
+++ b/integration-tests/memgraph/metadata/unit-test/graphrag-retrieve-validation UNIT.json	
@@ -0,0 +1,40 @@
+{
+  "variableValues": [],
+  "database_replacements": [],
+  "autoOpening": true,
+  "basePath": "",
+  "golden_data_sets": [
+    {
+      "field_mappings": [
+        {
+          "transform_field": "query_id",
+          "data_set_field": "query_id"
+        },
+        {
+          "transform_field": "rank",
+          "data_set_field": "rank"
+        },
+        {
+          "transform_field": "chunk_id",
+          "data_set_field": "chunk_id"
+        },
+        {
+          "transform_field": "facts",
+          "data_set_field": "facts"
+        }
+      ],
+      "field_order": [
+        "rank"
+      ],
+      "transform_name": "Validation",
+      "data_set_name": "graphrag-retrieve-validation-golden"
+    }
+  ],
+  "input_data_sets": [],
+  "name": "graphrag-retrieve-validation UNIT",
+  "description": "",
+  "trans_test_tweaks": [],
+  "persist_filename": "",
+  "pipeline_filename": "./tests/graphrag/graphrag-retrieve-validation.hpl",
+  "test_type": "UNIT_TEST"
+}
diff --git a/integration-tests/memgraph/tests/graphrag/graphrag-build.hpl b/integration-tests/memgraph/tests/graphrag/graphrag-build.hpl
new file mode 100644
index 0000000000..20c8d6456d
--- /dev/null
+++ b/integration-tests/memgraph/tests/graphrag/graphrag-build.hpl
@@ -0,0 +1,688 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+Licensed to the Apache Software Foundation (ASF) under one or more
+contributor license agreements.  See the NOTICE file distributed with
+this work for additional information regarding copyright ownership.
+The ASF licenses this file to You under the Apache License, Version 2.0
+(the "License"); you may not use this file except in compliance with
+the License.  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+
+-->
+<pipeline>
+  <info>
+    <name>graphrag-build</name>
+    <name_sync_with_filename>Y</name_sync_with_filename>
+    <description>Writes fixed chunks and extraction rows the way the GraphRAG samples do</description>
+    <extended_description/>
+    <pipeline_version/>
+    <pipeline_type>Normal</pipeline_type>
+    <parameters>
+    </parameters>
+    <capture_transform_performance>N</capture_transform_performance>
+    <transform_performance_capturing_delay>1000</transform_performance_capturing_delay>
+    <transform_performance_capturing_size_limit>100</transform_performance_capturing_size_limit>
+    <created_user>-</created_user>
+    <created_date>2026/10/10 12:00:00.000</created_date>
+    <modified_user>-</modified_user>
+    <modified_date>2026/10/10 12:00:00.000</modified_date>
+  </info>
+  <notepads>
+  </notepads>
+  <order>
+    <hop>
+      <from>chunks</from>
+      <to>Write documents and chunks</to>
+      <enabled>Y</enabled>
+    </hop>
+    <hop>
+      <from>extracted graph</from>
+      <to>Hold the graph</to>
+      <enabled>Y</enabled>
+    </hop>
+    <hop>
+      <from>Hold the graph</from>
+      <to>Wait for the chunks</to>
+      <enabled>Y</enabled>
+    </hop>
+    <hop>
+      <from>Wait for the chunks</from>
+      <to>Entity keys</to>
+      <enabled>Y</enabled>
+    </hop>
+    <hop>
+      <from>Entity keys</from>
+      <to>Entity?</to>
+      <enabled>Y</enabled>
+    </hop>
+    <hop>
+      <from>Entity?</from>
+      <to>Write mentions</to>
+      <enabled>Y</enabled>
+    </hop>
+    <hop>
+      <from>Entity?</from>
+      <to>Collect relationships</to>
+      <enabled>Y</enabled>
+    </hop>
+    <hop>
+      <from>Collect relationships</from>
+      <to>Wait for the entities</to>
+      <enabled>Y</enabled>
+    </hop>
+    <hop>
+      <from>Wait for the entities</from>
+      <to>Write relationships</to>
+      <enabled>Y</enabled>
+    </hop>
+  </order>
+  <transform>
+    <name>chunks</name>
+    <type>DataGrid</type>
+    <description>Three chunks with 3-dimensional embeddings</description>
+    <distribute>Y</distribute>
+    <custom_distribution/>
+    <copies>1</copies>
+    <partitioning>
+      <method>none</method>
+      <schema_name/>
+    </partitioning>
+    <fields>
+      <field>
+        <set_empty_string>N</set_empty_string>
+        <length>-1</length>
+        <name>document_id</name>
+        <precision>-1</precision>
+        <type>String</type>
+      </field>
+      <field>
+        <set_empty_string>N</set_empty_string>
+        <length>-1</length>
+        <name>title</name>
+        <precision>-1</precision>
+        <type>String</type>
+      </field>
+      <field>
+        <set_empty_string>N</set_empty_string>
+        <length>-1</length>
+        <name>chunk_id</name>
+        <precision>-1</precision>
+        <type>String</type>
+      </field>
+      <field>
+        <set_empty_string>N</set_empty_string>
+        <length>-1</length>
+        <name>chunk_index</name>
+        <precision>-1</precision>
+        <type>Integer</type>
+      </field>
+      <field>
+        <set_empty_string>N</set_empty_string>
+        <length>-1</length>
+        <name>chunk_text</name>
+        <precision>-1</precision>
+        <type>String</type>
+      </field>
+      <field>
+        <set_empty_string>N</set_empty_string>
+        <length>-1</length>
+        <name>embedding</name>
+        <precision>-1</precision>
+        <type>Vector</type>
+      </field>
+    </fields>
+    <data>
+      <line>
+        <item>d1</item>
+        <item>Analytical Engine</item>
+        <item>d1#0</item>
+        <item>0</item>
+        <item>Ada Lovelace worked with Charles Babbage.</item>
+        <item>[1,0,0]</item>
+      </line>
+      <line>
+        <item>d1</item>
+        <item>Analytical Engine</item>
+        <item>d1#1</item>
+        <item>1</item>
+        <item>Babbage designed the Analytical Engine.</item>
+        <item>[0.6,0,0.8]</item>
+      </line>
+      <line>
+        <item>d2</item>
+        <item>Weather</item>
+        <item>d2#0</item>
+        <item>0</item>
+        <item>The weather in London is fine today.</item>
+        <item>[0,0,1]</item>
+      </line>
+    </data>
+    <attributes/>
+    <GUI>
+      <xloc>96</xloc>
+      <yloc>96</yloc>
+    </GUI>
+  </transform>
+  <transform>
+    <name>Write documents and chunks</name>
+    <type>Neo4jGraphOutput</type>
+    <description/>
+    <distribute>Y</distribute>
+    <custom_distribution/>
+    <copies>1</copies>
+    <partitioning>
+      <method>none</method>
+      <schema_name/>
+    </partitioning>
+    <connection>Test</connection>
+    <model>graphrag</model>
+    <batch_size>100</batch_size>
+    <create_indexes>N</create_indexes>
+    <returning_graph>N</returning_graph>
+    <return_graph_field/>
+    <validate_against_model>N</validate_against_model>
+    <out_of_order_allowed>Y</out_of_order_allowed>
+    <mappings>
+      <mapping>
+        <source_field>document_id</source_field>
+        <target_type>Node</target_type>
+        <target_name>Document</target_name>
+        <target_property>id</target_property>
+        <target_hint>None</target_hint>
+      </mapping>
+      <mapping>
+        <source_field>title</source_field>
+        <target_type>Node</target_type>
+        <target_name>Document</target_name>
+        <target_property>title</target_property>
+        <target_hint>None</target_hint>
+      </mapping>
+      <mapping>
+        <source_field>chunk_id</source_field>
+        <target_type>Node</target_type>
+        <target_name>Chunk</target_name>
+        <target_property>id</target_property>
+        <target_hint>None</target_hint>
+      </mapping>
+      <mapping>
+        <source_field>chunk_index</source_field>
+        <target_type>Node</target_type>
+        <target_name>Chunk</target_name>
+        <target_property>chunk_index</target_property>
+        <target_hint>None</target_hint>
+      </mapping>
+      <mapping>
+        <source_field>chunk_text</source_field>
+        <target_type>Node</target_type>
+        <target_name>Chunk</target_name>
+        <target_property>text</target_property>
+        <target_hint>None</target_hint>
+      </mapping>
+      <mapping>
+        <source_field>embedding</source_field>
+        <target_type>Node</target_type>
+        <target_name>Chunk</target_name>
+        <target_property>embedding</target_property>
+        <target_hint>None</target_hint>
+      </mapping>
+    </mappings>
+    <relationship_mappings>
+    </relationship_mappings>
+    <node_mappings>
+    </node_mappings>
+    <attributes/>
+    <GUI>
+      <xloc>320</xloc>
+      <yloc>96</yloc>
+    </GUI>
+  </transform>
+  <transform>
+    <name>extracted graph</name>
+    <type>DataGrid</type>
+    <description>What Extract graph returns for the chunks. 'charles-babbage' merges with 'Charles Babbage'.</description>
+    <distribute>Y</distribute>
+    <custom_distribution/>
+    <copies>1</copies>
+    <partitioning>
+      <method>none</method>
+      <schema_name/>
+    </partitioning>
+    <fields>
+      <field>
+        <set_empty_string>N</set_empty_string>
+        <length>-1</length>
+        <name>chunk_id</name>
+        <precision>-1</precision>
+        <type>String</type>
+      </field>
+      <field>
+        <set_empty_string>N</set_empty_string>
+        <length>-1</length>
+        <name>graph_element</name>
+        <precision>-1</precision>
+        <type>String</type>
+      </field>
+      <field>
+        <set_empty_string>N</set_empty_string>
+        <length>-1</length>
+        <name>name</name>
+        <precision>-1</precision>
+        <type>String</type>
+      </field>
+      <field>
+        <set_empty_string>N</set_empty_string>
+        <length>-1</length>
+        <name>type</name>
+        <precision>-1</precision>
+        <type>String</type>
+      </field>
+      <field>
+        <set_empty_string>N</set_empty_string>
+        <length>-1</length>
+        <name>description</name>
+        <precision>-1</precision>
+        <type>String</type>
+      </field>
+      <field>
+        <set_empty_string>N</set_empty_string>
+        <length>-1</length>
+        <name>source</name>
+        <precision>-1</precision>
+        <type>String</type>
+      </field>
+      <field>
+        <set_empty_string>N</set_empty_string>
+        <length>-1</length>
+        <name>target</name>
+        <precision>-1</precision>
+        <type>String</type>
+      </field>
+    </fields>
+    <data>
+      <line>
+        <item>d1#0</item>
+        <item>ENTITY</item>
+        <item>Ada Lovelace</item>
+        <item>Person</item>
+        <item>Mathematician</item>
+        <item/>
+        <item/>
+      </line>
+      <line>
+        <item>d1#0</item>
+        <item>ENTITY</item>
+        <item>Charles Babbage</item>
+        <item>Person</item>
+        <item>Inventor</item>
+        <item/>
+        <item/>
+      </line>
+      <line>
+        <item>d1#0</item>
+        <item>RELATIONSHIP</item>
+        <item/>
+        <item>WORKED_WITH</item>
+        <item>Ada worked with Babbage</item>
+        <item>Ada Lovelace</item>
+        <item>Charles Babbage</item>
+      </line>
+      <line>
+        <item>d1#1</item>
+        <item>ENTITY</item>
+        <item>Charles Babbage</item>
+        <item>Person</item>
+        <item>Inventor</item>
+        <item/>
+        <item/>
+      </line>
+      <line>
+        <item>d1#1</item>
+        <item>ENTITY</item>
+        <item>Analytical Engine</item>
+        <item>Product</item>
+        <item>A mechanical computer</item>
+        <item/>
+        <item/>
+      </line>
+      <line>
+        <item>d1#1</item>
+        <item>RELATIONSHIP</item>
+        <item/>
+        <item>CREATED</item>
+        <item>Babbage designed it</item>
+        <item>charles-babbage</item>
+        <item>Analytical Engine</item>
+      </line>
+    </data>
+    <attributes/>
+    <GUI>
+      <xloc>96</xloc>
+      <yloc>240</yloc>
+    </GUI>
+  </transform>
+  <transform>
+    <name>Hold the graph</name>
+    <type>BlockingTransform</type>
+    <description/>
+    <distribute>Y</distribute>
+    <custom_distribution/>
+    <copies>1</copies>
+    <partitioning>
+      <method>none</method>
+      <schema_name/>
+    </partitioning>
+    <cache_size>5000</cache_size>
+    <compress>Y</compress>
+    <directory>${java.io.tmpdir}</directory>
+    <pass_all_rows>Y</pass_all_rows>
+    <prefix>graphrag</prefix>
+    <attributes/>
+    <GUI>
+      <xloc>288</xloc>
+      <yloc>240</yloc>
+    </GUI>
+  </transform>
+  <transform>
+    <name>Wait for the chunks</name>
+    <type>BlockUntilTransformsFinish</type>
+    <description/>
+    <distribute>Y</distribute>
+    <custom_distribution/>
+    <copies>1</copies>
+    <partitioning>
+      <method>none</method>
+      <schema_name/>
+    </partitioning>
+    <transforms>
+      <transform>
+        <name>Write documents and chunks</name>
+        <CopyNr>0</CopyNr>
+      </transform>
+    </transforms>
+    <attributes/>
+    <GUI>
+      <xloc>480</xloc>
+      <yloc>240</yloc>
+    </GUI>
+  </transform>
+  <transform>
+    <name>Entity keys</name>
+    <type>ScriptValueMod</type>
+    <description>Lowercase without spaces or punctuation, so 'Hop Run' and 'hop-run' are one entity</description>
+    <distribute>Y</distribute>
+    <custom_distribution/>
+    <copies>1</copies>
+    <partitioning>
+      <method>none</method>
+      <schema_name/>
+    </partitioning>
+    <optimizationLevel>9</optimizationLevel>
+    <jsScripts>
+      <jsScript>
+        <jsScript_type>0</jsScript_type>
+        <jsScript_name>Script 1</jsScript_name>
+        <jsScript_script>function entityKey(name) {
+  if (name == null) {
+    return null;
+  }
+  return ("" + name).toLowerCase().replace(/[^a-z0-9+#]/g, "");
+}
+var key = entityKey(name);
+var source_key = entityKey(source);
+var target_key = entityKey(target);</jsScript_script>
+      </jsScript>
+    </jsScripts>
+    <fields>
+      <field>
+        <name>key</name>
+        <rename>key</rename>
+        <type>String</type>
+        <length>-1</length>
+        <precision>-1</precision>
+        <replace>N</replace>
+      </field>
+      <field>
+        <name>source_key</name>
+        <rename>source_key</rename>
+        <type>String</type>
+        <length>-1</length>
+        <precision>-1</precision>
+        <replace>N</replace>
+      </field>
+      <field>
+        <name>target_key</name>
+        <rename>target_key</rename>
+        <type>String</type>
+        <length>-1</length>
+        <precision>-1</precision>
+        <replace>N</replace>
+      </field>
+    </fields>
+    <attributes/>
+    <GUI>
+      <xloc>672</xloc>
+      <yloc>240</yloc>
+    </GUI>
+  </transform>
+  <transform>
+    <name>Entity?</name>
+    <type>FilterRows</type>
+    <description/>
+    <distribute>Y</distribute>
+    <custom_distribution/>
+    <copies>1</copies>
+    <partitioning>
+      <method>none</method>
+      <schema_name/>
+    </partitioning>
+    <compare>
+      <condition>
+        <conditions>
+        </conditions>
+        <function>=</function>
+        <leftvalue>graph_element</leftvalue>
+        <negated>N</negated>
+        <operator>-</operator>
+        <value>
+          <isnull>N</isnull>
+          <length>-1</length>
+          <mask/>
+          <name>constant</name>
+          <precision>-1</precision>
+          <text>ENTITY</text>
+          <type>String</type>
+        </value>
+      </condition>
+    </compare>
+    <send_false_to>Collect relationships</send_false_to>
+    <send_true_to>Write mentions</send_true_to>
+    <attributes/>
+    <GUI>
+      <xloc>832</xloc>
+      <yloc>240</yloc>
+    </GUI>
+  </transform>
+  <transform>
+    <name>Write mentions</name>
+    <type>Neo4jGraphOutput</type>
+    <description>MERGE an Entity per key and the chunk's MENTIONS relationship to it</description>
+    <distribute>Y</distribute>
+    <custom_distribution/>
+    <copies>1</copies>
+    <partitioning>
+      <method>none</method>
+      <schema_name/>
+    </partitioning>
+    <connection>Test</connection>
+    <model>graphrag</model>
+    <batch_size>100</batch_size>
+    <create_indexes>N</create_indexes>
+    <returning_graph>N</returning_graph>
+    <return_graph_field/>
+    <validate_against_model>N</validate_against_model>
+    <out_of_order_allowed>Y</out_of_order_allowed>
+    <mappings>
+      <mapping>
+        <source_field>chunk_id</source_field>
+        <target_type>Node</target_type>
+        <target_name>Chunk</target_name>
+        <target_property>id</target_property>
+        <target_hint>None</target_hint>
+      </mapping>
+      <mapping>
+        <source_field>key</source_field>
+        <target_type>Node</target_type>
+        <target_name>Entity</target_name>
+        <target_property>key</target_property>
+        <target_hint>None</target_hint>
+      </mapping>
+      <mapping>
+        <source_field>name</source_field>
+        <target_type>Node</target_type>
+        <target_name>Entity</target_name>
+        <target_property>name</target_property>
+        <target_hint>None</target_hint>
+      </mapping>
+      <mapping>
+        <source_field>type</source_field>
+        <target_type>Node</target_type>
+        <target_name>Entity</target_name>
+        <target_property>type</target_property>
+        <target_hint>None</target_hint>
+      </mapping>
+      <mapping>
+        <source_field>description</source_field>
+        <target_type>Node</target_type>
+        <target_name>Entity</target_name>
+        <target_property>description</target_property>
+        <target_hint>None</target_hint>
+      </mapping>
+    </mappings>
+    <relationship_mappings>
+    </relationship_mappings>
+    <node_mappings>
+    </node_mappings>
+    <attributes/>
+    <GUI>
+      <xloc>1024</xloc>
+      <yloc>240</yloc>
+    </GUI>
+  </transform>
+  <transform>
+    <name>Collect relationships</name>
+    <type>BlockingTransform</type>
+    <description>Reads all relationship rows first</description>
+    <distribute>Y</distribute>
+    <custom_distribution/>
+    <copies>1</copies>
+    <partitioning>
+      <method>none</method>
+      <schema_name/>
+    </partitioning>
+    <cache_size>5000</cache_size>
+    <compress>Y</compress>
+    <directory>${java.io.tmpdir}</directory>
+    <pass_all_rows>Y</pass_all_rows>
+    <prefix>graphrag</prefix>
+    <attributes/>
+    <GUI>
+      <xloc>832</xloc>
+      <yloc>384</yloc>
+    </GUI>
+  </transform>
+  <transform>
+    <name>Wait for the entities</name>
+    <type>BlockUntilTransformsFinish</type>
+    <description>Relationships are written once every entity is</description>
+    <distribute>Y</distribute>
+    <custom_distribution/>
+    <copies>1</copies>
+    <partitioning>
+      <method>none</method>
+      <schema_name/>
+    </partitioning>
+    <transforms>
+      <transform>
+        <name>Write mentions</name>
+        <CopyNr>0</CopyNr>
+      </transform>
+    </transforms>
+    <attributes/>
+    <GUI>
+      <xloc>1024</xloc>
+      <yloc>384</yloc>
+    </GUI>
+  </transform>
+  <transform>
+    <name>Write relationships</name>
+    <type>Neo4jCypherOutput</type>
+    <description>One RELATED_TO per type and source chunk. Graph output merges a relationship on its two nodes only, so a second type between the same entities would overwrite the first.</description>
+    <distribute>Y</distribute>
+    <custom_distribution/>
+    <copies>1</copies>
+    <partitioning>
+      <method>none</method>
+      <schema_name/>
+    </partitioning>
+    <connection>Test</connection>
+    <cypher>MATCH (s:Entity {key: $source_key}), (t:Entity {key: $target_key})
+MERGE (s)-[r:RELATED_TO {type: $type, chunk_id: $chunk_id}]-&gt;(t)
+SET r.description = $description</cypher>
+    <batch_size>1</batch_size>
+    <read_only>N</read_only>
+    <nr_retries_on_error/>
+    <retry>N</retry>
+    <cypher_from_field>N</cypher_from_field>
+    <cypher_field/>
+    <unwind>N</unwind>
+    <unwind_map/>
+    <returning_graph>N</returning_graph>
+    <return_graph_field/>
+    <mappings>
+      <mapping>
+        <parameter>source_key</parameter>
+        <field>source_key</field>
+        <type>String</type>
+      </mapping>
+      <mapping>
+        <parameter>target_key</parameter>
+        <field>target_key</field>
+        <type>String</type>
+      </mapping>
+      <mapping>
+        <parameter>type</parameter>
+        <field>type</field>
+        <type>String</type>
+      </mapping>
+      <mapping>
+        <parameter>chunk_id</parameter>
+        <field>chunk_id</field>
+        <type>String</type>
+      </mapping>
+      <mapping>
+        <parameter>description</parameter>
+        <field>description</field>
+        <type>String</type>
+      </mapping>
+    </mappings>
+    <returns>
+
+    </returns>
+    <attributes/>
+    <GUI>
+      <xloc>1216</xloc>
+      <yloc>384</yloc>
+    </GUI>
+  </transform>
+  <transform_error_handling>
+  </transform_error_handling>
+  <attributes/>
+</pipeline>
diff --git a/integration-tests/memgraph/tests/graphrag/graphrag-graph-validation.hpl b/integration-tests/memgraph/tests/graphrag/graphrag-graph-validation.hpl
new file mode 100644
index 0000000000..a859fb8027
--- /dev/null
+++ b/integration-tests/memgraph/tests/graphrag/graphrag-graph-validation.hpl
@@ -0,0 +1,185 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+Licensed to the Apache Software Foundation (ASF) under one or more
+contributor license agreements.  See the NOTICE file distributed with
+this work for additional information regarding copyright ownership.
+The ASF licenses this file to You under the Apache License, Version 2.0
+(the "License"); you may not use this file except in compliance with
+the License.  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+
+-->
+<pipeline>
+  <info>
+    <name>graphrag-graph-validation</name>
+    <name_sync_with_filename>Y</name_sync_with_filename>
+    <description>Counts the nodes and relationships graphrag-build wrote</description>
+    <extended_description/>
+    <pipeline_version/>
+    <pipeline_type>Normal</pipeline_type>
+    <parameters>
+    </parameters>
+    <capture_transform_performance>N</capture_transform_performance>
+    <transform_performance_capturing_delay>1000</transform_performance_capturing_delay>
+    <transform_performance_capturing_size_limit>100</transform_performance_capturing_size_limit>
+    <created_user>-</created_user>
+    <created_date>2026/10/10 12:00:00.000</created_date>
+    <modified_user>-</modified_user>
+    <modified_date>2026/10/10 12:00:00.000</modified_date>
+  </info>
+  <notepads>
+  </notepads>
+  <order>
+    <hop>
+      <from>counts to check</from>
+      <to>count</to>
+      <enabled>Y</enabled>
+    </hop>
+    <hop>
+      <from>count</from>
+      <to>Validation</to>
+      <enabled>Y</enabled>
+    </hop>
+  </order>
+  <transform>
+    <name>counts to check</name>
+    <type>DataGrid</type>
+    <description/>
+    <distribute>Y</distribute>
+    <custom_distribution/>
+    <copies>1</copies>
+    <partitioning>
+      <method>none</method>
+      <schema_name/>
+    </partitioning>
+    <fields>
+      <field>
+        <set_empty_string>N</set_empty_string>
+        <length>-1</length>
+        <name>check</name>
+        <precision>-1</precision>
+        <type>String</type>
+      </field>
+      <field>
+        <set_empty_string>N</set_empty_string>
+        <length>-1</length>
+        <name>query</name>
+        <precision>-1</precision>
+        <type>String</type>
+      </field>
+    </fields>
+    <data>
+      <line>
+        <item>1 documents</item>
+        <item>MATCH (n:Document) RETURN count(n) AS n</item>
+      </line>
+      <line>
+        <item>2 chunks</item>
+        <item>MATCH (n:Chunk) RETURN count(n) AS n</item>
+      </line>
+      <line>
+        <item>3 entities</item>
+        <item>MATCH (n:Entity) RETURN count(n) AS n</item>
+      </line>
+      <line>
+        <item>4 has_chunk</item>
+        <item>MATCH (:Document)-[r:HAS_CHUNK]-&gt;(:Chunk) RETURN count(r) AS n</item>
+      </line>
+      <line>
+        <item>5 mentions</item>
+        <item>MATCH (:Chunk)-[r:MENTIONS]-&gt;(:Entity) RETURN count(r) AS n</item>
+      </line>
+      <line>
+        <item>6 related_to</item>
+        <item>MATCH (:Entity)-[r:RELATED_TO]-&gt;(:Entity) RETURN count(r) AS n</item>
+      </line>
+      <line>
+        <item>7 related_to from a chunk</item>
+        <item>MATCH (:Entity)-[r:RELATED_TO]-&gt;(:Entity) WHERE r.chunk_id IS NOT NULL RETURN count(r) AS n</item>
+      </line>
+    </data>
+    <attributes/>
+    <GUI>
+      <xloc>96</xloc>
+      <yloc>96</yloc>
+    </GUI>
+  </transform>
+  <transform>
+    <name>count</name>
+    <type>Neo4jCypherOutput</type>
+    <description>Runs the query of each row</description>
+    <distribute>Y</distribute>
+    <custom_distribution/>
+    <copies>1</copies>
+    <partitioning>
+      <method>none</method>
+      <schema_name/>
+    </partitioning>
+    <connection>Test</connection>
+    <cypher></cypher>
+    <batch_size>1</batch_size>
+    <read_only>Y</read_only>
+    <nr_retries_on_error/>
+    <retry>N</retry>
+    <cypher_from_field>Y</cypher_from_field>
+    <cypher_field>query</cypher_field>
+    <unwind>N</unwind>
+    <unwind_map/>
+    <returning_graph>N</returning_graph>
+    <return_graph_field/>
+    <mappings>
+
+    </mappings>
+    <returns>
+      <return>
+        <name>n</name>
+        <type>Integer</type>
+        <source_type>Integer</source_type>
+      </return>
+    </returns>
+    <attributes/>
+    <GUI>
+      <xloc>288</xloc>
+      <yloc>96</yloc>
+    </GUI>
+  </transform>
+  <transform>
+    <name>Validation</name>
+    <type>SelectValues</type>
+    <description/>
+    <distribute>Y</distribute>
+    <custom_distribution/>
+    <copies>1</copies>
+    <partitioning>
+      <method>none</method>
+      <schema_name/>
+    </partitioning>
+    <fields>
+      <field>
+        <name>check</name>
+        <rename/>
+      </field>
+      <field>
+        <name>n</name>
+        <rename/>
+      </field>
+      <select_unspecified>N</select_unspecified>
+    </fields>
+    <attributes/>
+    <GUI>
+      <xloc>480</xloc>
+      <yloc>96</yloc>
+    </GUI>
+  </transform>
+  <transform_error_handling>
+  </transform_error_handling>
+  <attributes/>
+</pipeline>
diff --git a/integration-tests/memgraph/tests/graphrag/graphrag-retrieve-validation.hpl b/integration-tests/memgraph/tests/graphrag/graphrag-retrieve-validation.hpl
new file mode 100644
index 0000000000..3a0781c8bc
--- /dev/null
+++ b/integration-tests/memgraph/tests/graphrag/graphrag-retrieve-validation.hpl
@@ -0,0 +1,363 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+Licensed to the Apache Software Foundation (ASF) under one or more
+contributor license agreements.  See the NOTICE file distributed with
+this work for additional information regarding copyright ownership.
+The ASF licenses this file to You under the Apache License, Version 2.0
+(the "License"); you may not use this file except in compliance with
+the License.  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+
+-->
+<pipeline>
+  <info>
+    <name>graphrag-retrieve-validation</name>
+    <name_sync_with_filename>Y</name_sync_with_filename>
+    <description>Vector search on the chunks, then the facts of each chunk</description>
+    <extended_description/>
+    <pipeline_version/>
+    <pipeline_type>Normal</pipeline_type>
+    <parameters>
+    </parameters>
+    <capture_transform_performance>N</capture_transform_performance>
+    <transform_performance_capturing_delay>1000</transform_performance_capturing_delay>
+    <transform_performance_capturing_size_limit>100</transform_performance_capturing_size_limit>
+    <created_user>-</created_user>
+    <created_date>2026/10/10 12:00:00.000</created_date>
+    <modified_user>-</modified_user>
+    <modified_date>2026/10/10 12:00:00.000</modified_date>
+  </info>
+  <notepads>
+  </notepads>
+  <order>
+    <hop>
+      <from>query vectors</from>
+      <to>Graph vector search</to>
+      <enabled>Y</enabled>
+    </hop>
+    <hop>
+      <from>Graph vector search</from>
+      <to>rank</to>
+      <enabled>Y</enabled>
+    </hop>
+    <hop>
+      <from>rank</from>
+      <to>Facts of the chunk</to>
+      <enabled>Y</enabled>
+    </hop>
+    <hop>
+      <from>Facts of the chunk</from>
+      <to>Fact</to>
+      <enabled>Y</enabled>
+    </hop>
+    <hop>
+      <from>Fact</from>
+      <to>One row per chunk</to>
+      <enabled>Y</enabled>
+    </hop>
+    <hop>
+      <from>One row per chunk</from>
+      <to>Validation</to>
+      <enabled>Y</enabled>
+    </hop>
+  </order>
+  <transform>
+    <name>query vectors</name>
+    <type>DataGrid</type>
+    <description>Close to one chunk each</description>
+    <distribute>Y</distribute>
+    <custom_distribution/>
+    <copies>1</copies>
+    <partitioning>
+      <method>none</method>
+      <schema_name/>
+    </partitioning>
+    <fields>
+      <field>
+        <set_empty_string>N</set_empty_string>
+        <length>-1</length>
+        <name>query_id</name>
+        <precision>-1</precision>
+        <type>String</type>
+      </field>
+      <field>
+        <set_empty_string>N</set_empty_string>
+        <length>-1</length>
+        <name>q</name>
+        <precision>-1</precision>
+        <type>Vector</type>
+      </field>
+    </fields>
+    <data>
+      <line>
+        <item>q1</item>
+        <item>[1,0,0]</item>
+      </line>
+      <line>
+        <item>q2</item>
+        <item>[0,0,1]</item>
+      </line>
+    </data>
+    <attributes/>
+    <GUI>
+      <xloc>96</xloc>
+      <yloc>96</yloc>
+    </GUI>
+  </transform>
+  <transform>
+    <name>Graph vector search</name>
+    <type>GraphVectorSearch</type>
+    <description/>
+    <distribute>Y</distribute>
+    <custom_distribution/>
+    <copies>1</copies>
+    <partitioning>
+      <method>none</method>
+      <schema_name/>
+    </partitioning>
+    <connection>Test</connection>
+    <element_type>NODE</element_type>
+    <index_name>graphrag_it_chunks</index_name>
+    <label>Chunk</label>
+    <vector_property>embedding</vector_property>
+    <similarity>COSINE</similarity>
+    <embedding_field>q</embedding_field>
+    <top_k>2</top_k>
+    <min_score>0</min_score>
+    <eat_row_on_no_match>Y</eat_row_on_no_match>
+    <score_field>score</score_field>
+    <return_properties>
+      <return_property>
+        <property>id</property>
+        <field_name>chunk_id</field_name>
+        <type>String</type>
+      </return_property>
+    </return_properties>
+    <attributes/>
+    <GUI>
+      <xloc>288</xloc>
+      <yloc>96</yloc>
+    </GUI>
+  </transform>
+  <transform>
+    <name>rank</name>
+    <type>Sequence</type>
+    <description/>
+    <distribute>Y</distribute>
+    <custom_distribution/>
+    <copies>1</copies>
+    <partitioning>
+      <method>none</method>
+      <schema_name/>
+    </partitioning>
+    <valuename>rank</valuename>
+    <use_database>N</use_database>
+    <connection/>
+    <schema/>
+    <seqname>SEQ_</seqname>
+    <use_counter>Y</use_counter>
+    <counter_name/>
+    <start_at>1</start_at>
+    <increment_by>1</increment_by>
+    <max_value>999999999</max_value>
+    <attributes/>
+    <GUI>
+      <xloc>448</xloc>
+      <yloc>96</yloc>
+    </GUI>
+  </transform>
+  <transform>
+    <name>Facts of the chunk</name>
+    <type>Neo4jCypherOutput</type>
+    <description>The entities the chunk mentions and their relationships: one row per fact</description>
+    <distribute>Y</distribute>
+    <custom_distribution/>
+    <copies>1</copies>
+    <partitioning>
+      <method>none</method>
+      <schema_name/>
+    </partitioning>
+    <connection>Test</connection>
+    <cypher>MATCH (c:Chunk {id: $chunk_id})
+OPTIONAL MATCH (c)-[:MENTIONS]-&gt;(e:Entity)
+OPTIONAL MATCH (e)-[r:RELATED_TO]-&gt;(o:Entity)
+RETURN e.name AS entity, e.type AS entity_type, r.type AS relation, o.name AS related_entity</cypher>
+    <batch_size>1</batch_size>
+    <read_only>Y</read_only>
+    <nr_retries_on_error/>
+    <retry>N</retry>
+    <cypher_from_field>N</cypher_from_field>
+    <cypher_field/>
+    <unwind>N</unwind>
+    <unwind_map/>
+    <returning_graph>N</returning_graph>
+    <return_graph_field/>
+    <mappings>
+      <mapping>
+        <parameter>chunk_id</parameter>
+        <field>chunk_id</field>
+        <type>String</type>
+      </mapping>
+    </mappings>
+    <returns>
+      <return>
+        <name>entity</name>
+        <type>String</type>
+        <source_type>String</source_type>
+      </return>
+      <return>
+        <name>entity_type</name>
+        <type>String</type>
+        <source_type>String</source_type>
+      </return>
+      <return>
+        <name>relation</name>
+        <type>String</type>
+        <source_type>String</source_type>
+      </return>
+      <return>
+        <name>related_entity</name>
+        <type>String</type>
+        <source_type>String</source_type>
+      </return>
+    </returns>
+    <attributes/>
+    <GUI>
+      <xloc>608</xloc>
+      <yloc>96</yloc>
+    </GUI>
+  </transform>
+  <transform>
+    <name>Fact</name>
+    <type>ScriptValueMod</type>
+    <description>Entity (type) -RELATION-&gt; other entity</description>
+    <distribute>Y</distribute>
+    <custom_distribution/>
+    <copies>1</copies>
+    <partitioning>
+      <method>none</method>
+      <schema_name/>
+    </partitioning>
+    <optimizationLevel>9</optimizationLevel>
+    <jsScripts>
+      <jsScript>
+        <jsScript_type>0</jsScript_type>
+        <jsScript_name>Script 1</jsScript_name>
+        <jsScript_script>var fact = null;
+if (entity != null) {
+  fact = entity;
+  if (entity_type != null) {
+    fact = fact + " (" + entity_type + ")";
+  }
+  if (relation != null) {
+    fact = fact + " -" + relation + "-&gt; " + related_entity;
+  }
+}</jsScript_script>
+      </jsScript>
+    </jsScripts>
+    <fields>
+      <field>
+        <name>fact</name>
+        <rename>fact</rename>
+        <type>String</type>
+        <length>-1</length>
+        <precision>-1</precision>
+        <replace>N</replace>
+      </field>
+    </fields>
+    <attributes/>
+    <GUI>
+      <xloc>768</xloc>
+      <yloc>96</yloc>
+    </GUI>
+  </transform>
+  <transform>
+    <name>One row per chunk</name>
+    <type>GroupBy</type>
+    <description>The rows of a chunk are consecutive</description>
+    <distribute>Y</distribute>
+    <custom_distribution/>
+    <copies>1</copies>
+    <partitioning>
+      <method>none</method>
+      <schema_name/>
+    </partitioning>
+    <directory>${java.io.tmpdir}</directory>
+    <prefix>graphrag</prefix>
+    <add_linenr>N</add_linenr>
+    <all_rows>N</all_rows>
+    <fields>
+      <field>
+        <aggregate>facts</aggregate>
+        <subject>fact</subject>
+        <type>CONCAT_DISTINCT</type>
+        <valuefield>; </valuefield>
+      </field>
+    </fields>
+    <give_back_row>N</give_back_row>
+    <group>
+      <field>
+        <name>query_id</name>
+      </field>
+      <field>
+        <name>rank</name>
+      </field>
+      <field>
+        <name>chunk_id</name>
+      </field>
+    </group>
+    <ignore_aggregate>N</ignore_aggregate>
+    <attributes/>
+    <GUI>
+      <xloc>928</xloc>
+      <yloc>96</yloc>
+    </GUI>
+  </transform>
+  <transform>
+    <name>Validation</name>
+    <type>SelectValues</type>
+    <description/>
+    <distribute>Y</distribute>
+    <custom_distribution/>
+    <copies>1</copies>
+    <partitioning>
+      <method>none</method>
+      <schema_name/>
+    </partitioning>
+    <fields>
+      <field>
+        <name>query_id</name>
+        <rename/>
+      </field>
+      <field>
+        <name>rank</name>
+        <rename/>
+      </field>
+      <field>
+        <name>chunk_id</name>
+        <rename/>
+      </field>
+      <field>
+        <name>facts</name>
+        <rename/>
+      </field>
+      <select_unspecified>N</select_unspecified>
+    </fields>
+    <attributes/>
+    <GUI>
+      <xloc>1120</xloc>
+      <yloc>96</yloc>
+    </GUI>
+  </transform>
+  <transform_error_handling>
+  </transform_error_handling>
+  <attributes/>
+</pipeline>
diff --git a/integration-tests/memgraph/tests/graphrag/main-graphrag.hwf b/integration-tests/memgraph/tests/graphrag/main-graphrag.hwf
new file mode 100644
index 0000000000..8a7ada2cfc
--- /dev/null
+++ b/integration-tests/memgraph/tests/graphrag/main-graphrag.hwf
@@ -0,0 +1,310 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+Licensed to the Apache Software Foundation (ASF) under one or more
+contributor license agreements.  See the NOTICE file distributed with
+this work for additional information regarding copyright ownership.
+The ASF licenses this file to You under the Apache License, Version 2.0
+(the "License"); you may not use this file except in compliance with
+the License.  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+
+-->
+<workflow>
+  <name>main-graphrag</name>
+  <name_sync_with_filename>Y</name_sync_with_filename>
+  <description>Graph vector search on the vector index of nodes</description>
+  <extended_description/>
+  <workflow_version/>
+  <created_user>-</created_user>
+  <created_date>2026/10/07 12:00:00.000</created_date>
+  <modified_user>-</modified_user>
+  <modified_date>2026/10/07 12:00:00.000</modified_date>
+  <parameters>
+    <parameter>
+      <name>TEST_FOLDER</name>
+      <default_value>graphrag</default_value>
+      <description/>
+    </parameter>
+  </parameters>
+  <actions>
+    <action>
+      <name>Start</name>
+      <description/>
+      <type>SPECIAL</type>
+      <attributes/>
+      <repeat>N</repeat>
+      <schedulerType>0</schedulerType>
+      <intervalSeconds>0</intervalSeconds>
+      <intervalMinutes>60</intervalMinutes>
+      <hour>12</hour>
+      <minutes>0</minutes>
+      <weekDay>1</weekDay>
+      <DayOfMonth>1</DayOfMonth>
+      <parallel>N</parallel>
+      <xloc>64</xloc>
+      <yloc>96</yloc>
+      <attributes_hac/>
+    </action>
+    <action>
+      <name>drop indexes before</name>
+      <description/>
+      <type>NEO4J_INDEX</type>
+      <attributes/>
+      <connection>Test</connection>
+      <updates>
+        <update>
+          <index_name>graphrag_it_chunks</index_name>
+          <object_name>Chunk</object_name>
+          <object_properties>embedding</object_properties>
+          <object_type>NODE</object_type>
+          <update_type>DROP</update_type>
+          <index_type>VECTOR</index_type>
+          <vector_dimensions>3</vector_dimensions>
+          <vector_similarity>COSINE</vector_similarity>
+        </update>
+      </updates>
+      <parallel>N</parallel>
+      <xloc>224</xloc>
+      <yloc>96</yloc>
+      <attributes_hac/>
+    </action>
+    <action>
+      <name>cleanup-database.hwf</name>
+      <description/>
+      <type>WORKFLOW</type>
+      <attributes/>
+      <run_configuration>local</run_configuration>
+      <filename>${PROJECT_HOME}/tests/shared/cleanup-database.hwf</filename>
+      <params_from_previous>N</params_from_previous>
+      <exec_per_row>N</exec_per_row>
+      <set_logfile>N</set_logfile>
+      <logfile/>
+      <logext/>
+      <add_date>N</add_date>
+      <add_time>N</add_time>
+      <loglevel>Nothing</loglevel>
+      <wait_until_finished>Y</wait_until_finished>
+      <create_parent_folder>N</create_parent_folder>
+      <parameters>
+        <pass_all_parameters>Y</pass_all_parameters>
+      </parameters>
+      <set_append_logfile>N</set_append_logfile>
+      <parallel>N</parallel>
+      <xloc>384</xloc>
+      <yloc>96</yloc>
+      <attributes_hac/>
+    </action>
+    <action>
+      <name>create indexes</name>
+      <description/>
+      <type>NEO4J_INDEX</type>
+      <attributes/>
+      <connection>Test</connection>
+      <updates>
+        <update>
+          <index_name>graphrag_it_chunks</index_name>
+          <object_name>Chunk</object_name>
+          <object_properties>embedding</object_properties>
+          <object_type>NODE</object_type>
+          <update_type>CREATE</update_type>
+          <index_type>VECTOR</index_type>
+          <vector_dimensions>3</vector_dimensions>
+          <vector_similarity>COSINE</vector_similarity>
+        </update>
+      </updates>
+      <parallel>N</parallel>
+      <xloc>544</xloc>
+      <yloc>96</yloc>
+      <attributes_hac/>
+    </action>
+    <action>
+      <name>graphrag-build.hpl</name>
+      <description/>
+      <type>PIPELINE</type>
+      <attributes/>
+      <filename>${PROJECT_HOME}/tests/graphrag/graphrag-build.hpl</filename>
+      <params_from_previous>N</params_from_previous>
+      <exec_per_row>N</exec_per_row>
+      <clear_rows>N</clear_rows>
+      <clear_files>N</clear_files>
+      <set_logfile>N</set_logfile>
+      <logfile/>
+      <logext/>
+      <add_date>N</add_date>
+      <add_time>N</add_time>
+      <loglevel>Basic</loglevel>
+      <set_append_logfile>N</set_append_logfile>
+      <wait_until_finished>Y</wait_until_finished>
+      <create_parent_folder>N</create_parent_folder>
+      <run_configuration>local</run_configuration>
+      <parameters>
+        <pass_all_parameters>Y</pass_all_parameters>
+      </parameters>
+      <parallel>N</parallel>
+      <xloc>704</xloc>
+      <yloc>96</yloc>
+      <attributes_hac/>
+    </action>
+    <action>
+      <name>Run graphrag tests</name>
+      <description/>
+      <type>RunPipelineTests</type>
+      <attributes/>
+      <test_names>
+        <test_name>
+          <name>graphrag-graph-validation UNIT</name>
+        </test_name>
+        <test_name>
+          <name>graphrag-retrieve-validation UNIT</name>
+        </test_name>
+      </test_names>
+      <parallel>N</parallel>
+      <xloc>864</xloc>
+      <yloc>96</yloc>
+      <attributes_hac/>
+    </action>
+    <action>
+      <name>drop indexes after test</name>
+      <description/>
+      <type>NEO4J_INDEX</type>
+      <attributes/>
+      <connection>Test</connection>
+      <updates>
+        <update>
+          <index_name>graphrag_it_chunks</index_name>
+          <object_name>Chunk</object_name>
+          <object_properties>embedding</object_properties>
+          <object_type>NODE</object_type>
+          <update_type>DROP</update_type>
+          <index_type>VECTOR</index_type>
+          <vector_dimensions>3</vector_dimensions>
+          <vector_similarity>COSINE</vector_similarity>
+        </update>
+      </updates>
+      <parallel>N</parallel>
+      <xloc>1024</xloc>
+      <yloc>96</yloc>
+      <attributes_hac/>
+    </action>
+    <action>
+      <name>drop indexes after failure</name>
+      <description/>
+      <type>NEO4J_INDEX</type>
+      <attributes/>
+      <connection>Test</connection>
+      <updates>
+        <update>
+          <index_name>graphrag_it_chunks</index_name>
+          <object_name>Chunk</object_name>
+          <object_properties>embedding</object_properties>
+          <object_type>NODE</object_type>
+          <update_type>DROP</update_type>
+          <index_type>VECTOR</index_type>
+          <vector_dimensions>3</vector_dimensions>
+          <vector_similarity>COSINE</vector_similarity>
+        </update>
+      </updates>
+      <parallel>N</parallel>
+      <xloc>1024</xloc>
+      <yloc>224</yloc>
+      <attributes_hac/>
+    </action>
+    <action>
+      <name>Success</name>
+      <description/>
+      <type>SUCCESS</type>
+      <attributes/>
+      <parallel>N</parallel>
+      <xloc>1184</xloc>
+      <yloc>96</yloc>
+      <attributes_hac/>
+    </action>
+    <action>
+      <name>Error out</name>
+      <description/>
+      <type>ABORT</type>
+      <attributes/>
+      <message>graphrag failed</message>
+      <parallel>N</parallel>
+      <xloc>1184</xloc>
+      <yloc>224</yloc>
+      <attributes_hac/>
+    </action>
+  </actions>
+  <hops>
+    <hop>
+      <from>Start</from>
+      <to>drop indexes before</to>
+      <enabled>Y</enabled>
+      <evaluation>Y</evaluation>
+      <unconditional>Y</unconditional>
+    </hop>
+    <hop>
+      <from>drop indexes before</from>
+      <to>cleanup-database.hwf</to>
+      <enabled>Y</enabled>
+      <evaluation>Y</evaluation>
+      <unconditional>Y</unconditional>
+    </hop>
+    <hop>
+      <from>cleanup-database.hwf</from>
+      <to>create indexes</to>
+      <enabled>Y</enabled>
+      <evaluation>Y</evaluation>
+      <unconditional>N</unconditional>
+    </hop>
+    <hop>
+      <from>create indexes</from>
+      <to>graphrag-build.hpl</to>
+      <enabled>Y</enabled>
+      <evaluation>Y</evaluation>
+      <unconditional>N</unconditional>
+    </hop>
+    <hop>
+      <from>graphrag-build.hpl</from>
+      <to>Run graphrag tests</to>
+      <enabled>Y</enabled>
+      <evaluation>Y</evaluation>
+      <unconditional>N</unconditional>
+    </hop>
+    <hop>
+      <from>Run graphrag tests</from>
+      <to>drop indexes after test</to>
+      <enabled>Y</enabled>
+      <evaluation>Y</evaluation>
+      <unconditional>N</unconditional>
+    </hop>
+    <hop>
+      <from>drop indexes after test</from>
+      <to>Success</to>
+      <enabled>Y</enabled>
+      <evaluation>Y</evaluation>
+      <unconditional>Y</unconditional>
+    </hop>
+    <hop>
+      <from>Run graphrag tests</from>
+      <to>drop indexes after failure</to>
+      <enabled>Y</enabled>
+      <evaluation>N</evaluation>
+      <unconditional>N</unconditional>
+    </hop>
+    <hop>
+      <from>drop indexes after failure</from>
+      <to>Error out</to>
+      <enabled>Y</enabled>
+      <evaluation>Y</evaluation>
+      <unconditional>Y</unconditional>
+    </hop>
+  </hops>
+  <notepads>
+  </notepads>
+  <attributes/>
+</workflow>
diff --git a/integration-tests/neo4j-bolt/datasets/graphrag-graph-validation-golden.csv b/integration-tests/neo4j-bolt/datasets/graphrag-graph-validation-golden.csv
new file mode 100644
index 0000000000..aa51e75de2
--- /dev/null
+++ b/integration-tests/neo4j-bolt/datasets/graphrag-graph-validation-golden.csv
@@ -0,0 +1,8 @@
+check,n
+1 documents,2
+2 chunks,3
+3 entities,3
+4 has_chunk,3
+5 mentions,4
+6 related_to,2
+7 related_to from a chunk,2
diff --git a/integration-tests/neo4j-bolt/datasets/graphrag-retrieve-validation-golden.csv b/integration-tests/neo4j-bolt/datasets/graphrag-retrieve-validation-golden.csv
new file mode 100644
index 0000000000..fa40e52184
--- /dev/null
+++ b/integration-tests/neo4j-bolt/datasets/graphrag-retrieve-validation-golden.csv
@@ -0,0 +1,5 @@
+query_id,rank,chunk_id,facts
+q1,1,d1#0,Ada Lovelace (Person) -WORKED_WITH-> Charles Babbage; Charles Babbage (Person) -CREATED-> Analytical Engine
+q1,2,d1#1,Analytical Engine (Product); Charles Babbage (Person) -CREATED-> Analytical Engine
+q2,3,d2#0,
+q2,4,d1#1,Analytical Engine (Product); Charles Babbage (Person) -CREATED-> Analytical Engine
diff --git a/integration-tests/neo4j-bolt/metadata/dataset/graphrag-graph-validation-golden.json b/integration-tests/neo4j-bolt/metadata/dataset/graphrag-graph-validation-golden.json
new file mode 100644
index 0000000000..1df16ac92a
--- /dev/null
+++ b/integration-tests/neo4j-bolt/metadata/dataset/graphrag-graph-validation-golden.json
@@ -0,0 +1,24 @@
+{
+  "base_filename": "graphrag-graph-validation-golden.csv",
+  "name": "graphrag-graph-validation-golden",
+  "description": "Node and relationship counts after graphrag-build",
+  "dataset_fields": [
+    {
+      "field_comment": "",
+      "field_length": -1,
+      "field_type": 2,
+      "field_precision": -1,
+      "field_format": "",
+      "field_name": "check"
+    },
+    {
+      "field_comment": "",
+      "field_length": -1,
+      "field_type": 5,
+      "field_precision": -1,
+      "field_format": "",
+      "field_name": "n"
+    }
+  ],
+  "folder_name": ""
+}
diff --git a/integration-tests/neo4j-bolt/metadata/dataset/graphrag-retrieve-validation-golden.json b/integration-tests/neo4j-bolt/metadata/dataset/graphrag-retrieve-validation-golden.json
new file mode 100644
index 0000000000..d7a1c18170
--- /dev/null
+++ b/integration-tests/neo4j-bolt/metadata/dataset/graphrag-retrieve-validation-golden.json
@@ -0,0 +1,40 @@
+{
+  "base_filename": "graphrag-retrieve-validation-golden.csv",
+  "name": "graphrag-retrieve-validation-golden",
+  "description": "The chunks per query vector, best first, and their facts",
+  "dataset_fields": [
+    {
+      "field_comment": "",
+      "field_length": -1,
+      "field_type": 2,
+      "field_precision": -1,
+      "field_format": "",
+      "field_name": "query_id"
+    },
+    {
+      "field_comment": "",
+      "field_length": -1,
+      "field_type": 5,
+      "field_precision": -1,
+      "field_format": "",
+      "field_name": "rank"
+    },
+    {
+      "field_comment": "",
+      "field_length": -1,
+      "field_type": 2,
+      "field_precision": -1,
+      "field_format": "",
+      "field_name": "chunk_id"
+    },
+    {
+      "field_comment": "",
+      "field_length": -1,
+      "field_type": 2,
+      "field_precision": -1,
+      "field_format": "",
+      "field_name": "facts"
+    }
+  ],
+  "folder_name": ""
+}
diff --git a/integration-tests/neo4j-bolt/metadata/neo4j-graph-model/graphrag.json b/integration-tests/neo4j-bolt/metadata/neo4j-graph-model/graphrag.json
new file mode 100644
index 0000000000..fec7bc5dee
--- /dev/null
+++ b/integration-tests/neo4j-bolt/metadata/neo4j-graph-model/graphrag.json
@@ -0,0 +1,189 @@
+{
+  "name": "graphrag",
+  "description": "GraphRAG: documents split into chunks with embeddings, the entities the chunks mention, and the relationships between those entities.",
+  "nodes": [
+    {
+      "presentation": {
+        "x": 80,
+        "y": 200
+      },
+      "name": "Document",
+      "description": "A source document",
+      "labels": [
+        "Document"
+      ],
+      "properties": [
+        {
+          "indexed": false,
+          "unique": true,
+          "name": "id",
+          "description": "Document ID",
+          "type": "String",
+          "mandatory": true,
+          "primary": true
+        },
+        {
+          "indexed": false,
+          "unique": false,
+          "name": "title",
+          "description": "Document title",
+          "type": "String",
+          "mandatory": false,
+          "primary": false
+        }
+      ]
+    },
+    {
+      "presentation": {
+        "x": 300,
+        "y": 200
+      },
+      "name": "Chunk",
+      "description": "A part of a document, with its embedding",
+      "labels": [
+        "Chunk"
+      ],
+      "properties": [
+        {
+          "indexed": false,
+          "unique": true,
+          "name": "id",
+          "description": "Chunk ID: document ID and chunk index",
+          "type": "String",
+          "mandatory": true,
+          "primary": true
+        },
+        {
+          "indexed": false,
+          "unique": false,
+          "name": "chunk_index",
+          "description": "Position in the document",
+          "type": "Integer",
+          "mandatory": false,
+          "primary": false
+        },
+        {
+          "indexed": false,
+          "unique": false,
+          "name": "text",
+          "description": "The text of the chunk",
+          "type": "String",
+          "mandatory": false,
+          "primary": false
+        },
+        {
+          "indexed": false,
+          "unique": false,
+          "name": "embedding",
+          "description": "The embedding of the text",
+          "type": "Vector",
+          "mandatory": false,
+          "primary": false
+        }
+      ]
+    },
+    {
+      "presentation": {
+        "x": 520,
+        "y": 200
+      },
+      "name": "Entity",
+      "description": "An entity the Extract graph transform read from a text. Its type is a property.",
+      "properties": [
+        {
+          "indexed": false,
+          "unique": true,
+          "name": "key",
+          "description": "The name in lowercase without spaces or punctuation: spellings of one entity share it",
+          "type": "String",
+          "mandatory": true,
+          "primary": true
+        },
+        {
+          "indexed": false,
+          "unique": false,
+          "name": "name",
+          "description": "The name of the entity, as a text names it",
+          "type": "String",
+          "mandatory": false,
+          "primary": false
+        },
+        {
+          "indexed": false,
+          "unique": false,
+          "name": "type",
+          "description": "The entity type, for example Person",
+          "type": "String",
+          "mandatory": false,
+          "primary": false
+        },
+        {
+          "indexed": false,
+          "unique": false,
+          "name": "description",
+          "description": "One sentence about the entity",
+          "type": "String",
+          "mandatory": false,
+          "primary": false
+        }
+      ],
+      "labels": [
+        "Entity"
+      ]
+    }
+  ],
+  "relationships": [
+    {
+      "nodeSource": "Document",
+      "name": "HAS_CHUNK",
+      "description": "A document consists of chunks",
+      "nodeTarget": "Chunk",
+      "label": "HAS_CHUNK",
+      "properties": []
+    },
+    {
+      "nodeSource": "Chunk",
+      "name": "MENTIONS",
+      "description": "A chunk mentions an entity",
+      "nodeTarget": "Entity",
+      "label": "MENTIONS",
+      "properties": []
+    },
+    {
+      "nodeSource": "Entity",
+      "name": "RELATED_TO",
+      "description": "A relationship the Extract graph transform read between two entities: one per type and source chunk. The GraphRAG samples write it with Graph query, so the type and chunk_id identify it.",
+      "nodeTarget": "Entity",
+      "label": "RELATED_TO",
+      "properties": [
+        {
+          "indexed": false,
+          "unique": false,
+          "name": "type",
+          "description": "The relationship type, for example WORKED_WITH",
+          "type": "String",
+          "mandatory": false,
+          "primary": false
+        },
+        {
+          "indexed": false,
+          "unique": false,
+          "name": "description",
+          "description": "One sentence about the relationship",
+          "type": "String",
+          "mandatory": false,
+          "primary": false
+        },
+        {
+          "indexed": false,
+          "unique": false,
+          "name": "chunk_id",
+          "description": "The chunk the relationship was read from",
+          "type": "String",
+          "mandatory": false,
+          "primary": false
+        }
+      ]
+    }
+  ]
+}
diff --git a/integration-tests/neo4j-bolt/metadata/unit-test/graphrag-graph-validation UNIT.json b/integration-tests/neo4j-bolt/metadata/unit-test/graphrag-graph-validation UNIT.json
new file mode 100644
index 0000000000..43a00078b9
--- /dev/null
+++ b/integration-tests/neo4j-bolt/metadata/unit-test/graphrag-graph-validation UNIT.json	
@@ -0,0 +1,32 @@
+{
+  "variableValues": [],
+  "database_replacements": [],
+  "autoOpening": true,
+  "basePath": "",
+  "golden_data_sets": [
+    {
+      "field_mappings": [
+        {
+          "transform_field": "check",
+          "data_set_field": "check"
+        },
+        {
+          "transform_field": "n",
+          "data_set_field": "n"
+        }
+      ],
+      "field_order": [
+        "check"
+      ],
+      "transform_name": "Validation",
+      "data_set_name": "graphrag-graph-validation-golden"
+    }
+  ],
+  "input_data_sets": [],
+  "name": "graphrag-graph-validation UNIT",
+  "description": "",
+  "trans_test_tweaks": [],
+  "persist_filename": "",
+  "pipeline_filename": "./tests/graphrag/graphrag-graph-validation.hpl",
+  "test_type": "UNIT_TEST"
+}
diff --git a/integration-tests/neo4j-bolt/metadata/unit-test/graphrag-retrieve-validation UNIT.json b/integration-tests/neo4j-bolt/metadata/unit-test/graphrag-retrieve-validation UNIT.json
new file mode 100644
index 0000000000..2d15688576
--- /dev/null
+++ b/integration-tests/neo4j-bolt/metadata/unit-test/graphrag-retrieve-validation UNIT.json	
@@ -0,0 +1,40 @@
+{
+  "variableValues": [],
+  "database_replacements": [],
+  "autoOpening": true,
+  "basePath": "",
+  "golden_data_sets": [
+    {
+      "field_mappings": [
+        {
+          "transform_field": "query_id",
+          "data_set_field": "query_id"
+        },
+        {
+          "transform_field": "rank",
+          "data_set_field": "rank"
+        },
+        {
+          "transform_field": "chunk_id",
+          "data_set_field": "chunk_id"
+        },
+        {
+          "transform_field": "facts",
+          "data_set_field": "facts"
+        }
+      ],
+      "field_order": [
+        "rank"
+      ],
+      "transform_name": "Validation",
+      "data_set_name": "graphrag-retrieve-validation-golden"
+    }
+  ],
+  "input_data_sets": [],
+  "name": "graphrag-retrieve-validation UNIT",
+  "description": "",
+  "trans_test_tweaks": [],
+  "persist_filename": "",
+  "pipeline_filename": "./tests/graphrag/graphrag-retrieve-validation.hpl",
+  "test_type": "UNIT_TEST"
+}
diff --git a/integration-tests/neo4j-bolt/tests/graphrag/graphrag-build.hpl b/integration-tests/neo4j-bolt/tests/graphrag/graphrag-build.hpl
new file mode 100644
index 0000000000..20c8d6456d
--- /dev/null
+++ b/integration-tests/neo4j-bolt/tests/graphrag/graphrag-build.hpl
@@ -0,0 +1,688 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+Licensed to the Apache Software Foundation (ASF) under one or more
+contributor license agreements.  See the NOTICE file distributed with
+this work for additional information regarding copyright ownership.
+The ASF licenses this file to You under the Apache License, Version 2.0
+(the "License"); you may not use this file except in compliance with
+the License.  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+
+-->
+<pipeline>
+  <info>
+    <name>graphrag-build</name>
+    <name_sync_with_filename>Y</name_sync_with_filename>
+    <description>Writes fixed chunks and extraction rows the way the GraphRAG samples do</description>
+    <extended_description/>
+    <pipeline_version/>
+    <pipeline_type>Normal</pipeline_type>
+    <parameters>
+    </parameters>
+    <capture_transform_performance>N</capture_transform_performance>
+    <transform_performance_capturing_delay>1000</transform_performance_capturing_delay>
+    <transform_performance_capturing_size_limit>100</transform_performance_capturing_size_limit>
+    <created_user>-</created_user>
+    <created_date>2026/10/10 12:00:00.000</created_date>
+    <modified_user>-</modified_user>
+    <modified_date>2026/10/10 12:00:00.000</modified_date>
+  </info>
+  <notepads>
+  </notepads>
+  <order>
+    <hop>
+      <from>chunks</from>
+      <to>Write documents and chunks</to>
+      <enabled>Y</enabled>
+    </hop>
+    <hop>
+      <from>extracted graph</from>
+      <to>Hold the graph</to>
+      <enabled>Y</enabled>
+    </hop>
+    <hop>
+      <from>Hold the graph</from>
+      <to>Wait for the chunks</to>
+      <enabled>Y</enabled>
+    </hop>
+    <hop>
+      <from>Wait for the chunks</from>
+      <to>Entity keys</to>
+      <enabled>Y</enabled>
+    </hop>
+    <hop>
+      <from>Entity keys</from>
+      <to>Entity?</to>
+      <enabled>Y</enabled>
+    </hop>
+    <hop>
+      <from>Entity?</from>
+      <to>Write mentions</to>
+      <enabled>Y</enabled>
+    </hop>
+    <hop>
+      <from>Entity?</from>
+      <to>Collect relationships</to>
+      <enabled>Y</enabled>
+    </hop>
+    <hop>
+      <from>Collect relationships</from>
+      <to>Wait for the entities</to>
+      <enabled>Y</enabled>
+    </hop>
+    <hop>
+      <from>Wait for the entities</from>
+      <to>Write relationships</to>
+      <enabled>Y</enabled>
+    </hop>
+  </order>
+  <transform>
+    <name>chunks</name>
+    <type>DataGrid</type>
+    <description>Three chunks with 3-dimensional embeddings</description>
+    <distribute>Y</distribute>
+    <custom_distribution/>
+    <copies>1</copies>
+    <partitioning>
+      <method>none</method>
+      <schema_name/>
+    </partitioning>
+    <fields>
+      <field>
+        <set_empty_string>N</set_empty_string>
+        <length>-1</length>
+        <name>document_id</name>
+        <precision>-1</precision>
+        <type>String</type>
+      </field>
+      <field>
+        <set_empty_string>N</set_empty_string>
+        <length>-1</length>
+        <name>title</name>
+        <precision>-1</precision>
+        <type>String</type>
+      </field>
+      <field>
+        <set_empty_string>N</set_empty_string>
+        <length>-1</length>
+        <name>chunk_id</name>
+        <precision>-1</precision>
+        <type>String</type>
+      </field>
+      <field>
+        <set_empty_string>N</set_empty_string>
+        <length>-1</length>
+        <name>chunk_index</name>
+        <precision>-1</precision>
+        <type>Integer</type>
+      </field>
+      <field>
+        <set_empty_string>N</set_empty_string>
+        <length>-1</length>
+        <name>chunk_text</name>
+        <precision>-1</precision>
+        <type>String</type>
+      </field>
+      <field>
+        <set_empty_string>N</set_empty_string>
+        <length>-1</length>
+        <name>embedding</name>
+        <precision>-1</precision>
+        <type>Vector</type>
+      </field>
+    </fields>
+    <data>
+      <line>
+        <item>d1</item>
+        <item>Analytical Engine</item>
+        <item>d1#0</item>
+        <item>0</item>
+        <item>Ada Lovelace worked with Charles Babbage.</item>
+        <item>[1,0,0]</item>
+      </line>
+      <line>
+        <item>d1</item>
+        <item>Analytical Engine</item>
+        <item>d1#1</item>
+        <item>1</item>
+        <item>Babbage designed the Analytical Engine.</item>
+        <item>[0.6,0,0.8]</item>
+      </line>
+      <line>
+        <item>d2</item>
+        <item>Weather</item>
+        <item>d2#0</item>
+        <item>0</item>
+        <item>The weather in London is fine today.</item>
+        <item>[0,0,1]</item>
+      </line>
+    </data>
+    <attributes/>
+    <GUI>
+      <xloc>96</xloc>
+      <yloc>96</yloc>
+    </GUI>
+  </transform>
+  <transform>
+    <name>Write documents and chunks</name>
+    <type>Neo4jGraphOutput</type>
+    <description/>
+    <distribute>Y</distribute>
+    <custom_distribution/>
+    <copies>1</copies>
+    <partitioning>
+      <method>none</method>
+      <schema_name/>
+    </partitioning>
+    <connection>Test</connection>
+    <model>graphrag</model>
+    <batch_size>100</batch_size>
+    <create_indexes>N</create_indexes>
+    <returning_graph>N</returning_graph>
+    <return_graph_field/>
+    <validate_against_model>N</validate_against_model>
+    <out_of_order_allowed>Y</out_of_order_allowed>
+    <mappings>
+      <mapping>
+        <source_field>document_id</source_field>
+        <target_type>Node</target_type>
+        <target_name>Document</target_name>
+        <target_property>id</target_property>
+        <target_hint>None</target_hint>
+      </mapping>
+      <mapping>
+        <source_field>title</source_field>
+        <target_type>Node</target_type>
+        <target_name>Document</target_name>
+        <target_property>title</target_property>
+        <target_hint>None</target_hint>
+      </mapping>
+      <mapping>
+        <source_field>chunk_id</source_field>
+        <target_type>Node</target_type>
+        <target_name>Chunk</target_name>
+        <target_property>id</target_property>
+        <target_hint>None</target_hint>
+      </mapping>
+      <mapping>
+        <source_field>chunk_index</source_field>
+        <target_type>Node</target_type>
+        <target_name>Chunk</target_name>
+        <target_property>chunk_index</target_property>
+        <target_hint>None</target_hint>
+      </mapping>
+      <mapping>
+        <source_field>chunk_text</source_field>
+        <target_type>Node</target_type>
+        <target_name>Chunk</target_name>
+        <target_property>text</target_property>
+        <target_hint>None</target_hint>
+      </mapping>
+      <mapping>
+        <source_field>embedding</source_field>
+        <target_type>Node</target_type>
+        <target_name>Chunk</target_name>
+        <target_property>embedding</target_property>
+        <target_hint>None</target_hint>
+      </mapping>
+    </mappings>
+    <relationship_mappings>
+    </relationship_mappings>
+    <node_mappings>
+    </node_mappings>
+    <attributes/>
+    <GUI>
+      <xloc>320</xloc>
+      <yloc>96</yloc>
+    </GUI>
+  </transform>
+  <transform>
+    <name>extracted graph</name>
+    <type>DataGrid</type>
+    <description>What Extract graph returns for the chunks. 'charles-babbage' merges with 'Charles Babbage'.</description>
+    <distribute>Y</distribute>
+    <custom_distribution/>
+    <copies>1</copies>
+    <partitioning>
+      <method>none</method>
+      <schema_name/>
+    </partitioning>
+    <fields>
+      <field>
+        <set_empty_string>N</set_empty_string>
+        <length>-1</length>
+        <name>chunk_id</name>
+        <precision>-1</precision>
+        <type>String</type>
+      </field>
+      <field>
+        <set_empty_string>N</set_empty_string>
+        <length>-1</length>
+        <name>graph_element</name>
+        <precision>-1</precision>
+        <type>String</type>
+      </field>
+      <field>
+        <set_empty_string>N</set_empty_string>
+        <length>-1</length>
+        <name>name</name>
+        <precision>-1</precision>
+        <type>String</type>
+      </field>
+      <field>
+        <set_empty_string>N</set_empty_string>
+        <length>-1</length>
+        <name>type</name>
+        <precision>-1</precision>
+        <type>String</type>
+      </field>
+      <field>
+        <set_empty_string>N</set_empty_string>
+        <length>-1</length>
+        <name>description</name>
+        <precision>-1</precision>
+        <type>String</type>
+      </field>
+      <field>
+        <set_empty_string>N</set_empty_string>
+        <length>-1</length>
+        <name>source</name>
+        <precision>-1</precision>
+        <type>String</type>
+      </field>
+      <field>
+        <set_empty_string>N</set_empty_string>
+        <length>-1</length>
+        <name>target</name>
+        <precision>-1</precision>
+        <type>String</type>
+      </field>
+    </fields>
+    <data>
+      <line>
+        <item>d1#0</item>
+        <item>ENTITY</item>
+        <item>Ada Lovelace</item>
+        <item>Person</item>
+        <item>Mathematician</item>
+        <item/>
+        <item/>
+      </line>
+      <line>
+        <item>d1#0</item>
+        <item>ENTITY</item>
+        <item>Charles Babbage</item>
+        <item>Person</item>
+        <item>Inventor</item>
+        <item/>
+        <item/>
+      </line>
+      <line>
+        <item>d1#0</item>
+        <item>RELATIONSHIP</item>
+        <item/>
+        <item>WORKED_WITH</item>
+        <item>Ada worked with Babbage</item>
+        <item>Ada Lovelace</item>
+        <item>Charles Babbage</item>
+      </line>
+      <line>
+        <item>d1#1</item>
+        <item>ENTITY</item>
+        <item>Charles Babbage</item>
+        <item>Person</item>
+        <item>Inventor</item>
+        <item/>
+        <item/>
+      </line>
+      <line>
+        <item>d1#1</item>
+        <item>ENTITY</item>
+        <item>Analytical Engine</item>
+        <item>Product</item>
+        <item>A mechanical computer</item>
+        <item/>
+        <item/>
+      </line>
+      <line>
+        <item>d1#1</item>
+        <item>RELATIONSHIP</item>
+        <item/>
+        <item>CREATED</item>
+        <item>Babbage designed it</item>
+        <item>charles-babbage</item>
+        <item>Analytical Engine</item>
+      </line>
+    </data>
+    <attributes/>
+    <GUI>
+      <xloc>96</xloc>
+      <yloc>240</yloc>
+    </GUI>
+  </transform>
+  <transform>
+    <name>Hold the graph</name>
+    <type>BlockingTransform</type>
+    <description/>
+    <distribute>Y</distribute>
+    <custom_distribution/>
+    <copies>1</copies>
+    <partitioning>
+      <method>none</method>
+      <schema_name/>
+    </partitioning>
+    <cache_size>5000</cache_size>
+    <compress>Y</compress>
+    <directory>${java.io.tmpdir}</directory>
+    <pass_all_rows>Y</pass_all_rows>
+    <prefix>graphrag</prefix>
+    <attributes/>
+    <GUI>
+      <xloc>288</xloc>
+      <yloc>240</yloc>
+    </GUI>
+  </transform>
+  <transform>
+    <name>Wait for the chunks</name>
+    <type>BlockUntilTransformsFinish</type>
+    <description/>
+    <distribute>Y</distribute>
+    <custom_distribution/>
+    <copies>1</copies>
+    <partitioning>
+      <method>none</method>
+      <schema_name/>
+    </partitioning>
+    <transforms>
+      <transform>
+        <name>Write documents and chunks</name>
+        <CopyNr>0</CopyNr>
+      </transform>
+    </transforms>
+    <attributes/>
+    <GUI>
+      <xloc>480</xloc>
+      <yloc>240</yloc>
+    </GUI>
+  </transform>
+  <transform>
+    <name>Entity keys</name>
+    <type>ScriptValueMod</type>
+    <description>Lowercase without spaces or punctuation, so 'Hop Run' and 'hop-run' are one entity</description>
+    <distribute>Y</distribute>
+    <custom_distribution/>
+    <copies>1</copies>
+    <partitioning>
+      <method>none</method>
+      <schema_name/>
+    </partitioning>
+    <optimizationLevel>9</optimizationLevel>
+    <jsScripts>
+      <jsScript>
+        <jsScript_type>0</jsScript_type>
+        <jsScript_name>Script 1</jsScript_name>
+        <jsScript_script>function entityKey(name) {
+  if (name == null) {
+    return null;
+  }
+  return ("" + name).toLowerCase().replace(/[^a-z0-9+#]/g, "");
+}
+var key = entityKey(name);
+var source_key = entityKey(source);
+var target_key = entityKey(target);</jsScript_script>
+      </jsScript>
+    </jsScripts>
+    <fields>
+      <field>
+        <name>key</name>
+        <rename>key</rename>
+        <type>String</type>
+        <length>-1</length>
+        <precision>-1</precision>
+        <replace>N</replace>
+      </field>
+      <field>
+        <name>source_key</name>
+        <rename>source_key</rename>
+        <type>String</type>
+        <length>-1</length>
+        <precision>-1</precision>
+        <replace>N</replace>
+      </field>
+      <field>
+        <name>target_key</name>
+        <rename>target_key</rename>
+        <type>String</type>
+        <length>-1</length>
+        <precision>-1</precision>
+        <replace>N</replace>
+      </field>
+    </fields>
+    <attributes/>
+    <GUI>
+      <xloc>672</xloc>
+      <yloc>240</yloc>
+    </GUI>
+  </transform>
+  <transform>
+    <name>Entity?</name>
+    <type>FilterRows</type>
+    <description/>
+    <distribute>Y</distribute>
+    <custom_distribution/>
+    <copies>1</copies>
+    <partitioning>
+      <method>none</method>
+      <schema_name/>
+    </partitioning>
+    <compare>
+      <condition>
+        <conditions>
+        </conditions>
+        <function>=</function>
+        <leftvalue>graph_element</leftvalue>
+        <negated>N</negated>
+        <operator>-</operator>
+        <value>
+          <isnull>N</isnull>
+          <length>-1</length>
+          <mask/>
+          <name>constant</name>
+          <precision>-1</precision>
+          <text>ENTITY</text>
+          <type>String</type>
+        </value>
+      </condition>
+    </compare>
+    <send_false_to>Collect relationships</send_false_to>
+    <send_true_to>Write mentions</send_true_to>
+    <attributes/>
+    <GUI>
+      <xloc>832</xloc>
+      <yloc>240</yloc>
+    </GUI>
+  </transform>
+  <transform>
+    <name>Write mentions</name>
+    <type>Neo4jGraphOutput</type>
+    <description>MERGE an Entity per key and the chunk's MENTIONS relationship to it</description>
+    <distribute>Y</distribute>
+    <custom_distribution/>
+    <copies>1</copies>
+    <partitioning>
+      <method>none</method>
+      <schema_name/>
+    </partitioning>
+    <connection>Test</connection>
+    <model>graphrag</model>
+    <batch_size>100</batch_size>
+    <create_indexes>N</create_indexes>
+    <returning_graph>N</returning_graph>
+    <return_graph_field/>
+    <validate_against_model>N</validate_against_model>
+    <out_of_order_allowed>Y</out_of_order_allowed>
+    <mappings>
+      <mapping>
+        <source_field>chunk_id</source_field>
+        <target_type>Node</target_type>
+        <target_name>Chunk</target_name>
+        <target_property>id</target_property>
+        <target_hint>None</target_hint>
+      </mapping>
+      <mapping>
+        <source_field>key</source_field>
+        <target_type>Node</target_type>
+        <target_name>Entity</target_name>
+        <target_property>key</target_property>
+        <target_hint>None</target_hint>
+      </mapping>
+      <mapping>
+        <source_field>name</source_field>
+        <target_type>Node</target_type>
+        <target_name>Entity</target_name>
+        <target_property>name</target_property>
+        <target_hint>None</target_hint>
+      </mapping>
+      <mapping>
+        <source_field>type</source_field>
+        <target_type>Node</target_type>
+        <target_name>Entity</target_name>
+        <target_property>type</target_property>
+        <target_hint>None</target_hint>
+      </mapping>
+      <mapping>
+        <source_field>description</source_field>
+        <target_type>Node</target_type>
+        <target_name>Entity</target_name>
+        <target_property>description</target_property>
+        <target_hint>None</target_hint>
+      </mapping>
+    </mappings>
+    <relationship_mappings>
+    </relationship_mappings>
+    <node_mappings>
+    </node_mappings>
+    <attributes/>
+    <GUI>
+      <xloc>1024</xloc>
+      <yloc>240</yloc>
+    </GUI>
+  </transform>
+  <transform>
+    <name>Collect relationships</name>
+    <type>BlockingTransform</type>
+    <description>Reads all relationship rows first</description>
+    <distribute>Y</distribute>
+    <custom_distribution/>
+    <copies>1</copies>
+    <partitioning>
+      <method>none</method>
+      <schema_name/>
+    </partitioning>
+    <cache_size>5000</cache_size>
+    <compress>Y</compress>
+    <directory>${java.io.tmpdir}</directory>
+    <pass_all_rows>Y</pass_all_rows>
+    <prefix>graphrag</prefix>
+    <attributes/>
+    <GUI>
+      <xloc>832</xloc>
+      <yloc>384</yloc>
+    </GUI>
+  </transform>
+  <transform>
+    <name>Wait for the entities</name>
+    <type>BlockUntilTransformsFinish</type>
+    <description>Relationships are written once every entity is</description>
+    <distribute>Y</distribute>
+    <custom_distribution/>
+    <copies>1</copies>
+    <partitioning>
+      <method>none</method>
+      <schema_name/>
+    </partitioning>
+    <transforms>
+      <transform>
+        <name>Write mentions</name>
+        <CopyNr>0</CopyNr>
+      </transform>
+    </transforms>
+    <attributes/>
+    <GUI>
+      <xloc>1024</xloc>
+      <yloc>384</yloc>
+    </GUI>
+  </transform>
+  <transform>
+    <name>Write relationships</name>
+    <type>Neo4jCypherOutput</type>
+    <description>One RELATED_TO per type and source chunk. Graph output merges a relationship on its two nodes only, so a second type between the same entities would overwrite the first.</description>
+    <distribute>Y</distribute>
+    <custom_distribution/>
+    <copies>1</copies>
+    <partitioning>
+      <method>none</method>
+      <schema_name/>
+    </partitioning>
+    <connection>Test</connection>
+    <cypher>MATCH (s:Entity {key: $source_key}), (t:Entity {key: $target_key})
+MERGE (s)-[r:RELATED_TO {type: $type, chunk_id: $chunk_id}]-&gt;(t)
+SET r.description = $description</cypher>
+    <batch_size>1</batch_size>
+    <read_only>N</read_only>
+    <nr_retries_on_error/>
+    <retry>N</retry>
+    <cypher_from_field>N</cypher_from_field>
+    <cypher_field/>
+    <unwind>N</unwind>
+    <unwind_map/>
+    <returning_graph>N</returning_graph>
+    <return_graph_field/>
+    <mappings>
+      <mapping>
+        <parameter>source_key</parameter>
+        <field>source_key</field>
+        <type>String</type>
+      </mapping>
+      <mapping>
+        <parameter>target_key</parameter>
+        <field>target_key</field>
+        <type>String</type>
+      </mapping>
+      <mapping>
+        <parameter>type</parameter>
+        <field>type</field>
+        <type>String</type>
+      </mapping>
+      <mapping>
+        <parameter>chunk_id</parameter>
+        <field>chunk_id</field>
+        <type>String</type>
+      </mapping>
+      <mapping>
+        <parameter>description</parameter>
+        <field>description</field>
+        <type>String</type>
+      </mapping>
+    </mappings>
+    <returns>
+
+    </returns>
+    <attributes/>
+    <GUI>
+      <xloc>1216</xloc>
+      <yloc>384</yloc>
+    </GUI>
+  </transform>
+  <transform_error_handling>
+  </transform_error_handling>
+  <attributes/>
+</pipeline>
diff --git a/integration-tests/neo4j-bolt/tests/graphrag/graphrag-graph-validation.hpl b/integration-tests/neo4j-bolt/tests/graphrag/graphrag-graph-validation.hpl
new file mode 100644
index 0000000000..a859fb8027
--- /dev/null
+++ b/integration-tests/neo4j-bolt/tests/graphrag/graphrag-graph-validation.hpl
@@ -0,0 +1,185 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+Licensed to the Apache Software Foundation (ASF) under one or more
+contributor license agreements.  See the NOTICE file distributed with
+this work for additional information regarding copyright ownership.
+The ASF licenses this file to You under the Apache License, Version 2.0
+(the "License"); you may not use this file except in compliance with
+the License.  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+
+-->
+<pipeline>
+  <info>
+    <name>graphrag-graph-validation</name>
+    <name_sync_with_filename>Y</name_sync_with_filename>
+    <description>Counts the nodes and relationships graphrag-build wrote</description>
+    <extended_description/>
+    <pipeline_version/>
+    <pipeline_type>Normal</pipeline_type>
+    <parameters>
+    </parameters>
+    <capture_transform_performance>N</capture_transform_performance>
+    <transform_performance_capturing_delay>1000</transform_performance_capturing_delay>
+    <transform_performance_capturing_size_limit>100</transform_performance_capturing_size_limit>
+    <created_user>-</created_user>
+    <created_date>2026/10/10 12:00:00.000</created_date>
+    <modified_user>-</modified_user>
+    <modified_date>2026/10/10 12:00:00.000</modified_date>
+  </info>
+  <notepads>
+  </notepads>
+  <order>
+    <hop>
+      <from>counts to check</from>
+      <to>count</to>
+      <enabled>Y</enabled>
+    </hop>
+    <hop>
+      <from>count</from>
+      <to>Validation</to>
+      <enabled>Y</enabled>
+    </hop>
+  </order>
+  <transform>
+    <name>counts to check</name>
+    <type>DataGrid</type>
+    <description/>
+    <distribute>Y</distribute>
+    <custom_distribution/>
+    <copies>1</copies>
+    <partitioning>
+      <method>none</method>
+      <schema_name/>
+    </partitioning>
+    <fields>
+      <field>
+        <set_empty_string>N</set_empty_string>
+        <length>-1</length>
+        <name>check</name>
+        <precision>-1</precision>
+        <type>String</type>
+      </field>
+      <field>
+        <set_empty_string>N</set_empty_string>
+        <length>-1</length>
+        <name>query</name>
+        <precision>-1</precision>
+        <type>String</type>
+      </field>
+    </fields>
+    <data>
+      <line>
+        <item>1 documents</item>
+        <item>MATCH (n:Document) RETURN count(n) AS n</item>
+      </line>
+      <line>
+        <item>2 chunks</item>
+        <item>MATCH (n:Chunk) RETURN count(n) AS n</item>
+      </line>
+      <line>
+        <item>3 entities</item>
+        <item>MATCH (n:Entity) RETURN count(n) AS n</item>
+      </line>
+      <line>
+        <item>4 has_chunk</item>
+        <item>MATCH (:Document)-[r:HAS_CHUNK]-&gt;(:Chunk) RETURN count(r) AS n</item>
+      </line>
+      <line>
+        <item>5 mentions</item>
+        <item>MATCH (:Chunk)-[r:MENTIONS]-&gt;(:Entity) RETURN count(r) AS n</item>
+      </line>
+      <line>
+        <item>6 related_to</item>
+        <item>MATCH (:Entity)-[r:RELATED_TO]-&gt;(:Entity) RETURN count(r) AS n</item>
+      </line>
+      <line>
+        <item>7 related_to from a chunk</item>
+        <item>MATCH (:Entity)-[r:RELATED_TO]-&gt;(:Entity) WHERE r.chunk_id IS NOT NULL RETURN count(r) AS n</item>
+      </line>
+    </data>
+    <attributes/>
+    <GUI>
+      <xloc>96</xloc>
+      <yloc>96</yloc>
+    </GUI>
+  </transform>
+  <transform>
+    <name>count</name>
+    <type>Neo4jCypherOutput</type>
+    <description>Runs the query of each row</description>
+    <distribute>Y</distribute>
+    <custom_distribution/>
+    <copies>1</copies>
+    <partitioning>
+      <method>none</method>
+      <schema_name/>
+    </partitioning>
+    <connection>Test</connection>
+    <cypher></cypher>
+    <batch_size>1</batch_size>
+    <read_only>Y</read_only>
+    <nr_retries_on_error/>
+    <retry>N</retry>
+    <cypher_from_field>Y</cypher_from_field>
+    <cypher_field>query</cypher_field>
+    <unwind>N</unwind>
+    <unwind_map/>
+    <returning_graph>N</returning_graph>
+    <return_graph_field/>
+    <mappings>
+
+    </mappings>
+    <returns>
+      <return>
+        <name>n</name>
+        <type>Integer</type>
+        <source_type>Integer</source_type>
+      </return>
+    </returns>
+    <attributes/>
+    <GUI>
+      <xloc>288</xloc>
+      <yloc>96</yloc>
+    </GUI>
+  </transform>
+  <transform>
+    <name>Validation</name>
+    <type>SelectValues</type>
+    <description/>
+    <distribute>Y</distribute>
+    <custom_distribution/>
+    <copies>1</copies>
+    <partitioning>
+      <method>none</method>
+      <schema_name/>
+    </partitioning>
+    <fields>
+      <field>
+        <name>check</name>
+        <rename/>
+      </field>
+      <field>
+        <name>n</name>
+        <rename/>
+      </field>
+      <select_unspecified>N</select_unspecified>
+    </fields>
+    <attributes/>
+    <GUI>
+      <xloc>480</xloc>
+      <yloc>96</yloc>
+    </GUI>
+  </transform>
+  <transform_error_handling>
+  </transform_error_handling>
+  <attributes/>
+</pipeline>
diff --git a/integration-tests/neo4j-bolt/tests/graphrag/graphrag-retrieve-validation.hpl b/integration-tests/neo4j-bolt/tests/graphrag/graphrag-retrieve-validation.hpl
new file mode 100644
index 0000000000..3a0781c8bc
--- /dev/null
+++ b/integration-tests/neo4j-bolt/tests/graphrag/graphrag-retrieve-validation.hpl
@@ -0,0 +1,363 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+Licensed to the Apache Software Foundation (ASF) under one or more
+contributor license agreements.  See the NOTICE file distributed with
+this work for additional information regarding copyright ownership.
+The ASF licenses this file to You under the Apache License, Version 2.0
+(the "License"); you may not use this file except in compliance with
+the License.  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+
+-->
+<pipeline>
+  <info>
+    <name>graphrag-retrieve-validation</name>
+    <name_sync_with_filename>Y</name_sync_with_filename>
+    <description>Vector search on the chunks, then the facts of each chunk</description>
+    <extended_description/>
+    <pipeline_version/>
+    <pipeline_type>Normal</pipeline_type>
+    <parameters>
+    </parameters>
+    <capture_transform_performance>N</capture_transform_performance>
+    <transform_performance_capturing_delay>1000</transform_performance_capturing_delay>
+    <transform_performance_capturing_size_limit>100</transform_performance_capturing_size_limit>
+    <created_user>-</created_user>
+    <created_date>2026/10/10 12:00:00.000</created_date>
+    <modified_user>-</modified_user>
+    <modified_date>2026/10/10 12:00:00.000</modified_date>
+  </info>
+  <notepads>
+  </notepads>
+  <order>
+    <hop>
+      <from>query vectors</from>
+      <to>Graph vector search</to>
+      <enabled>Y</enabled>
+    </hop>
+    <hop>
+      <from>Graph vector search</from>
+      <to>rank</to>
+      <enabled>Y</enabled>
+    </hop>
+    <hop>
+      <from>rank</from>
+      <to>Facts of the chunk</to>
+      <enabled>Y</enabled>
+    </hop>
+    <hop>
+      <from>Facts of the chunk</from>
+      <to>Fact</to>
+      <enabled>Y</enabled>
+    </hop>
+    <hop>
+      <from>Fact</from>
+      <to>One row per chunk</to>
+      <enabled>Y</enabled>
+    </hop>
+    <hop>
+      <from>One row per chunk</from>
+      <to>Validation</to>
+      <enabled>Y</enabled>
+    </hop>
+  </order>
+  <transform>
+    <name>query vectors</name>
+    <type>DataGrid</type>
+    <description>Close to one chunk each</description>
+    <distribute>Y</distribute>
+    <custom_distribution/>
+    <copies>1</copies>
+    <partitioning>
+      <method>none</method>
+      <schema_name/>
+    </partitioning>
+    <fields>
+      <field>
+        <set_empty_string>N</set_empty_string>
+        <length>-1</length>
+        <name>query_id</name>
+        <precision>-1</precision>
+        <type>String</type>
+      </field>
+      <field>
+        <set_empty_string>N</set_empty_string>
+        <length>-1</length>
+        <name>q</name>
+        <precision>-1</precision>
+        <type>Vector</type>
+      </field>
+    </fields>
+    <data>
+      <line>
+        <item>q1</item>
+        <item>[1,0,0]</item>
+      </line>
+      <line>
+        <item>q2</item>
+        <item>[0,0,1]</item>
+      </line>
+    </data>
+    <attributes/>
+    <GUI>
+      <xloc>96</xloc>
+      <yloc>96</yloc>
+    </GUI>
+  </transform>
+  <transform>
+    <name>Graph vector search</name>
+    <type>GraphVectorSearch</type>
+    <description/>
+    <distribute>Y</distribute>
+    <custom_distribution/>
+    <copies>1</copies>
+    <partitioning>
+      <method>none</method>
+      <schema_name/>
+    </partitioning>
+    <connection>Test</connection>
+    <element_type>NODE</element_type>
+    <index_name>graphrag_it_chunks</index_name>
+    <label>Chunk</label>
+    <vector_property>embedding</vector_property>
+    <similarity>COSINE</similarity>
+    <embedding_field>q</embedding_field>
+    <top_k>2</top_k>
+    <min_score>0</min_score>
+    <eat_row_on_no_match>Y</eat_row_on_no_match>
+    <score_field>score</score_field>
+    <return_properties>
+      <return_property>
+        <property>id</property>
+        <field_name>chunk_id</field_name>
+        <type>String</type>
+      </return_property>
+    </return_properties>
+    <attributes/>
+    <GUI>
+      <xloc>288</xloc>
+      <yloc>96</yloc>
+    </GUI>
+  </transform>
+  <transform>
+    <name>rank</name>
+    <type>Sequence</type>
+    <description/>
+    <distribute>Y</distribute>
+    <custom_distribution/>
+    <copies>1</copies>
+    <partitioning>
+      <method>none</method>
+      <schema_name/>
+    </partitioning>
+    <valuename>rank</valuename>
+    <use_database>N</use_database>
+    <connection/>
+    <schema/>
+    <seqname>SEQ_</seqname>
+    <use_counter>Y</use_counter>
+    <counter_name/>
+    <start_at>1</start_at>
+    <increment_by>1</increment_by>
+    <max_value>999999999</max_value>
+    <attributes/>
+    <GUI>
+      <xloc>448</xloc>
+      <yloc>96</yloc>
+    </GUI>
+  </transform>
+  <transform>
+    <name>Facts of the chunk</name>
+    <type>Neo4jCypherOutput</type>
+    <description>The entities the chunk mentions and their relationships: one row per fact</description>
+    <distribute>Y</distribute>
+    <custom_distribution/>
+    <copies>1</copies>
+    <partitioning>
+      <method>none</method>
+      <schema_name/>
+    </partitioning>
+    <connection>Test</connection>
+    <cypher>MATCH (c:Chunk {id: $chunk_id})
+OPTIONAL MATCH (c)-[:MENTIONS]-&gt;(e:Entity)
+OPTIONAL MATCH (e)-[r:RELATED_TO]-&gt;(o:Entity)
+RETURN e.name AS entity, e.type AS entity_type, r.type AS relation, o.name AS related_entity</cypher>
+    <batch_size>1</batch_size>
+    <read_only>Y</read_only>
+    <nr_retries_on_error/>
+    <retry>N</retry>
+    <cypher_from_field>N</cypher_from_field>
+    <cypher_field/>
+    <unwind>N</unwind>
+    <unwind_map/>
+    <returning_graph>N</returning_graph>
+    <return_graph_field/>
+    <mappings>
+      <mapping>
+        <parameter>chunk_id</parameter>
+        <field>chunk_id</field>
+        <type>String</type>
+      </mapping>
+    </mappings>
+    <returns>
+      <return>
+        <name>entity</name>
+        <type>String</type>
+        <source_type>String</source_type>
+      </return>
+      <return>
+        <name>entity_type</name>
+        <type>String</type>
+        <source_type>String</source_type>
+      </return>
+      <return>
+        <name>relation</name>
+        <type>String</type>
+        <source_type>String</source_type>
+      </return>
+      <return>
+        <name>related_entity</name>
+        <type>String</type>
+        <source_type>String</source_type>
+      </return>
+    </returns>
+    <attributes/>
+    <GUI>
+      <xloc>608</xloc>
+      <yloc>96</yloc>
+    </GUI>
+  </transform>
+  <transform>
+    <name>Fact</name>
+    <type>ScriptValueMod</type>
+    <description>Entity (type) -RELATION-&gt; other entity</description>
+    <distribute>Y</distribute>
+    <custom_distribution/>
+    <copies>1</copies>
+    <partitioning>
+      <method>none</method>
+      <schema_name/>
+    </partitioning>
+    <optimizationLevel>9</optimizationLevel>
+    <jsScripts>
+      <jsScript>
+        <jsScript_type>0</jsScript_type>
+        <jsScript_name>Script 1</jsScript_name>
+        <jsScript_script>var fact = null;
+if (entity != null) {
+  fact = entity;
+  if (entity_type != null) {
+    fact = fact + " (" + entity_type + ")";
+  }
+  if (relation != null) {
+    fact = fact + " -" + relation + "-&gt; " + related_entity;
+  }
+}</jsScript_script>
+      </jsScript>
+    </jsScripts>
+    <fields>
+      <field>
+        <name>fact</name>
+        <rename>fact</rename>
+        <type>String</type>
+        <length>-1</length>
+        <precision>-1</precision>
+        <replace>N</replace>
+      </field>
+    </fields>
+    <attributes/>
+    <GUI>
+      <xloc>768</xloc>
+      <yloc>96</yloc>
+    </GUI>
+  </transform>
+  <transform>
+    <name>One row per chunk</name>
+    <type>GroupBy</type>
+    <description>The rows of a chunk are consecutive</description>
+    <distribute>Y</distribute>
+    <custom_distribution/>
+    <copies>1</copies>
+    <partitioning>
+      <method>none</method>
+      <schema_name/>
+    </partitioning>
+    <directory>${java.io.tmpdir}</directory>
+    <prefix>graphrag</prefix>
+    <add_linenr>N</add_linenr>
+    <all_rows>N</all_rows>
+    <fields>
+      <field>
+        <aggregate>facts</aggregate>
+        <subject>fact</subject>
+        <type>CONCAT_DISTINCT</type>
+        <valuefield>; </valuefield>
+      </field>
+    </fields>
+    <give_back_row>N</give_back_row>
+    <group>
+      <field>
+        <name>query_id</name>
+      </field>
+      <field>
+        <name>rank</name>
+      </field>
+      <field>
+        <name>chunk_id</name>
+      </field>
+    </group>
+    <ignore_aggregate>N</ignore_aggregate>
+    <attributes/>
+    <GUI>
+      <xloc>928</xloc>
+      <yloc>96</yloc>
+    </GUI>
+  </transform>
+  <transform>
+    <name>Validation</name>
+    <type>SelectValues</type>
+    <description/>
+    <distribute>Y</distribute>
+    <custom_distribution/>
+    <copies>1</copies>
+    <partitioning>
+      <method>none</method>
+      <schema_name/>
+    </partitioning>
+    <fields>
+      <field>
+        <name>query_id</name>
+        <rename/>
+      </field>
+      <field>
+        <name>rank</name>
+        <rename/>
+      </field>
+      <field>
+        <name>chunk_id</name>
+        <rename/>
+      </field>
+      <field>
+        <name>facts</name>
+        <rename/>
+      </field>
+      <select_unspecified>N</select_unspecified>
+    </fields>
+    <attributes/>
+    <GUI>
+      <xloc>1120</xloc>
+      <yloc>96</yloc>
+    </GUI>
+  </transform>
+  <transform_error_handling>
+  </transform_error_handling>
+  <attributes/>
+</pipeline>
diff --git a/integration-tests/neo4j-bolt/tests/graphrag/main-graphrag.hwf b/integration-tests/neo4j-bolt/tests/graphrag/main-graphrag.hwf
new file mode 100644
index 0000000000..8a7ada2cfc
--- /dev/null
+++ b/integration-tests/neo4j-bolt/tests/graphrag/main-graphrag.hwf
@@ -0,0 +1,310 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+Licensed to the Apache Software Foundation (ASF) under one or more
+contributor license agreements.  See the NOTICE file distributed with
+this work for additional information regarding copyright ownership.
+The ASF licenses this file to You under the Apache License, Version 2.0
+(the "License"); you may not use this file except in compliance with
+the License.  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+
+-->
+<workflow>
+  <name>main-graphrag</name>
+  <name_sync_with_filename>Y</name_sync_with_filename>
+  <description>Graph vector search on the vector index of nodes</description>
+  <extended_description/>
+  <workflow_version/>
+  <created_user>-</created_user>
+  <created_date>2026/10/07 12:00:00.000</created_date>
+  <modified_user>-</modified_user>
+  <modified_date>2026/10/07 12:00:00.000</modified_date>
+  <parameters>
+    <parameter>
+      <name>TEST_FOLDER</name>
+      <default_value>graphrag</default_value>
+      <description/>
+    </parameter>
+  </parameters>
+  <actions>
+    <action>
+      <name>Start</name>
+      <description/>
+      <type>SPECIAL</type>
+      <attributes/>
+      <repeat>N</repeat>
+      <schedulerType>0</schedulerType>
+      <intervalSeconds>0</intervalSeconds>
+      <intervalMinutes>60</intervalMinutes>
+      <hour>12</hour>
+      <minutes>0</minutes>
+      <weekDay>1</weekDay>
+      <DayOfMonth>1</DayOfMonth>
+      <parallel>N</parallel>
+      <xloc>64</xloc>
+      <yloc>96</yloc>
+      <attributes_hac/>
+    </action>
+    <action>
+      <name>drop indexes before</name>
+      <description/>
+      <type>NEO4J_INDEX</type>
+      <attributes/>
+      <connection>Test</connection>
+      <updates>
+        <update>
+          <index_name>graphrag_it_chunks</index_name>
+          <object_name>Chunk</object_name>
+          <object_properties>embedding</object_properties>
+          <object_type>NODE</object_type>
+          <update_type>DROP</update_type>
+          <index_type>VECTOR</index_type>
+          <vector_dimensions>3</vector_dimensions>
+          <vector_similarity>COSINE</vector_similarity>
+        </update>
+      </updates>
+      <parallel>N</parallel>
+      <xloc>224</xloc>
+      <yloc>96</yloc>
+      <attributes_hac/>
+    </action>
+    <action>
+      <name>cleanup-database.hwf</name>
+      <description/>
+      <type>WORKFLOW</type>
+      <attributes/>
+      <run_configuration>local</run_configuration>
+      <filename>${PROJECT_HOME}/tests/shared/cleanup-database.hwf</filename>
+      <params_from_previous>N</params_from_previous>
+      <exec_per_row>N</exec_per_row>
+      <set_logfile>N</set_logfile>
+      <logfile/>
+      <logext/>
+      <add_date>N</add_date>
+      <add_time>N</add_time>
+      <loglevel>Nothing</loglevel>
+      <wait_until_finished>Y</wait_until_finished>
+      <create_parent_folder>N</create_parent_folder>
+      <parameters>
+        <pass_all_parameters>Y</pass_all_parameters>
+      </parameters>
+      <set_append_logfile>N</set_append_logfile>
+      <parallel>N</parallel>
+      <xloc>384</xloc>
+      <yloc>96</yloc>
+      <attributes_hac/>
+    </action>
+    <action>
+      <name>create indexes</name>
+      <description/>
+      <type>NEO4J_INDEX</type>
+      <attributes/>
+      <connection>Test</connection>
+      <updates>
+        <update>
+          <index_name>graphrag_it_chunks</index_name>
+          <object_name>Chunk</object_name>
+          <object_properties>embedding</object_properties>
+          <object_type>NODE</object_type>
+          <update_type>CREATE</update_type>
+          <index_type>VECTOR</index_type>
+          <vector_dimensions>3</vector_dimensions>
+          <vector_similarity>COSINE</vector_similarity>
+        </update>
+      </updates>
+      <parallel>N</parallel>
+      <xloc>544</xloc>
+      <yloc>96</yloc>
+      <attributes_hac/>
+    </action>
+    <action>
+      <name>graphrag-build.hpl</name>
+      <description/>
+      <type>PIPELINE</type>
+      <attributes/>
+      <filename>${PROJECT_HOME}/tests/graphrag/graphrag-build.hpl</filename>
+      <params_from_previous>N</params_from_previous>
+      <exec_per_row>N</exec_per_row>
+      <clear_rows>N</clear_rows>
+      <clear_files>N</clear_files>
+      <set_logfile>N</set_logfile>
+      <logfile/>
+      <logext/>
+      <add_date>N</add_date>
+      <add_time>N</add_time>
+      <loglevel>Basic</loglevel>
+      <set_append_logfile>N</set_append_logfile>
+      <wait_until_finished>Y</wait_until_finished>
+      <create_parent_folder>N</create_parent_folder>
+      <run_configuration>local</run_configuration>
+      <parameters>
+        <pass_all_parameters>Y</pass_all_parameters>
+      </parameters>
+      <parallel>N</parallel>
+      <xloc>704</xloc>
+      <yloc>96</yloc>
+      <attributes_hac/>
+    </action>
+    <action>
+      <name>Run graphrag tests</name>
+      <description/>
+      <type>RunPipelineTests</type>
+      <attributes/>
+      <test_names>
+        <test_name>
+          <name>graphrag-graph-validation UNIT</name>
+        </test_name>
+        <test_name>
+          <name>graphrag-retrieve-validation UNIT</name>
+        </test_name>
+      </test_names>
+      <parallel>N</parallel>
+      <xloc>864</xloc>
+      <yloc>96</yloc>
+      <attributes_hac/>
+    </action>
+    <action>
+      <name>drop indexes after test</name>
+      <description/>
+      <type>NEO4J_INDEX</type>
+      <attributes/>
+      <connection>Test</connection>
+      <updates>
+        <update>
+          <index_name>graphrag_it_chunks</index_name>
+          <object_name>Chunk</object_name>
+          <object_properties>embedding</object_properties>
+          <object_type>NODE</object_type>
+          <update_type>DROP</update_type>
+          <index_type>VECTOR</index_type>
+          <vector_dimensions>3</vector_dimensions>
+          <vector_similarity>COSINE</vector_similarity>
+        </update>
+      </updates>
+      <parallel>N</parallel>
+      <xloc>1024</xloc>
+      <yloc>96</yloc>
+      <attributes_hac/>
+    </action>
+    <action>
+      <name>drop indexes after failure</name>
+      <description/>
+      <type>NEO4J_INDEX</type>
+      <attributes/>
+      <connection>Test</connection>
+      <updates>
+        <update>
+          <index_name>graphrag_it_chunks</index_name>
+          <object_name>Chunk</object_name>
+          <object_properties>embedding</object_properties>
+          <object_type>NODE</object_type>
+          <update_type>DROP</update_type>
+          <index_type>VECTOR</index_type>
+          <vector_dimensions>3</vector_dimensions>
+          <vector_similarity>COSINE</vector_similarity>
+        </update>
+      </updates>
+      <parallel>N</parallel>
+      <xloc>1024</xloc>
+      <yloc>224</yloc>
+      <attributes_hac/>
+    </action>
+    <action>
+      <name>Success</name>
+      <description/>
+      <type>SUCCESS</type>
+      <attributes/>
+      <parallel>N</parallel>
+      <xloc>1184</xloc>
+      <yloc>96</yloc>
+      <attributes_hac/>
+    </action>
+    <action>
+      <name>Error out</name>
+      <description/>
+      <type>ABORT</type>
+      <attributes/>
+      <message>graphrag failed</message>
+      <parallel>N</parallel>
+      <xloc>1184</xloc>
+      <yloc>224</yloc>
+      <attributes_hac/>
+    </action>
+  </actions>
+  <hops>
+    <hop>
+      <from>Start</from>
+      <to>drop indexes before</to>
+      <enabled>Y</enabled>
+      <evaluation>Y</evaluation>
+      <unconditional>Y</unconditional>
+    </hop>
+    <hop>
+      <from>drop indexes before</from>
+      <to>cleanup-database.hwf</to>
+      <enabled>Y</enabled>
+      <evaluation>Y</evaluation>
+      <unconditional>Y</unconditional>
+    </hop>
+    <hop>
+      <from>cleanup-database.hwf</from>
+      <to>create indexes</to>
+      <enabled>Y</enabled>
+      <evaluation>Y</evaluation>
+      <unconditional>N</unconditional>
+    </hop>
+    <hop>
+      <from>create indexes</from>
+      <to>graphrag-build.hpl</to>
+      <enabled>Y</enabled>
+      <evaluation>Y</evaluation>
+      <unconditional>N</unconditional>
+    </hop>
+    <hop>
+      <from>graphrag-build.hpl</from>
+      <to>Run graphrag tests</to>
+      <enabled>Y</enabled>
+      <evaluation>Y</evaluation>
+      <unconditional>N</unconditional>
+    </hop>
+    <hop>
+      <from>Run graphrag tests</from>
+      <to>drop indexes after test</to>
+      <enabled>Y</enabled>
+      <evaluation>Y</evaluation>
+      <unconditional>N</unconditional>
+    </hop>
+    <hop>
+      <from>drop indexes after test</from>
+      <to>Success</to>
+      <enabled>Y</enabled>
+      <evaluation>Y</evaluation>
+      <unconditional>Y</unconditional>
+    </hop>
+    <hop>
+      <from>Run graphrag tests</from>
+      <to>drop indexes after failure</to>
+      <enabled>Y</enabled>
+      <evaluation>N</evaluation>
+      <unconditional>N</unconditional>
+    </hop>
+    <hop>
+      <from>drop indexes after failure</from>
+      <to>Error out</to>
+      <enabled>Y</enabled>
+      <evaluation>Y</evaluation>
+      <unconditional>Y</unconditional>
+    </hop>
+  </hops>
+  <notepads>
+  </notepads>
+  <attributes/>
+</workflow>
diff --git a/plugins/tech/ai/src/main/samples/metadata/neo4j-graph-model/graphrag.json b/plugins/tech/ai/src/main/samples/metadata/neo4j-graph-model/graphrag.json
new file mode 100644
index 0000000000..fec7bc5dee
--- /dev/null
+++ b/plugins/tech/ai/src/main/samples/metadata/neo4j-graph-model/graphrag.json
@@ -0,0 +1,189 @@
+{
+  "name": "graphrag",
+  "description": "GraphRAG: documents split into chunks with embeddings, the entities the chunks mention, and the relationships between those entities.",
+  "nodes": [
+    {
+      "presentation": {
+        "x": 80,
+        "y": 200
+      },
+      "name": "Document",
+      "description": "A source document",
+      "labels": [
+        "Document"
+      ],
+      "properties": [
+        {
+          "indexed": false,
+          "unique": true,
+          "name": "id",
+          "description": "Document ID",
+          "type": "String",
+          "mandatory": true,
+          "primary": true
+        },
+        {
+          "indexed": false,
+          "unique": false,
+          "name": "title",
+          "description": "Document title",
+          "type": "String",
+          "mandatory": false,
+          "primary": false
+        }
+      ]
+    },
+    {
+      "presentation": {
+        "x": 300,
+        "y": 200
+      },
+      "name": "Chunk",
+      "description": "A part of a document, with its embedding",
+      "labels": [
+        "Chunk"
+      ],
+      "properties": [
+        {
+          "indexed": false,
+          "unique": true,
+          "name": "id",
+          "description": "Chunk ID: document ID and chunk index",
+          "type": "String",
+          "mandatory": true,
+          "primary": true
+        },
+        {
+          "indexed": false,
+          "unique": false,
+          "name": "chunk_index",
+          "description": "Position in the document",
+          "type": "Integer",
+          "mandatory": false,
+          "primary": false
+        },
+        {
+          "indexed": false,
+          "unique": false,
+          "name": "text",
+          "description": "The text of the chunk",
+          "type": "String",
+          "mandatory": false,
+          "primary": false
+        },
+        {
+          "indexed": false,
+          "unique": false,
+          "name": "embedding",
+          "description": "The embedding of the text",
+          "type": "Vector",
+          "mandatory": false,
+          "primary": false
+        }
+      ]
+    },
+    {
+      "presentation": {
+        "x": 520,
+        "y": 200
+      },
+      "name": "Entity",
+      "description": "An entity the Extract graph transform read from a text. Its type is a property.",
+      "properties": [
+        {
+          "indexed": false,
+          "unique": true,
+          "name": "key",
+          "description": "The name in lowercase without spaces or punctuation: spellings of one entity share it",
+          "type": "String",
+          "mandatory": true,
+          "primary": true
+        },
+        {
+          "indexed": false,
+          "unique": false,
+          "name": "name",
+          "description": "The name of the entity, as a text names it",
+          "type": "String",
+          "mandatory": false,
+          "primary": false
+        },
+        {
+          "indexed": false,
+          "unique": false,
+          "name": "type",
+          "description": "The entity type, for example Person",
+          "type": "String",
+          "mandatory": false,
+          "primary": false
+        },
+        {
+          "indexed": false,
+          "unique": false,
+          "name": "description",
+          "description": "One sentence about the entity",
+          "type": "String",
+          "mandatory": false,
+          "primary": false
+        }
+      ],
+      "labels": [
+        "Entity"
+      ]
+    }
+  ],
+  "relationships": [
+    {
+      "nodeSource": "Document",
+      "name": "HAS_CHUNK",
+      "description": "A document consists of chunks",
+      "nodeTarget": "Chunk",
+      "label": "HAS_CHUNK",
+      "properties": []
+    },
+    {
+      "nodeSource": "Chunk",
+      "name": "MENTIONS",
+      "description": "A chunk mentions an entity",
+      "nodeTarget": "Entity",
+      "label": "MENTIONS",
+      "properties": []
+    },
+    {
+      "nodeSource": "Entity",
+      "name": "RELATED_TO",
+      "description": "A relationship the Extract graph transform read between two entities: one per type and source chunk. The GraphRAG samples write it with Graph query, so the type and chunk_id identify it.",
+      "nodeTarget": "Entity",
+      "label": "RELATED_TO",
+      "properties": [
+        {
+          "indexed": false,
+          "unique": false,
+          "name": "type",
+          "description": "The relationship type, for example WORKED_WITH",
+          "type": "String",
+          "mandatory": false,
+          "primary": false
+        },
+        {
+          "indexed": false,
+          "unique": false,
+          "name": "description",
+          "description": "One sentence about the relationship",
+          "type": "String",
+          "mandatory": false,
+          "primary": false
+        },
+        {
+          "indexed": false,
+          "unique": false,
+          "name": "chunk_id",
+          "description": "The chunk the relationship was read from",
+          "type": "String",
+          "mandatory": false,
+          "primary": false
+        }
+      ]
+    }
+  ]
+}
diff --git a/plugins/tech/ai/src/main/samples/transforms/graphrag-ask-hybrid.hpl b/plugins/tech/ai/src/main/samples/transforms/graphrag-ask-hybrid.hpl
new file mode 100644
index 0000000000..0cda22d215
--- /dev/null
+++ b/plugins/tech/ai/src/main/samples/transforms/graphrag-ask-hybrid.hpl
@@ -0,0 +1,530 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+Licensed to the Apache Software Foundation (ASF) under one or more
+contributor license agreements.  See the NOTICE file distributed with
+this work for additional information regarding copyright ownership.
+The ASF licenses this file to You under the Apache License, Version 2.0
+(the "License"); you may not use this file except in compliance with
+the License.  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+
+-->
+<pipeline>
+  <info>
+    <name>graphrag-ask-hybrid</name>
+    <name_sync_with_filename>Y</name_sync_with_filename>
+    <description>GraphRAG question answering: embed the question, find the closest chunks in pgvector, add the facts the graph holds about the entities each chunk mentions, and ask the chat model. Run graphrag-index-hybrid.hpl first. Uses the same connections and AI providers.</description>
+    <extended_description/>
+    <pipeline_version/>
+    <pipeline_type>Normal</pipeline_type>
+    <parameters>
+    <parameter>
+      <name>QUESTION</name>
+      <default_value>In which city did the designer of the machine Ada Lovelace wrote an algorithm for live?</default_value>
+      <description>The question to answer</description>
+    </parameter>
+    </parameters>
+    <capture_transform_performance>N</capture_transform_performance>
+    <transform_performance_capturing_delay>1000</transform_performance_capturing_delay>
+    <transform_performance_capturing_size_limit>100</transform_performance_capturing_size_limit>
+    <created_user>-</created_user>
+    <created_date>2026/10/10 12:00:00.000</created_date>
+    <modified_user>-</modified_user>
+    <modified_date>2026/10/10 12:00:00.000</modified_date>
+  </info>
+  <notepads>
+  </notepads>
+  <order>
+    <hop>
+      <from>One row</from>
+      <to>Question</to>
+      <enabled>Y</enabled>
+    </hop>
+    <hop>
+      <from>Question</from>
+      <to>Embed the question</to>
+      <enabled>Y</enabled>
+    </hop>
+    <hop>
+      <from>Embed the question</from>
+      <to>Vector search in pgvector</to>
+      <enabled>Y</enabled>
+    </hop>
+    <hop>
+      <from>Vector search in pgvector</from>
+      <to>Facts of the chunk</to>
+      <enabled>Y</enabled>
+    </hop>
+    <hop>
+      <from>Facts of the chunk</from>
+      <to>Fact</to>
+      <enabled>Y</enabled>
+    </hop>
+    <hop>
+      <from>Fact</from>
+      <to>One row per chunk</to>
+      <enabled>Y</enabled>
+    </hop>
+    <hop>
+      <from>One row per chunk</from>
+      <to>Label the excerpts</to>
+      <enabled>Y</enabled>
+    </hop>
+    <hop>
+      <from>Label the excerpts</from>
+      <to>Context</to>
+      <enabled>Y</enabled>
+    </hop>
+    <hop>
+      <from>Context</from>
+      <to>Prompt</to>
+      <enabled>Y</enabled>
+    </hop>
+    <hop>
+      <from>Prompt</from>
+      <to>Answer the question</to>
+      <enabled>Y</enabled>
+    </hop>
+    <hop>
+      <from>Answer the question</from>
+      <to>Answer</to>
+      <enabled>Y</enabled>
+    </hop>
+  </order>
+  <transform>
+    <name>One row</name>
+    <type>RowGenerator</type>
+    <description/>
+    <distribute>Y</distribute>
+    <custom_distribution/>
+    <copies>1</copies>
+    <partitioning>
+      <method>none</method>
+      <schema_name/>
+    </partitioning>
+    <never_ending>N</never_ending>
+    <interval_in_ms>5000</interval_in_ms>
+    <limit>1</limit>
+    <fields/>
+    <attributes/>
+    <GUI>
+      <xloc>96</xloc>
+      <yloc>128</yloc>
+    </GUI>
+  </transform>
+  <transform>
+    <name>Question</name>
+    <type>GetVariable</type>
+    <description/>
+    <distribute>Y</distribute>
+    <custom_distribution/>
+    <copies>1</copies>
+    <partitioning>
+      <method>none</method>
+      <schema_name/>
+    </partitioning>
+    <fields>
+      <field>
+        <name>question</name>
+        <variable>${QUESTION}</variable>
+        <type>String</type>
+        <format/>
+        <currency/>
+        <decimal/>
+        <group/>
+        <length>-1</length>
+        <precision>-1</precision>
+        <trim_type>none</trim_type>
+      </field>
+    </fields>
+    <attributes/>
+    <GUI>
+      <xloc>224</xloc>
+      <yloc>128</yloc>
+    </GUI>
+  </transform>
+  <transform>
+    <name>Embed the question</name>
+    <type>EmbedText</type>
+    <description/>
+    <distribute>Y</distribute>
+    <custom_distribution/>
+    <copies>1</copies>
+    <partitioning>
+      <method>none</method>
+      <schema_name/>
+    </partitioning>
+    <ai_provider>ollama-embeddings</ai_provider>
+    <model_name/>
+    <input_field>question</input_field>
+    <output_field>question_embedding</output_field>
+    <model_field/>
+    <dimensions_field/>
+    <include_model_metadata>N</include_model_metadata>
+    <output_format>VECTOR</output_format>
+    <batch_size>1</batch_size>
+    <attributes/>
+    <GUI>
+      <xloc>352</xloc>
+      <yloc>128</yloc>
+    </GUI>
+  </transform>
+  <transform>
+    <name>Vector search in pgvector</name>
+    <type>PgVectorSearch</type>
+    <description>The 3 chunks closest to the question</description>
+    <distribute>Y</distribute>
+    <custom_distribution/>
+    <copies>1</copies>
+    <partitioning>
+      <method>none</method>
+      <schema_name/>
+    </partitioning>
+    <connection>pgvector</connection>
+    <schemaName>public</schemaName>
+    <tableName>graphrag_chunks</tableName>
+    <embeddingField>question_embedding</embeddingField>
+    <topK>3</topK>
+    <minScore>0</minScore>
+    <distanceMetric>COSINE</distanceMetric>
+    <resultIdField>chunk_id</resultIdField>
+    <resultDocumentIdField>document_id</resultDocumentIdField>
+    <resultChunkIndexField>chunk_index</resultChunkIndexField>
+    <resultContentField>chunk_text</resultContentField>
+    <resultScoreField>score</resultScoreField>
+    <attributes/>
+    <GUI>
+      <xloc>480</xloc>
+      <yloc>128</yloc>
+    </GUI>
+  </transform>
+  <transform>
+    <name>Facts of the chunk</name>
+    <type>Neo4jCypherOutput</type>
+    <description>The entities the chunk mentions and their relationships: one row per fact</description>
+    <distribute>Y</distribute>
+    <custom_distribution/>
+    <copies>1</copies>
+    <partitioning>
+      <method>none</method>
+      <schema_name/>
+    </partitioning>
+    <connection>demo-age</connection>
+    <cypher>MATCH (c:Chunk {id: $chunk_id})
+OPTIONAL MATCH (c)-[:MENTIONS]-&gt;(e:Entity)
+OPTIONAL MATCH (e)-[r:RELATED_TO]-&gt;(o:Entity)
+RETURN e.name AS entity, e.type AS entity_type, r.type AS relation, o.name AS related_entity</cypher>
+    <batch_size>1</batch_size>
+    <read_only>Y</read_only>
+    <nr_retries_on_error/>
+    <retry>N</retry>
+    <cypher_from_field>N</cypher_from_field>
+    <cypher_field/>
+    <unwind>N</unwind>
+    <unwind_map/>
+    <returning_graph>N</returning_graph>
+    <return_graph_field/>
+    <mappings>
+      <mapping>
+        <parameter>chunk_id</parameter>
+        <field>chunk_id</field>
+        <type>String</type>
+      </mapping>
+    </mappings>
+    <returns>
+      <return>
+        <name>entity</name>
+        <type>String</type>
+        <source_type>String</source_type>
+      </return>
+      <return>
+        <name>entity_type</name>
+        <type>String</type>
+        <source_type>String</source_type>
+      </return>
+      <return>
+        <name>relation</name>
+        <type>String</type>
+        <source_type>String</source_type>
+      </return>
+      <return>
+        <name>related_entity</name>
+        <type>String</type>
+        <source_type>String</source_type>
+      </return>
+    </returns>
+    <attributes/>
+    <GUI>
+      <xloc>672</xloc>
+      <yloc>128</yloc>
+    </GUI>
+  </transform>
+  <transform>
+    <name>Fact</name>
+    <type>ScriptValueMod</type>
+    <description>Entity (type) -RELATION-&gt; other entity</description>
+    <distribute>Y</distribute>
+    <custom_distribution/>
+    <copies>1</copies>
+    <partitioning>
+      <method>none</method>
+      <schema_name/>
+    </partitioning>
+    <optimizationLevel>9</optimizationLevel>
+    <jsScripts>
+      <jsScript>
+        <jsScript_type>0</jsScript_type>
+        <jsScript_name>Script 1</jsScript_name>
+        <jsScript_script>var fact = null;
+if (entity != null) {
+  fact = entity;
+  if (entity_type != null) {
+    fact = fact + " (" + entity_type + ")";
+  }
+  if (relation != null) {
+    fact = fact + " -" + relation + "-&gt; " + related_entity;
+  }
+}</jsScript_script>
+      </jsScript>
+    </jsScripts>
+    <fields>
+      <field>
+        <name>fact</name>
+        <rename>fact</rename>
+        <type>String</type>
+        <length>-1</length>
+        <precision>-1</precision>
+        <replace>N</replace>
+      </field>
+    </fields>
+    <attributes/>
+    <GUI>
+      <xloc>832</xloc>
+      <yloc>128</yloc>
+    </GUI>
+  </transform>
+  <transform>
+    <name>One row per chunk</name>
+    <type>GroupBy</type>
+    <description>The rows of a chunk are consecutive</description>
+    <distribute>Y</distribute>
+    <custom_distribution/>
+    <copies>1</copies>
+    <partitioning>
+      <method>none</method>
+      <schema_name/>
+    </partitioning>
+    <directory>${java.io.tmpdir}</directory>
+    <prefix>graphrag</prefix>
+    <add_linenr>N</add_linenr>
+    <all_rows>N</all_rows>
+    <fields>
+      <field>
+        <aggregate>facts</aggregate>
+        <subject>fact</subject>
+        <type>CONCAT_DISTINCT</type>
+        <valuefield>; </valuefield>
+      </field>
+    </fields>
+    <give_back_row>N</give_back_row>
+    <group>
+      <field>
+        <name>question</name>
+      </field>
+      <field>
+        <name>chunk_id</name>
+      </field>
+      <field>
+        <name>chunk_text</name>
+      </field>
+      <field>
+        <name>score</name>
+      </field>
+    </group>
+    <ignore_aggregate>N</ignore_aggregate>
+    <attributes/>
+    <GUI>
+      <xloc>992</xloc>
+      <yloc>128</yloc>
+    </GUI>
+  </transform>
+  <transform>
+    <name>Label the excerpts</name>
+    <type>ScriptValueMod</type>
+    <description/>
+    <distribute>Y</distribute>
+    <custom_distribution/>
+    <copies>1</copies>
+    <partitioning>
+      <method>none</method>
+      <schema_name/>
+    </partitioning>
+    <optimizationLevel>9</optimizationLevel>
+    <jsScripts>
+      <jsScript>
+        <jsScript_type>0</jsScript_type>
+        <jsScript_name>Script 1</jsScript_name>
+        <jsScript_script>var excerpt = "---\n" + chunk_text;
+if (facts != null &amp;&amp; facts != "") {
+  excerpt = excerpt + "\nFacts: " + facts;
+}</jsScript_script>
+      </jsScript>
+    </jsScripts>
+    <fields>
+      <field>
+        <name>excerpt</name>
+        <rename>excerpt</rename>
+        <type>String</type>
+        <length>-1</length>
+        <precision>-1</precision>
+        <replace>N</replace>
+      </field>
+    </fields>
+    <attributes/>
+    <GUI>
+      <xloc>672</xloc>
+      <yloc>272</yloc>
+    </GUI>
+  </transform>
+  <transform>
+    <name>Context</name>
+    <type>GroupBy</type>
+    <description/>
+    <distribute>Y</distribute>
+    <custom_distribution/>
+    <copies>1</copies>
+    <partitioning>
+      <method>none</method>
+      <schema_name/>
+    </partitioning>
+    <directory>${java.io.tmpdir}</directory>
+    <prefix>graphrag</prefix>
+    <add_linenr>N</add_linenr>
+    <all_rows>N</all_rows>
+    <fields>
+      <field>
+        <aggregate>context</aggregate>
+        <subject>excerpt</subject>
+        <type>CONCAT_STRING_CRLF</type>
+        <valuefield/>
+      </field>
+    </fields>
+    <give_back_row>N</give_back_row>
+    <group>
+      <field>
+        <name>question</name>
+      </field>
+    </group>
+    <ignore_aggregate>N</ignore_aggregate>
+    <attributes/>
+    <GUI>
+      <xloc>864</xloc>
+      <yloc>272</yloc>
+    </GUI>
+  </transform>
+  <transform>
+    <name>Prompt</name>
+    <type>ScriptValueMod</type>
+    <description/>
+    <distribute>Y</distribute>
+    <custom_distribution/>
+    <copies>1</copies>
+    <partitioning>
+      <method>none</method>
+      <schema_name/>
+    </partitioning>
+    <optimizationLevel>9</optimizationLevel>
+    <jsScripts>
+      <jsScript>
+        <jsScript_type>0</jsScript_type>
+        <jsScript_name>Script 1</jsScript_name>
+        <jsScript_script>var prompt = "Answer the question using only the excerpts below. "
+  + "Each excerpt lists the facts a knowledge graph holds about the entities it mentions; "
+  + "use them to connect information across excerpts. "
+  + "If the excerpts don't answer the question, say that you don't know.\n\n"
+  + "Excerpts:\n" + context + "\n\nQuestion: " + question + "\n\nAnswer:";</jsScript_script>
+      </jsScript>
+    </jsScripts>
+    <fields>
+      <field>
+        <name>prompt</name>
+        <rename>prompt</rename>
+        <type>String</type>
+        <length>-1</length>
+        <precision>-1</precision>
+        <replace>N</replace>
+      </field>
+    </fields>
+    <attributes/>
+    <GUI>
+      <xloc>1056</xloc>
+      <yloc>272</yloc>
+    </GUI>
+  </transform>
+  <transform>
+    <name>Answer the question</name>
+    <type>LanguageModelChat</type>
+    <description/>
+    <distribute>Y</distribute>
+    <custom_distribution/>
+    <copies>1</copies>
+    <partitioning>
+      <method>none</method>
+      <schema_name/>
+    </partitioning>
+    <aiProviderName>ollama-local</aiProviderName>
+    <inputField>prompt</inputField>
+    <inputChatJson>false</inputChatJson>
+    <outputChatJson>false</outputChatJson>
+    <mock>false</mock>
+    <mockOutputValue/>
+    <outputFieldNamePrefix>llm_</outputFieldNamePrefix>
+    <parallelism>1</parallelism>
+    <attributes/>
+    <GUI>
+      <xloc>1312</xloc>
+      <yloc>272</yloc>
+    </GUI>
+  </transform>
+  <transform>
+    <name>Answer</name>
+    <type>WriteToLog</type>
+    <description>The answer is in llm_output</description>
+    <distribute>Y</distribute>
+    <custom_distribution/>
+    <copies>1</copies>
+    <partitioning>
+      <method>none</method>
+      <schema_name/>
+    </partitioning>
+    <displayHeader>Y</displayHeader>
+    <fields>
+      <field>
+        <name>question</name>
+      </field>
+      <field>
+        <name>llm_output</name>
+      </field>
+    </fields>
+    <limitRows>N</limitRows>
+    <limitRowsNumber>0</limitRowsNumber>
+    <loglevel>Basic</loglevel>
+    <logmessage/>
+    <attributes/>
+    <GUI>
+      <xloc>1472</xloc>
+      <yloc>272</yloc>
+    </GUI>
+  </transform>
+  <transform_error_handling>
+  </transform_error_handling>
+  <attributes/>
+</pipeline>
diff --git a/plugins/tech/ai/src/main/samples/transforms/graphrag-ask.hpl b/plugins/tech/ai/src/main/samples/transforms/graphrag-ask.hpl
new file mode 100644
index 0000000000..8885b7dd7a
--- /dev/null
+++ b/plugins/tech/ai/src/main/samples/transforms/graphrag-ask.hpl
@@ -0,0 +1,541 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+Licensed to the Apache Software Foundation (ASF) under one or more
+contributor license agreements.  See the NOTICE file distributed with
+this work for additional information regarding copyright ownership.
+The ASF licenses this file to You under the Apache License, Version 2.0
+(the "License"); you may not use this file except in compliance with
+the License.  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+
+-->
+<pipeline>
+  <info>
+    <name>graphrag-ask</name>
+    <name_sync_with_filename>Y</name_sync_with_filename>
+    <description>GraphRAG question answering: embed the question, find the closest chunks with Graph vector search, add the facts the graph holds about the entities each chunk mentions, and ask the chat model. Run graphrag-index.hwf first. Uses the same connections and AI providers.</description>
+    <extended_description/>
+    <pipeline_version/>
+    <pipeline_type>Normal</pipeline_type>
+    <parameters>
+    <parameter>
+      <name>QUESTION</name>
+      <default_value>In which city did the designer of the machine Ada Lovelace wrote an algorithm for live?</default_value>
+      <description>The question to answer</description>
+    </parameter>
+    </parameters>
+    <capture_transform_performance>N</capture_transform_performance>
+    <transform_performance_capturing_delay>1000</transform_performance_capturing_delay>
+    <transform_performance_capturing_size_limit>100</transform_performance_capturing_size_limit>
+    <created_user>-</created_user>
+    <created_date>2026/10/10 12:00:00.000</created_date>
+    <modified_user>-</modified_user>
+    <modified_date>2026/10/10 12:00:00.000</modified_date>
+  </info>
+  <notepads>
+  </notepads>
+  <order>
+    <hop>
+      <from>One row</from>
+      <to>Question</to>
+      <enabled>Y</enabled>
+    </hop>
+    <hop>
+      <from>Question</from>
+      <to>Embed the question</to>
+      <enabled>Y</enabled>
+    </hop>
+    <hop>
+      <from>Embed the question</from>
+      <to>Vector search on chunks</to>
+      <enabled>Y</enabled>
+    </hop>
+    <hop>
+      <from>Vector search on chunks</from>
+      <to>Facts of the chunk</to>
+      <enabled>Y</enabled>
+    </hop>
+    <hop>
+      <from>Facts of the chunk</from>
+      <to>Fact</to>
+      <enabled>Y</enabled>
+    </hop>
+    <hop>
+      <from>Fact</from>
+      <to>One row per chunk</to>
+      <enabled>Y</enabled>
+    </hop>
+    <hop>
+      <from>One row per chunk</from>
+      <to>Label the excerpts</to>
+      <enabled>Y</enabled>
+    </hop>
+    <hop>
+      <from>Label the excerpts</from>
+      <to>Context</to>
+      <enabled>Y</enabled>
+    </hop>
+    <hop>
+      <from>Context</from>
+      <to>Prompt</to>
+      <enabled>Y</enabled>
+    </hop>
+    <hop>
+      <from>Prompt</from>
+      <to>Answer the question</to>
+      <enabled>Y</enabled>
+    </hop>
+    <hop>
+      <from>Answer the question</from>
+      <to>Answer</to>
+      <enabled>Y</enabled>
+    </hop>
+  </order>
+  <transform>
+    <name>One row</name>
+    <type>RowGenerator</type>
+    <description/>
+    <distribute>Y</distribute>
+    <custom_distribution/>
+    <copies>1</copies>
+    <partitioning>
+      <method>none</method>
+      <schema_name/>
+    </partitioning>
+    <never_ending>N</never_ending>
+    <interval_in_ms>5000</interval_in_ms>
+    <limit>1</limit>
+    <fields/>
+    <attributes/>
+    <GUI>
+      <xloc>96</xloc>
+      <yloc>128</yloc>
+    </GUI>
+  </transform>
+  <transform>
+    <name>Question</name>
+    <type>GetVariable</type>
+    <description/>
+    <distribute>Y</distribute>
+    <custom_distribution/>
+    <copies>1</copies>
+    <partitioning>
+      <method>none</method>
+      <schema_name/>
+    </partitioning>
+    <fields>
+      <field>
+        <name>question</name>
+        <variable>${QUESTION}</variable>
+        <type>String</type>
+        <format/>
+        <currency/>
+        <decimal/>
+        <group/>
+        <length>-1</length>
+        <precision>-1</precision>
+        <trim_type>none</trim_type>
+      </field>
+    </fields>
+    <attributes/>
+    <GUI>
+      <xloc>224</xloc>
+      <yloc>128</yloc>
+    </GUI>
+  </transform>
+  <transform>
+    <name>Embed the question</name>
+    <type>EmbedText</type>
+    <description/>
+    <distribute>Y</distribute>
+    <custom_distribution/>
+    <copies>1</copies>
+    <partitioning>
+      <method>none</method>
+      <schema_name/>
+    </partitioning>
+    <ai_provider>ollama-embeddings</ai_provider>
+    <model_name/>
+    <input_field>question</input_field>
+    <output_field>question_embedding</output_field>
+    <model_field/>
+    <dimensions_field/>
+    <include_model_metadata>N</include_model_metadata>
+    <output_format>VECTOR</output_format>
+    <batch_size>1</batch_size>
+    <attributes/>
+    <GUI>
+      <xloc>352</xloc>
+      <yloc>128</yloc>
+    </GUI>
+  </transform>
+  <transform>
+    <name>Vector search on chunks</name>
+    <type>GraphVectorSearch</type>
+    <description>The 3 chunks closest to the question</description>
+    <distribute>Y</distribute>
+    <custom_distribution/>
+    <copies>1</copies>
+    <partitioning>
+      <method>none</method>
+      <schema_name/>
+    </partitioning>
+    <connection>demo-neo4j</connection>
+    <element_type>NODE</element_type>
+    <index_name>graphrag_chunks</index_name>
+    <label>Chunk</label>
+    <vector_property>embedding</vector_property>
+    <similarity>COSINE</similarity>
+    <embedding_field>question_embedding</embedding_field>
+    <top_k>3</top_k>
+    <min_score>0</min_score>
+    <eat_row_on_no_match>Y</eat_row_on_no_match>
+    <score_field>score</score_field>
+    <return_properties>
+      <return_property>
+        <property>id</property>
+        <field_name>chunk_id</field_name>
+        <type>String</type>
+      </return_property>
+      <return_property>
+        <property>text</property>
+        <field_name>chunk_text</field_name>
+        <type>String</type>
+      </return_property>
+    </return_properties>
+    <attributes/>
+    <GUI>
+      <xloc>480</xloc>
+      <yloc>128</yloc>
+    </GUI>
+  </transform>
+  <transform>
+    <name>Facts of the chunk</name>
+    <type>Neo4jCypherOutput</type>
+    <description>The entities the chunk mentions and their relationships: one row per fact</description>
+    <distribute>Y</distribute>
+    <custom_distribution/>
+    <copies>1</copies>
+    <partitioning>
+      <method>none</method>
+      <schema_name/>
+    </partitioning>
+    <connection>demo-neo4j</connection>
+    <cypher>MATCH (c:Chunk {id: $chunk_id})
+OPTIONAL MATCH (c)-[:MENTIONS]-&gt;(e:Entity)
+OPTIONAL MATCH (e)-[r:RELATED_TO]-&gt;(o:Entity)
+RETURN e.name AS entity, e.type AS entity_type, r.type AS relation, o.name AS related_entity</cypher>
+    <batch_size>1</batch_size>
+    <read_only>Y</read_only>
+    <nr_retries_on_error/>
+    <retry>N</retry>
+    <cypher_from_field>N</cypher_from_field>
+    <cypher_field/>
+    <unwind>N</unwind>
+    <unwind_map/>
+    <returning_graph>N</returning_graph>
+    <return_graph_field/>
+    <mappings>
+      <mapping>
+        <parameter>chunk_id</parameter>
+        <field>chunk_id</field>
+        <type>String</type>
+      </mapping>
+    </mappings>
+    <returns>
+      <return>
+        <name>entity</name>
+        <type>String</type>
+        <source_type>String</source_type>
+      </return>
+      <return>
+        <name>entity_type</name>
+        <type>String</type>
+        <source_type>String</source_type>
+      </return>
+      <return>
+        <name>relation</name>
+        <type>String</type>
+        <source_type>String</source_type>
+      </return>
+      <return>
+        <name>related_entity</name>
+        <type>String</type>
+        <source_type>String</source_type>
+      </return>
+    </returns>
+    <attributes/>
+    <GUI>
+      <xloc>672</xloc>
+      <yloc>128</yloc>
+    </GUI>
+  </transform>
+  <transform>
+    <name>Fact</name>
+    <type>ScriptValueMod</type>
+    <description>Entity (type) -RELATION-&gt; other entity</description>
+    <distribute>Y</distribute>
+    <custom_distribution/>
+    <copies>1</copies>
+    <partitioning>
+      <method>none</method>
+      <schema_name/>
+    </partitioning>
+    <optimizationLevel>9</optimizationLevel>
+    <jsScripts>
+      <jsScript>
+        <jsScript_type>0</jsScript_type>
+        <jsScript_name>Script 1</jsScript_name>
+        <jsScript_script>var fact = null;
+if (entity != null) {
+  fact = entity;
+  if (entity_type != null) {
+    fact = fact + " (" + entity_type + ")";
+  }
+  if (relation != null) {
+    fact = fact + " -" + relation + "-&gt; " + related_entity;
+  }
+}</jsScript_script>
+      </jsScript>
+    </jsScripts>
+    <fields>
+      <field>
+        <name>fact</name>
+        <rename>fact</rename>
+        <type>String</type>
+        <length>-1</length>
+        <precision>-1</precision>
+        <replace>N</replace>
+      </field>
+    </fields>
+    <attributes/>
+    <GUI>
+      <xloc>832</xloc>
+      <yloc>128</yloc>
+    </GUI>
+  </transform>
+  <transform>
+    <name>One row per chunk</name>
+    <type>GroupBy</type>
+    <description>The rows of a chunk are consecutive</description>
+    <distribute>Y</distribute>
+    <custom_distribution/>
+    <copies>1</copies>
+    <partitioning>
+      <method>none</method>
+      <schema_name/>
+    </partitioning>
+    <directory>${java.io.tmpdir}</directory>
+    <prefix>graphrag</prefix>
+    <add_linenr>N</add_linenr>
+    <all_rows>N</all_rows>
+    <fields>
+      <field>
+        <aggregate>facts</aggregate>
+        <subject>fact</subject>
+        <type>CONCAT_DISTINCT</type>
+        <valuefield>; </valuefield>
+      </field>
+    </fields>
+    <give_back_row>N</give_back_row>
+    <group>
+      <field>
+        <name>question</name>
+      </field>
+      <field>
+        <name>chunk_id</name>
+      </field>
+      <field>
+        <name>chunk_text</name>
+      </field>
+      <field>
+        <name>score</name>
+      </field>
+    </group>
+    <ignore_aggregate>N</ignore_aggregate>
+    <attributes/>
+    <GUI>
+      <xloc>992</xloc>
+      <yloc>128</yloc>
+    </GUI>
+  </transform>
+  <transform>
+    <name>Label the excerpts</name>
+    <type>ScriptValueMod</type>
+    <description/>
+    <distribute>Y</distribute>
+    <custom_distribution/>
+    <copies>1</copies>
+    <partitioning>
+      <method>none</method>
+      <schema_name/>
+    </partitioning>
+    <optimizationLevel>9</optimizationLevel>
+    <jsScripts>
+      <jsScript>
+        <jsScript_type>0</jsScript_type>
+        <jsScript_name>Script 1</jsScript_name>
+        <jsScript_script>var excerpt = "---\n" + chunk_text;
+if (facts != null &amp;&amp; facts != "") {
+  excerpt = excerpt + "\nFacts: " + facts;
+}</jsScript_script>
+      </jsScript>
+    </jsScripts>
+    <fields>
+      <field>
+        <name>excerpt</name>
+        <rename>excerpt</rename>
+        <type>String</type>
+        <length>-1</length>
+        <precision>-1</precision>
+        <replace>N</replace>
+      </field>
+    </fields>
+    <attributes/>
+    <GUI>
+      <xloc>672</xloc>
+      <yloc>272</yloc>
+    </GUI>
+  </transform>
+  <transform>
+    <name>Context</name>
+    <type>GroupBy</type>
+    <description/>
+    <distribute>Y</distribute>
+    <custom_distribution/>
+    <copies>1</copies>
+    <partitioning>
+      <method>none</method>
+      <schema_name/>
+    </partitioning>
+    <directory>${java.io.tmpdir}</directory>
+    <prefix>graphrag</prefix>
+    <add_linenr>N</add_linenr>
+    <all_rows>N</all_rows>
+    <fields>
+      <field>
+        <aggregate>context</aggregate>
+        <subject>excerpt</subject>
+        <type>CONCAT_STRING_CRLF</type>
+        <valuefield/>
+      </field>
+    </fields>
+    <give_back_row>N</give_back_row>
+    <group>
+      <field>
+        <name>question</name>
+      </field>
+    </group>
+    <ignore_aggregate>N</ignore_aggregate>
+    <attributes/>
+    <GUI>
+      <xloc>864</xloc>
+      <yloc>272</yloc>
+    </GUI>
+  </transform>
+  <transform>
+    <name>Prompt</name>
+    <type>ScriptValueMod</type>
+    <description/>
+    <distribute>Y</distribute>
+    <custom_distribution/>
+    <copies>1</copies>
+    <partitioning>
+      <method>none</method>
+      <schema_name/>
+    </partitioning>
+    <optimizationLevel>9</optimizationLevel>
+    <jsScripts>
+      <jsScript>
+        <jsScript_type>0</jsScript_type>
+        <jsScript_name>Script 1</jsScript_name>
+        <jsScript_script>var prompt = "Answer the question using only the excerpts below. "
+  + "Each excerpt lists the facts a knowledge graph holds about the entities it mentions; "
+  + "use them to connect information across excerpts. "
+  + "If the excerpts don't answer the question, say that you don't know.\n\n"
+  + "Excerpts:\n" + context + "\n\nQuestion: " + question + "\n\nAnswer:";</jsScript_script>
+      </jsScript>
+    </jsScripts>
+    <fields>
+      <field>
+        <name>prompt</name>
+        <rename>prompt</rename>
+        <type>String</type>
+        <length>-1</length>
+        <precision>-1</precision>
+        <replace>N</replace>
+      </field>
+    </fields>
+    <attributes/>
+    <GUI>
+      <xloc>1056</xloc>
+      <yloc>272</yloc>
+    </GUI>
+  </transform>
+  <transform>
+    <name>Answer the question</name>
+    <type>LanguageModelChat</type>
+    <description/>
+    <distribute>Y</distribute>
+    <custom_distribution/>
+    <copies>1</copies>
+    <partitioning>
+      <method>none</method>
+      <schema_name/>
+    </partitioning>
+    <aiProviderName>ollama-local</aiProviderName>
+    <inputField>prompt</inputField>
+    <inputChatJson>false</inputChatJson>
+    <outputChatJson>false</outputChatJson>
+    <mock>false</mock>
+    <mockOutputValue/>
+    <outputFieldNamePrefix>llm_</outputFieldNamePrefix>
+    <parallelism>1</parallelism>
+    <attributes/>
+    <GUI>
+      <xloc>1312</xloc>
+      <yloc>272</yloc>
+    </GUI>
+  </transform>
+  <transform>
+    <name>Answer</name>
+    <type>WriteToLog</type>
+    <description>The answer is in llm_output</description>
+    <distribute>Y</distribute>
+    <custom_distribution/>
+    <copies>1</copies>
+    <partitioning>
+      <method>none</method>
+      <schema_name/>
+    </partitioning>
+    <displayHeader>Y</displayHeader>
+    <fields>
+      <field>
+        <name>question</name>
+      </field>
+      <field>
+        <name>llm_output</name>
+      </field>
+    </fields>
+    <limitRows>N</limitRows>
+    <limitRowsNumber>0</limitRowsNumber>
+    <loglevel>Basic</loglevel>
+    <logmessage/>
+    <attributes/>
+    <GUI>
+      <xloc>1472</xloc>
+      <yloc>272</yloc>
+    </GUI>
+  </transform>
+  <transform_error_handling>
+  </transform_error_handling>
+  <attributes/>
+</pipeline>
diff --git a/plugins/tech/ai/src/main/samples/transforms/graphrag-index-hybrid.hpl b/plugins/tech/ai/src/main/samples/transforms/graphrag-index-hybrid.hpl
new file mode 100644
index 0000000000..d6a5bc57ba
--- /dev/null
+++ b/plugins/tech/ai/src/main/samples/transforms/graphrag-index-hybrid.hpl
@@ -0,0 +1,728 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+Licensed to the Apache Software Foundation (ASF) under one or more
+contributor license agreements.  See the NOTICE file distributed with
+this work for additional information regarding copyright ownership.
+The ASF licenses this file to You under the Apache License, Version 2.0
+(the "License"); you may not use this file except in compliance with
+the License.  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+
+-->
+<pipeline>
+  <info>
+    <name>graphrag-index-hybrid</name>
+    <name_sync_with_filename>Y</name_sync_with_filename>
+    <description>GraphRAG indexing: split documents into chunks, embed them and write them to pgvector and Apache AGE, then extract entities and relationships per chunk. Needs the graph database connection demo-age, the relational database connection pgvector (PostgreSQL with the vector extension), an AI provider ollama-embeddings with an embedding model (768 dimensions, for example nomic-embed-text) and an AI provider ollama-local with a chat model. Set Thinking to Off on ollama-local f [...]
+    <extended_description/>
+    <pipeline_version/>
+    <pipeline_type>Normal</pipeline_type>
+    <parameters>
+    </parameters>
+    <capture_transform_performance>N</capture_transform_performance>
+    <transform_performance_capturing_delay>1000</transform_performance_capturing_delay>
+    <transform_performance_capturing_size_limit>100</transform_performance_capturing_size_limit>
+    <created_user>-</created_user>
+    <created_date>2026/10/10 12:00:00.000</created_date>
+    <modified_user>-</modified_user>
+    <modified_date>2026/10/10 12:00:00.000</modified_date>
+  </info>
+  <notepads>
+    <notepad>
+      <backgroundcolorblue>251</backgroundcolorblue>
+      <backgroundcolorgreen>232</backgroundcolorgreen>
+      <backgroundcolorred>201</backgroundcolorred>
+      <bordercolorblue>90</bordercolorblue>
+      <bordercolorgreen>58</bordercolorgreen>
+      <bordercolorred>14</bordercolorred>
+      <fontbold>N</fontbold>
+      <fontcolorblue>90</fontcolorblue>
+      <fontcolorgreen>58</fontcolorgreen>
+      <fontcolorred>14</fontcolorred>
+      <fontitalic>N</fontitalic>
+      <fontname/>
+      <fontsize>-1</fontsize>
+      <height>48</height>
+      <xloc>64</xloc>
+      <yloc>400</yloc>
+      <note>Documents -&gt; chunks -&gt; embeddings -&gt; Document and Chunk nodes + pgvector rows.
+Once every chunk is written: Extract graph -&gt; Entity nodes and MENTIONS, then RELATED_TO per type and source chunk.</note>
+      <width>640</width>
+    </notepad>
+  </notepads>
+  <order>
+    <hop>
+      <from>Documents</from>
+      <to>Split into chunks</to>
+      <enabled>Y</enabled>
+    </hop>
+    <hop>
+      <from>Split into chunks</from>
+      <to>Chunk ID</to>
+      <enabled>Y</enabled>
+    </hop>
+    <hop>
+      <from>Chunk ID</from>
+      <to>Embed chunks</to>
+      <enabled>Y</enabled>
+    </hop>
+    <hop>
+      <from>Embed chunks</from>
+      <to>Upsert into pgvector</to>
+      <enabled>Y</enabled>
+    </hop>
+    <hop>
+      <from>Embed chunks</from>
+      <to>Write documents and chunks</to>
+      <enabled>Y</enabled>
+    </hop>
+    <hop>
+      <from>Chunk ID</from>
+      <to>Hold the chunks</to>
+      <enabled>Y</enabled>
+    </hop>
+    <hop>
+      <from>Hold the chunks</from>
+      <to>Wait for the chunks</to>
+      <enabled>Y</enabled>
+    </hop>
+    <hop>
+      <from>Wait for the chunks</from>
+      <to>Extract graph</to>
+      <enabled>Y</enabled>
+    </hop>
+    <hop>
+      <from>Extract graph</from>
+      <to>Entity keys</to>
+      <enabled>Y</enabled>
+    </hop>
+    <hop>
+      <from>Entity keys</from>
+      <to>Entity?</to>
+      <enabled>Y</enabled>
+    </hop>
+    <hop>
+      <from>Entity?</from>
+      <to>Write mentions</to>
+      <enabled>Y</enabled>
+    </hop>
+    <hop>
+      <from>Entity?</from>
+      <to>Collect relationships</to>
+      <enabled>Y</enabled>
+    </hop>
+    <hop>
+      <from>Collect relationships</from>
+      <to>Wait for the entities</to>
+      <enabled>Y</enabled>
+    </hop>
+    <hop>
+      <from>Wait for the entities</from>
+      <to>Write relationships</to>
+      <enabled>Y</enabled>
+    </hop>
+  </order>
+  <transform>
+    <name>Documents</name>
+    <type>DataGrid</type>
+    <description>Replace with your own documents, for example a Text file input</description>
+    <distribute>Y</distribute>
+    <custom_distribution/>
+    <copies>1</copies>
+    <partitioning>
+      <method>none</method>
+      <schema_name/>
+    </partitioning>
+    <fields>
+      <field>
+        <set_empty_string>N</set_empty_string>
+        <length>-1</length>
+        <name>document_id</name>
+        <precision>-1</precision>
+        <type>String</type>
+      </field>
+      <field>
+        <set_empty_string>N</set_empty_string>
+        <length>-1</length>
+        <name>title</name>
+        <precision>-1</precision>
+        <type>String</type>
+      </field>
+      <field>
+        <set_empty_string>N</set_empty_string>
+        <length>-1</length>
+        <name>text</name>
+        <precision>-1</precision>
+        <type>String</type>
+      </field>
+    </fields>
+    <data>
+      <line>
+        <item>ada-lovelace</item>
+        <item>Ada Lovelace</item>
+        <item>Ada Lovelace was a mathematician. She wrote the first published algorithm intended for a machine: a method to calculate Bernoulli numbers on the Analytical Engine.</item>
+      </line>
+      <line>
+        <item>analytical-engine</item>
+        <item>The Analytical Engine</item>
+        <item>The Analytical Engine was a design for a mechanical general-purpose computer. Charles Babbage designed it and first described it in 1837.</item>
+      </line>
+      <line>
+        <item>charles-babbage</item>
+        <item>Charles Babbage</item>
+        <item>Charles Babbage was a mathematician and inventor. He lived in London, where he built a working part of his earlier Difference Engine.</item>
+      </line>
+    </data>
+    <attributes/>
+    <GUI>
+      <xloc>96</xloc>
+      <yloc>128</yloc>
+    </GUI>
+  </transform>
+  <transform>
+    <name>Split into chunks</name>
+    <type>TextChunker</type>
+    <description/>
+    <distribute>Y</distribute>
+    <custom_distribution/>
+    <copies>1</copies>
+    <partitioning>
+      <method>none</method>
+      <schema_name/>
+    </partitioning>
+    <inputField>text</inputField>
+    <outputChunkField>chunk_text</outputChunkField>
+    <contentTypeField/>
+    <chunkingStrategy>STRUCTURE</chunkingStrategy>
+    <chunkSize>1500</chunkSize>
+    <chunkOverlap>200</chunkOverlap>
+    <includeMetadata>Y</includeMetadata>
+    <chunkIndexField>chunk_index</chunkIndexField>
+    <chunkStartPosField>chunk_start_position</chunkStartPosField>
+    <sourceDocumentIdField>document_id</sourceDocumentIdField>
+    <documentIdField>document_id</documentIdField>
+    <chunkCountField>total_chunks</chunkCountField>
+    <attributes/>
+    <GUI>
+      <xloc>256</xloc>
+      <yloc>128</yloc>
+    </GUI>
+  </transform>
+  <transform>
+    <name>Chunk ID</name>
+    <type>ScriptValueMod</type>
+    <description>Document ID and chunk index: the key of a chunk</description>
+    <distribute>N</distribute>
+    <custom_distribution/>
+    <copies>1</copies>
+    <partitioning>
+      <method>none</method>
+      <schema_name/>
+    </partitioning>
+    <optimizationLevel>9</optimizationLevel>
+    <jsScripts>
+      <jsScript>
+        <jsScript_type>0</jsScript_type>
+        <jsScript_name>Script 1</jsScript_name>
+        <jsScript_script>var chunk_id = document_id + "#" + chunk_index;</jsScript_script>
+      </jsScript>
+    </jsScripts>
+    <fields>
+      <field>
+        <name>chunk_id</name>
+        <rename>chunk_id</rename>
+        <type>String</type>
+        <length>-1</length>
+        <precision>-1</precision>
+        <replace>N</replace>
+      </field>
+    </fields>
+    <attributes/>
+    <GUI>
+      <xloc>416</xloc>
+      <yloc>128</yloc>
+    </GUI>
+  </transform>
+  <transform>
+    <name>Embed chunks</name>
+    <type>EmbedText</type>
+    <description/>
+    <distribute>N</distribute>
+    <custom_distribution/>
+    <copies>1</copies>
+    <partitioning>
+      <method>none</method>
+      <schema_name/>
+    </partitioning>
+    <ai_provider>ollama-embeddings</ai_provider>
+    <model_name/>
+    <input_field>chunk_text</input_field>
+    <output_field>embedding</output_field>
+    <model_field/>
+    <dimensions_field/>
+    <include_model_metadata>N</include_model_metadata>
+    <output_format>VECTOR</output_format>
+    <batch_size>16</batch_size>
+    <attributes/>
+    <GUI>
+      <xloc>608</xloc>
+      <yloc>128</yloc>
+    </GUI>
+  </transform>
+  <transform>
+    <name>Upsert into pgvector</name>
+    <type>PgVectorUpsert</type>
+    <description>The embeddings live in pgvector, keyed on the chunk ID. A document's old rows are deleted first, so indexing it again leaves no stale chunks.</description>
+    <distribute>Y</distribute>
+    <custom_distribution/>
+    <copies>1</copies>
+    <partitioning>
+      <method>none</method>
+      <schema_name/>
+    </partitioning>
+    <connection>pgvector</connection>
+    <schemaName>public</schemaName>
+    <tableName>graphrag_chunks</tableName>
+    <idField>chunk_id</idField>
+    <documentIdField>document_id</documentIdField>
+    <chunkIndexField>chunk_index</chunkIndexField>
+    <contentField>chunk_text</contentField>
+    <embeddingField>embedding</embeddingField>
+    <embeddingDimensions>768</embeddingDimensions>
+    <createTableIfMissing>Y</createTableIfMissing>
+    <createHnswIndex>Y</createHnswIndex>
+    <deleteDocumentBeforeUpsert>Y</deleteDocumentBeforeUpsert>
+    <commitSize>50</commitSize>
+    <indexMetric>COSINE</indexMetric>
+    <mapping>
+      <column>title</column>
+      <stream>title</stream>
+    </mapping>
+    <attributes/>
+    <GUI>
+      <xloc>800</xloc>
+      <yloc>64</yloc>
+    </GUI>
+  </transform>
+  <transform>
+    <name>Write documents and chunks</name>
+    <type>Neo4jGraphOutput</type>
+    <description>The same chunks in the graph, without the embedding</description>
+    <distribute>Y</distribute>
+    <custom_distribution/>
+    <copies>1</copies>
+    <partitioning>
+      <method>none</method>
+      <schema_name/>
+    </partitioning>
+    <connection>demo-age</connection>
+    <model>graphrag</model>
+    <batch_size>100</batch_size>
+    <create_indexes>N</create_indexes>
+    <returning_graph>N</returning_graph>
+    <return_graph_field/>
+    <validate_against_model>N</validate_against_model>
+    <out_of_order_allowed>Y</out_of_order_allowed>
+    <mappings>
+      <mapping>
+        <source_field>document_id</source_field>
+        <target_type>Node</target_type>
+        <target_name>Document</target_name>
+        <target_property>id</target_property>
+        <target_hint>None</target_hint>
+      </mapping>
+      <mapping>
+        <source_field>title</source_field>
+        <target_type>Node</target_type>
+        <target_name>Document</target_name>
+        <target_property>title</target_property>
+        <target_hint>None</target_hint>
+      </mapping>
+      <mapping>
+        <source_field>chunk_id</source_field>
+        <target_type>Node</target_type>
+        <target_name>Chunk</target_name>
+        <target_property>id</target_property>
+        <target_hint>None</target_hint>
+      </mapping>
+      <mapping>
+        <source_field>chunk_index</source_field>
+        <target_type>Node</target_type>
+        <target_name>Chunk</target_name>
+        <target_property>chunk_index</target_property>
+        <target_hint>None</target_hint>
+      </mapping>
+      <mapping>
+        <source_field>chunk_text</source_field>
+        <target_type>Node</target_type>
+        <target_name>Chunk</target_name>
+        <target_property>text</target_property>
+        <target_hint>None</target_hint>
+      </mapping>
+    </mappings>
+    <relationship_mappings>
+    </relationship_mappings>
+    <node_mappings>
+    </node_mappings>
+    <attributes/>
+    <GUI>
+      <xloc>800</xloc>
+      <yloc>160</yloc>
+    </GUI>
+  </transform>
+  <transform>
+    <name>Hold the chunks</name>
+    <type>BlockingTransform</type>
+    <description>The graph is extracted once every chunk is written</description>
+    <distribute>Y</distribute>
+    <custom_distribution/>
+    <copies>1</copies>
+    <partitioning>
+      <method>none</method>
+      <schema_name/>
+    </partitioning>
+    <cache_size>5000</cache_size>
+    <compress>Y</compress>
+    <directory>${java.io.tmpdir}</directory>
+    <pass_all_rows>Y</pass_all_rows>
+    <prefix>graphrag</prefix>
+    <attributes/>
+    <GUI>
+      <xloc>416</xloc>
+      <yloc>272</yloc>
+    </GUI>
+  </transform>
+  <transform>
+    <name>Wait for the chunks</name>
+    <type>BlockUntilTransformsFinish</type>
+    <description/>
+    <distribute>Y</distribute>
+    <custom_distribution/>
+    <copies>1</copies>
+    <partitioning>
+      <method>none</method>
+      <schema_name/>
+    </partitioning>
+    <transforms>
+      <transform>
+        <name>Write documents and chunks</name>
+        <CopyNr>0</CopyNr>
+      </transform>
+    </transforms>
+    <attributes/>
+    <GUI>
+      <xloc>608</xloc>
+      <yloc>272</yloc>
+    </GUI>
+  </transform>
+  <transform>
+    <name>Extract graph</name>
+    <type>ExtractGraph</type>
+    <description>Entities and relationships per chunk, with the chunk's fields</description>
+    <distribute>Y</distribute>
+    <custom_distribution/>
+    <copies>1</copies>
+    <partitioning>
+      <method>none</method>
+      <schema_name/>
+    </partitioning>
+    <ai_provider>ollama-local</ai_provider>
+    <model_name/>
+    <input_field>chunk_text</input_field>
+    <entity_types>Person, Machine, Place, Concept</entity_types>
+    <relationship_types>DESIGNED, WROTE_ALGORITHM_FOR, LIVED_IN, BUILT, DESCRIBED</relationship_types>
+    <instructions/>
+    <pass_rows_without_results>N</pass_rows_without_results>
+    <kind_field>graph_element</kind_field>
+    <name_field>name</name_field>
+    <type_field>type</type_field>
+    <description_field>description</description_field>
+    <source_field>source</source_field>
+    <target_field>target</target_field>
+    <attributes/>
+    <GUI>
+      <xloc>800</xloc>
+      <yloc>272</yloc>
+    </GUI>
+  </transform>
+  <transform>
+    <name>Entity keys</name>
+    <type>ScriptValueMod</type>
+    <description>Lowercase without spaces or punctuation, so 'Hop Run' and 'hop-run' are one entity</description>
+    <distribute>Y</distribute>
+    <custom_distribution/>
+    <copies>1</copies>
+    <partitioning>
+      <method>none</method>
+      <schema_name/>
+    </partitioning>
+    <optimizationLevel>9</optimizationLevel>
+    <jsScripts>
+      <jsScript>
+        <jsScript_type>0</jsScript_type>
+        <jsScript_name>Script 1</jsScript_name>
+        <jsScript_script>function entityKey(name) {
+  if (name == null) {
+    return null;
+  }
+  return ("" + name).toLowerCase().replace(/[^a-z0-9+#]/g, "");
+}
+var key = entityKey(name);
+var source_key = entityKey(source);
+var target_key = entityKey(target);</jsScript_script>
+      </jsScript>
+    </jsScripts>
+    <fields>
+      <field>
+        <name>key</name>
+        <rename>key</rename>
+        <type>String</type>
+        <length>-1</length>
+        <precision>-1</precision>
+        <replace>N</replace>
+      </field>
+      <field>
+        <name>source_key</name>
+        <rename>source_key</rename>
+        <type>String</type>
+        <length>-1</length>
+        <precision>-1</precision>
+        <replace>N</replace>
+      </field>
+      <field>
+        <name>target_key</name>
+        <rename>target_key</rename>
+        <type>String</type>
+        <length>-1</length>
+        <precision>-1</precision>
+        <replace>N</replace>
+      </field>
+    </fields>
+    <attributes/>
+    <GUI>
+      <xloc>992</xloc>
+      <yloc>272</yloc>
+    </GUI>
+  </transform>
+  <transform>
+    <name>Entity?</name>
+    <type>FilterRows</type>
+    <description/>
+    <distribute>Y</distribute>
+    <custom_distribution/>
+    <copies>1</copies>
+    <partitioning>
+      <method>none</method>
+      <schema_name/>
+    </partitioning>
+    <compare>
+      <condition>
+        <conditions>
+        </conditions>
+        <function>=</function>
+        <leftvalue>graph_element</leftvalue>
+        <negated>N</negated>
+        <operator>-</operator>
+        <value>
+          <isnull>N</isnull>
+          <length>-1</length>
+          <mask/>
+          <name>constant</name>
+          <precision>-1</precision>
+          <text>ENTITY</text>
+          <type>String</type>
+        </value>
+      </condition>
+    </compare>
+    <send_false_to>Collect relationships</send_false_to>
+    <send_true_to>Write mentions</send_true_to>
+    <attributes/>
+    <GUI>
+      <xloc>1152</xloc>
+      <yloc>272</yloc>
+    </GUI>
+  </transform>
+  <transform>
+    <name>Write mentions</name>
+    <type>Neo4jGraphOutput</type>
+    <description>MERGE an Entity per key and the chunk's MENTIONS relationship to it</description>
+    <distribute>Y</distribute>
+    <custom_distribution/>
+    <copies>1</copies>
+    <partitioning>
+      <method>none</method>
+      <schema_name/>
+    </partitioning>
+    <connection>demo-age</connection>
+    <model>graphrag</model>
+    <batch_size>100</batch_size>
+    <create_indexes>N</create_indexes>
+    <returning_graph>N</returning_graph>
+    <return_graph_field/>
+    <validate_against_model>N</validate_against_model>
+    <out_of_order_allowed>Y</out_of_order_allowed>
+    <mappings>
+      <mapping>
+        <source_field>chunk_id</source_field>
+        <target_type>Node</target_type>
+        <target_name>Chunk</target_name>
+        <target_property>id</target_property>
+        <target_hint>None</target_hint>
+      </mapping>
+      <mapping>
+        <source_field>key</source_field>
+        <target_type>Node</target_type>
+        <target_name>Entity</target_name>
+        <target_property>key</target_property>
+        <target_hint>None</target_hint>
+      </mapping>
+      <mapping>
+        <source_field>name</source_field>
+        <target_type>Node</target_type>
+        <target_name>Entity</target_name>
+        <target_property>name</target_property>
+        <target_hint>None</target_hint>
+      </mapping>
+      <mapping>
+        <source_field>type</source_field>
+        <target_type>Node</target_type>
+        <target_name>Entity</target_name>
+        <target_property>type</target_property>
+        <target_hint>None</target_hint>
+      </mapping>
+      <mapping>
+        <source_field>description</source_field>
+        <target_type>Node</target_type>
+        <target_name>Entity</target_name>
+        <target_property>description</target_property>
+        <target_hint>None</target_hint>
+      </mapping>
+    </mappings>
+    <relationship_mappings>
+    </relationship_mappings>
+    <node_mappings>
+    </node_mappings>
+    <attributes/>
+    <GUI>
+      <xloc>1344</xloc>
+      <yloc>272</yloc>
+    </GUI>
+  </transform>
+  <transform>
+    <name>Collect relationships</name>
+    <type>BlockingTransform</type>
+    <description>Reads all relationship rows first</description>
+    <distribute>Y</distribute>
+    <custom_distribution/>
+    <copies>1</copies>
+    <partitioning>
+      <method>none</method>
+      <schema_name/>
+    </partitioning>
+    <cache_size>5000</cache_size>
+    <compress>Y</compress>
+    <directory>${java.io.tmpdir}</directory>
+    <pass_all_rows>Y</pass_all_rows>
+    <prefix>graphrag</prefix>
+    <attributes/>
+    <GUI>
+      <xloc>1152</xloc>
+      <yloc>416</yloc>
+    </GUI>
+  </transform>
+  <transform>
+    <name>Wait for the entities</name>
+    <type>BlockUntilTransformsFinish</type>
+    <description>Relationships are written once every entity is</description>
+    <distribute>Y</distribute>
+    <custom_distribution/>
+    <copies>1</copies>
+    <partitioning>
+      <method>none</method>
+      <schema_name/>
+    </partitioning>
+    <transforms>
+      <transform>
+        <name>Write mentions</name>
+        <CopyNr>0</CopyNr>
+      </transform>
+    </transforms>
+    <attributes/>
+    <GUI>
+      <xloc>1344</xloc>
+      <yloc>416</yloc>
+    </GUI>
+  </transform>
+  <transform>
+    <name>Write relationships</name>
+    <type>Neo4jCypherOutput</type>
+    <description>One RELATED_TO per type and source chunk. Graph output merges a relationship on its two nodes only, so a second type between the same entities would overwrite the first.</description>
+    <distribute>Y</distribute>
+    <custom_distribution/>
+    <copies>1</copies>
+    <partitioning>
+      <method>none</method>
+      <schema_name/>
+    </partitioning>
+    <connection>demo-age</connection>
+    <cypher>MATCH (s:Entity {key: $source_key}), (t:Entity {key: $target_key})
+MERGE (s)-[r:RELATED_TO {type: $type, chunk_id: $chunk_id}]-&gt;(t)
+SET r.description = $description</cypher>
+    <batch_size>1</batch_size>
+    <read_only>N</read_only>
+    <nr_retries_on_error/>
+    <retry>N</retry>
+    <cypher_from_field>N</cypher_from_field>
+    <cypher_field/>
+    <unwind>N</unwind>
+    <unwind_map/>
+    <returning_graph>N</returning_graph>
+    <return_graph_field/>
+    <mappings>
+      <mapping>
+        <parameter>source_key</parameter>
+        <field>source_key</field>
+        <type>String</type>
+      </mapping>
+      <mapping>
+        <parameter>target_key</parameter>
+        <field>target_key</field>
+        <type>String</type>
+      </mapping>
+      <mapping>
+        <parameter>type</parameter>
+        <field>type</field>
+        <type>String</type>
+      </mapping>
+      <mapping>
+        <parameter>chunk_id</parameter>
+        <field>chunk_id</field>
+        <type>String</type>
+      </mapping>
+      <mapping>
+        <parameter>description</parameter>
+        <field>description</field>
+        <type>String</type>
+      </mapping>
+    </mappings>
+    <returns>
+
+    </returns>
+    <attributes/>
+    <GUI>
+      <xloc>1536</xloc>
+      <yloc>416</yloc>
+    </GUI>
+  </transform>
+  <transform_error_handling>
+  </transform_error_handling>
+  <attributes/>
+</pipeline>
diff --git a/plugins/tech/ai/src/main/samples/transforms/graphrag-index.hpl b/plugins/tech/ai/src/main/samples/transforms/graphrag-index.hpl
new file mode 100644
index 0000000000..7ef33331f4
--- /dev/null
+++ b/plugins/tech/ai/src/main/samples/transforms/graphrag-index.hpl
@@ -0,0 +1,695 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+Licensed to the Apache Software Foundation (ASF) under one or more
+contributor license agreements.  See the NOTICE file distributed with
+this work for additional information regarding copyright ownership.
+The ASF licenses this file to You under the Apache License, Version 2.0
+(the "License"); you may not use this file except in compliance with
+the License.  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+
+-->
+<pipeline>
+  <info>
+    <name>graphrag-index</name>
+    <name_sync_with_filename>Y</name_sync_with_filename>
+    <description>GraphRAG indexing: split documents into chunks, embed them and write them to the graph database, then extract entities and relationships per chunk. Needs the graph database connection demo-neo4j (Neo4j 5.18 or later; select demo-memgraph or demo-falkordb for those databases), an AI provider ollama-embeddings with an embedding model (768 dimensions, for example nomic-embed-text) and an AI provider ollama-local with a chat model. Set Thinking to Off on ollama-local for thi [...]
+    <extended_description/>
+    <pipeline_version/>
+    <pipeline_type>Normal</pipeline_type>
+    <parameters>
+    </parameters>
+    <capture_transform_performance>N</capture_transform_performance>
+    <transform_performance_capturing_delay>1000</transform_performance_capturing_delay>
+    <transform_performance_capturing_size_limit>100</transform_performance_capturing_size_limit>
+    <created_user>-</created_user>
+    <created_date>2026/10/10 12:00:00.000</created_date>
+    <modified_user>-</modified_user>
+    <modified_date>2026/10/10 12:00:00.000</modified_date>
+  </info>
+  <notepads>
+    <notepad>
+      <backgroundcolorblue>251</backgroundcolorblue>
+      <backgroundcolorgreen>232</backgroundcolorgreen>
+      <backgroundcolorred>201</backgroundcolorred>
+      <bordercolorblue>90</bordercolorblue>
+      <bordercolorgreen>58</bordercolorgreen>
+      <bordercolorred>14</bordercolorred>
+      <fontbold>N</fontbold>
+      <fontcolorblue>90</fontcolorblue>
+      <fontcolorgreen>58</fontcolorgreen>
+      <fontcolorred>14</fontcolorred>
+      <fontitalic>N</fontitalic>
+      <fontname/>
+      <fontsize>-1</fontsize>
+      <height>48</height>
+      <xloc>64</xloc>
+      <yloc>400</yloc>
+      <note>Documents -&gt; chunks -&gt; embeddings -&gt; Document and Chunk nodes.
+Once every chunk is written: Extract graph -&gt; Entity nodes and MENTIONS, then RELATED_TO per type and source chunk.</note>
+      <width>640</width>
+    </notepad>
+  </notepads>
+  <order>
+    <hop>
+      <from>Documents</from>
+      <to>Split into chunks</to>
+      <enabled>Y</enabled>
+    </hop>
+    <hop>
+      <from>Split into chunks</from>
+      <to>Chunk ID</to>
+      <enabled>Y</enabled>
+    </hop>
+    <hop>
+      <from>Chunk ID</from>
+      <to>Embed chunks</to>
+      <enabled>Y</enabled>
+    </hop>
+    <hop>
+      <from>Embed chunks</from>
+      <to>Write documents and chunks</to>
+      <enabled>Y</enabled>
+    </hop>
+    <hop>
+      <from>Chunk ID</from>
+      <to>Hold the chunks</to>
+      <enabled>Y</enabled>
+    </hop>
+    <hop>
+      <from>Hold the chunks</from>
+      <to>Wait for the chunks</to>
+      <enabled>Y</enabled>
+    </hop>
+    <hop>
+      <from>Wait for the chunks</from>
+      <to>Extract graph</to>
+      <enabled>Y</enabled>
+    </hop>
+    <hop>
+      <from>Extract graph</from>
+      <to>Entity keys</to>
+      <enabled>Y</enabled>
+    </hop>
+    <hop>
+      <from>Entity keys</from>
+      <to>Entity?</to>
+      <enabled>Y</enabled>
+    </hop>
+    <hop>
+      <from>Entity?</from>
+      <to>Write mentions</to>
+      <enabled>Y</enabled>
+    </hop>
+    <hop>
+      <from>Entity?</from>
+      <to>Collect relationships</to>
+      <enabled>Y</enabled>
+    </hop>
+    <hop>
+      <from>Collect relationships</from>
+      <to>Wait for the entities</to>
+      <enabled>Y</enabled>
+    </hop>
+    <hop>
+      <from>Wait for the entities</from>
+      <to>Write relationships</to>
+      <enabled>Y</enabled>
+    </hop>
+  </order>
+  <transform>
+    <name>Documents</name>
+    <type>DataGrid</type>
+    <description>Replace with your own documents, for example a Text file input</description>
+    <distribute>Y</distribute>
+    <custom_distribution/>
+    <copies>1</copies>
+    <partitioning>
+      <method>none</method>
+      <schema_name/>
+    </partitioning>
+    <fields>
+      <field>
+        <set_empty_string>N</set_empty_string>
+        <length>-1</length>
+        <name>document_id</name>
+        <precision>-1</precision>
+        <type>String</type>
+      </field>
+      <field>
+        <set_empty_string>N</set_empty_string>
+        <length>-1</length>
+        <name>title</name>
+        <precision>-1</precision>
+        <type>String</type>
+      </field>
+      <field>
+        <set_empty_string>N</set_empty_string>
+        <length>-1</length>
+        <name>text</name>
+        <precision>-1</precision>
+        <type>String</type>
+      </field>
+    </fields>
+    <data>
+      <line>
+        <item>ada-lovelace</item>
+        <item>Ada Lovelace</item>
+        <item>Ada Lovelace was a mathematician. She wrote the first published algorithm intended for a machine: a method to calculate Bernoulli numbers on the Analytical Engine.</item>
+      </line>
+      <line>
+        <item>analytical-engine</item>
+        <item>The Analytical Engine</item>
+        <item>The Analytical Engine was a design for a mechanical general-purpose computer. Charles Babbage designed it and first described it in 1837.</item>
+      </line>
+      <line>
+        <item>charles-babbage</item>
+        <item>Charles Babbage</item>
+        <item>Charles Babbage was a mathematician and inventor. He lived in London, where he built a working part of his earlier Difference Engine.</item>
+      </line>
+    </data>
+    <attributes/>
+    <GUI>
+      <xloc>96</xloc>
+      <yloc>128</yloc>
+    </GUI>
+  </transform>
+  <transform>
+    <name>Split into chunks</name>
+    <type>TextChunker</type>
+    <description/>
+    <distribute>Y</distribute>
+    <custom_distribution/>
+    <copies>1</copies>
+    <partitioning>
+      <method>none</method>
+      <schema_name/>
+    </partitioning>
+    <inputField>text</inputField>
+    <outputChunkField>chunk_text</outputChunkField>
+    <contentTypeField/>
+    <chunkingStrategy>STRUCTURE</chunkingStrategy>
+    <chunkSize>1500</chunkSize>
+    <chunkOverlap>200</chunkOverlap>
+    <includeMetadata>Y</includeMetadata>
+    <chunkIndexField>chunk_index</chunkIndexField>
+    <chunkStartPosField>chunk_start_position</chunkStartPosField>
+    <sourceDocumentIdField>document_id</sourceDocumentIdField>
+    <documentIdField>document_id</documentIdField>
+    <chunkCountField>total_chunks</chunkCountField>
+    <attributes/>
+    <GUI>
+      <xloc>256</xloc>
+      <yloc>128</yloc>
+    </GUI>
+  </transform>
+  <transform>
+    <name>Chunk ID</name>
+    <type>ScriptValueMod</type>
+    <description>Document ID and chunk index: the key of a chunk</description>
+    <distribute>N</distribute>
+    <custom_distribution/>
+    <copies>1</copies>
+    <partitioning>
+      <method>none</method>
+      <schema_name/>
+    </partitioning>
+    <optimizationLevel>9</optimizationLevel>
+    <jsScripts>
+      <jsScript>
+        <jsScript_type>0</jsScript_type>
+        <jsScript_name>Script 1</jsScript_name>
+        <jsScript_script>var chunk_id = document_id + "#" + chunk_index;</jsScript_script>
+      </jsScript>
+    </jsScripts>
+    <fields>
+      <field>
+        <name>chunk_id</name>
+        <rename>chunk_id</rename>
+        <type>String</type>
+        <length>-1</length>
+        <precision>-1</precision>
+        <replace>N</replace>
+      </field>
+    </fields>
+    <attributes/>
+    <GUI>
+      <xloc>416</xloc>
+      <yloc>128</yloc>
+    </GUI>
+  </transform>
+  <transform>
+    <name>Embed chunks</name>
+    <type>EmbedText</type>
+    <description/>
+    <distribute>Y</distribute>
+    <custom_distribution/>
+    <copies>1</copies>
+    <partitioning>
+      <method>none</method>
+      <schema_name/>
+    </partitioning>
+    <ai_provider>ollama-embeddings</ai_provider>
+    <model_name/>
+    <input_field>chunk_text</input_field>
+    <output_field>embedding</output_field>
+    <model_field/>
+    <dimensions_field/>
+    <include_model_metadata>N</include_model_metadata>
+    <output_format>VECTOR</output_format>
+    <batch_size>16</batch_size>
+    <attributes/>
+    <GUI>
+      <xloc>608</xloc>
+      <yloc>128</yloc>
+    </GUI>
... 592 lines suppressed ...