# Knowledge graph

> Visualize your ontology with the interactive knowledge graph.

**Category:** Core Concepts | **Tab:** features

---

The Knowledge Graph is an interactive visualization of your entire ontology — concepts as nodes, relationships as edges — giving you a bird's-eye view of how your product domain fits together.

## Accessing the graph

Navigate to **Knowledge Graph** in the sidebar. The graph loads automatically with all concepts and relationships in your current workspace.

## Reading the graph

- **Nodes** represent concepts, colored by their class
- **Edges** represent semantic relationships, labeled with the relationship type
- **Node size** reflects the number of connections — concepts with more relationships appear larger

The graph uses an automatic **Dagre layout algorithm** that arranges nodes hierarchically, positioning related concepts near each other for readability.

## Interacting with the graph

| Action | Result |
|--------|--------|
| **Click a node** | Opens the concept detail panel |
| **Drag a node** | Repositions it in the graph |
| **Scroll wheel** | Zoom in/out |
| **Click and drag background** | Pan the view |

## One-Hop toggle

The **One-Hop** toggle (found in the graph toolbar) controls how deep the visualization goes:

- **Off** — Shows only direct (Level 1) connections from the selected concept
- **On** — Expands to show Level 2 connections — concepts connected to your direct connections

This is useful for exploring how concepts cluster. For example, selecting a Plan concept with One-Hop enabled shows not just its features, but also the features' own dependencies and related concepts.

## Filtering

Use the filter panel to focus on specific parts of your ontology:

- **By class** — Show only concepts of a specific class (e.g., only Features)
- **By relationship type** — Show only specific relationship types (e.g., only `hasFeature` links)

Filters are combinable — you can show only Feature concepts connected by `hasFeature` relationships, hiding everything else.

## Graph stats

The stats panel shows:

- Total concepts and relationships displayed
- Breakdown by class
- Most connected concepts

## Bidirectional relationships in the graph

Bidirectional relationships appear as edges with arrows in both directions. The forward label is shown on the edge; hovering reveals the inverse label. This reflects the auto-inverse logic — when you create a bidirectional relationship, both directions appear in the graph automatically.

## Tips for a useful graph

- **Define classes consistently** — classes determine node colors, so a clear class taxonomy makes the graph immediately readable
- **Use descriptive relationship labels** — edge labels should be scannable at a glance (`hasFeature` is better than `rel1`)
- **Start with filters** — large ontologies are easier to explore one class or relationship type at a time
- **Use One-Hop for discovery** — enable it to find unexpected connections between distant parts of your ontology