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: