Graph overlays
The Knowledge Graph is one property graph per namespace, not four stores stitched together. Every retrieval lane reads the overlay, or combination of overlays, it needs from that single graph.
One graph per namespace
Four overlays, one graph: the same nodes carry text, outline, types and vectors. Hybrid search, outline navigation and entity navigation read across them as a question needs.
The same nodes, seen four ways: as text in reading order, as a section outline, as typed entities, and as vectors.
Lexical overlay
Section titled “Lexical overlay”The lexical overlay treats a document as text units in reading order: Chunk nodes linked to their source file and to the chunk before and after them, each with full-text indexes. It powers keyword search, citation text, and neighbourhood expansion (the chunk before or after a match, for extra context). It becomes queryable as soon as the file is indexed, with no model call.
Structural overlay (page index)
Section titled “Structural overlay (page index)”The structural overlay treats a document as a hierarchy of sections: an outline tree in which each section covers one or more chunks. Fontana builds this outline from the parsed document’s typed heading blocks, so headings carry stable anchors that become citation targets. It powers outline navigation and the section trail on every citation: an agent lists a file’s sections, opens one by its key, and hops to its parent, siblings or children. See Retrieval.
Domain overlay (typed entities)
Section titled “Domain overlay (typed entities)”The domain overlay is a typed world model: Entity nodes connected by typed relationships, each evidenced by MENTIONS edges from the chunks that support it. Every mention records how it was found:
keyword: at index time, the ontology’s published entity and alias names are matched in chunk text, creating provisional entities and mentions with no model call. A keyword match always wins over entity recognition for the same text.ner: entity recognition runs over the prose of each file (never over tables or code) and creates provisional typed entities, such as people, organisations, places, products, laws and events, with a mention in every chunk that names them. Low-confidence entities stay untyped, with the proposed type as a hint.module: tables yield entities from their headers and cells, and code yields definitions and imports from its syntax tree.llm: the Ontology Agent reads chunks against your published schema and writes typed relationships (for exampleOwner -[:HAS]-> Pet), leaving out anything off-schema.
Entity recognition also links entities that often share a sentence in the same file with CO_OCCURS_WITH edges, weighted by pointwise mutual information and kept only for each entity’s strongest partners. Like a relationship, a co-occurrence edge records the file it came from, so it is shown only to someone who can read that file.
Keyword and recognition mentions are never promoted to typed relationships on their own: Peter and Mittens can exist as provisional entities from a keyword match long before the Ontology Agent confirms Peter -[:HAS]-> Mittens. This overlay powers entity navigation and weighted relationship expansion.
Vector overlay (embeddings)
Section titled “Vector overlay (embeddings)”The vector overlay adds an embedding to chunks, entities and files. Chunk and entity embeddings power search by meaning and entity merge candidates. During Embed, Fontana also writes one whole-file embedding per file (the concatenated document, windowed and pooled when it exceeds the model length) and SIMILAR_TO edges between files whose embeddings are close. In KG Studio, switch on Files and Similarity to draw those links between files, labelled with their score; in the force graph, stronger scores pull harder. Vector similarity never writes a typed relationship: SIMILAR_TO is a similarity signal, not an ontology fact.
Why overlays, not separate databases
Section titled “Why overlays, not separate databases”Every overlay lives on the same nodes and edges in the same graph, which gives you three properties a split architecture cannot:
- Consistent identity: an entity found through a keyword mention, an extracted relationship and a vector match is the same graph node, so you never reconcile three identifiers for “ESMA”.
- Cross-overlay fusion: hybrid search runs full text, vector and one-hop relationship expansion against the same graph, then fuses the ranked hits with reciprocal rank fusion. You do not join across separate search services.
- One backup, one restore: a volume snapshot of the workspace’s graph store captures all four overlays together, so a restore never leaves keyword search ahead of the domain graph or the other way round.