Across the search ecosystem, the foundation of powerful user experiences starts with how data is stored. For a computer to deliver accurate content and relevant answers to questions, it needs a comprehensive view of the data it's using, rather than just points in isolation. That's why Yext experiences are built on the Knowledge Graph, a brain-like database that is structured with real-world entities and their relationships. The Knowledge Graph forgoes the rigid, hierarchical structure of traditional databases and makes it possible for applications to traverse relationships between data and see the bigger picture.
Building a Better Knowledge Graph with Relationships
The introduction of the Relationship Custom Field Type in the Spring '22 Release makes it even easier and more flexible to build and manage relationships between entities in the Knowledge Graph.
Curtis Maher, Platform Product Marketing
May 12, 2022
Relationships have always been critical to how Yext structures data in the Knowledge Graph. Before the Spring '22 release, users could model relationships by adding Entity List Fields on individual entities that related them to another entity (or group of entities). In doing so, they could define this relationship in a single direction, from one entity to another — that is, Entity A is related to Entity B. This worked, but it had its limitations. In order to map relationships in two directions — for instance, Entity A is related to Entity B and Entity B is related to Entity A — users had to manage two distinct Entity List fields on each entity, pointing towards the other. While this was a viable solution, more robust Knowledge Graphs and complex use cases drove the Yext team to simplify this workflow and make it more flexible. That's why, in the Spring '22 release, we introduced the Relationship Custom Field Type.
Now, with a dedicated Relationship Custom Field Type, it's easier and more efficient to add and manage relationships in the Knowledge Graph. Creating a new Relationship Custom Field, you follow a simple workflow — much like Entity Lists before — adding a Field Name, ID, and Entity Type Availability. However, in addition to long-supported One Way relationships, the Relationship Custom Field Type also supports Two Way relationships. Dedicated support for Two Way Relationships brings significant time-saving; When you add a Two Way Relationship Field to an entity, its related counterpart will be automatically updated with a backlink and data for this field. Two Way Relationships can also be configured using either a Shared Field or a Distinct Field to describe the relationship. When deciding between which to use, it's important to consider the entities' point of reference. If the relationship looks the same to both entities (e.g., two related products), then you should use a Shared Field to describe their relationship. If the relationship looks different from either entity's perspective (e.g., a product is related to the store location where it's available), then it would make sense to describe their relationship with Distinct Fields.
Two Way relationships are vital to brands with complex organizations and/or business data, ranging from Consumer Goods to Financial Services to Healthcare. With a data architecture able to store these relationships, the Knowledge Graph helps brands manage this complexity and avoid duplicative data management, while enabling them to build powerful natural language experiences (e.g., Search, Pages) downstream.
Using a Shared Field configuration, Two Way relationships make it easy to map commonalities between entities throughout your Knowledge Graph. For instance, imagine you're a footwear retailer and you want to use the Knowledge Graph to power product pages on your website. In the Knowledge Graph you can add Two Way Relationships with Shared Fields to link related products, like different editions of the Nike Air Max. Although Nike Air Max 97 is distinct from Nike Air Max 95, their relationship can be defined with a single field because the relationship looks the same from either entity's perspective. With these relationships stored in the Knowledge Graph, it's easy to add dynamic content to your pages — like a list of related products — that helps customers find what they are looking for and convert more quickly.
Two Way Relationships with Distinct Fields are necessary when there's a semantic difference between how the relationship is perceived on either side. For instance, in healthcare, it's important to keep track of the relationships between healthcare providers and the hospitals or clinics where they practice. From the doctor's perspective, it relates to a hospital as a location where they practice — yet, for a hospital, this doctor is a member of its staff. This distinction is important, especially when it comes to answering common questions that patients may have (Which doctors at Community Health in Brooklyn treat arthritis?). It also highlights a key distinction between the Knowledge Graph and traditional databases. By mapping the nuances of these relationships, relationships in the Knowledge Graph enable natural language understanding in downstream applications by navigating these semantic differences.
We're always working on ways to improve how users can structure real-world business information in the Knowledge Graph. Now, with the introduction of the Relationship Custom Field Type, it's easier than ever to create and manage entity relationships in Yext. With both Shared Field and Distinct Field Two Way Relationship configurations, users can model their data flexibly and use relationships to power exceptional user experiences.
We're really excited by all the creative applications of Entity Relationships we've seen across the Hitchhikers community — here are a few more examples:
Financial Services: Relate offerings (i.e., credit cards, loans) with related articles and/or other educational content that helps customers make informed decisions
Consumer Goods: Relate products with promotions/sales they are included in
Hiring: Relate job postings with the locations that are hiring and/or company information relevant to that role
Want to learn more about how to build relationships in your Yext account? Check out these Hitchhikers resources: