Knowledge Graph
A search of a knowledge base finds the passages whose wording is closest to the question. That misses a fact that is two steps away. Ask "Who runs the company that supplies Riverton Bakery?" and the search finds the supply contract ("Larkspur Foods supplies flour to Riverton Bakery"), but not the page that says who runs Larkspur Foods, because that page never mentions the bakery.
A knowledge graph fixes this. Studio reads each file of the knowledge base and notes the specific things it names (people, organizations, products, places, projects, policies and terms) and how the documents relate them ("Larkspur Foods supplies Riverton Bakery", "Asha Rao is the chief executive of Larkspur Foods"). A search then also follows those links from what the question names, so the answer gets both pages.
Turning it on
Knowledge graphs are off until an admin turns them on for Studio, then each knowledge base turns its own on.
For Studio (admins):
- Open Admin › Settings › Documents.
- Under Knowledge graph, turn on Knowledge graphs for knowledge bases.
- Choose the Extraction model, the model that reads the files. Default model uses Studio's default. A small local model is usually enough, and Test checks that it answers.
- Click Save.
For a knowledge base (anyone who can edit it):
- Open the knowledge base in Workspace › Enterprise Knowledge.
- Click Knowledge graph at the top, next to Access.
- Turn on Use a knowledge graph.
Studio then reads the files in the background. The dialog shows how far it has got ("Files read: 12 of 14"), and how many entities and relations it found. You can close it and come back.
How it stays up to date
- A file you add is read when it has been indexed.
- A file that changes (updated, re-indexed, or synced again by Knowledge Sync) is read again. Until then its earlier part of the graph stays in use.
- A file you remove, or that is deleted, leaves the graph at once. Its passages are never added to an answer afterwards.
- Read all files again rebuilds the whole graph, for example after changing the extraction model. It asks first, because every part of every file is one more call to the extraction model.
If a file can't be read, the dialog lists it under Files that couldn't be read, with the reason (for example, the extraction model can't be reached). Try them again reads only those files.
Exploring the graph
The dialog's explorer shows what the graph knows:
- Most mentioned lists its entities, the ones named most often first. Find an entity narrows the list by name.
- Click an entity to see its Relations, such as "Asha Rao → is the chief executive of → Larkspur Foods", each with the file it comes from, and the Files that name it. Click a name in a relation to move to that entity.
Anyone who can read the knowledge base can explore its graph. Only people who can edit it can turn the graph on or off, or read the files again.
What answers get
Whenever a knowledge base with a graph is searched, in a chat, by an agent's knowledge tools, or by a workflow's file search, the graph adds to the search; it never replaces it:
- The search's own results stay as they were. The graph only adds what the search missed: two to four more passages (more when the search asks for more results), those most closely connected to what the question names first.
- A short note of the relations it followed comes with them, such as "Larkspur Foods → supplies flour to → Riverton Bakery (supply.txt)". The model sees how the things asked about connect, and the note shows as a Knowledge graph source in the citations.
- Superseded documents stay out, as in any search, unless the knowledge base includes them.
- A question that names nothing the graph knows gets the search alone.
Turning it off
Turning a knowledge base's graph off asks first, then deletes its entities and relations. Turning it on again reads every file again.
If an admin turns knowledge graphs off for Studio, the graphs are kept but not used or updated. The dialog says so, and each knowledge base can still turn its own graph off to delete it.
Limits
- Only the first 400 parts of a long file are read into the graph. The whole file is still searched as before.
- Names are matched as written. A question finds an entity by its full name, in any letter case, or by its first or last word written with a capital ("Larkspur" finds "Larkspur Foods"), but not by an abbreviation or a nickname ("LF").
- The graph is as good as the extraction model. It reads each part of a file on its own, so a relation that spans two parts is only found if one part states it.
- Extraction takes time and model calls: one call for each part of each file. Its use shows in Studio's AI usage reports as the knowledge graph feature.
- Where the extraction model runs is checked, like any model: if data locations don't allow its connection, files can't be read, and the reason is shown.
- Searches limited to one file, and full-context attachments, don't use the graph.