MATIH Platform is in active MVP development. Documentation reflects current implementation status.
14. Context Graph & Ontology
Search Services
Discovery Search

Discovery Search

Discovery search explores the knowledge graph outward from a starting entity to find related entities, uncover hidden connections, and map the neighborhood of a specific data asset. Unlike targeted semantic or structural search, discovery search is exploratory and designed for data catalog browsing.


Overview

Discovery search answers questions like "What else is related to this entity?" and "What does the neighborhood around this dataset look like?" It combines graph expansion with relevance scoring to surface the most interesting related entities.


How It Works

  1. Start from a seed entity (identified by URN)
  2. Expand outward through relationships up to a configurable depth
  3. Score each discovered entity based on relationship distance, entity importance, and access frequency
  4. Return the top-k most relevant discovered entities with their relationship paths

API Usage

results = await service.search(SearchQuery(
    query="urn:matih:dataset:acme:customer_events",
    tenant_id="acme",
    mode=SearchMode.DISCOVERY,
    top_k=20,
    filters=SearchFilters(
        max_hops=3,
    ),
))

Discovery Scoring

Discovered entities are scored using a combination of factors:

FactorDescription
Hop DistanceCloser entities score higher (inverse of distance)
Relationship StrengthStronger relationships (e.g., DERIVED_FROM) score higher than weaker ones
Entity ImportanceEntities with more connections score higher
Access RecencyRecently accessed entities get a recency boost
Type RelevanceEntities of types commonly associated with the seed entity score higher

Relationship Path Tracking

Each discovery result includes the full path from the seed entity:

{
  "entity_urn": "urn:matih:model:acme:churn_predictor",
  "score": 0.85,
  "path": [
    {"from": "urn:matih:dataset:acme:customer_events", "rel": "CONSUMED_BY"},
    {"from": "urn:matih:feature:acme:customer_features", "rel": "TRAINED_ON"},
    {"from": "urn:matih:model:acme:churn_predictor", "rel": null}
  ],
  "hop_distance": 2
}

Filtering Options

FilterDescription
entity_typesOnly discover entities of specified types
relationship_typesOnly follow specified relationship types
max_hopsMaximum traversal depth (default: 3)
exclude_urnsExclude specific entities from results
min_importanceMinimum entity importance score

Use Cases

Use CaseStarting EntityWhat Gets Discovered
Data catalog browsingA datasetRelated features, models, dashboards, and pipelines
Impact analysisA schema changeAll downstream consumers and dependents
Dependency mappingA deployed modelAll upstream data sources and feature stores
Knowledge explorationA business metricRelated dimensions, facts, and computed measures