Knowledge Graph
📖 Best for: Super-admins and data teams — anyone who needs to model relational data (customers, products, orders, people, events) as an entity-relationship network for relationship mining, path tracing, and graph analytics
📖 Reading time: 10 minutes
📖 In one sentence: Knowledge Graph (Graph Panorama) is YingClaw's enterprise entity-relationship platform built on Neo4j, unifying multi-source data into a "entities + relations" knowledge network with ontology design, multi-source ingestion (ETL / SQL connectors / HTTP API), path queries, graph analytics, visual exploration, and backup/restore. Access via the top nav "Knowledge Graph" (route/graph-panorama), super-admin only.
Two "graphs" in this site — don't confuse them:
- Knowledge Base → Knowledge Graph (tab): lives inside a knowledge base. GraphRAG extracts entity relations from documents; data is stored in the document index. Use it to see what a single KB extracted.
- Knowledge Graph (Graph Panorama) (this page): a standalone platform with its own ontology design and multi-source ingestion; data is stored in Neo4j. Use it for enterprise-level relationship analysis.
They do not share storage. The only bridge is the "GraphRAG ETL" inside Graph Panorama, which can map a KB's extracted entities/relations onto ontology types and import them into Neo4j.
How it differs from the Data Hub: The graph answers "who, with whom, why connected, what's affected"; the data hub answers "how much, how is it changing, is anything abnormal".
Capability Overview
1. Core Capabilities
| Capability | Description |
|---|---|
| Ontology modeling | Visually define object types (entities), relation types (source/target constraints, cardinality), and operation types (bind to a skill or workflow) |
| AI-assisted ontology design | Enter a type name and business scenario; AI suggests 5–10 properties. Edit and create in one click. Falls back to built-in templates when AI is unavailable |
| AI table analysis | Give it a table; AI reads DDL, foreign keys, and sample rows, then suggests object-type names, property schema, ETL config, and FK→relation mappings. "Adopt and create" lands them in one click |
| ETL data integration pipelines | Data sources: GraphRAG (KB) / MySQL table / PostgreSQL table / external HTTP API. Includes pipeline config and execution history |
| SQL data source connector | Supports PostgreSQL / MySQL / SQL Server / MongoDB: test connection, browse schema, discover fields and FKs, preview top N rows |
| Extraction tasks | Field mapping, incremental extraction (cursor-based resumption), auto FK→relation extraction, WHERE filters, enable toggle, execution history |
| Path query | Pick a start and end entity + depth 1–5 hops; canvas highlights the full path |
| Neighbors and subgraph | Expand N-hop neighbors; pull a subgraph from multiple seed nodes |
| Graph statistics | Entity and type distributions, node/edge totals, real Neo4j label counts (including "unregistered" types) |
| Degree centrality ranking | Sort by in/out degree to find the most central nodes fast |
| Entity resolution (deduplication) | Detect duplicate entities by name similarity + shared neighbors; merge in one click (edge redirection + source flagging) |
| Graph analytics | Graph metrics, community overview, connected components, similar entities, scheduled analytics tasks |
| Visual exploration | Three layouts: force-directed / grid / circular; pan, zoom, drag, fit-to-window, full reload |
| Timeline | Pull a date property out of entities and replay graph evolution on an interactive timeline at the bottom of the canvas |
| Global search | Top search bar does fuzzy cross-type search hitting name, title, author, department, entity ID, etc. |
| Export | PNG (canvas screenshot) / JSON (full) / CSV (nodes, with BOM) |
| Bulk import and new entity | Bulk-import entities from JSON; single create with real-time field validation |
| My investigations | Save the current canvas view as an investigation session with notes, marked entities, tasks, and sharing |
| Safe Cypher | Run read-only Cypher under controlled conditions (admin / data-owner roles only) |
| Service health monitoring | Neo4j connectivity, PostgreSQL sync reference count, audit log status |
| Data cleanup | Clean dirty entities (default dry-run preview first), clean orphan relations; plus a daily scheduled cleanup |
| Backup and restore | Full-graph JSON backup, append-mode restore, full-graph clear |
| Demo data | One-click sample graph (append or reset) to practice before going live |
| Audit log | Records all entity/relation CRUD; tags the source (manual / GraphRAG / ETL / API / stream) |
| Manufacturing-specific ETL | Built-in 15 manufacturing ontologies (Product / Part / ProductionOrder / PurchaseOrder / Project / Workshop / Inventory / Routing / BOM / Person / Organization / Company / Department / Customer / Supplier); import from ERP |
| MCP toolset | Exposes 15 read-only graph_* tools to the outside (search / entity / relation / path / neighbor / subgraph / Cypher / ontology / stats, etc.) |
2. Typical Use Cases
- Customer 360 view: pull a customer's org, related people, events, and documents into a single network — see the full picture in one screen.
- Supply-chain risk propagation: when a supplier has an issue, which downstream orders, products, and customers are affected? Use path queries with 1–5 hops to scope the blast radius.
- Anti-fraud and gang detection: groups sharing addresses, contacts, or fund flows show up as a "connected" anomalous subgraph on the graph — much more intuitive than scanning tables.
- Industry knowledge networks: papers, patents, people, and institutions modeled as a network for research lineage and collaboration analysis.
- Relation-style Q&A: "Which peer companies did this company invest in?" Pure text retrieval can't answer this; turn on GraphRAG and the graph returns the relation chain directly.
- Ontology-first to tame dirty data: define object types (Customer / Product / Order) and relation types (Purchased / BelongsTo / Recommends) before importing data to avoid an expensive cleanup later.
- Turn a table into a graph in one step: give AI a business table — it reads FKs and sample data, then directly suggests entities and relations, saving you the manual ontology design.
3. UI and Operations
3.1 Entry and permissions
| Item | Description |
|---|---|
| Route | /graph-panorama |
| Nav | Top-level nav "Knowledge Graph", icon: topology diagram |
| Permission | Super-admin only (non-admins are redirected to home) |
3.2 Page layout
| Area | Content |
|---|---|
| Top global search bar | Placeholder "🔍 Global search: by name / title / author / department / entity_id…", 300ms debounce, up to 20 results; right side shows "Total: N entities · M ontology types" |
| Left sidebar (collapsible, 280px) | Top title "Knowledge Graph" + "Ontology Design" button; below it are three tabs — Browse / Analyze / Tools (switches to the ontology design panel when in design mode) |
| Center canvas | Entity-relation graph (G6-rendered); supports drag, zoom, click-to-expand |
| Right drawer (420px) | Opens on entity click: Properties / Relations / History |
3.3 Browse tab
- Search box (placeholder "Search") + "Filter by type".
- Object type list: unregistered types are tagged
* {name} (unregistered). - Search result list: each row has "Start" (set as path start) and "End" (set as path end) buttons; bottom shows "Load more (N remaining)".
- Action buttons: "New Entity" / "Clear Canvas" / "Bulk Import".
- Path-finding panel: start search (placeholder "Search start entity..."), end search (placeholder "Search end entity..."), depth dropdown (1 hop / 2 hops / 3 hops (default) / 4 hops / 5 hops), button "Find Path".
3.4 Analyze tab
- "Graph Statistics":
Nodes: N Edges: N+ type counts (Person / Organization / Document / Event / Location / Project / Contract / Order). - "Graph Analytics" + "Refresh Analytics" button; when not loaded, hint "Click Refresh Analytics to load".
- "Degree Centrality Ranking" list; each row shows
outN inN. - "Entity Resolution" + "Detect Duplicates" button; each row shows
A ≈ B+ "Merge" button +(shared neighbors: N).
3.5 Tools tab
| Tool | Description |
|---|---|
| My investigations | Enter "Investigation title" + "Save current view"; list items show N entities, deletable |
| ETL data integration | Opens the wide drawer "ETL data integration pipelines" |
| SQL data source management | Opens the wide drawer "Database data source connector" |
| Graph statistics | Opens the "Graph statistics dashboard" (total nodes / total edges / community count, type distribution, top-10 degree centrality, community overview) |
| Service health | Opens the "Service Health" panel (Neo4j status + URI, PostgreSQL reference count, audit log count) |
| Admin tools | "Append demo data" (success hint "Demo data generated successfully"), "Reset data" (two-step confirm "Confirm reset of all graph data?" → "Data has been reset, please refresh the page") |
ETL data integration pipeline
- Two tabs: "Pipeline config" / "Execution history (n)".
- Source types: GraphRAG (KB) / MySQL table / PostgreSQL table / External HTTP API.
- GraphRAG section takes "Knowledge base ID (kb_id)" and "Import count"; click "Preview mapping" to see type mapping results first.
- Action button "Run ETL pipeline"; result area shows entity / relation / PG / import counts.
SQL data source management
- Four tabs: Connectors (n) / Schema browser / (MongoDB shows "Collection browser") / Extraction tasks (n) / History.
- Connector card actions: "Test connection" / "Edit" / "Delete" (two-step confirm "Confirm deleting this connector and its tasks?").
- "New connector" form fields: Name, source type, database type, host, port, database name, username, password, enable SSL, description. Hint: "Password is Fernet-encrypted and stored in PG; provide it on first creation. Rotate later via Edit."
- Table detail embeds tabs: Columns (n) / Foreign keys (n) / Preview (n) / This table's tasks (n), plus an "AI analysis" button.
- Extraction task actions: "Incremental" (hint "Incremental extraction (resumes from last cursor)") / "Full" (hint "Full re-extraction (clear cursor, start from first record)") / "Edit" / "History" / "Delete".
3.6 Ontology design mode
Click "Ontology Design" at the top of the sidebar to enter design mode, where you can create / edit / delete three categories of elements:
| Element | Fields |
|---|---|
| Object type | Type name (English, placeholder "Type name (English)") + property definitions |
| Relation type | Relation name (e.g. KNOWS), source type, target type, cardinality, relation properties |
| Operation type | Operation name, object type, Skill Slug (optional), Workflow ID (optional) |
- A bottom toggle "View ontology graph / Hide ontology graph" renders the ontology as a graph with "types as nodes, relation types as edges".
- System-built types are flagged as system types and cannot be deleted.
- AI hint (verbatim): "💡 Don't know what to fill? Click the ⚡ AI button at the top right. AI will suggest 5–10 fields based on the type name + business scenario. You can freely edit/add/remove them before creating."
- AI ontology design assistant drawer fields: "Object type name (Chinese or English)" + "Business scenario (optional, helps AI pick the right fields)" (placeholder "e.g. Manufacturing procurement contract management / Customer relationship follow-up / Order lifecycle tracking"); buttons "AI generate suggested fields" / "Adopt and create (N properties)".
- AI table analysis drawer: while running, shows "Calling AI model, usually 2–5 seconds…"; when AI is unavailable, shows "AI service temporarily unavailable. Used rule-based auto-mapping. Result is ready to use, you can also fine-tune manually."
3.7 Entity detail drawer
Title "Entity details" + type tag; top-right buttons: Edit / AI analysis / Close.
| Tab | Content |
|---|---|
| Properties | Key-value list (max 20 fields); in edit mode you can add/remove properties (placeholders "Field name" / "Value" + "+ Add property") |
| Relations (n) | Relation list (empty state "No relations"); "Create relation" area: target search (placeholder "Search target entity...") + relation-type dropdown (placeholder "Select relation type") + "Create relation" button |
| History | "AI analysis result" report block + "Operation history (n)" (action labels create/delete/update + details + timestamp); empty state "No analysis reports or operation history" |
3.8 Canvas toolbar
| Control | Description |
|---|---|
| Layout | "Force-directed" / "Grid" / "Circular" |
| Zoom | Zoom in / Zoom out / "Fit to window" / "Full reload" (pulls top 100 records across all types) |
| Export | "Export PNG" / "Export JSON" / "Export CSV" |
| Timeline | Opens the bottom interactive timeline and replays graph evolution by date property |
3.9 Key dialogs
| Dialog | Description |
|---|---|
| Bulk import entities | Paste JSON (sample includes Person Zhang San / Organization Some Tech Co. Ltd, etc.), buttons "Import" / "Cancel", progress hint "Importing... N%" |
| New entity | Select type, fill name (required), ontology properties + custom properties ("+ Add custom property"), real-time validation |
| Reset data | Dangerous operation, two-step confirm |
3.10 Where the data comes from
| Source | Description |
|---|---|
| Manual creation / bulk import | Create entities and relations directly in the canvas or drawer |
| GraphRAG ETL | Entities / relations extracted from a KB are type-mapped and imported into Neo4j (mapping rules: Organization / Company → Organization, Person → Person, Location / City / Country → Location, Event → Event, Category → Document, no match defaults to Document) |
| SQL connector | Pull table data from PostgreSQL / MySQL / SQL Server; supports auto FK→relation and cursor-based incremental extraction |
| MongoDB / HTTP API / MySQL direct | Corresponding ETL data source types |
| Manufacturing ERP | Built-in 15 manufacturing ontologies, imported from the ERP database |
| Demo data | One-click sample data via admin tools |
After data is written to Neo4j, it can be synced to PostgreSQL as a reference and published to the outside via the event stream; all user actions are recorded in the audit log.
3.11 Built-in system ontology
- 5 object types: Person, Organization, Document, Event, Location.
- 6 relation types: WORKS_FOR, LOCATED_IN, MENTIONS, OCCURRED_AT, PARTICIPATED_IN, RELATED_TO.
4. Best Practices
- Design the ontology before importing data: use "Ontology Design" to nail down object types (Customer / Product / Order) and relation types (Purchased / BelongsTo / Recommends) before starting ETL — otherwise cleanup costs later are brutal.
- Start with demo data: the first time you open it, the graph is empty. Go to "Tools → Admin tools → Append demo data", practice queries / paths / analytics, and load real data only after you have the picture.
- Try "AI table analysis" on a real table: pick a business table with foreign keys and let AI read the DDL and sample rows to suggest — often faster and more accurate than manual ontology design.
- Always filter on large graphs: path query max depth is 5 hops, pagination cap is 1000 records, free Cypher row cap is 1000, query timeout is 60 seconds. Production already has millions of nodes, so unfiltered full-graph traversal will bring the DB to its knees. Practical recipe: narrow the type first, then query the path.
- Run "Entity resolution" on a schedule: imports often produce "two names for the same company". Use "Analyze → Entity resolution → Detect duplicates" regularly, confirm, and merge — the cleaner the graph, the more accurate the paths and analytics.
- Watch the rate limits on heavy operations: global, per-IP, and heavy-op limits are three independent buckets. Batch path / subgraph / Cypher queries should be staggered or chunked; being rate-limited is not a failure.
- Free Cypher only for those who should have it: the "run Cypher directly" capability is restricted to admin / data-owner roles, and is enforced as read-only with row caps and timeouts. Don't open it up to regular users for convenience.
- Back up before changing: before large imports,
reset, cleanups, or merges, take a full-graph JSON backup outside of "Tools → Admin tools". Backup restore is append-mode, not overwrite — think through what state you want to restore to. - The scheduled tasks already do three things for you: daily analytics, weekly analytics, orphan-relation cleanup, plus entity growth checks. After changing the data model, check whether these tasks are still running normally (use the "Service Health" panel to see audit and sync status).
- Pay attention to enterprise isolation in production ⚠️: a graph entity's enterprise ownership depends on an enterprise-identifier property on the entity; nodes in legacy data that don't have that identifier filled in will fall through to the "global shared" branch. Before doing cross-enterprise data governance, ask the admin to confirm legacy ownership backfill — don't assume isolation is fully in effect.
- GraphRAG ETL has a prerequisite: it requires the target KB to be in the enterprise's visible KB allowlist, otherwise it returns 403 directly. Before going live, make sure the KB is bound in "Data Hub → Enterprise knowledge base scope".
- Exporting JSON is the easiest intermediate state: to hand the graph to someone else for analysis, or to take a snapshot, "Export JSON" is much faster than re-running ETL.