Use Knowledge Graph panel and entity search

Knowledge Graph improves search quality and experience by understanding the relationship between different instances and entities in your corpus, and providing a deeper, context-aware search. In addition, Knowledge Graph helps enrich People panels and surface public information such as public organizations.

Knowledge Graph is available for apps that have the following connectors:

  • People using Custom Connector
  • Microsoft Entra ID
  • Jira Cloud
  • Jira Data Center
  • SharePoint Cloud
  • SharePoint Data Center

Purpose of Knowledge Graph

The Knowledge Graph is designed to enhance search capabilities by:

  1. Enriching people-related data with organizational context, including derived reporting lines and relationships to other entities.
  2. Improving entity recognition, relationships, and intent understanding to discover more insights from user queries.
  3. Improving search responses with precise, context-driven data, making it easier for users to locate relevant people and organizational information.

About query annotation with Knowledge Graph

Query annotation with Knowledge Graph enhances search query understanding by associating structured data with search terms. This process improves the accuracy and relevance of search results by leveraging contextual insights from the Knowledge Graph.

Unlike standalone information panels, query annotation functions independently by enriching search queries with metadata, allowing for more precise entity detection, entity linking, and user context understanding. When you enter a search term, the Knowledge Graph helps categorize and interpret the query based on its relationship to people, organizations, issues, or other entities.

The key components of query annotation include:

  • Mention detection: Identifies key entities (for example, people) and relationships (for example, manager) in a search query and associates them with structured data.

  • User context understanding: Analyzes the context of the user and retrieves related user signals (for example, top coworkers) to refine search relevance.

  • Entity linking: Resolves ambiguities by linking terms to their most relevant entities (for example, distinguishing between "Apple" as a company versus a fruit).

Knowledge Graph panels

After the knowledge graph is enabled, the search engine integrates the enriched panels into search results, delivering more precise, context-driven information to help users quickly find relevant people, roles, and organizations. When you perform a search, the search API responds with detailed panels that provide additional context and insights related to the search query.

The following panel types appear on the search results page, enhancing your ability to identify relevant entities.

  1. People panel: This panel includes information such as the person's job title, department, and relationships to other people (for example, management chain, direct reports, and teammates). It helps you to quickly find relevant people and their roles within the organization. The People panel is enhanced with Knowledge Graph and are displayed as long-form cards, providing a comprehensive view of the person's role and relationships within the organization. The Knowledge Graph search API response includes enriched data panels in a unified, one-box search format. The People panel contains job title, department, and related people information (such as management chain, direct reports, or teammates with the same managers). The Knowledge Graph-derived fields are returned in derived_struct_data within the People panel result.

  2. Organization panel: This panel provides key details about the organization, such as its name, description, and website information. The Knowledge Graph search API response includes enriched data panels in a unified, one-box search format. The Organization panel displays organization name, description, and website information.The Organization results are returned in the knowledge_graph_results field within the Organization panel result.

Knowledge Graph configurations

Knowledge Graph enhances search results by integrating enriched panels with precise, context-driven information from internal and external data sources.

Types of Knowledge Graphs

There are two types of Knowledge Graphs:

  1. Google Cloud Knowledge Graph: Expands search results by incorporating external data sources. This broadens the scope of search results and enhances relevance with additional insights.

  2. Private Knowledge Graph: Leverages internal organizational data to generate enriched search results. It improves relevance by incorporating proprietary knowledge, such as relationships, roles, and job titles, and provides more contextually accurate query annotations.

Change Knowledge Graph configurations

Knowledge Graph configurations are enabled for all Agentspace Enterprise apps. Before making changes, you can see the impact on search results as follows:

Configuration Enabled Disabled
Google Cloud Knowledge Graph Expands search with external data. Limits search to internal data.
Private Knowledge Graph Enhances search with internal data. Removes internal derived data.

To modify Knowledge Graph configurations, see the Manage Knowledge Graph configuration section.

Manage Knowledge Graph configuration

You can manage configurations using the console or API.

Before you begin:

  1. You must have created an Agentspace Enterprise app.
  2. Review Changing Knowledge Graph configurations to see the impact of changing configurations on existing apps.

Use the following procedure to update Knowledge Graph configurations in the console:

Console

To use the Google Cloud console to manage Knowledge Graph configurations, follow these steps:

  1. In the Google Cloud console, go to the Agentspace Enterprise page.

    Agentspace Enterprise

  2. On the Apps page, click the app whose Knowledge Graph configurations you want to update.

  3. Navigate to Configurations > Knowledge Graph tab.

  4. Toggle Google Cloud Knowledge Graph or Private Knowledge Graph based on your needs.

  5. Click the Save button after confirming any prompts or warnings.

The effects of enabling and disabling Knowledge Graph are as follows:

  1. Google Cloud Knowledge Graph:

    • Enabling the Google Cloud Knowledge Graph grants access to enriched data from external sources, broadening search context.
    • Disabling it limits search results to internal data, removing access to external context.
  2. Private Knowledge Graph:

    • Enabling the private Knowledge Graph regenerates internal derived data, and query annotations return after up to a day.
    • Disabling it deletes internal derived data and removes query annotations, reducing search accuracy and richness.

API

You can modify Knowledge Graph settings using the API:

  {
    "engine": {
      "name": "projects/<project_id>/locations/<location>/collections/<collection_id>/engines/<engine_id>",
      "knowledge_graph_config": {
        "enable_cloud_knowledge_graph": true,
        "enable_private_knowledge_graph": true
      }
    },
    "update_mask": {
      "paths": "knowledge_graph_config"
    }
  }

View knowledge panels in search results

You can view how the Knowledge Graph-enriched search results are displayed in your search application. For panel-based search interfaces, the Knowledge Graph panel appears as an enriched information box alongside regular search results. It integrates relevant entity details, such as names, descriptions, images, and relationships, providing a more informative and contextually relevant search experience. These boosted results help you quickly find key insights related to your query.

The following JSON example shows how a People panel appears in an API response:


      one_box_results: [
        {
          one_box_type: PEOPLE
          search_results: [
            {
              document: {
                name: "projects/<pii data>/locations/global/collections/default_collection/dataStores/people-v17-df-sprint_1731449540556/branches/0/documents/<name>"
                derived_struct_data: {
                  fields: [
                    {
                      key: "management_chain"
                      value: {
                        list_value: {
                          values: [
                            {
                              struct_value: {
                                fields: [
                                  {
                                    key: "person_id"
                                    value: {

                                      string_value: "<persons name>"
                                    }
                                  },
                                  {
                                    key: "job_title"
                                    value: {
                                      string_value: "Account Executive"
                                    }
                                  },
                                  {
                                    key: "name"
                                    value: {
                                      string_value: "<persons name>"
                                    }
                                  }
                                ]
                              }
                            },
                            {
                              struct_value: {
                                fields: [
                                  {
                                    key: "name"
                                    value: {
                                      string_value: "<persons name>"
                                    }
                                  },
                                  {
                                    key: "job_title"
                                    value: {

                                      string_value: "Account Executive"
                                    }
                                  },
                                  {
                                    key: "person_id"
                                    value: {

                                      string_value: "<persons name>"
                                    }
                                  }
                                ]
                              }
                            }

                          ]
                        }
                      }
                    },
                    {

                      key: "teammates_with_same_manager"
                      value: {

                        list_value: {

                          values: [
                            {

                              struct_value: {

                                fields: [
                                  {

                                    key: "person_id"
                                    value: {

                                      string_value: "<persons name>"
                                    }
                                  },
                                  {

                                    key: "job_title"
                                    value: {

                                      string_value: "Account Executive"
                                    }
                                  },
                                  {

                                    key: "name"
                                    value: {

                                      string_value: "<persons name>"
                                    }
                                  }
                                ]
                              }
                            }
                          ]
                        }
                      }
                    },
                    {
                      key: "direct_reports"
                      value: {
                        list_value: {
                          values: [
                            {
                              struct_value: {
                                fields: [
                                  {
                                    key: "job_title"
                                    value: {
                                      string_value: "Account Strategist, Lead Generation"
                                    }
                                  },
                                  {
                                    key: "name"
                                    value: {
                                      string_value: "<persons name>"
                                    }
                                  },
                                  {
                                    key: "person_id"
                                    value: {
                                      string_value: "<persons name>"
                                    }
                                  }
                                ]
                              }
                            },
                            {
                              struct_value: {
                                fields: [
                                  {
                                    key: "person_id"
                                    value: {
                                      string_value: "<persons name>"
                                    }
                                  },
                                  {
                                    key: "name"
                                    value: {
                                      string_value: "<persons name>"
                                    }
                                  },
                                  {
                                    key: "job_title"
                                    value: {

                                      string_value: "Account Strategist, Mid-Market Sales, Google Customer Solutions"
                                    }
                                  }
                                ]
                              }
                            }
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          ]
        }
      ]

The following JSON example shows how an Organization panel appears in an API response:

      {
        one_box_type: ORGANIZATION
        knowledge_graph_results: [
          {
            knowledge_graph_source_type: CLOUD_KG
            context: {
              struct_value: {
                fields: [
                  {
                    key: "@vocab"
                    value: {
                      string_value: "http://schema.org/"
                    }
                  }
                ]
              }
            }
            type: {
              string_value: "ItemList"
            }
            item_list_element: {
              values: [
                {
                  struct_value: {
                    fields: [
                      {
                        key: "result"
                        value: {
                          struct_value: {
                            fields: [
                              {
                                key: "@id"
                                value: {
                                  string_value: "c-025prnpgp"
                                }
                              },
                              {
                                key: "identifier"
                                value: {
                                  list_value: {
                                    values: [
                                      {
                                        struct_value: {
                                          fields: [
                                            {
                                              key: "name"
                                              value: {
                                                string_value: "googleKgMID"
                                              }
                                            },
                                            {
                                              key: "value"
                                              value: {
                                                string_value: "/m/0k8z"
                                              }
                                            },
                                            {
                                              key: "@type"
                                              value: {
                                                string_value: "PropertyValue"
                                              }
                                            }
                                          ]
                                        }
                                      },
                                      {
                                        struct_value: {
                                          fields: [
                                            {
                                              key: "value"
                                              value: {

                                                string_value: "Q312"
                                              }
                                            },
                                            {
                                              key: "@type"
                                              value: {
                                                string_value: "PropertyValue"
                                              }
                                            },
                                            {
                                              key: "name"
                                              value: {

                                                string_value: "wikidataQID"
                                              }
                                            }
                                          ]
                                        }
                                      }
                                    ]
                                  }
                                }
                              },
                              {
                                key: "@type"
                                value: {
                                  list_value: {
                                    values: [
                                      {
                                        string_value: "Corporation"
                                      },
                                      {
                                        string_value: "Thing"
                                      },
                                      {
                                        string_value: "Organization"
                                      }
                                    ]
                                  }
                                }
                              },
                              {
                                key: "name"
                                value: {
                                  string_value: "Apple"
                                }
                              },
                              {
                                key: "detailedDescription"
                                value: {
                                  struct_value: {
                                    fields: [
                                      {
                                        key: "url"
                                        value: {
                                          string_value: "https://en.wikipedia.org/wiki/Apple_Inc."
                                        }
                                      },
                                      {
                                        key: "articleBody"
                                        value: {
                                          string_value: "Apple Inc. is an American multinational corporation and technology company headquartered and incorporated in Cupertino, California, in Silicon Valley. It is best known for its consumer electronics, software, and services. "
                                        }
                                      },
                                      {
                                        key: "license"
                                        value: {

                                          string_value: "https://en.wikipedia.org/wiki/Wikipedia:Text_of_Creative_Commons_Attribution-ShareAlike_3.0_Unported_License"
                                        }
                                      }
                                    ]
                                  }
                                }
                              },
                              {
                                key: "description"
                                value: {
                                  string_value: "Technology company"
                                }
                              },
                              {
                                key: "image"
                                value: {
                                  struct_value: {
                                    fields: [
                                      {
                                        key: "contentUrl"
                                        value: {
                                          string_value: "https://encrypted-tbn1.gstatic.com/images?q=tbn:ANd9GcTMHrvLPmr_8yVjoTYsyxhRGtPMcA90bcJl9_RehtJU0tr64KNR"
                                        }
                                      },
                                      {
                                        key: "url"
                                        value: {

                                          string_value: "https://commons.wikimedia.org/wiki/File:Apple_logo_black.svg"
                                        }
                                      }
                                    ]
                                  }
                                }
                              },
                              {
                                key: "url"
                                value: {

                                  string_value: "http://www.apple.com/"
                                }
                              }
                            ]
                          }
                        }
                      }
                    ]
                  }
                }
              ]
            }
          }
        ]
      }

What's next

Use custom embeddings.