# Industry intelligence: an Omnigraph use case

Signals, patterns and insights about an industry, linked to the products and technologies they concern, with hybrid search over the sources.

| | |
|---|---|
| Category | Research |
| Graph ID | spike |
| Sample data | The AI infrastructure market, from public sources: 109 nodes, 154 edges |
| Schema | 10 node types, 23 edge types |
| Stored queries | 42 reads, 31 writes |
| Source | https://github.com/ModernRelay/omnigraph-cookbooks/tree/main/industry-intel |

## Node types

### Signal

- `slug: String` (key)
- `name: String`
- `brief: String`
- `description: String?`
- `domain: enum(training, inference, infra, harness, robotics, security, data-eng, context)?`
- `stagingTimestamp: DateTime`
- `createdAt: DateTime`
- `updatedAt: DateTime`

### Element

- `slug: String` (key)
- `name: String`
- `kind: enum(product, technology, framework, concept, ops)`
- `brief: String?`
- `description: String?`
- `category: [String]?`
- `domain: enum(training, inference, infra, harness, robotics, security, data-eng, context)?`
- `website: String?`
- `release_year: I32?`
- `license: String?`
- `repository: String?`
- `use_cases: [String]?`
- `key_features: [String]?`
- `target_users: String?`
- `definition: String?`
- `key_points: [String]?`
- `createdAt: DateTime`
- `updatedAt: DateTime`

### Pattern

- `slug: String` (key)
- `name: String`
- `kind: enum(challenge, disruption, dynamic)`
- `brief: String?`
- `description: String?`
- `evolution: String?`
- `createdAt: DateTime`
- `updatedAt: DateTime`

### Insight

- `slug: String` (key)
- `name: String`
- `brief: String?`
- `description: String?`
- `importance: String?`
- `createdAt: DateTime`
- `updatedAt: DateTime`

### KnowHow

- `slug: String` (key)
- `name: String`
- `brief: String?`
- `description: String?`
- `guidelines: [String]?`
- `context: String?`
- `url: String?`
- `stagingTimestamp: DateTime`
- `createdAt: DateTime`
- `updatedAt: DateTime`

### Company

- `slug: String` (key)
- `name: String`
- `brief: String?`
- `description: String?`
- `site: String?`
- `formerly: String?`
- `type: enum(bigtech, developer, investor, research, hardware, media)?`

### SourceEntity

- `slug: String` (key)
- `name: String`
- `type: enum(blog, newsletter, video_channel, academic_repository, podcast, organization)?`
- `platform: String?`
- `url: String?`

### Expert

- `slug: String` (key)
- `name: String`

### InformationArtifact

- `slug: String` (key)
- `name: String`
- `artifactType: enum(email, youtube, pdf, article)`
- `link: String?`
- `stagingTimestamp: DateTime`
- `createdAt: DateTime`
- `updatedAt: DateTime`

### Chunk

- `text: String`
- `chunk_index: I32`
- `embedding: Vector(3072)`
- `createdAt: DateTime`

## Edge types

- `Signal -[FormsPattern]-> Pattern`
- `Signal -[ContradictsPattern]-> Pattern`
- `Insight -[HighlightsPattern]-> Pattern`
- `Insight -[ReliesOnElement]-> Element`
- `Pattern -[ReliesOnPattern]-> Pattern`
- `Pattern -[DrivesPattern]-> Pattern`
- `Pattern -[ContradictsToPattern]-> Pattern`
- `Signal -[OnElement]-> Element`
- `Element -[EnablesElement]-> Element`
- `Element -[UsesElement]-> Element`
- `Element -[ExemplifiesPattern]-> Pattern`
- `Element -[EnablesPattern]-> Pattern`
- `InformationArtifact -[PublishedBySource]-> SourceEntity`
- `InformationArtifact -[ContributedByExpert]-> Expert`
- `Chunk -[PartOfArtifact]-> InformationArtifact`
- `Signal -[SpottedInArtifact]-> InformationArtifact`
- `Element -[IdentifiedInArtifact]-> InformationArtifact`
- `KnowHow -[SourcedFromArtifact]-> InformationArtifact`
- `Signal -[SourcedFromSource]-> SourceEntity`
- `Signal -[RelevantCompany]-> Company`
- `Element -[DevelopedByCompany]-> Company`
- `Expert -[AffiliatedWithCompany]-> Company`
- `KnowHow -[ReferencesElement]-> Element`

Full schema: https://github.com/ModernRelay/omnigraph-cookbooks/blob/main/industry-intel/schema.pg

## Questions it answers

### Which patterns does new evidence contradict?

Tension: patterns with contradicting evidence — where the thesis is actively contested. High counts deserve an Insight.

```graphql
// Tension: patterns with contradicting evidence — where the thesis is
// actively contested. High counts deserve an Insight.
query contested_patterns() {
    match {
        $p: Pattern
        $s contradictsPattern $p
    }
    return { $p.slug, $p.name, count($s) as contradictions }
}
```

### Which patterns are gathering signals fastest?

Momentum: how many signals each pattern attracted since a cutoff. Params: since — e.g. {"since": "2026-05-01T00:00:00Z"}

```graphql
// Momentum: how many signals each pattern attracted since a cutoff.
// Params: since — e.g. {"since": "2026-05-01T00:00:00Z"}
query pattern_momentum($since: DateTime) {
    match {
        $p: Pattern
        $s formsPattern $p
        $s.stagingTimestamp >= $since
    }
    return { $p.slug, $p.name, count($s) as recent_signals }
}
```

### What do the sources say about a question?

Hybrid: Reciprocal Rank Fusion of semantic similarity and BM25 over the same chunk text — the robust default for agent retrieval.

```graphql
// Hybrid: Reciprocal Rank Fusion of semantic similarity and BM25 over the
// same chunk text — the robust default for agent retrieval.
query hybrid_chunks($q: String) {
    match { $c: Chunk }
    return { $c.text, $c.chunk_index }
    order { rrf(nearest($c.embedding, $q), bm25($c.text, $q)) }
    limit 10
}
```

### What came in most recently?

```graphql
query recent_signals() {
    match {
        $s: Signal
    }
    return { $s.slug, $s.name, $s.brief, $s.domain, $s.stagingTimestamp }
    order { $s.stagingTimestamp desc }
    limit 50
}
```

## Stored queries

### queries/elements.gq

- `get_element`
- `elements_by_kind`
- `search_elements`
- `element_enables`
- `element_uses`
- `element_patterns`
- `element_signals`
- `element_developer`
- `element_sources`

### queries/hybrid.gq

- `related_chunks`: Semantic neighbors: embed the question at query time, k-NN over chunks.
- `hybrid_chunks`: Hybrid: Reciprocal Rank Fusion of semantic similarity and BM25 over the same chunk text — the robust default for agent retrieval.

### queries/insights.gq

- `get_insight`
- `search_insights`
- `insight_patterns`
- `insight_elements`

### queries/knowhow.gq

- `get_knowhow`
- `recent_knowhow`
- `search_knowhow`
- `knowhow_elements`
- `knowhow_sources`

### queries/mutations.gq

- `add_signal` (write)
- `add_element` (write)
- `add_pattern` (write)
- `add_insight` (write)
- `add_knowhow` (write)
- `add_company` (write)
- `add_source` (write)
- `add_expert` (write)
- `add_artifact` (write)
- `link_signal_forms_pattern` (write)
- `link_signal_contradicts_pattern` (write)
- `link_insight_highlights_pattern` (write)
- `link_insight_relies_on_element` (write)
- `link_pattern_relies_on` (write)
- `link_pattern_drives` (write)
- `link_pattern_contradicts` (write)
- `link_signal_on_element` (write)
- `link_element_enables` (write)
- `link_element_uses` (write)
- `link_element_exemplifies_pattern` (write)
- `link_element_enables_pattern` (write)
- `link_artifact_published_by` (write)
- `link_artifact_contributed_by` (write)
- `link_signal_spotted_in` (write)
- `link_element_identified_in` (write)
- `link_knowhow_sourced_from` (write)
- `link_signal_sourced_from` (write)
- `link_signal_relevant_company` (write)
- `link_element_developed_by` (write)
- `link_expert_affiliated_with` (write)
- `link_knowhow_references` (write)

### queries/patterns.gq

- `get_pattern`
- `patterns_by_kind`
- `search_patterns`
- `pattern_signals`
- `pattern_drives`
- `pattern_relies_on`
- `pattern_contradicts`
- `pattern_elements`
- `pattern_insights`

### queries/signals.gq

- `get_signal`
- `recent_signals`
- `search_signals`
- `signal_patterns`
- `signal_contradictions`
- `signal_elements`
- `signal_companies`
- `signal_sources`

### queries/workflow.gq

- `orphan_signals`: Triage queue: signals not yet attached to any pattern (neither forming nor contradicting one). Work this list down to zero each review.
- `pattern_momentum`: Momentum: how many signals each pattern attracted since a cutoff. Params: since — e.g. {"since": "2026-05-01T00:00:00Z"}
- `stale_patterns`: Staleness: patterns with no new signal since the cutoff — prune them or push research. Params: since — e.g. {"since": "2026-05-01T00:00:00Z"}
- `contested_patterns`: Tension: patterns with contradicting evidence — where the thesis is actively contested. High counts deserve an Insight.
- `unsourced_signals`: Provenance gaps: signals with no artifact and no source — claims an agent cannot verify. Fix with attach mutations or drop the signal.

## Run it

```bash
git clone https://github.com/ModernRelay/omnigraph-cookbooks
cd omnigraph-cookbooks
export COOKBOOK=$PWD/industry-intel
omnigraph cluster validate --config "$COOKBOOK"
omnigraph cluster apply --target "$COOKBOOK" --config "$COOKBOOK" --as act-admin --json
```

The full local setup (server, sample data, queries): https://github.com/ModernRelay/omnigraph-cookbooks#local-setup

Source: https://www.omnigraph.dev/use-cases/industry-intel
