{"id":22499,"date":"2020-12-14T09:46:17","date_gmt":"2020-12-14T09:46:17","guid":{"rendered":"https:\/\/www.experfy.com\/blog\/knowledge-graphs-rules\/"},"modified":"2023-09-21T17:23:51","modified_gmt":"2023-09-21T17:23:51","slug":"knowledge-graphs-rules","status":"publish","type":"post","link":"https:\/\/www.experfy.com\/blog\/ai-ml\/knowledge-graphs-rules\/","title":{"rendered":"Rules for Knowledge Graphs Rules"},"content":{"rendered":"\t\t<div data-elementor-type=\"wp-post\" data-elementor-id=\"22499\" class=\"elementor elementor-22499\" data-elementor-post-type=\"post\">\n\t\t\t\t\t\t<section class=\"has_eae_slider elementor-section elementor-top-section elementor-element elementor-element-c654166 elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-id=\"c654166\" data-element_type=\"section\" data-e-type=\"section\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t<div class=\"has_eae_slider elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-1cf18bd\" data-id=\"1cf18bd\" data-element_type=\"column\" data-e-type=\"column\">\n\t\t\t<div class=\"elementor-widget-wrap elementor-element-populated\">\n\t\t\t\t\t\t<div class=\"elementor-element elementor-element-06ace75 elementor-widget elementor-widget-text-editor\" data-id=\"06ace75\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<p id=\"bef4\">Should you store business rules in your Enterprise Knowledge Graph (EKG)? This is a non-trivial question, and how you answer it might change your <a href=\"https:\/\/www.experfy.com\/blog\/bigdata-cloud\/enterprise-search-trends-to-look-for-in-2019\/\" target=\"_blank\" rel=\"noreferrer noopener\">enterprise knowledge graph strategy<\/a>.<\/p>\n\n<p id=\"e559\">A few weeks ago, I wrote an article on the incredible new\u00a0<a href=\"https:\/\/dmccreary.medium.com\/intels-incredible-piuma-graph-analytics-hardware-a2e9c3daf8d8\" target=\"_blank\" rel=\"noreferrer noopener\" class=\"broken_link\">Intel PIUMA<\/a>\u00a0chip architecture and how it will change the face of computing by offering a 1,000x improvement in knowledge graph traversal performance. These chips could be manufactured at a low-cost and integrated into many devices and portend many changes to the computing industry and software design. This is not just the end of the relational database era. It can also single sweeping changes in other large segments of the software industry: enterprise rules engines, workflow systems, validation engines, and many other areas related to the movement of data and management of data quality.<\/p>\n\n<p id=\"4ece\">This article will review what enterprise rules engines are, review a few taxonomies of rules, and then speculate on the impact that hardware graphs will have on these systems. This analysis will help us determine which of our enterprise systems can benefit from storing and executing rules in our enterprise knowledge graphs.<\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-2d8f7f5 elementor-widget elementor-widget-heading\" data-id=\"2d8f7f5\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"heading.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t<h2 class=\"elementor-heading-title elementor-size-default\">What is an Enterprise Rule?<\/h2>\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-f5c11db elementor-widget elementor-widget-text-editor\" data-id=\"f5c11db\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<p id=\"52da\">Every time we write a conditional expression in our code in the form of an IF\/THEN\/ELSE statement, we are creating a rule. But the scope of our rule may vary from just the context of a single web page all the way up to having an impact on all our customers and our entire organization. For the purpose of our discussion here, we will define an&nbsp;<strong>enterprise rule<\/strong>&nbsp;as any rule that has a scope outside a single project. Enterprise rules may have some of the following characteristics:<\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-dd8a0c0 elementor-widget elementor-widget-text-editor\" data-id=\"dd8a0c0\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<ol><li>Enterprise rules have a scope that can impact two or more projects.<\/li><li>Enterprise rules should be stored in a format that can be reused in multiple projects in multiple rules engines. One example of this standard format is the\u00a0<a href=\"https:\/\/en.wikipedia.org\/wiki\/Decision_Model_and_Notation\" target=\"_blank\" rel=\"noreferrer noopener\">Decision Model Notation<\/a>\u00a0(DMN) standard. Any DMN rule can be converted into a decision tree can be represented in a graph where the conditional is a vertex, and the TRUE and FALSE branches are edges.<\/li><li>Enterprise rules should be stored in a place that can be searched and reused. Remember, we can\u2019t reuse what we can\u2019t find.<\/li><li>Enterprise rules should have documentation that has been reviewed and approved by two or more people. This often overlaps data stewardship functions.<\/li><li>Enterprise rules should be testable by anyone, so they often come with test cases.<\/li><li>Enterprise rules may have a name or label that has a registered meaning outside of a small project. These names help everyone discuss these rules with precision.<\/li><li>Enterprise rules should reference concepts that have shared meaning outside of an individual project. These concept references can be stored as links to a centralized database of concepts that have a low probability of having different meanings in different contexts, and the concept meaning will not change over time (<a href=\"https:\/\/en.wikipedia.org\/wiki\/Semantic_change\" rel=\"noopener\">semantic drift<\/a>).<\/li><li>Some enterprise rules are critical enough that you want to know where they are being used (in what applications), how often they are being executed, and what the impact of a rule change might be for your enterprise. The relationship between rules and the places that use them form a dependency graph.<\/li><li>The evidence of rule execution is often buried deep within log files. Organizations with good logging standards make it easier to find this data, but it still takes time and resources.<\/li><li>Enterprise rules might be connected to other enterprise rules in complex structures called ontologies. Rule dependency graphs must include this structure.<\/li><\/ol>\n\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-c7b6ffd elementor-widget elementor-widget-text-editor\" data-id=\"c7b6ffd\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<p id=\"e435\">Anyone that has studied semantics might realize that whenever we talk about enterprise rules that are connected to registered concepts, and these concepts are in turn connected to other rules, they might see that enterprise rules are indistinguishable from a knowledge graph. People who write rules engines don\u2019t claim to be building knowledge graphs, but you can\u2019t really build them to be shared without connected knowledge. These connections are key factors in our ability to find and reuse related rules.<\/p>\n\n<p id=\"c7ad\">Note that when we use the phrase \u201cregistered concepts,\u201d we are referring to a centralized place where concepts are added to an enterprise database with a focus on deduplication. Humans curate each concept, and multiple references to the same concept are merged together. For a good background on this topic, the reader is encouraged to read the concepts behind the<a href=\"https:\/\/en.wikipedia.org\/wiki\/ISO\/IEC_11179\" target=\"_blank\" rel=\"noreferrer noopener\">\u00a0ISO\/IEC 11179 Metadata Registry<\/a>.<\/p>\n\n<p id=\"8f95\"><strong>Bottom line<\/strong>:&nbsp;<em>Rules can be represented as graphs, and<\/em>&nbsp;e<em>nterprise rules engines can be enterprise knowledge graphs. Connecting rules is a big deal.<\/em><\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-a601677 elementor-widget elementor-widget-heading\" data-id=\"a601677\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"heading.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t<h2 class=\"elementor-heading-title elementor-size-default\">Are Business Rules Code or Data?<\/h2>\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-9f4a264 elementor-widget elementor-widget-text-editor\" data-id=\"9f4a264\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<p id=\"6e5c\">One of my favorite discussion points for business units that are considering the migration to graph databases is to ask them a question that reveals their perspective on rules. I ask them, \u201care business rules code or data?<\/p>\n\n<p id=\"b241\">If then answer that business rules are&nbsp;<strong>code<\/strong>, we know that they may have one or more people maintaining procedural code such as Java, C, Python, Ruby, or Kotlin. Their mindset is that software developers create and maintain rules.<\/p>\n\n<p id=\"417f\">But if they answer that their business rules are&nbsp;<strong>data<\/strong>, we know they have a more enterprise-scale understanding of the creation and maintenance of business rules. They understand how business rules can be stored in a database, queried, extracted, maintained, as reused as reusable software components. They might also discuss what rules are the most important to their business, how they are curated, how often they are executed, and how they are related to other rules. The key here is do they see how rules are related to other things.<\/p>\n\n<p id=\"1af9\">The more a business unit see the&nbsp;<strong>relationships<\/strong>&nbsp;between rules and the external world, the better they are willing to see the benefits of storing rules in an enterprise knowledge graph.<\/p>\n\n<p id=\"c6ed\">Neither of the code vs. data answers is wrong. But the answer reveals where the business units are in their evolution of business rules as reusable assets and the fitness of EKGs to store complex rule relationships.<\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-63fa7f7 elementor-widget elementor-widget-heading\" data-id=\"63fa7f7\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"heading.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t<h2 class=\"elementor-heading-title elementor-size-default\">Rule Taxonomies<\/h2>\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-0038422 elementor-widget elementor-widget-text-editor\" data-id=\"0038422\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<p id=\"911d\">Next, let\u2019s analyze what types of rules should be stored in enterprise knowledge graphs and executed on the next generation of 1,000x graph hardware.<\/p>\n\n<p id=\"9fed\">I should preface this discussion with the acknowledgment that rule taxonomies vary widely based on who you are talking to and the context of your discussion. For a great book on this topic, you might enjoy George Lakoff\u2019s book\u00a0<a href=\"https:\/\/en.wikipedia.org\/wiki\/Women,_Fire,_and_Dangerous_Things\" target=\"_blank\" rel=\"noreferrer noopener\">Women, Fire, and Dangerous Things<\/a>.<\/p>\n\n<p id=\"03c9\"><strong>Data Validation Rules\u00a0<\/strong>\u2014 These are rules that validate individual data elements or groups of data elements in a semi-structured document such as an XML or JSON file. A classical example is using an XML Schema to validate an XML file. Validation rules can return a Boolean TRUE\/FALSE as well as a list of the rules that did not return true in the document. Schema validation is a mature technology with many easy-to-use GUI tools like the\u00a0<a href=\"https:\/\/www.oxygenxml.com\/xml_editor\/xml_schema_editor.html\" target=\"_blank\" rel=\"noreferrer noopener\">oXygen XML Schema editor<\/a>. This allows non-programming staff to create and maintain even complex rules.<\/p>\n\n<p id=\"f6b1\">There are\u00a0<a href=\"https:\/\/www.w3.org\/TR\/xmlschema11-1\/\" target=\"_blank\" rel=\"noreferrer noopener\">W3C standards for these rules<\/a>, making it more difficult for vendors to trap you into their proprietary solutions. Using standards allow your rules to stay portable across many systems and can be stable over time. Smart IT departments understand leverage these rule-based standards despite vendors that try to convince you to use their proprietary formats.<\/p>\n\n<p id=\"d51b\">Data type validation is also a built-in assumption in strongly typed programming languages. Quickly detecting a type mismatch in a function call allows us to isolate errors quickly, give users precise feedback, and is a part of the \u201cfail fast\u201d philosophy in software engineering.<\/p>\n\n<p id=\"365a\">Validation rules are usually self-contained entities that compare data elements with patterns. They don\u2019t often need to reach into customer data to be executed. So they are not often considered candidates for conversion into decision trees of a knowledge graph.<\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-3d18269 elementor-widget elementor-widget-heading\" data-id=\"3d18269\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"heading.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t<h2 class=\"elementor-heading-title elementor-size-default\">Graph Quality Rules and SHACL<\/h2>\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-1ed89e4 elementor-widget elementor-widget-text-editor\" data-id=\"1ed89e4\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<p id=\"d5d1\">Graphs also have their own unique quality tests related to how the structure or shape of data around a vertex can determine its quality. Although XML Schemas and Schematron rules are good at expressing quality rules expressed as XPath expressions, they often don\u2019t look outside a document to do their work. To express these rules for a modern LPG graph, we can look to mature RDF-driven graph rules called Shape Assertion Constraints. The Shape Assertion Constraint Language or\u00a0<a href=\"https:\/\/www.w3.org\/TR\/shacl\/\" target=\"_blank\" rel=\"noreferrer noopener\">SHACL<\/a>\u00a0standard is a great way to understand the complexities of expressing these rules in an enterprise knowledge graph.<\/p>\n\n<p id=\"45bb\"><strong>Calculation Rules<\/strong>\u00a0\u2014 These are rules that calculate numeric values. For example, an e-commerce call center can prioritize inbound phone calls based on the predicted\u00a0<a href=\"https:\/\/en.wikipedia.org\/wiki\/Customer_lifetime_value\" target=\"_blank\" rel=\"noreferrer noopener\">lifetime value<\/a>\u00a0(LTV) of a customer. High LTV customers might get routed to more senior call center staff with expertise in their specific purchasing profile. The calculation rules should be consistent across a line of business and be resilient to work on multiple types of customer data. For the call routing example, they need to run quickly to not delay the caller.<\/p>\n\n<p id=\"8698\">One variation of a calculation rule is a similarity score rule used in recommendation engines. Given a customer, can we calculate the most similar customer (from a pool of 1 million customers) in 100 milliseconds? FPGA hardware is ideal for these types of calculations.<\/p>\n\n<p id=\"fdc3\"><strong>Classification and Summarization Rules&nbsp;<\/strong>\u2014 These are rules that put items into or more groups or classification taxonomy. They can be simple IF\/THEN rules or complex rules of nested conditions that have many AND\/OR statements that return the classification of any item. Classification rules can also be applied to entire documents and return a list of the concepts that are being mentioned within a document. Machine learning tools like&nbsp;<a href=\"https:\/\/en.wikipedia.org\/wiki\/GPT-3\" rel=\"noopener\">GPT-3<\/a>&nbsp;have proved ideal for document classification and summarization.<\/p>\n\n<p id=\"9d60\"><strong>Transformation Rules<\/strong>&nbsp;\u2014 These are rules used to transform one type of data into another type of data. For example, you might want to extract a serialized RDF representation of a graph and convert it into a JSON representation. Transformation rules can be complex, and languages such as XPATH can be used to find patterns within documents using path expressions that contain complex wildcards. Databases often export data in one structure that must be transformed into other structures using a process called Extract, Transform, and Load or ETL. Automating the creation of transformations with machine learning is an active area of AI research called&nbsp;<a href=\"https:\/\/en.wikipedia.org\/wiki\/Schema_matching\" rel=\"noopener\">Schema Matching<\/a>&nbsp;and Schema Mapping.<\/p>\n\n<p id=\"b5cb\"><strong>Workflow Rules<\/strong>&nbsp;\u2014 These are rules that are the decision points in long-running transactions that involve humans. They are rules that transition a business event from one state to the next until a task is considered complete. For example, a publishing workflow might require an editor to approve a document by doing a grammar and spelling check of a document. Once they press an \u201cApprove\u201d button, the rules allow a document to appear on a public website. Workflow editors often allow rules to be reused using graphical editors such as&nbsp;<a href=\"https:\/\/en.wikipedia.org\/wiki\/Business_Process_Model_and_Notation\" rel=\"noopener\">BPMN<\/a>&nbsp;editors and executed on workflow engines that execute these rules and update the state of a task.<\/p>\n\n<p id=\"003a\"><strong>Business Definitions&nbsp;<\/strong>\u2014 Not everyone thinks of business definitions as being a type of rule. Most business glossaries just focus on creating a registry of terms for each project and writing their ISO definition. But definitions are rules that bind a label with a meaning. They are rules that indicate what each business unit uses as their preferred label for a concept and what alternate labels form synonym rings of a concept. Business glossaries often start out with a simple structure and then evolve into a concept taxonomy and eventually, a concept graph or ontology.<\/p>\n\n<p id=\"d901\">I have worked on many projects with a business analyst sending me a spreadsheet of their terms and definitions. These terms are then grouped together and converted into a hierarchy where they become a formal taxonomy of concepts. Taxonomies can then have complex relationships that form a graph. That is an ontology.<\/p>\n\n<p id=\"a10a\"><strong>Inference Rules<\/strong>&nbsp;\u2014 These are rules that take an existing graph and look for missing links in the graph. The W3C defines inference as&nbsp;<a href=\"https:\/\/www.w3.org\/standards\/semanticweb\/inference\" rel=\"noopener\">discovering new relationships<\/a>. Just like there are workflow engines, there are also inference engines that encode their rules in structures such as RDF, RDFS, and OWL. These rules can be stored in simple text files or they can be stored in a graph.<\/p>\n\n<p id=\"712f\"><strong>Discriminatory Rules<\/strong>&nbsp;\u2014 These are rules that take complex sets of unstructured data such as images or text and then discriminate between classes of objects. These rules tend to learn the boundary between classes\/labels in a dataset. For example, give a set of photos of cats and dogs, classify which photos are cats and which ones are dogs. The result is usually a probability score that the item contains a class \u2014 for example, there is a 90% probability that a given photo contains a dog. Discriminatory rules can overlap classification rules, but they are usually associated with machine learning tasks on unstructured data. Most discriminatory rules are implemented in neural networks such as deep neural networks.<\/p>\n\n<p id=\"fe6d\"><strong>Generative Rules&nbsp;<\/strong>\u2014 These are rules that understand how to generate the details of an object, even when only a simple summary is given. Think of everything to a field in a form that has an \u201cas-you-type\u201d autocomplete to the automatic suggestions generated by g-mail to the generative text generated by Transformers such as BERT.<\/p>\n\n<p id=\"fc2f\"><strong>Bottom Line:<\/strong>&nbsp;<em>There are many different types of rules, from simple to complex. There will not be a simple rule to determine which types of rules should be stored in an enterprise knowledge graph.<\/em><\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-337f4a2 elementor-widget elementor-widget-heading\" data-id=\"337f4a2\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"heading.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t<h2 class=\"elementor-heading-title elementor-size-default\">Deterministic vs. Statistical Rules<\/h2>\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-5fe542e elementor-widget elementor-widget-text-editor\" data-id=\"5fe542e\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<p id=\"093c\">There are also two different ways that rules are created, maintained, and executed.<\/p>\n\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-4867d24 elementor-widget elementor-widget-text-editor\" data-id=\"4867d24\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<ol><li><a href=\"https:\/\/en.wikipedia.org\/wiki\/Deterministic_system\" target=\"_blank\" rel=\"noreferrer noopener\">Deterministic<\/a>\u00a0rules: where the result is pre-determined to be consistent, and no random functions are used to calculate their output and are easy to explain. Many areas, such as healthcare and clinical decision support strongly prefer rules that can be explained.<\/li><li>Probabilistic rules: where we use random or\u00a0<a href=\"https:\/\/en.wikipedia.org\/wiki\/Stochastic_process\" target=\"_blank\" rel=\"noreferrer noopener\">stochastic<\/a>\u00a0functions, statistics, and machine learning to create complex rules that can vary over time.<\/li><\/ol>\n\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-0cb3523 elementor-widget elementor-widget-text-editor\" data-id=\"0cb3523\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<p id=\"49d4\">Most of the IF\/THEN\/ELSE rules that are created and maintained by humans are called deterministic rules because the results of the rules are clearly determined to be consistent over time. Given the same input to these rules, you should always get the same output.<\/p>\n\n<p id=\"542e\">Probalistic rules can be much more complex. They are often executed in the form of a neural network that can be extremely large. It is not uncommon to have neural networks that are millions or billions of parameters. The GPT-3 system uses 175 billion parameters.<\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-7f25e87 elementor-widget elementor-widget-heading\" data-id=\"7f25e87\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"heading.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t<h2 class=\"elementor-heading-title elementor-size-default\">TBox and ABox Rules<\/h2>\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-0bfd98f elementor-widget elementor-widget-text-editor\" data-id=\"0bfd98f\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<p id=\"a749\">Many of you that have studied\u00a0<a href=\"https:\/\/en.wikipedia.org\/wiki\/Symbolic_artificial_intelligence\" target=\"_blank\" rel=\"noreferrer noopener\">symbolic AI<\/a>\u00a0in the past are familiar with a taxonomy for rules that distinguished between terminological components (known as\u00a0<a href=\"https:\/\/en.wikipedia.org\/wiki\/Tbox\" rel=\"noopener\">TBox<\/a>\u00a0rules) and assertion rules or\u00a0<a href=\"https:\/\/en.wikipedia.org\/wiki\/Abox\" target=\"_blank\" rel=\"noreferrer noopener\">ABox<\/a>\u00a0rules \u2014 assertions about instances in a knowledge graph. Although most AI people I work with have never heard of this rule taxonomy, I still think there is wisdom to get gained about separating rules into these categories.<\/p>\n\n<p id=\"e1f2\">Terminology components tend to be universal rules about the world and how things are related. Most items in glossaries, taxonomies, and ontologies are Tbox rules. I always imagine my knowledge graphs having discrete subgraphs for storing Tbox rules. Tbox rules should have global read and execute permissions in a knowledge graph since they usually don\u2019t need direct access to customer data. Reference data management (codes and their semantics) also fits into Tbox rules.<\/p>\n\n<p id=\"f55d\">ABox rules, on the other hand, are tightly commingled with customer data. To execute, they need to have access to the vertices and links about every customer. So their access control is tied to customer data access.<\/p>\n\n<p id=\"371e\">ABox rules also have the property that they must conform to all the TBox rules. So TBox rules are often thought of as \u201crules about rules.\u201d As a consequence, TBox rules need more governance and review because their changes impact other rules. TBox rules, on the other hand, might only impact a small group of customers within a single business segment. They don\u2019t need the same chance control procedures.<\/p>\n\n<p id=\"2e68\">The problem with the TBox\/ABox classification scheme for rules is that there is really no precise definition of where to draw the line. There are many shades of gray. Rules that live higher in an ontology (called the upper ontology) need to be very stable and controlled. Rules in the middle ontologies need some controls, but not as many. Rules at the bottom of an ontology are often administered by an administrative staff that uses administrative-tools like spreadsheets to keep the low-level rules up to date. Adding a new drug or medical device to a medical ontology is a good example of these low-level rules.<\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-3098128 elementor-widget elementor-widget-heading\" data-id=\"3098128\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"heading.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t<h2 class=\"elementor-heading-title elementor-size-default\">Which Rules Should Execute on Graph Hardware?<\/h2>\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-a584e73 elementor-widget elementor-widget-text-editor\" data-id=\"a584e73\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<p id=\"449d\">So now that we see an incredible diversity of enterprise rules and how they are used to solve business problems, let&#8217;s ask ourselves which of these would benefit from a 1,000x speedup on graph hardware? This is a complex problem, and there is no single answer for all rules. Here are some considerations:<\/p>\n\n<p id=\"5964\"><strong>Rule Containment:&nbsp;<\/strong>How many remote nodes in a graph or remote services need to be accessed by a rule. Simple rules that check against string patterns are very self-contained. Rules that need to validate an ID in a remote system are not contained, and many depend on remote services that have low service levels. These complex rules may need additional timeout rules when remote systems are down.<\/p>\n\n<p id=\"a7bd\"><strong>Rule Performance:&nbsp;<\/strong>How quickly does the rule need to run? Is there a person waiting for the rule to run? Is there a web page that could render faster if the rule is run 1,000 faster? These are all indications that you should consider migrating the rules run in an enterprise knowledge graph.<\/p>\n\n<p id=\"fe5b\"><strong>Input Scope:<\/strong>&nbsp;How many inputs are needed to create the output of this rule? How difficult is it to calculate the inputs?<\/p>\n\n<p id=\"8d0f\"><strong>Rule Complexity:<\/strong>&nbsp;Do rules depend on other rules? Could these rules be configured as pointer hopping over a graph?<\/p>\n\n<p id=\"ccf5\"><strong>Conversion to Decision Tree Formats:&nbsp;<\/strong>How easy is it to convert these rules into and standard decision tree format such as Decision Model Notation (DMN).<\/p>\n\n<p id=\"549a\"><strong>Frequence of Execution:&nbsp;<\/strong>How often does a rule get executed? The more often rules run, the more we think about the benefits of converting to efficient pointer hop execution.<\/p>\n\n<p id=\"a2c5\"><strong>Rule Execution as a Service:&nbsp;<\/strong>Many of these rules can be quickly and efficiently be executed as an external service. If the rules require parallel execution, an FPGA might be a low-cost way to execute rules such as similarity calculation rules.<\/p>\n\n<p id=\"8ceb\">For many systems, such as validation rules, they need to run every time data comes into or goes out of systems. They are designed to run using in-memory execution steps, and it may not make sense to put them in a knowledge graph.<\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-6d690ff elementor-widget elementor-widget-heading\" data-id=\"6d690ff\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"heading.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t<h2 class=\"elementor-heading-title elementor-size-default\">When Data Access Blocks Real-Time Rules<\/h2>\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-7dfc856 elementor-widget elementor-widget-text-editor\" data-id=\"7dfc856\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<p id=\"a9f0\">I think the key insight is to understand how difficult it has been to build rules engines that had good performance characteristics. Image a decision tree with 25, 50, or 100 branches. Each branch required a system to run an SQL query in an RDBMS system and wait for the result to be returned. Running simple extract rules on some systems would cause CPUs to max out, network traffic to spike, and disk access to hit their limits.<\/p>\n\n<p id=\"33a9\">In knowledge graphs, we don\u2019t have these problems. Everything is in RAM, everything can be accessed with simple point hopping, and the time for any decision is just the time for pointers to hop through memory.<\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-5b6a989 elementor-widget elementor-widget-heading\" data-id=\"5b6a989\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"heading.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t<h2 class=\"elementor-heading-title elementor-size-default\">Conclusion<\/h2>\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-bf6829d elementor-widget elementor-widget-text-editor\" data-id=\"bf6829d\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<p id=\"7a74\">I wish there were a simple set of rules I could give you about when to put your rules directly into your enterprise knowledge graph. Unfortunately, the world of enterprise rule management is still a complex place, and I can\u2019t give you a clear decision tree that will work in all contexts. Your mileage may vary.<\/p>\n\n<p id=\"def3\">My suggestion is to be aware of the fact that there are many benefits to treating your rules as data, making them searchable, making them reusable, and tracking rules execution in a knowledge graph. I hope you keep an open mind about storing your rules in an EKG, understand the tradeoffs, and seek out the advice of experts when you are unsure of your own knowledge base.<\/p>\n\n<p id=\"e605\">As 1,000x graph hardware becomes a commodity over the next few years,, we will see a gradual swing to store enterprise rules in an enterprise knowledge graph.<\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t<\/div>\n\t\t","protected":false},"excerpt":{"rendered":"<p>Should you store business rules in your Enterprise Knowledge Graph (EKG)? This is a non-trivial question, and how you answer, it might change your enterprise knowledge graph strategy.<\/p>\n","protected":false},"author":993,"featured_media":18163,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"content-type":"","footnotes":""},"categories":[183],"tags":[1117,1118,1119,1120,1121],"ppma_author":[3677],"class_list":["post-22499","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-ai-ml","tag-business-rule-engine","tag-graph-database","tag-knowledge-graph","tag-rule-engine","tag-rules"],"authors":[{"term_id":3677,"user_id":993,"is_guest":0,"slug":"dan-mccreary","display_name":"Dan McCreary","avatar_url":"https:\/\/www.experfy.com\/blog\/wp-content\/uploads\/2021\/05\/Dan-McCreary.jpeg","user_url":"https:\/\/www.optum.com\/","last_name":"McCreary","first_name":"Dan","job_title":"","description":"Dan McCreary is a distinguished Engineer in AI and Graph at Optum, a health services and innovation company. He is the co-author of the highly rated book \"Making Sense of NoSQL\" and co-founder of the \"NoSQL Now!\" conference."}],"_links":{"self":[{"href":"https:\/\/www.experfy.com\/blog\/wp-json\/wp\/v2\/posts\/22499","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.experfy.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.experfy.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.experfy.com\/blog\/wp-json\/wp\/v2\/users\/993"}],"replies":[{"embeddable":true,"href":"https:\/\/www.experfy.com\/blog\/wp-json\/wp\/v2\/comments?post=22499"}],"version-history":[{"count":4,"href":"https:\/\/www.experfy.com\/blog\/wp-json\/wp\/v2\/posts\/22499\/revisions"}],"predecessor-version":[{"id":33098,"href":"https:\/\/www.experfy.com\/blog\/wp-json\/wp\/v2\/posts\/22499\/revisions\/33098"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.experfy.com\/blog\/wp-json\/wp\/v2\/media\/18163"}],"wp:attachment":[{"href":"https:\/\/www.experfy.com\/blog\/wp-json\/wp\/v2\/media?parent=22499"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.experfy.com\/blog\/wp-json\/wp\/v2\/categories?post=22499"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.experfy.com\/blog\/wp-json\/wp\/v2\/tags?post=22499"},{"taxonomy":"author","embeddable":true,"href":"https:\/\/www.experfy.com\/blog\/wp-json\/wp\/v2\/ppma_author?post=22499"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}