Knowledge Graph

Create, manage and query observed entities in the knowledge graph.

As Google presented in their classic "Things, Not Strings" article, the structure of a knowledge graph is based on entities and the relationships between them.

... a “graph”—that understands real-world entities and their relationships to one another: things, not strings.

Graphlit automatically creates a knowledge graph from the entities found in your content, by using Machine Learning (ML) models to identify people, places and things.

Entity extraction is supported as an optional stage of content workflows. Using ML models such as Azure Cognitive Services, Graphlit analyzes text or images and extracts entities observed in your Content entities.

The data model for the knowledge graph adheres to the Schema.org standard for entity properties.

The knowledge graph adds context to the text found in documents, audio transcripts or Slack messages, which enhances the search and discovery of the knowledge.

Additionally, these entities can be enriched via external data sources to provide even more context. For example, if an ML model found the place 'Seattle' in a document, Graphlit can enrich the 'Seattle' place entity with information from a Google Maps, a weather API, or a customer's database. (This enrichment process can be done on any entity type, not just places.)

When an entity is found in a piece of content, we call this an observation, as in, we are observing the entity in the content.

In addition to observations being automatically created via entity extraction, you can create your own observations on previously-ingested content.

An observation requires an observable entity (specified by name or ID), one or more occurrences within the content, and a content reference. Occurrences can be time-based - for audio or video content, text-based - for web pages or documents, or bounding box-based - for images or video.

Create Observation

Mutation:

mutation CreateObservation($observation: ObservationInput!) {
  createObservation(observation: $observation) {
    id
  }
}

Variables:

{
  "observation": {
    "type": "LABEL",
    "observable": {
      "name": "Sentiment"
    },
    "occurrences": [
      {
        "type": "TIME",
        "confidence": 1.25,
        "startTime": "PT1M",
        "endTime": "PT1M30S"
      },
      {
        "type": "TIME",
        "confidence": -0.75,
        "startTime": "PT3M30S",
        "endTime": "PT4M"
      }
    ],
    "content": {
      "id": "2ea78934-506b-4f0b-81c7-e4771f06557d"
    }
  }
}

Response:

{
  "id": "13d84a2d-3a79-4533-95b2-4fb6ae61db5a"
}
Update Observation

Mutation:

mutation UpdateObservation($observation: ObservationUpdateInput!) {
  updateObservation(observation: $observation) {
    id
  }
}

Variables:

{
  "observation": {
    "type": "LABEL",
    "observable": {
      "name": "Sentiment"
    },
    "occurrences": [
      {
        "type": "TIME",
        "confidence": 1.1,
        "startTime": "PT10M",
        "endTime": "PT10M30S"
      }
    ],
    "content": {
      "id": "2ea78934-506b-4f0b-81c7-e4771f06557d"
    },
    "id": "13d84a2d-3a79-4533-95b2-4fb6ae61db5a"
  }
}

Response:

{
  "id": "13d84a2d-3a79-4533-95b2-4fb6ae61db5a"
}
Delete Observation

Mutation:

mutation DeleteObservation($id: ID!) {
  deleteObservation(id: $id) {
    id
    state
  }
}

Variables:

{
  "id": "13d84a2d-3a79-4533-95b2-4fb6ae61db5a"
}

Response:

{
  "id": "13d84a2d-3a79-4533-95b2-4fb6ae61db5a",
  "state": "DELETED"
}
Get Observation

Query:

query GetObservation($id: ID!) {
  observation(id: $id) {
    id
    creationDate
    owner {
      id
    }
    type
    observable {
      id
      name
    }
    occurrences {
      type
      confidence
      startTime
      endTime
      pageIndex
      boundingBox {
        left
        top
        width
        height
      }
    }
  }
}

Variables:

{
  "id": "13d84a2d-3a79-4533-95b2-4fb6ae61db5a"
}

Response:

{
  "type": "LABEL",
  "observable": {
    "name": "Sentiment",
    "id": "6f810022-9e7a-4f38-9984-89e2179d9a50"
  },
  "occurrences": [
    {
      "type": "TIME",
      "confidence": 1.25,
      "startTime": "PT1M",
      "endTime": "PT1M30S"
    },
    {
      "type": "TIME",
      "confidence": -0.75,
      "startTime": "PT3M30S",
      "endTime": "PT4M"
    }
  ],
  "id": "13d84a2d-3a79-4533-95b2-4fb6ae61db5a",
  "creationDate": "2023-09-06T20:53:39Z",
  "owner": {
    "id": "530a3721-3273-44b4-bff4-e87218143164"
  }
}

Pick an Observable entity type below to learn more:

Last updated