Skip to main content

Overview

Generate and open an interactive HTML visualization of the knowledge graph. Supports filtering, community highlighting, and entity descriptions.

Usage

Options

Basic Options

string
Output directory containing graph data. Use -o as shorthand.
string
Output HTML file path. Defaults to {output_dir}/graph.html.
boolean
default:"false"
Generate HTML without opening in browser.
boolean
default:"false"
Enable verbose logging. Use -v as shorthand.

Filter Options

integer
Show only top N entities by degree (number of connections).
float
Hide nodes and edges below this confidence threshold (0.0-1.0).
string
Show only entities extracted from this source document.
string
Center visualization on specific entity and show N-hop neighborhood.
integer
default:"1"
Number of hops for neighborhood visualization. Used with --neighborhood.
string
Focus on a specific community (e.g., Community 1). Requires sift narrate to have been run.

Behavior

Visualization Features

  • Interactive Layout - Drag nodes, zoom, pan
  • Entity Descriptions - Hover tooltips (if sift narrate was run)
  • Community Colors - Color-coded communities
  • Confidence Indicators - Edge thickness/opacity shows confidence
  • Search - Find entities by name

Entity Descriptions

If entity_descriptions.json exists (from sift narrate):
  • Descriptions appear in hover tooltips
  • Displayed in info panels
  • Logged in console during generation

Examples

Basic visualization

Opens full graph in browser at output/graph.html.

Top entities only

Shows only the 50 most connected entities.

Filter by confidence

Hides entities and relations with confidence below 0.7.

Source document filter

Shows only entities extracted from the specified document.

Neighborhood view

Centers on “John Doe” entity and shows 2-hop neighborhood.

Community focus

Highlights and focuses on entities in Community 1.

Combined filters

Generates filtered visualization without auto-opening browser.

Output

Generates standalone HTML file with embedded:
  • Graph data
  • Entity attributes
  • Descriptions (if available)
  • Interactive JavaScript visualization
Default location: {output_dir}/graph.html

Output Summary

Displays:
  • Applied filters
  • Entity count (after filters)
  • Relation count (after filters)
  • Output file location
  • Browser URL (if --no-open used)

Visualization Controls

In the browser:
  • Click & Drag - Move nodes
  • Scroll - Zoom in/out
  • Right Click - Pan view
  • Hover - Show entity details
  • Click Node - Highlight connections

Performance Tips

Large Graphs

For graphs with 1000+ entities:
Filtering improves browser performance.

Focused Exploration

Use neighborhood view to explore specific areas:

Error Handling

Exits with error if:
  • No graph_data.json found (run sift build first)
  • Invalid filter parameters

See Also