<?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 Midhun Mohan Kudayattutharayil on Medium]]></title>
        <description><![CDATA[Stories by Midhun Mohan Kudayattutharayil on Medium]]></description>
        <link>https://medium.com/@midhunmohank?source=rss-b01a46bdf862------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*kIKG7iZCVIntq8Onco6iEA@2x.jpeg</url>
            <title>Stories by Midhun Mohan Kudayattutharayil on Medium</title>
            <link>https://medium.com/@midhunmohank?source=rss-b01a46bdf862------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Wed, 02 Dec 2026 03:37:14 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@midhunmohank/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[Boosting Neo4j Query Performance: A Comprehensive Guide to Using Indexes]]></title>
            <link>https://medium.com/@midhunmohank/boosting-neo4j-query-performance-a-comprehensive-guide-to-using-indexes-d12a106e30a1?source=rss-b01a46bdf862------2</link>
            <guid isPermaLink="false">https://medium.com/p/d12a106e30a1</guid>
            <category><![CDATA[graph]]></category>
            <category><![CDATA[graph-database]]></category>
            <category><![CDATA[indexing]]></category>
            <category><![CDATA[neo4j]]></category>
            <dc:creator><![CDATA[Midhun Mohan Kudayattutharayil]]></dc:creator>
            <pubDate>Sun, 16 Jun 2024 07:54:56 GMT</pubDate>
            <atom:updated>2024-06-16T07:56:34.520Z</atom:updated>
            <content:encoded><![CDATA[<h3>What is an Index?</h3><p>An index is a data structure that improves the speed of data retrieval operations on a database table at the cost of additional writes and storage space to maintain the index data structure. The main purpose of an index is to allow quick lookup of data without having to search every row in a database table every time a database table is accessed.</p><h3>How Indexes Work</h3><p>Indexes function similarly to the index of a book. Instead of going through each page to find a topic, you can refer to the index to quickly find the page number. In databases, an index performs a similar function by providing a quick way to look up data based on one or more columns.</p><h3>Types of Indexes in Neo4j</h3><ol><li><strong>Single-Property Index</strong>: Indexes a single property of nodes or relationships.</li><li><strong>Composite Index</strong>: Indexes multiple properties together.</li><li><strong>Full-Text Index</strong>: Allows efficient searching of text properties.</li></ol><h3>Why Use Indexes?</h3><ul><li><strong>Improved Query Performance</strong>: Indexes speed up query performance by allowing the database to quickly locate and retrieve the requested data without scanning the entire dataset.</li><li><strong>Efficient Data Retrieval</strong>: Indexes provide a mechanism for efficiently retrieving records that meet certain criteria, such as finding a person by name.</li><li><strong>Reduced I/O Operations</strong>: By reducing the number of records the database needs to scan, indexes reduce the number of I/O operations, leading to faster query execution.</li></ul><h3>Creating and Managing Indexes in Neo4j</h3><ul><li><strong>Creating Indexes</strong>: Use the CREATE INDEX command to create an index. Choose the properties you frequently query on.</li><li><strong>Listing Indexes</strong>: Use the CALL db.indexes() command to list all existing indexes.</li><li><strong>Dropping Indexes</strong>: Use the DROP INDEX command to remove an index when it is no longer needed or if it is not being used effectively.</li></ul><h3>Example</h3><h4>Scenario</h4><p>Suppose we have a graph database with nodes representing people, each with properties such as `name` and `age`. We want to quickly find a person by their name.</p><p><strong>1. Data Creation:</strong></p><pre>CREATE (a:Person {name: &#39;Alice&#39;, age: 30})<br>CREATE (b:Person {name: &#39;Bob&#39;, age: 25})<br>CREATE (c:Person {name: &#39;Charlie&#39;, age: 35})</pre><h4>Without an Index</h4><p><strong>2. Query to Find a Person by Name:</strong></p><pre>MATCH (n:Person {name: &#39;Alice&#39;})<br>RETURN n</pre><p>Without an index, Neo4j must perform a full scan of all nodes labeled `Person` and check each node’s `name` property to see if it matches ‘Alice’. This can be slow, especially if there are many nodes.</p><p><strong>3. Creating an Index</strong></p><p>To improve the speed of this query, we create an index on the `name` property.</p><pre>CREATE INDEX FOR (n:Person) ON (n.name)<br> </pre><p><strong>With an Index</strong></p><p>Now, when we run the same query, Neo4j uses the index to find the node.</p><p><strong>2. Query Using the Index:</strong></p><pre>MATCH (n:Person {name: &#39;Alice&#39;})<br>RETURN n</pre><p>With the index, Neo4j quickly looks up the `name` property in the index structure, similar to looking up a term in a book’s index, and retrieves the node(s) with `name: ‘Alice’`. This is much faster than scanning all nodes.</p><h3>How Indexes Work Internally</h3><p><strong>1. Index Creation:</strong><br> — When the index is created, Neo4j builds an internal data structure (e.g., a B-tree or a hash table) that maps the indexed property values (in this case, `name`) to the corresponding nodes.</p><p><strong>2. Query Execution with Index:</strong><br> — When the query runs, Neo4j checks the index data structure for the specified property value (‘Alice’).<br> — The index quickly points to the node(s) that have the `name` property set to ‘Alice’, without needing to scan all nodes.</p><h3><strong>Performance Impact</strong></h3><p><strong>- Without Index:</strong><br> — For each query, Neo4j must examine every node with the label `Person` to check if its `name` matches the query.<br> — This can be time-consuming, especially with a large number of nodes.</p><p><strong>- With Index:</strong><br> — The query directly uses the index to locate nodes, which significantly reduces the number of operations needed.<br> — This results in much faster query performance.</p><h3>Visual Example</h3><p><strong>Without Index:</strong></p><pre>[Person: {name: &#39;Alice&#39;, age: 30}]<br>[Person: {name: &#39;Bob&#39;, age: 25}]<br>[Person: {name: &#39;Charlie&#39;, age: 35}]<br>--<br>Query: MATCH (n:Person {name: &#39;Alice&#39;})<br>Neo4j scans each node: &#39;Bob&#39; -&gt; &#39;Charlie&#39; -&gt; &#39;Alice&#39; -&gt; … (slow)</pre><p><strong>With Index:</strong></p><pre>Index: { &#39;Alice&#39; -&gt; NodeID1, &#39;Bob&#39; -&gt; NodeID2, &#39;Charlie&#39; -&gt; NodeID3, … }<br>Query: MATCH (n:Person {name: &#39;Alice&#39;})<br>Neo4j uses the index: &#39;Alice&#39; -&gt; NodeID1 (fast)</pre><h3>Summary</h3><p>- <strong>Index Creation</strong>: Indexes are created on properties that are frequently queried, reducing the need to scan all nodes.<br>- <strong>Query Execution</strong>: Queries use indexes to directly find the relevant nodes, improving performance.<br>- <strong>Performance Improvement</strong>: Indexes significantly speed up data retrieval, especially in large datasets, by minimizing the number of nodes Neo4j needs to examine.</p><p>By creating and using indexes, you can enhance the performance of your Neo4j queries, making data retrieval operations much more efficient.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d12a106e30a1" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Transforming Unstructured Data into Knowledge Graphs with OpenAI Assistants API]]></title>
            <link>https://medium.com/@midhunmohank/transforming-unstructured-data-into-knowledge-graphs-with-openai-assistants-api-107fc1324e67?source=rss-b01a46bdf862------2</link>
            <guid isPermaLink="false">https://medium.com/p/107fc1324e67</guid>
            <category><![CDATA[openai]]></category>
            <category><![CDATA[neo4j]]></category>
            <category><![CDATA[knowledge-graph]]></category>
            <category><![CDATA[graph-database]]></category>
            <category><![CDATA[unstructured-data]]></category>
            <dc:creator><![CDATA[Midhun Mohan Kudayattutharayil]]></dc:creator>
            <pubDate>Sun, 12 May 2024 07:26:15 GMT</pubDate>
            <atom:updated>2024-05-12T07:26:15.266Z</atom:updated>
            <content:encoded><![CDATA[<p>In the realm of data processing, converting unstructured data into structured knowledge graphs is a challenging yet valuable task.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*IOy3iMpGudisZu9AH0-yVQ.png" /><figcaption>Transforming Unstructured Text to Knowledge Graph</figcaption></figure><p>OpenAI’s Assistants API provides a powerful solution by combining natural language processing capabilities with iterative function calling. This approach enables the seamless transformation of unstructured data into knowledge graphs, unlocking new possibilities for data analysis and insights.</p><p>The process involves two key functions that work in tandem with the OpenAI Assistants API:</p><h4>1. Peek Schema Function</h4><p>The `peek_schema` function retrieves the available nodes and edges present in the existing knowledge graph. This information is crucial for understanding the current structure and relationships within the graph, allowing for informed decisions during the data integration process.</p><h4>2. Run Query Function</h4><p>The `run_query` function is responsible for querying and merging nodes and edges from the new unstructured data source into the knowledge graph. By leveraging the OpenAI Assistants API’s natural language processing capabilities, this function can extract relevant entities and relationships from the unstructured data and seamlessly integrate them into the knowledge graph structure.</p><p>The iterative nature of this approach allows for incremental updates to the knowledge graph as new data becomes available. The OpenAI Assistants API can repeatedly call these functions, enabling a continuous flow of information from unstructured sources into the structured knowledge graph representation.</p><p>This process offers several advantages:</p><p>1. <strong>Scalability</strong>: The ability to handle large volumes of unstructured data and incrementally update the knowledge graph ensures scalability and adaptability to growing data sources.</p><p>2. <strong>Consistency</strong>: By leveraging the OpenAI Assistants API’s natural language processing capabilities, the extraction and integration of entities and relationships maintain consistency across diverse data sources.</p><p>3. <strong>Automation</strong>: The iterative function calling mechanism automates the process of transforming unstructured data into structured knowledge graphs, reducing manual effort and increasing efficiency.</p><p>4. <strong>Insights and Analysis</strong>: Once the unstructured data is transformed into a knowledge graph, it becomes accessible for advanced analysis, querying, and deriving valuable insights using graph algorithms and techniques.</p><p>By combining the power of OpenAI’s Assistants API with the `peek_schema` and `run_query` functions, organizations can unlock the potential of their unstructured data sources, enabling better decision-making, knowledge discovery, and data-driven strategies.</p><p>Implementation to follow.</p><p>Citations:<br>[1] <a href="https://techcommunity.microsoft.com/t5/azure-architecture-blog/leveraging-knowledge-graphs-with-azure-openai/ba-p/4093233">https://techcommunity.microsoft.com/t5/azure-architecture-blog/leveraging-knowledge-graphs-with-azure-openai/ba-p/4093233</a><br>[2] <a href="https://neo4j.com/blog/unifying-llm-knowledge-graph/">https://neo4j.com/blog/unifying-llm-knowledge-graph/</a></p><p>[3] <a href="https://neo4j.com/developer-blog/construct-knowledge-graphs-unstructured-text/">https://neo4j.com/developer-blog/construct-knowledge-graphs-unstructured-text/</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=107fc1324e67" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Beyond Rows and Columns: Exploring the Power of Graph Databases]]></title>
            <link>https://medium.com/@midhunmohank/beyond-rows-and-columns-exploring-the-power-of-graph-databases-6d4aa3266235?source=rss-b01a46bdf862------2</link>
            <guid isPermaLink="false">https://medium.com/p/6d4aa3266235</guid>
            <category><![CDATA[graph-database]]></category>
            <category><![CDATA[social-network]]></category>
            <category><![CDATA[knowledge-graph]]></category>
            <category><![CDATA[neo4j]]></category>
            <dc:creator><![CDATA[Midhun Mohan Kudayattutharayil]]></dc:creator>
            <pubDate>Mon, 22 Apr 2024 05:56:19 GMT</pubDate>
            <atom:updated>2024-04-22T05:56:19.867Z</atom:updated>
            <content:encoded><![CDATA[<p>The digital age has brought an explosion of data, and with it, the need for efficient ways to store, manage, and analyze this information. While traditional relational databases, with their rows and columns, have long been the go-to solution, they often struggle to represent complex relationships between data points. Enter the graph database, a rising database technology in the data management world, offering a flexible and intuitive approach to handling interconnected data.</p><p>Imagine a social network like Facebook. You have users, their friends, groups they belong to, events they attend, and countless interactions between them. Representing this web of connections in a relational database would be cumbersome, requiring numerous tables with complex joins. A graph database, however, thrives in this environment.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/800/1*idWauAtfQ2S167GODKpUUg.jpeg" /><figcaption>Social Network Platform on Relational vs Graph Database</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/624/1*DmJy8wAB2-FgShR6feIL9w.jpeg" /><figcaption>Graph Representation of a Social Network</figcaption></figure><p><strong>Nodes and Edges: The Building Blocks of Connection</strong></p><p>Graph databases organize data using two fundamental elements: nodes and edges. Nodes represent entities (like users, products, or locations), while edges represent the relationships between them (like friendships, purchases, or geographic proximity). Each node and edge can have properties that provide further details. This simple structure allows graph databases to naturally mirror the interconnectedness of real-world data.</p><p><strong>Why Choose a Graph Database?</strong></p><p>1. Relationship Focus: Unlike relational databases that focus on data points, graph databases excel at uncovering and analyzing relationships. This makes them ideal for scenarios like recommendation engines, fraud detection, social network analysis, and knowledge graphs.</p><p>2. Flexibility and Agility: Graph databases embrace evolving data structures. Adding new types of nodes or relationships is seamless, making them perfect for dynamic environments where data constantly changes.</p><p>3. Performance and Scalability: Traversing relationships in a graph database is fast and efficient, even with massive datasets. This allows for complex queries to be executed quickly, enabling real-time insights.</p><p>4. Intuitive Data Visualization: The visual nature of graph databases makes it easier to understand complex relationships and patterns within the data. This can be invaluable for data exploration and communication.</p><p><strong>Is a Graph Database Right for You?</strong></p><p>While graph databases offer many advantages, they may not be the perfect fit for every scenario. If your data is primarily structured and relationships are simple, a relational database might be sufficient. However, if your data is highly interconnected and you need to analyze complex relationships, a graph database could be the key to unlocking valuable insights.</p><p><strong>Popular Graph Databases to Explore</strong></p><ul><li>Neo4j: A leading graph database platform known for its scalability and user-friendly interface.</li><li>Amazon Neptune: A fully managed graph database service offered by Amazon Web Services.</li><li>Microsoft Azure Cosmos DB: A multi-model database service that includes graph database capabilities.</li></ul><p>The world of data is constantly evolving, and graph databases offer a powerful tool for navigating the complex relationships within it. Whether you are exploring social networks, optimizing supply chains, or building the next generation of AI, understanding the potential of graph databases can open up a world of possibilities.</p><p>References and more reading:</p><ol><li><a href="https://dev.to/sukhbirsekhon/what-is-neo4j-8jc">https://dev.to/sukhbirsekhon/what-is-neo4j-8jc</a></li></ol><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=6d4aa3266235" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Knowledge Graph Embeddings: Unraveling the What, Why, and How]]></title>
            <link>https://medium.com/@midhunmohank/knowledge-graph-embeddings-unraveling-the-what-why-and-how-4eb670a84d98?source=rss-b01a46bdf862------2</link>
            <guid isPermaLink="false">https://medium.com/p/4eb670a84d98</guid>
            <category><![CDATA[knowledge-graph-embedding]]></category>
            <category><![CDATA[knowledge-graph]]></category>
            <dc:creator><![CDATA[Midhun Mohan Kudayattutharayil]]></dc:creator>
            <pubDate>Fri, 05 Apr 2024 23:04:42 GMT</pubDate>
            <atom:updated>2024-04-05T23:04:42.998Z</atom:updated>
            <content:encoded><![CDATA[<p>Knowledge Graphs (KGs) are like intricate maps of information, connecting entities (people, places, things) through various relationships.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*FOeRpLwZ2kwDNCdy59OyrQ.png" /><figcaption>Example: Knowledge Graph</figcaption></figure><p>But these maps often have missing roads, leaving us with incomplete knowledge. This is where Knowledge Graph Embeddings (KGEs) come in, acting as powerful tools to fill in the gaps and unlock the full potential of KGs.</p><p><strong>What are KGEs?</strong></p><p>Imagine transforming the entities and relations in a KG into numerical vectors, creating a mathematical representation of the knowledge within. That’s what KGEs do! These vector representations capture the semantic meaning and relationships between entities, allowing us to perform various tasks, like:</p><ul><li><strong>Link Prediction:</strong> Predicting missing connections between entities, such as identifying potential collaborators for a researcher or suggesting relevant products for a customer.</li><li><strong>Entity Classification:</strong> Categorizing entities into specific types, such as recognizing a new musician as a “jazz singer” based on their connections in the KG.</li><li><strong>Knowledge Base Completion:</strong> Filling in missing information in the KG, such as inferring the birthplace of a historical figure based on their known associations.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*huYd7o7UP5RB4Dy4J5MS8g.png" /><figcaption>Example: Knowledge Graph Embeddings</figcaption></figure><p><strong>Why use KGEs?</strong></p><p>KGEs offer several advantages:</p><ul><li><strong>Efficiency:</strong> Numerical computations on vectors are much faster than traversing the entire KG, making tasks like link prediction highly efficient.</li><li><strong>Scalability:</strong> KGEs handle large-scale KGs with millions of entities and relations without sacrificing performance.</li><li><strong>Flexibility:</strong> Different KGE models cater to various needs, from modeling simple relationships to capturing complex hierarchies and temporal dynamics.</li></ul><p><strong>How do KGEs work?</strong></p><p>There are two main approaches to KGE:</p><ul><li><strong>Distance-Based Embeddings:</strong> Entities are represented as points in a multi-dimensional space, and relations act as transformations that bring related entities closer together. For example, TransE model interprets relations as translations, where adding the relation vector to the head entity’s vector should result in a vector close to the tail entity’s vector.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*KT6DbWyFtIsuGYoGuREKRw.png" /><figcaption>Transformation in a Vector Space</figcaption></figure><ul><li><strong>Semantic Matching Embeddings:</strong> These models focus on measuring the semantic similarity between entities and relations using mathematical operations like tensor products or complex numbers. For example, RESCAL uses a matrix to represent each relation, and the score of a triple is calculated by multiplying the head entity vector with the relation matrix and then with the tail entity vector.</li></ul><p><strong>The Landscape of KGEs:</strong></p><p>Numerous KGE models exist, each with its own strengths and weaknesses. Some popular ones include:</p><ul><li><strong>TransE:</strong> Simple and efficient, but struggles with complex relationships like one-to-many or many-to-many.</li><li><strong>RotatE:</strong> Interprets relations as rotations in complex space, effectively capturing symmetric and antisymmetric relations.</li><li><strong>ComplEx:</strong> Utilizes complex numbers to handle various relation types, including antisymmetric and inversion.</li><li><strong>TuckER:</strong> Leverages tensor factorization to capture richer interactions between entities and relations.</li></ul><p><strong>The Future of KGEs:</strong></p><p>The field of KGEs is constantly evolving, with ongoing research exploring new approaches like:</p><ul><li><strong>Hyperbolic Embeddings:</strong> Embeddings in hyperbolic spaces offer better representation of hierarchical structures found in many KGs.</li><li><strong>Neural Network Models:</strong> Convolutional neural networks and graph neural networks are being used to capture more complex patterns and relationships in KGs.</li><li><strong>Pretrained Language Models:</strong> Integrating information from textual descriptions of entities and relations can further enhance the accuracy and expressiveness of KGEs.</li></ul><p>KGEs are revolutionizing the way we interact with and utilize knowledge graphs. As research continues to advance, we can expect even more powerful and versatile KGE models to emerge, unlocking the full potential of KGs and paving the way for new discoveries and applications.</p><p>References:</p><ol><li>Multilingual Knowledge Graph Embeddings for Cross-lingual Knowledge Alignment [<a href="https://muhaochen.github.io/slides/mtranse_slides_short.pdf">https://muhaochen.github.io/slides/mtranse_slides_short.pdf</a>]</li><li>KNOWLEDGE GRAPH EMBEDDING: AN OVERVIEW <a href="https://arxiv.org/pdf/2309.12501.pdf">https://arxiv.org/pdf/2309.12501.pdf</a></li></ol><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=4eb670a84d98" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>