Glossary

Knowledge Graph

Discover how knowledge graphs revolutionize AI by modeling complex relationships, enabling semantic search, personalized recommendations, and more.

Train YOLO models simply
with Ultralytics HUB

Learn more

A knowledge graph organizes information by connecting real-world entities (like people, places, or concepts) and describing the relationships between them. Think of it as a network or a map of knowledge, where points represent entities and lines represent how they are related. This structured approach allows Artificial Intelligence (AI) systems, particularly in Machine Learning (ML), to understand context, draw inferences, and access information more intelligently than simply searching through raw text or siloed databases.

Core Concepts

Knowledge graphs are built using nodes (representing entities or concepts) and edges (representing the relationships between these nodes). For instance, a node could be "Ultralytics YOLO" and another "Object Detection", connected by an edge labeled "is a type of". This structure allows for complex queries and reasoning capabilities, enabling systems to infer new facts from existing data. Technologies like the Resource Description Framework (RDF) provide a standard model for data interchange, while query languages like SPARQL allow users to retrieve information based on these relationships. Building KGs often involves extracting information from various sources, including structured databases and unstructured text, sometimes using Natural Language Processing (NLP) techniques and potentially involving complex reasoning systems.

Knowledge Graphs vs. Other Concepts

While related to other data structures, knowledge graphs have distinct characteristics:

  • Databases: Traditional relational databases store data in tables with predefined schemas, focusing on efficient storage and retrieval of structured records. KGs excel at representing complex, often heterogeneous relationships and inferring new knowledge, which is less straightforward in standard databases.
  • Ontologies: An ontology defines the vocabulary and rules (the schema) for a domain, specifying types of entities and relationships. A knowledge graph is often an instance of an ontology, representing specific facts according to those rules. The Web Ontology Language (OWL) is a common standard for defining ontologies.
  • Vector Databases: These store data as high-dimensional vectors (embeddings), capturing semantic similarity. They are excellent for finding similar items but don't explicitly define relationships like KGs do. KGs store explicit, factual connections.

Applications in AI/ML

Knowledge graphs power many intelligent applications:

  • Enhanced Search Results: Search engines like Google use KGs (like the Google Knowledge Graph) to understand search queries semantically and provide direct answers, summaries, and related entities in information panels, going beyond simple keyword matching to enable better Semantic Search.
  • Recommendation Systems: Platforms use KGs to model connections between users, products, content, and their attributes (e.g., genre, actors, director). This allows for more nuanced recommendations based on discovered relationships, improving user experience in areas like AI in fashion retail.
  • Contextual AI: In Computer Vision (CV), detecting an object like a specific building using an Ultralytics YOLO model such as YOLOv8 could trigger a KG query to retrieve its history, architect, or opening hours, enriching the application's understanding. This contextual data can be managed and utilized within platforms like Ultralytics HUB. KGs also enhance Question Answering systems by providing structured background knowledge.
  • Drug Discovery: KGs integrate diverse biological data (genes, proteins, diseases, drugs) to help researchers identify potential drug targets and interactions, accelerating AI solutions in healthcare.

Building and Using Knowledge Graphs

Creating and maintaining KGs can involve automated extraction techniques, manual curation, or a combination. Open-source knowledge graphs like DBpedia (derived from Wikipedia) and Wikidata provide vast amounts of structured data. Specialized graph database technologies like Neo4j are designed to store and query graph data efficiently. ML models are increasingly used for tasks like entity recognition and relation extraction to populate KGs automatically from text or even visual data derived from various computer vision datasets.

Read all