From 4a022ceb17bb7307795edc78b9da4bdc50551f8a Mon Sep 17 00:00:00 2001 From: Marko Budiselic Date: Sun, 1 Mar 2026 18:49:48 +0100 Subject: [PATCH 1/2] Add Agentic GraphRAG skill --- memgraph-agentic-graphrag/SKILL.md | 66 ++++++++++++ .../references/preprocessing.md | 101 ++++++++++++++++++ .../references/text_search.md | 50 +++++++++ .../references/vector_search.md | 82 ++++++++++++++ 4 files changed, 299 insertions(+) create mode 100644 memgraph-agentic-graphrag/SKILL.md create mode 100644 memgraph-agentic-graphrag/references/preprocessing.md create mode 100644 memgraph-agentic-graphrag/references/text_search.md create mode 100644 memgraph-agentic-graphrag/references/vector_search.md diff --git a/memgraph-agentic-graphrag/SKILL.md b/memgraph-agentic-graphrag/SKILL.md new file mode 100644 index 0000000..33c7657 --- /dev/null +++ b/memgraph-agentic-graphrag/SKILL.md @@ -0,0 +1,66 @@ +--- +name: memgraph-agentic-graphrag +description: Answers questions over any knowledge graph stored in Memgraph using agentic GraphRAG techniques (text2Cypher; vector/text search also called local graph search; query-focused summarization). +--- + +## Deterministic Analytical Questions - Text2Cypher + +When a user asks a question that requires precise information from the graph—for +example, counts, aggregations, or analytical queries where exact data is needed—use +a **text2Cypher** approach: + +1. **Generate a Cypher query** from the natural language question, based on the + graph schema (use `SHOW SCHEMA INFO;` query to get the schema). +2. **Execute the query** using the Memgraph MCP tool `run_query` when the + workspace is connected to Memgraph. +3. **Return the result** to the user with a clear summary of the findings. + +Example: if asked "How many nodes of type X exist?", generate and run: +```cypher +MATCH (n:X) RETURN n.name AS name, count(n) AS count ORDER BY count DESC; +``` +Then report back the result to the user. + +## Similar entities and semantic search - Local Graph Search + +When a user requests to find entities similar to a given one, or to determine +which nodes are related to a concept, employ vector or text search combined with +graph traversals to discover the most relevant results. +``` +CALL embeddings.text(['']) YIELD embeddings, success +CALL vector_search.search('vs_index', 5, embeddings[0]) YIELD distance, node, similarity +WITH node AS chunk, similarity +MATCH (entity: