Skip to content

Ontology explorer

The ONTO command in the WebUI draws a knowledge store as a graph you can move through: one circle per entity type, the typed links between those types, then the individual entities of a type, a single entity's neighbourhood, its claims, its current state and the consensus answers about it. Masters only.

Nothing on this page writes. It reads a store with a read-only handle and answers one question at a time, so opening it can never change a claim, a link or a piece of consensus.

What it is for

A knowledge store answers questions such as "what does the graph hold", "what is this node connected to", "what is its current state" and "what evidence is behind that state" badly if you have to write a query for each. The explorer answers them from the page: pick a type, click a node, read the panel.

Three views share one canvas:

View What is drawn Layout
Overview one circle per entity type, sized by how many entities of that type the store holds, with a line between two types that the store links circular, then a ForceAtlas2 pass in a web worker
A type the type's individual nodes, best connected first, and the links between them ForceAtlas2 in a web worker, positions streamed back and redrawn
Ego one node, its first or second hop, with the typed edges between everything reached hop rings, computed on the client: deterministic and instant
Hierarchy the concepts narrower than a node, or the chain from a node through its state keys to the claims behind them one row per depth level

Clicking a circle in the overview opens that type. Clicking a node inspects it and offers 1 hop, 2 hops, narrower and provenance.

The inspector

For the selected node the panel shows, in this order:

  • its name, type and reference, and the payload's own definition or description when the store has one;
  • the current state: one row per predicate|scope, with the winning value, its validity time and its source;
  • consensus: published answers about the node with their status (agreed, contested, unresolved), value, confidence and how many independent sources it rests on;
  • neighbours: every typed link, by type;
  • the newest claims naming the node, with a link to the source when the store kept a public one.

The search box takes words from a node name or reference and returns the matching nodes; clicking a result opens its neighbourhood. A store's full-text index is prepared by its single writer, so a WebUI that reads a store whose newest rows are not yet indexed falls back to a bounded scan of the node names and says so ("the search index is behind the store"). Search never fails because of that lag; it is slower and it tells you.

How much of a store you see

Every answer is bounded on the server before it is sent, so the browser never receives a whole table and a large store cannot freeze a page:

Answer Bound
counts by type one scan of at most 500 000 rows; marked partial when the store is larger
overview subgraph 1 500 nodes, 8 000 edges; 60 type rows
search 100 nodes, query at most 200 characters
ego 2 hops, 400 nodes, fan-out 100
one node 100 neighbours, 50 state entries
claims 200 per page
consensus questions 200
hierarchy depth 4, 500 nodes

When an answer was cut, the page says so. Two kinds of cut are normal in a real store: the type counts of a store bigger than one scan, and a neighbourhood with more than 400 nodes. The right way to see more is to narrow down (a type, a node, a hop), not to ask for everything.

The browser also never chooses which store is read. The store is picked from a server-side allowlist, SHAREDDATA_WEB_ONTO_STORES (a comma-separated list of store names, default RESEARCH), and the picker on the page only offers those names.

What is safe about it

The text a knowledge store holds comes from filings, news and crawled pages, so it is treated as untrusted on this page:

  • a label, definition, quote or claim value is only ever a text node or a canvas glyph; the page inserts no markup at all, so a node named with a script tag stays a node named with a script tag;
  • a source link is shown only when it is a public http or https address, and it opens with noopener noreferrer;
  • every script on the page is served from this site, including the layout worker. No third-party host is contacted, and the Content-Security-Policy needs no exception;
  • the graph simulation runs in a web worker: the main thread draws the positions it is given and never animates a simulation, so a large layout does not lock the page.

When there is nothing to show

The page distinguishes three states instead of failing:

  • no store configured or readable: it says which store it looked for and suggests setting SHAREDDATA_WEB_ONTO_STORES;
  • an empty store: the store exists but nothing has been ingested into it yet;
  • a partial store: the store is being written, so an edge may name a node that is not there yet. Those references are dropped rather than shown as broken nodes.

Operational notes

  • The page is read-only by construction, not by convention: the store is opened with a read-only handle, and the read-only handle refuses to prepare an index or write a row. There are no POST, PUT or DELETE routes for it.
  • Opening a store does not create it. If the named store does not exist on this server, the page says so and creates nothing.
  • Reading a very large claims table is the most expensive answer the page asks for. It is a fixed column scan, capped per page; on a store with millions of claims, prefer the node inspector (which reads the current state directly) over paging through claims.
  • A store that is being ingested is read as it is: the five tables of a knowledge graph are not written atomically, so the page tolerates an edge that arrives before its node.