<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Sabika Tasneem</title>
    <description>The latest articles on DEV Community by Sabika Tasneem (@sabika_tasneem_9768bc8a96).</description>
    <link>https://dev.to/sabika_tasneem_9768bc8a96</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F2092592%2Fdc805aeb-7a75-4844-bafe-b1ca96c14566.jpg</url>
      <title>DEV Community: Sabika Tasneem</title>
      <link>https://dev.to/sabika_tasneem_9768bc8a96</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/sabika_tasneem_9768bc8a96"/>
    <language>en</language>
    <item>
      <title>When Should You Use Text2Cypher in a GraphRAG Pipeline</title>
      <dc:creator>Sabika Tasneem</dc:creator>
      <pubDate>Fri, 22 May 2026 10:53:33 +0000</pubDate>
      <link>https://dev.to/memgraph/when-should-you-use-text2cypher-in-a-graphrag-pipeline-3imf</link>
      <guid>https://dev.to/memgraph/when-should-you-use-text2cypher-in-a-graphrag-pipeline-3imf</guid>
      <description>&lt;p&gt;Not every GraphRAG question needs the same retrieval pattern.&lt;/p&gt;

&lt;p&gt;Some questions need the neighborhood around an entity. Some need a summary across a large part of the graph. Some just need an exact answer from structured data. That last group is where Text2Cypher fits.&lt;/p&gt;

&lt;p&gt;It turns a natural language question into a Cypher query, so the system can return a precise graph result instead of a broad summary.&lt;/p&gt;

&lt;h2&gt;
  
  
  What Is Text2Cypher?
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://memgraph.com/docs/ai-ecosystem/graph-rag/atomic-pipelines/text2cypher" rel="noopener noreferrer"&gt;Text2Cypher&lt;/a&gt; is the graph version of a broader pattern developers already know from &lt;a href="https://arxiv.org/abs/2406.08426" rel="noopener noreferrer"&gt;text-to-SQL systems&lt;/a&gt; where you take a natural language question and generate a database query that can answer it.&lt;/p&gt;

&lt;p&gt;The difference is the target query language.&lt;/p&gt;

&lt;p&gt;Instead of generating SQL for tables, Text2Cypher generates Cypher for graph data. &lt;a href="https://opencypher.org/" rel="noopener noreferrer"&gt;Cypher&lt;/a&gt; is a declarative query language for property graphs, where data is modeled as nodes, relationships, labels, and properties.&lt;/p&gt;

&lt;p&gt;The LLM’s job is not to invent the answer. Its job is to generate the right query, run it, and return the result. That distinction matters.&lt;/p&gt;

&lt;h2&gt;
  
  
  What Text2Cypher Does in GraphRAG
&lt;/h2&gt;

&lt;p&gt;In a GraphRAG pipeline, Text2Cypher is useful when the user’s question maps cleanly to the graph schema.&lt;/p&gt;

&lt;p&gt;For example:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Does user &lt;code&gt;31254&lt;/code&gt; exist in this dataset?&lt;/li&gt;
&lt;li&gt;Which suppliers provide components used in Product A?&lt;/li&gt;
&lt;li&gt;How many orders are delayed by more than 7 days?&lt;/li&gt;
&lt;li&gt;Which customers have more than 3 unresolved support tickets?&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;These questions are not asking the model to read a pile of text and summarize it. They are asking for a structured answer from structured data.&lt;/p&gt;

&lt;p&gt;  &lt;iframe src="https://www.youtube.com/embed/b_iWAxtQ7UE"&gt;
  &lt;/iframe&gt;
&lt;/p&gt;

&lt;p&gt;A practical Text2Cypher flow usually looks like this:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Inspect the graph schema.&lt;/li&gt;
&lt;li&gt;Pass the relevant schema context to the LLM.&lt;/li&gt;
&lt;li&gt;Generate the Cypher query.&lt;/li&gt;
&lt;li&gt;Run the query.&lt;/li&gt;
&lt;li&gt;Return the result.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Schema is the part people underestimate.&lt;/p&gt;

&lt;p&gt;If the LLM does not know what labels, relationship types, and properties exist, it can generate a query that looks reasonable but does not match the actual graph. For example, it may generate &lt;code&gt;(:Customer)-[:PURCHASED]-&amp;gt;(:Product)&lt;/code&gt;when the real graph uses &lt;code&gt;(:User)-[:BOUGHT]-&amp;gt;(:Item)&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;That query is syntactically fine. It is just wrong for your data.&lt;/p&gt;

&lt;p&gt;In Memgraph, &lt;a href="https://memgraph.com/docs/querying/schema" rel="noopener noreferrer"&gt;&lt;code&gt;SHOW SCHEMA INFO&lt;/code&gt;&lt;/a&gt; can expose labels, relationship types, and properties, giving the model real schema context before it generates the query.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why Text2Cypher Is the Best Fit for Analytical GraphRAG Questions
&lt;/h2&gt;

&lt;p&gt;Analytical GraphRAG questions ask for something concrete.&lt;/p&gt;

&lt;p&gt;Usually, the answer is one of these:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;A count&lt;/li&gt;
&lt;li&gt;A boolean answer&lt;/li&gt;
&lt;li&gt;A list of matching nodes&lt;/li&gt;
&lt;li&gt;A filtered table&lt;/li&gt;
&lt;li&gt;A grouped result&lt;/li&gt;
&lt;li&gt;A ranked result based on a property or aggregate&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;For example, in a &lt;a href="https://memgraph.com/webinars/meet-atomic-graphrag" rel="noopener noreferrer"&gt;GitHub Issues knowledge graph&lt;/a&gt;, a user might ask:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;How many feature requests Memgraph has?&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;That question does not need the model to retrieve five chunks about issue tracking and reason from prose.&lt;/p&gt;

&lt;p&gt;It needs a query over the graph:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight cypher"&gt;&lt;code&gt;&lt;span class="n"&gt;SHOW&lt;/span&gt; &lt;span class="n"&gt;SCHEMA&lt;/span&gt; &lt;span class="n"&gt;INFO&lt;/span&gt;&lt;span class="ss"&gt;;&lt;/span&gt;

&lt;span class="k"&gt;MATCH&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="ss"&gt;(&lt;/span&gt;&lt;span class="py"&gt;i:&lt;/span&gt;&lt;span class="n"&gt;Issue&lt;/span&gt;&lt;span class="ss"&gt;)&lt;/span&gt;
&lt;span class="k"&gt;RETURN&lt;/span&gt; &lt;span class="n"&gt;i.issue_type&lt;/span&gt; &lt;span class="k"&gt;AS&lt;/span&gt; &lt;span class="n"&gt;issue_type&lt;/span&gt;&lt;span class="ss"&gt;,&lt;/span&gt;
       &lt;span class="nf"&gt;count&lt;/span&gt;&lt;span class="ss"&gt;(&lt;/span&gt;&lt;span class="o"&gt;*&lt;/span&gt;&lt;span class="ss"&gt;)&lt;/span&gt; &lt;span class="k"&gt;AS&lt;/span&gt; &lt;span class="n"&gt;count&lt;/span&gt;
&lt;span class="k"&gt;ORDER&lt;/span&gt; &lt;span class="k"&gt;BY&lt;/span&gt; &lt;span class="n"&gt;count&lt;/span&gt; &lt;span class="k"&gt;DESC&lt;/span&gt;&lt;span class="ss"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;That answer comes back as a table shaped result.&lt;/p&gt;

&lt;p&gt;No long context window. No vague summary. No pretending that a generative answer is better than a database result.&lt;/p&gt;

&lt;p&gt;That is why Text2Cypher is a strong fit for analytical GraphRAG. The question has a query-shaped answer.&lt;/p&gt;

&lt;h2&gt;
  
  
  When Text2Cypher Is the Wrong Tool
&lt;/h2&gt;

&lt;p&gt;Text2Cypher gets weaker when the question is open-ended, exploratory, or depends on broader context that does not live in a single clean query result.&lt;/p&gt;

&lt;p&gt;Bad fits include questions like:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Why are users unhappy with this product?&lt;/li&gt;
&lt;li&gt;What themes appear across negative reviews?&lt;/li&gt;
&lt;li&gt;Which related issues should an engineer investigate first?&lt;/li&gt;
&lt;li&gt;What is missing from this research corpus?&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;These questions need more than a count or table.&lt;/p&gt;

&lt;p&gt;They may need local graph search, where the system starts from a relevant node and expands into its surrounding neighborhood. Or they may need query-focused summarization, where the system synthesizes patterns across a larger part of the graph.&lt;/p&gt;

&lt;p&gt;Trying to force Text2Cypher onto those questions gives you shallow answers.&lt;/p&gt;

&lt;p&gt;A query can return rows. It does not automatically explain themes, tradeoffs, causes, or missing context.&lt;/p&gt;

&lt;p&gt;A useful rule is simple:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;If the Answer Should Look Like...&lt;/th&gt;
&lt;th&gt;Use...&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;A number, table, filtered list, or direct lookup&lt;/td&gt;
&lt;td&gt;&lt;a href="https://memgraph.com/blog/text-to-cypher-graphrag-analytical-questions" rel="noopener noreferrer"&gt;Text2Cypher&lt;/a&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Connected context around one entity&lt;/td&gt;
&lt;td&gt;&lt;a href="https://memgraph.com/blog/local-graph-search-graphrag-pipeline-type" rel="noopener noreferrer"&gt;Local graph search&lt;/a&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Themes or patterns across a corpus&lt;/td&gt;
&lt;td&gt;&lt;a href="https://memgraph.com/blog/global-atomic-graphrag-pipeline-query-focused-summarization" rel="noopener noreferrer"&gt;Query-focused summarization&lt;/a&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;The retrieval path should match the question.&lt;/p&gt;

&lt;h2&gt;
  
  
  Keep the Pipeline Inspectable
&lt;/h2&gt;

&lt;p&gt;Text2Cypher has one major advantage for developers: &lt;strong&gt;you can inspect it.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;You can read the generated query and you can run it again. That matters in GraphRAG because retrieval bugs are easy to hide behind fluent language.&lt;/p&gt;

&lt;p&gt;If the answer is wrong, you need to know where the failure happened. Was the schema context incomplete? Did the model generate the wrong query? Did the graph lack the right data? Did the final LLM response overstate what the query returned?&lt;/p&gt;

&lt;p&gt;For analytical retrieval, the cleanest pipeline is often the most boring one: inspect the schema, generate the query, execute it, and return the result.&lt;/p&gt;

&lt;p&gt;That is also what makes Text2Cypher easier to evaluate than a retrieval flow hidden behind several prompts and orchestration steps. The generated query gives you something concrete to inspect before the final answer reaches the user.&lt;/p&gt;

&lt;p&gt;For a deeper walkthrough of this pattern, Memgraph has a full guide on &lt;a href="https://memgraph.com/blog/text-to-cypher-graphrag-analytical-questions" rel="noopener noreferrer"&gt;Text2Cypher for GraphRAG analytical questions&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Text2Cypher is not the whole GraphRAG story. It is the pattern you use when the question has a query-shaped answer.&lt;/p&gt;

</description>
      <category>text2cypher</category>
      <category>ai</category>
      <category>analytics</category>
      <category>rag</category>
    </item>
    <item>
      <title>When Should You Use GraphRAG Instead of RAG?</title>
      <dc:creator>Sabika Tasneem</dc:creator>
      <pubDate>Thu, 21 May 2026 10:36:08 +0000</pubDate>
      <link>https://dev.to/memgraph/when-should-you-use-graphrag-instead-of-rag-4fja</link>
      <guid>https://dev.to/memgraph/when-should-you-use-graphrag-instead-of-rag-4fja</guid>
      <description>&lt;p&gt;Most teams building LLM applications start with RAG for a good reason. It is practical, easy to understand, and usually good enough for a simple AI use case.&lt;/p&gt;

&lt;p&gt;But once users stop asking simple lookup questions and start asking relationship-heavy questions, standard RAG can get shallow fast.&lt;/p&gt;

&lt;p&gt;The issue is not that RAG is bad. The issue is that many real questions are not just about finding a relevant paragraph. They are about following connections across people, products, systems, documents, events, or dependencies.&lt;/p&gt;

&lt;p&gt;That is the gap GraphRAG tries to fill.&lt;/p&gt;

&lt;h2&gt;
  
  
  RAG vs GraphRAG
&lt;/h2&gt;

&lt;p&gt;RAG made LLM applications more useful because it gave models access to external information.&lt;/p&gt;

&lt;p&gt;Instead of asking a model to answer from training data alone, a RAG pipeline retrieves relevant content from your docs, tickets, wikis, PDFs, or databases, adds that content to the prompt, and asks the model to answer from it.&lt;/p&gt;

&lt;p&gt;That works well for a lot of use cases.&lt;/p&gt;

&lt;p&gt;If the question is:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;What is our refund policy for annual subscriptions?&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;A standard RAG pipeline can search the documentation, find the right policy section, and give the model the relevant text.&lt;/p&gt;

&lt;p&gt;The problem starts when the question is not just about finding the right text. It starts when the answer depends on relationships.&lt;/p&gt;

&lt;p&gt;For example:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Which suppliers could be causing delivery delays for products affected by a specific component shortage?&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;That question is not just asking for a matching paragraph. It needs the system to connect suppliers, components, products, shipments, delays, and dependencies.&lt;/p&gt;

&lt;p&gt;This is where GraphRAG becomes useful.&lt;/p&gt;

&lt;p&gt;RAG is good at finding text that sounds relevant. GraphRAG is better when the answer depends on how things are connected.&lt;/p&gt;

&lt;h2&gt;
  
  
  What RAG Does Well
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://arxiv.org/abs/2005.11401" rel="noopener noreferrer"&gt;Retrieval augmented generation&lt;/a&gt;, usually shortened to RAG, combines a language model with an external retrieval system. The original paper described this as combining a parametric model (the LLM itself) with non-parametric memory (external knowledge), usually retrieved from an external corpus.&lt;/p&gt;

&lt;p&gt;In most modern implementations, that retrieval step uses embeddings. The basic flow looks like this:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Split documents into chunks.&lt;/li&gt;
&lt;li&gt;Convert each chunk into an embedding.&lt;/li&gt;
&lt;li&gt;Store those embeddings in a vector index.&lt;/li&gt;
&lt;li&gt;Convert the user question into an embedding.&lt;/li&gt;
&lt;li&gt;Retrieve the most similar chunks.&lt;/li&gt;
&lt;li&gt;Add those chunks to the LLM prompt.&lt;/li&gt;
&lt;li&gt;Generate the answer.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fl0f2yj49j3i7wgs5mv8y.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fl0f2yj49j3i7wgs5mv8y.png" alt="RAG vector search workflow" width="800" height="673"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;This is useful when the answer is likely to be contained in one or a few text chunks. Good RAG use cases include:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Documentation search&lt;/li&gt;
&lt;li&gt;FAQ assistants&lt;/li&gt;
&lt;li&gt;Internal knowledge base search&lt;/li&gt;
&lt;li&gt;Customer support answer generation&lt;/li&gt;
&lt;li&gt;Summarization over a small set of relevant documents&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;For many teams, this is the right starting point. It is simpler than building a knowledge graph, and it can deliver useful results quickly.&lt;/p&gt;

&lt;p&gt;The issue is that similarity is not the same as understanding.&lt;/p&gt;

&lt;p&gt;A vector search system can find chunks that sound close to the query. It does not automatically know whether one entity owns another, depends on another, contradicts another, or affects another through a multi step chain.&lt;/p&gt;

&lt;p&gt;That difference matters once your questions become relational.&lt;/p&gt;

&lt;h2&gt;
  
  
  Where RAG Gets Shallow
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://memgraph.com/blog/what-is-rag" rel="noopener noreferrer"&gt;RAG&lt;/a&gt; usually retrieves isolated text chunks. That creates a few common problems.&lt;/p&gt;

&lt;p&gt;First, chunking can break context. A policy, customer, transaction, or technical decision might make sense only when you see how it connects to other facts. Splitting documents into chunks can hide that structure.&lt;/p&gt;

&lt;p&gt;Second, semantic similarity can over retrieve. A chunk may sound relevant without being useful for the actual answer.&lt;/p&gt;

&lt;p&gt;Third, RAG does not inherently reason across relationships. It may retrieve text about a supplier, text about a product, and text about a shipment delay, but it does not automatically know how those things connect.&lt;/p&gt;

&lt;p&gt;Think about this question:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Which customers are affected by the delayed shipment from Supplier A?&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;A standard RAG pipeline might retrieve documents that mention Supplier A, delayed shipments, and customers. That is helpful, but still incomplete.&lt;/p&gt;

&lt;p&gt;The actual answer may require a path like this: &lt;/p&gt;

&lt;p&gt;&lt;code&gt;Supplier A -&amp;gt; supplies -&amp;gt; Component X -&amp;gt; used in -&amp;gt; Product Y -&amp;gt; included in -&amp;gt; Shipment Z -&amp;gt; assigned to -&amp;gt; Customer C&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;That path is not just text similarity. It is structure.&lt;/p&gt;

&lt;p&gt;If your application needs to answer questions like this, treating your knowledge base as flat chunks is a weak model of the problem.&lt;/p&gt;

&lt;h2&gt;
  
  
  What GraphRAG Adds
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://memgraph.com/blog/what-is-graphrag" rel="noopener noreferrer"&gt;GraphRAG&lt;/a&gt; keeps the useful part of RAG: &lt;strong&gt;retrieval&lt;/strong&gt;. But it adds a graph layer, where information is represented as entities and relationships. Microsoft’s paper on &lt;a href="https://arxiv.org/abs/2404.16130" rel="noopener noreferrer"&gt;GraphRAG for query focused summarization&lt;/a&gt; helped popularize this pattern for using graph structure to answer questions that need broader connected context.&lt;/p&gt;

&lt;p&gt;Instead of only storing chunks like:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Supplier A provides Component X. Component X is used in Product Y. Product Y is part of Shipment Z.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;A graph represents the structure directly:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;(Supplier A)-[:SUPPLIES]-&amp;gt;(Component X)
(Component X)-[:USED_IN]-&amp;gt;(Product Y)
(Product Y)-[:INCLUDED_IN]-&amp;gt;(Shipment Z)
(Shipment Z)-[:ASSIGNED_TO]-&amp;gt;(Customer C)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Now the system can retrieve context by following relationships, not just by matching similar text.&lt;/p&gt;

&lt;p&gt;A GraphRAG pipeline might work like this:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Use semantic search, keyword search, or another method to find a starting point.&lt;/li&gt;
&lt;li&gt;Identify the relevant node or set of nodes in the graph.&lt;/li&gt;
&lt;li&gt;Traverse connected relationships.&lt;/li&gt;
&lt;li&gt;Rank, filter, and compress the connected context.&lt;/li&gt;
&lt;li&gt;Send the final context to the LLM.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fhapl9s36cy4vvdg5ebdg.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fhapl9s36cy4vvdg5ebdg.png" alt="Memgraph GraphRAG workflow" width="799" height="437"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The key difference is that search finds where to start, while graph traversal finds what is connected.&lt;/p&gt;

&lt;p&gt;That is why GraphRAG is useful for relationship-heavy use cases, such as:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Supply chain analysis where the system needs to trace products, components, suppliers, and delayed shipments&lt;/li&gt;
&lt;li&gt;Fraud detection where suspicious behavior appears across shared accounts, devices, transactions, or addresses&lt;/li&gt;
&lt;li&gt;Cybersecurity investigation where alerts need to be connected to users, assets, permissions, and attack paths&lt;/li&gt;
&lt;li&gt;Healthcare or life sciences research where answers depend on relationships between diseases, genes, drugs, and clinical evidence&lt;/li&gt;
&lt;li&gt;Customer 360 applications where support tickets, purchases, product usage, and account history need to be connected&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;These are not just document lookup problems. They are relationship problems.&lt;/p&gt;

&lt;h2&gt;
  
  
  RAG and GraphRAG Are Not Enemies
&lt;/h2&gt;

&lt;p&gt;The lazy version of this topic is: RAG bad, GraphRAG good.&lt;/p&gt;

&lt;p&gt;That is wrong. &lt;strong&gt;RAG&lt;/strong&gt; is still useful. If your data is mostly unstructured text and your questions are direct, a standard RAG pipeline may be enough. &lt;strong&gt;GraphRAG&lt;/strong&gt; becomes useful when the shape of the answer depends on connected facts. A better way to think about it:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;&lt;strong&gt;Use RAG When&lt;/strong&gt;&lt;/th&gt;
&lt;th&gt;&lt;strong&gt;Use GraphRAG When&lt;/strong&gt;&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;The answer is likely inside a small number of text chunks.&lt;/td&gt;
&lt;td&gt;The answer depends on relationships across entities.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;You need fast document Q&amp;amp;A.&lt;/td&gt;
&lt;td&gt;You need multi-hop reasoning.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Your data does not have strong entity relationships.&lt;/td&gt;
&lt;td&gt;Your data has dependencies, hierarchies, ownership, or causality.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;You are building a first version quickly.&lt;/td&gt;
&lt;td&gt;You need more explainable and structured retrieval.&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;In practice, many good systems use both. &lt;strong&gt;Vector search&lt;/strong&gt; can find semantically relevant entry points. &lt;strong&gt;Graph traversal&lt;/strong&gt; can expand from those entry points into connected context.&lt;/p&gt;

&lt;p&gt;That combination is often more useful than either approach alone.&lt;/p&gt;

&lt;h2&gt;
  
  
  Keep the Retrieval Logic Close to the Data
&lt;/h2&gt;

&lt;p&gt;GraphRAG gets harder to maintain when every retrieval step lives in a different place.&lt;/p&gt;

&lt;p&gt;One service finds similar chunks. Another stores the graph. Another expands relationships. Another ranks results. Another builds the final prompt.&lt;/p&gt;

&lt;p&gt;That can work, but it gives you more moving parts to debug when the answer is wrong.&lt;/p&gt;

&lt;p&gt;A cleaner pattern is to keep as much of the retrieval logic as possible close to the graph itself. Search can find the starting point. Traversal can expand the context. Ranking and filtering can reduce the result before it ever reaches the prompt.&lt;/p&gt;

&lt;p&gt;That is the idea behind &lt;a href="https://memgraph.com/docs/ai-ecosystem/graph-rag/atomic-pipelines" rel="noopener noreferrer"&gt;Atomic GraphRAG in Memgraph&lt;/a&gt;. It express the retrieval path as a single execution layer where possible, instead of spreading it across a pile of orchestration code.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F1i4bgi00xo9kfsoh53ts.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F1i4bgi00xo9kfsoh53ts.png" alt="atomic graphrag real example" width="800" height="400"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The broader lesson is not tool specific. If your GraphRAG pipeline is hard to inspect, it will be hard to trust. The retrieval path should be visible, testable, and easy to change.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Practical Rule
&lt;/h2&gt;

&lt;p&gt;Use RAG when you need to retrieve relevant text. Use GraphRAG when you need to retrieve connected context. That is the real distinction. &lt;/p&gt;

&lt;p&gt;If your question can be answered by finding the right paragraph, RAG is probably enough. If your question requires following relationships between people, products, systems, documents, events, risks, or dependencies, you are no longer just doing text retrieval. You are doing graph retrieval.&lt;/p&gt;

&lt;p&gt;The point is not to use GraphRAG as an extra layer and start using it where it is right retrieval model for the problem.&lt;/p&gt;

</description>
      <category>ai</category>
      <category>rag</category>
      <category>graphrag</category>
      <category>llm</category>
    </item>
    <item>
      <title>MCP for Agents: The Security Gap Most Teams Miss</title>
      <dc:creator>Sabika Tasneem</dc:creator>
      <pubDate>Mon, 16 Feb 2026 12:31:41 +0000</pubDate>
      <link>https://dev.to/memgraph/mcp-for-agents-the-security-gap-most-teams-miss-3bnl</link>
      <guid>https://dev.to/memgraph/mcp-for-agents-the-security-gap-most-teams-miss-3bnl</guid>
      <description>&lt;p&gt;MCP is exciting because it turns an LLM into something that can execute actions through tool calls. One protocol, many tools. Your agent can pull data, update tickets, call APIs, and trigger workflows. That is exactly why teams are rushing to ship MCP based agents.&lt;/p&gt;

&lt;p&gt;That speed comes with a tradeoff. Once an LLM can touch live systems, mistakes stop being “bad answers” and start becoming real actions. The point of this post is not to criticize MCP. It is to help you ship agents that stay useful without unintentionally expanding your blast radius.&lt;/p&gt;

&lt;p&gt;Let’s dive in!&lt;/p&gt;

&lt;h2&gt;
  
  
  What MCP Gives You (And What it Does Not)
&lt;/h2&gt;

&lt;p&gt;MCP standardizes how tools and context are exposed to a model, which is great for developer velocity. What it does not do is decide what is safe or appropriate in your environment. You still own boundaries and behavior.&lt;/p&gt;

&lt;p&gt;

  &lt;iframe src="https://www.youtube.com/embed/nmAVOTVi7yE"&gt;
  &lt;/iframe&gt;


&lt;/p&gt;

&lt;p&gt;In production, the gaps show up fast:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Which tool should be used for this request&lt;/li&gt;
&lt;li&gt;What data is allowed for this user or team&lt;/li&gt;
&lt;li&gt;Which actions should be blocked or require approval&lt;/li&gt;
&lt;li&gt;How you can audit tool use after something goes wrong&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;If you want the spec level overview, start with &lt;a href="https://www.anthropic.com/news/model-context-protocol" rel="noopener noreferrer"&gt;Anthropic’s MCP introduction&lt;/a&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  Building Agents with MCP: 3 Problems You Will Hit First
&lt;/h2&gt;

&lt;p&gt;The first failure is rarely a headline breach. It usually looks like a normal product bug, except now the bug can trigger emails, update records, or touch production data. For instance:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;The Agent Does the “Helpful” Thing You Did Not Ask For&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;A user asks, “Can you check which customers are impacted?” The agent decides that notifying customers is helpful and drafts a mass email. Nothing was hacked. The model was just optimizing for task completion, and you gave it a tool that made the wrong idea easy.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;A Demo Tool Becomes a Production Hazard&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Most teams start with a broad tool set because it makes the demo work. Later, the agent gets a slightly different question and reaches for the most powerful tool available. If that tool can write, delete, or trigger workflows, you now have an outsized failure scope. That is the blast radius.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;The Agent Guesses and Guesses Wrong&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;If your agent can query a database, it will try. If it does not have the right context about what is allowed and what the data means, it will guess. Sometimes the guess is harmless. Sometimes it pulls data it should not have pulled, or it produces results that look right but are based on the wrong assumptions.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Why Prompt Rules Are Not Enforcement
&lt;/h2&gt;

&lt;p&gt;The common response is to add more instructions: “Read-only,” “confirm before sending,” “never delete.” Those rules help, but they do not enforce anything.&lt;/p&gt;

&lt;p&gt;There is a simple reason. Prompts influence the model’s behavior. They do not change the system’s capabilities. If a write tool is exposed, the model can still call it, even if you told it not to. If a broad SQL tool is exposed, the model can still retrieve more data than you intended, even if you asked it to be careful.&lt;/p&gt;

&lt;p&gt;This is why prompt-only safety tends to decay over time. As you add tools, edge cases, and new workflows, the instruction layer becomes a long list of exceptions. The agent still has the same tool surface, but now it is operating under a growing set of text rules that are easy to miss, conflict, or misapply.&lt;/p&gt;

&lt;p&gt;The fix is capability control. Reduce what the agent can do, scope what it can see, and require explicit approvals for actions that have a real blast radius.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Practical Fix: Shrink the Tool Surface at Runtime
&lt;/h2&gt;

&lt;p&gt;Do not rely on the model to always choose correctly. Make wrong choices harder. The simplest way to do that is to reduce what the agent can do by default, then expand capabilities only when you have a clear reason.&lt;/p&gt;

&lt;p&gt;Start with these guardrails:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Expose fewer tools by default&lt;/li&gt;
&lt;li&gt;Only expose tools that match the current task&lt;/li&gt;
&lt;li&gt;Separate read tools from write tools&lt;/li&gt;
&lt;li&gt;Require approvals for irreversible actions&lt;/li&gt;
&lt;li&gt;Log tool calls so you can trace what happened&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This is least-privilege design applied to agent tool access, enforced at runtime.&lt;/p&gt;

&lt;h2&gt;
  
  
  Where GraphRAG Fits in an MCP Tooling Stack
&lt;/h2&gt;

&lt;p&gt;Most RAG stacks start with vectors. Vectors are great at finding semantically similar text, but they are not built to represent relationships like who owns which data, which rule is current, or which tool is allowed for this workflow.&lt;/p&gt;

&lt;p&gt;Graphs are good at that because they model relationships directly. When you add a graph-based context layer, you can give the model a smaller, cleaner slice of context tied to the user and the task.&lt;/p&gt;

&lt;p&gt;For example, you can make use of &lt;a href="https://memgraph.com/docs/database-management/authentication-and-authorization/role-based-access-control#label-based-access-control" rel="noopener noreferrer"&gt;label-based access controls&lt;/a&gt; that determine which node labels and relationship edge types a given user or workflow can touch. That reduces overload and lowers the chance your agent reaches for the wrong tool.&lt;/p&gt;

&lt;h2&gt;
  
  
  A Checklist You Can Actually Use
&lt;/h2&gt;

&lt;p&gt;If you are shipping MCP-powered agents, do not treat guardrails as a final polish step. Treat them as part of the build. The fastest way to end up in trouble is to bolt safety on after you have already exposed a wide tool surface to an LLM.&lt;/p&gt;

&lt;p&gt;Start with a simple baseline and improve it as you learn. The point is not to predict every edge case up front. The point is to make tool behavior observable, reversible where possible, and scoped to what the agent should be doing right now.&lt;/p&gt;

&lt;p&gt;If you are shipping MCP-powered agents, start here:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;List your tools and label them read or write&lt;/li&gt;
&lt;li&gt;Turn off anything irreversible by default&lt;/li&gt;
&lt;li&gt;Add a human approval step for high impact actions&lt;/li&gt;
&lt;li&gt;Keep tool descriptions short and specific&lt;/li&gt;
&lt;li&gt;Log every tool call with who requested it and what tool ran&lt;/li&gt;
&lt;li&gt;Review misfires weekly and treat them as product bugs&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;This checklist is not about paranoia. It is about making MCP workflows predictable enough to ship. If your plan is “we will fix it in the prompt,” you are in for some trouble.&lt;/p&gt;

&lt;h2&gt;
  
  
  What Memgraph adds to an MCP agent stack
&lt;/h2&gt;

&lt;p&gt;At some point in production, most enterprise teams realize they need a real context layer. Memgraph is an in-memory graph database used as a real-time context engine, which makes it a good fit when your agent needs fast traversal, connected context, and governance that changes as your systems change.&lt;/p&gt;

&lt;p&gt;In practice, you can use Memgraph to store and query the relationships your agent depends on, then apply GraphRAG patterns to retrieve a connected context slice instead of stuffing everything into a prompt.&lt;/p&gt;

&lt;p&gt;This is also where Memgraph’s &lt;strong&gt;&lt;a href="https://www.crowdcast.io/c/meet-atomic-graphrag-a-single-unified-execution-layer" rel="noopener noreferrer"&gt;Atomic GraphRAG&lt;/a&gt;&lt;/strong&gt; comes in. Instead of stitching together multiple retrieval steps in your application code, Atomic GraphRAG aims to generate context in a single query so it is simpler, faster, and easier to review and tweak. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fv528cggc13phtxnqq4qm.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fv528cggc13phtxnqq4qm.png" alt="memgraph-atomic-graphrag-single-query-execution"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;For you, that means fewer moving parts, clearer failure modes, and a smaller surface area for accidental tool misuse.&lt;/p&gt;

&lt;p&gt;If you are exploring MCP specifically, Memgraph provides an &lt;a href="https://memgraph.com/blog/pushing-mcp-forward" rel="noopener noreferrer"&gt;MCP Server&lt;/a&gt; to expose graph context to agents, and an &lt;a href="https://modelcontextprotocol.io/clients#:~:text=and%20Agent%20API-,Memgraph%20Lab,-%23" rel="noopener noreferrer"&gt;MCP Client&lt;/a&gt; inside &lt;a href="https://memgraph.com/lab" rel="noopener noreferrer"&gt;Memgraph Lab&lt;/a&gt; to compose workflows across MCP servers.&lt;/p&gt;

&lt;h2&gt;
  
  
  Wrapping Up
&lt;/h2&gt;

&lt;p&gt;MCP is a doorway to useful agents. It also makes mistakes expensive. If you want to ship responsibly, focus on runtime guardrails: shrink the tool surface, keep context clean, and log everything.&lt;/p&gt;

&lt;p&gt;If you want to explore a graph-based context layer for MCP, &lt;a href="https://memgraph.com/blog/mcp-client-memgraph-lab-interoperability" rel="noopener noreferrer"&gt;start here&lt;/a&gt;. And remember, tool access is part of your attack surface, so review it alongside your production code.&lt;/p&gt;

</description>
      <category>mcp</category>
      <category>agents</category>
      <category>graphrag</category>
      <category>accesscontrols</category>
    </item>
  </channel>
</rss>
