<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Sangeetha R on Medium]]></title>
        <description><![CDATA[Stories by Sangeetha R on Medium]]></description>
        <link>https://medium.com/@sangeethavijayl?source=rss-4276b8fe5596------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*Oe9_m0VvgeAcg_y-.jpg</url>
            <title>Stories by Sangeetha R on Medium</title>
            <link>https://medium.com/@sangeethavijayl?source=rss-4276b8fe5596------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sun, 29 Nov 2026 09:38:37 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@sangeethavijayl/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[GraphRAG: Mapping Knowledge Like the Human Mind]]></title>
            <link>https://medium.com/@sangeethavijayl/graphrag-mapping-knowledge-like-the-human-mind-626f0ea7bcce?source=rss-4276b8fe5596------2</link>
            <guid isPermaLink="false">https://medium.com/p/626f0ea7bcce</guid>
            <category><![CDATA[rags]]></category>
            <category><![CDATA[connected-data]]></category>
            <category><![CDATA[graphrag]]></category>
            <category><![CDATA[knowledge-graph]]></category>
            <dc:creator><![CDATA[Sangeetha R]]></dc:creator>
            <pubDate>Tue, 23 Sep 2025 13:05:07 GMT</pubDate>
            <atom:updated>2025-09-23T13:05:07.323Z</atom:updated>
            <content:encoded><![CDATA[<p>Information is natively interconnected — traversing it enhances retrieval</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*oyyOkemMLsmZ57I51i4BBA.png" /></figure><h3><strong>Why RAG Needs Graphs</strong></h3><p>In today’s interconnected world, data can be sourced from many places. Making sense of this data for decision-making requires structured organization — especially in enterprise settings.</p><p>Large Language Models (LLMs), when given the right context and clear instructions, make natural language interaction smooth. But when context is insufficient, even with precise instructions, LLMs can hallucinate and produce unreliable responses.</p><p>Retrieval-Augmented Generation (RAG) addresses this problem by feeding relevant context to the LLM. However, <strong>traditional RAG falls short</strong> when nuanced connections exist in the data — connections the human brain infers naturally.</p><h3>Grounding LLM Responses</h3><p>Vector search is influenced by <strong>chunking</strong> since embeddings are generated from chunks.</p><ul><li>Larger chunks dilute important details.</li><li>Smaller chunks lose semantic meaning from the wider sentence or paragraph.</li></ul><p>Even if chunking is carefully done, the <strong>interconnectedness</strong> of the data may still be lost in vector space.</p><p>👉 This is where <strong>graphs</strong> come in. By enriching vector similarity results with graph edges, we can ground LLMs in structured relationships — ensuring reliable responses at enterprise scale, regardless of domain.</p><h3>Constructing Knowledge Graphs</h3><p>Traditionally, building knowledge graphs has been considered:</p><ul><li>Laborious, requiring SMEs.</li><li>Dependent on heavy data modeling and graph database setup.</li></ul><p>As a result, graph databases are often seen as “nice to have” rather than essential.</p><p>But there’s a more dynamic way: <strong>jump-start graph use directly from unstructured data</strong>, then run <strong>GraphRAG</strong> for LLM use cases.</p><h3>Hybrid RAG Approach</h3><p>To see this in action, I used <strong>podcast transcripts</strong> (related or unrelated) as input. By combining:</p><ul><li><strong>Graph RAG (graph traversal)</strong></li><li><strong>Vector similarity search (RAG)</strong></li></ul><p>I could retrieve rich, interconnected context for the LLM to answer podcast-related questions.</p><p>The hybrid approach combines the best of both worlds: the semantic understanding of vector search with the structural relationships of graph traversal.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*jnw9wYa7NrmF0ETD5tJEGQ.png" /><figcaption>GraphRAG via GraphRetriever In Action</figcaption></figure><h3>Why GraphRetriever</h3><p>GraphRetriever efficiently handles <strong>structured relationships between documents </strong>without the heavy lift of building a full knowledge graph.</p><p>Key benefits:</p><ul><li>Reduced costs in knowledge graph creation.</li><li>Lazy traversal of metadata instead of building a full graph.</li><li>More efficient and cost-effective real-time retrieval.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*pJuqX0_w-cy11Yw9z9BfqQ.png" /><figcaption>GraphRAG Workflow Using Unstructured and AstraDB</figcaption></figure><p>This workflow shows how Unstructured API / SDK + KeyBERT Metadata (custom) enrichment + AstraDB feed into the graph-based retrieval process.</p><h3>Implementation</h3><p>For my demo, here’s the Graph Retriever setup:</p><pre># Graph Retriever <br>retriever = GraphRetriever(<br>        store = vectorstore,<br>        edges = edges, <br>        strategy = Eager(start_k=10,<br>                     select_k=10,<br>                     adjacent_k=2,<br>                     max_depth=6), # max_depth of graph traversal; 0 is no traversal at all<br>    )</pre><p>This configuration combines graph traversal with semantic vector matching.</p><p>The above creates a graph traversing retriever that starts with fetching start_k number of documents via similarity for starting the traversal (start_k=10), retrieves a maximum of select_k documents (select_k=10), retrieves adjacent_k number of documents for each outgoing edge (adjacent_k=2) and limits the search to documents that are at most 2 steps away from the first match (max_depth=6).</p><h3><strong>Comparing Retrieval Results</strong></h3><h4><strong>Graph Traversal + Vector Evidence</strong></h4><p>→ Produces richer, grounded answers by leveraging connected nodes.</p><pre>## Visualize the nodes used in the query (Graph traversal + Sematic Vector matching)<br>import networkx as nx<br>import matplotlib.pyplot as plt<br>from langchain_graph_retriever.document_graph import create_graph<br><br>question = &quot;How does snowflake support incremental data processing?&quot;<br>g_edges = [(&quot;keywords&quot;, &quot;keywords&quot;)]<br>result, documents = enhanced_graphrag.visualize_hybrid_query(question, 10, 6)<br>document_graph = create_graph(<br>    documents=documents,<br>    edges = g_edges,<br>)<br><br>nx.draw(document_graph, with_labels=True)<br>plt.show()<br><br>Found 10 documents with keywords:<br><br>Document 1:<br>  ID: a9fb5dbd269a3fc5c7c453bf77a45943<br>  Type: NarrativeText<br>  Keywords: [&#39;migrations&#39;, &#39;migration&#39;, &#39;datafolds&#39;, &#39;datafold&#39;, &#39;dataengineeringpodcast&#39;]<br>  Has graph edges: True<br>  Content preview: Hello, and welcome to the Data Engineering Podcast, the show about modern data management.   Data mi...<br><br>Document 2:<br>  ID: 1ec5ce8aa0d31fa9626b1bb6b0ecaa7a<br>  Type: NarrativeText<br>  Keywords: [&#39;streaming&#39;, &#39;orchestrating&#39;, &#39;programming&#39;, &#39;systems&#39;, &#39;instrumenting&#39;]<br>  Has graph edges: True<br>  Content preview: But   I I I guess I&#39;ve always had the sense that,   they&#39;re kind of unsatisfying from, like, a theor...<br><br>Document 3:<br>  ID: 588952fd069ce89e1952a82da1908df2<br>  Type: Title<br>  Keywords: [&#39;sotolongo&#39;, &#39;dan&#39;, &#39;27&#39;, &#39;48&#39;, &#39;00&#39;]<br>  Has graph edges: True<br>  Content preview: [00:27:48] Dan Sotolongo:...<br><br>Extracted 15 unique keywords: [&#39;instrumenting&#39;, &#39;sotolongo&#39;, &#39;48&#39;, &#39;00&#39;, &#39;streaming&#39;, &#39;systems&#39;, &#39;datafold&#39;, &#39;orchestrating&#39;, &#39;migrations&#39;, &#39;datafolds&#39;]...<br>Using keywords-based edges: [(&#39;keywords&#39;, &#39;keywords&#39;)]<br>...<br>...<br>📄 Document content from AstraDB:<br>--------------------------------------------------<br>{&#39;_id&#39;: &#39;4f1fb4021489f3e42a84268864cdbf9f&#39;, &#39;content&#39;: &quot;And so having this capability   of managing the incremental updates, handling   the complexities   of ensuring that the different data sources are aligning in terms of the delivery cycles,   it still doesn&#39;t address the other end of the problem of managing that input layer of how does the data even get to Snowflake for it to be able to do that incremental processing.   And I&#39;m wondering if you can talk to some of the ways that you&#39;re thinking about the   automatics. Maybe it&#39;s an append only log or, in particular, being able to handle things like deletions or updates as you are doing that processing and just some of the   structural   patterns   around this   unbounded data and how it lands in the context of Snowflake for it to be able to be then be fed into these dynamic tables.&quot;, &#39;metadata&#39;: {&#39;keywords&#39;: [&#39;snowflake&#39;, &#39;incremental&#39;, &#39;dynamic&#39;, &#39;tables&#39;, &#39;delivery&#39;], &#39;languages&#39;: [&#39;eng&#39;], &#39;filename&#39;: &#39;delayed-view-semantics-incremental-data-processing.txt&#39;, &#39;filetype&#39;: &#39;text/plain&#39;, &#39;parent_id&#39;: &#39;561faf9c5ca1bf846f50211ca5d6741a&#39;, &#39;element_type&#39;: &#39;NarrativeText&#39;, &#39;element_id&#39;: &#39;4f1fb4021489f3e42a84268864cdbf9f&#39;, &#39;graph_links&#39;: [{&#39;kind&#39;: &#39;sections&#39;, &#39;direction&#39;: &#39;bidir&#39;, &#39;tag&#39;: &#39;4f1fb4021489f3e42a84268864cdbf9f&#39;}, {&#39;kind&#39;: &#39;sections&#39;, &#39;direction&#39;: &#39;bidir&#39;, &#39;tag&#39;: &#39;561faf9c5ca1bf846f50211ca5d6741a&#39;}], &#39;graph_edges&#39;: True}}<br>--------------------------------------------------</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/660/1*Ee7CwAqbfCyBsU-gOom7PQ.png" /><figcaption>See How Graph Traversal + Vector Evidence Shaped the Response</figcaption></figure><p><strong>Response received via GraphRAG:</strong></p><p>Snowflake supports incremental data processing through a combination of dynamic tables and a micro-batch processing engine that underpins its architecture. The dynamic tables feature in Snowflake operates as a micro-batch engine, which processes data in small batches under the hood, while providing a user experience akin to streaming data processing models. This means that users do not need to manage orchestration or keep track of data updates manually, as Snowflake automates these processes.</p><p>Dynamic tables in Snowflake are integrated closely with the platform’s high-performance SQL processing capabilities, incorporating Snowflake’s SQL compiler and execution engine. This integration allows the dynamic tables to leverage the existing functionalities of Snowflake for incremental view maintenance. Snowflake has also engineered the system to handle updates and deletions effectively, as the data undergoes transformations or when adhering to regulations such as GDPR that might require data to be updated or deleted.</p><p>Furthermore, Snowflake uses the concept of materialized data representations, which enables efficient data handling and processing. The data can be incrementally loaded from various sources, like Kafka into an S3 bucket, and then processed by Snowflake. This processing includes maintaining derived state in dynamic tables, thereby enabling efficient and incremental updates to the data as new batches arrive.</p><p>Internally, Snowflake handles complex transformations, such as incremental maintenance of join operations, by algebraically rewriting query plans to keep the join views up to date as underlying data changes. This sophisticated approach minimizes the computational overhead and latency typically associated with maintaining accuracy and freshness in a dynamic dataset. <br>Additionally, Snowflake’s support for the Iceberg format helps optimize data management and integration, allowing dynamic tables to function seamlessly as both input and output formats, facilitating straightforward transformations within the Snowflake ecosystem. This dual-role capability of Iceberg tables further enhances the platform’s ability to process incremental data updates efficiently.</p><p>Overall, these features and functionalities collectively enable Snowflake to provide robust support for incremental data processing within its cloud data platform.</p><h4><strong>Vector Similarity Alone</strong></h4><p>→ Captures semantic closeness but often misses contextual nuance.</p><pre>## Visualize the nodes used in the query (Sematic Vector matching)<br>import networkx as nx<br>import matplotlib.pyplot as plt<br>from langchain_graph_retriever.document_graph import create_graph<br><br>question = &quot;How does snowflake support incremental data processing?&quot;<br>g_edges = []<br>result, documents = enhanced_graphrag.visualize_vector_query(question, 10)<br>document_graph = create_graph(<br>    documents=documents,<br>    edges = g_edges,<br>)<br><br>nx.draw(document_graph, with_labels=True)<br>plt.show()</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/660/1*au-PP6iTIWyZgrKVjOYIcw.png" /><figcaption>See How Vector Similarity Alone Shaped the Response</figcaption></figure><p><strong>Response received via Vector similarity alone:</strong></p><p>Snowflake supports incremental data processing through its dynamic tables feature, which operates on a micro batch engine. The dynamic tables allow data to be processed in batches that are small and frequent, thus approximating a streaming processing model. This eliminates the need for explicit orchestration and frequent updates, as the system automatically manages these aspects. Furthermore, Snowflake incorporates an advanced SQL compiler and execution engine, which efficiently handles incremental updates and complex queries such as maintaining inner joins incrementally by algebraically rewriting query plans to accommodate changes. This system leverages Snowflake’s high-performance columnar storage and compute capabilities, ultimately enhancing the efficiency and ease of handling incremental loads and complex transformations within the database.</p><p>Repository with complete code and jupyter notebook can be found <a href="https://github.com/sangs/GraphRAGWithUnstructured.git">here</a></p><h3><strong>References</strong>:</h3><p><a href="https://medium.com/towards-data-science/your-documents-are-trying-to-tell-you-whats-relevant-better-rag-using-links-386b7433d0f2">https://medium.com/towards-data-science/your-documents-are-trying-to-tell-you-whats-relevant-better-rag-using-links-386b7433d0f2</a></p><p><a href="https://thenewstack.io/building-graph-based-rag-applications-just-got-easier/">Building Graph-Based RAG Applications Just Got Easier</a></p><p><a href="https://datastax.github.io/graph-rag/blog/2025/01/31/introducing-graph-rag/">Introducing Graph Retriever: https://datastax.github.io/graph-rag/blog/2025/01/31/introducing-graph-rag/</a></p><p>Unstructured: <a href="https://docs.unstructured.io/welcome">https://docs.unstructured.io/welcome</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=626f0ea7bcce" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>