A definition of a legal ontology graph
A legal ontology graph is a set of typed facts about legal work, organized by a legal ontology. The ontology contains entity types such as matter, party, document, clause and obligation, and the relationships among those types. The graph contains the facts in your firm's documents, and each fact includes a link to the source document and passage.
The term joins two ideas your firm may have heard separately. A legal ontology is the schema: the vocabulary of legal work, defined precisely enough for software. A knowledge graph is the data: entities connected by relationships. In a legal ontology graph, every node type and every edge type in the knowledge graph is defined in the legal ontology.
The two layers: the ontology and the graph
Your lawyers maintain the ontology layer, and software fills the graph layer from your documents. When a partner asks a question, the system answers by following a path through the graph, not by matching keywords in text.
| Layer | Contains | Example from a fund practice |
|---|---|---|
| Ontology | Entity types | Matter, party, document, clause, defined term, obligation, event |
| Ontology | Relationship types | Investor in, governed by, amends, grants, arises from |
| Ontology | Properties and rules | An election window is a number of days; every obligation belongs to a party |
| Graph | Entities | Acme Growth Partners IV, L.P.; Acme Pension Trust |
| Graph | Facts | Acme Pension Trust is an investor in Acme Growth Partners IV, L.P. |
| Graph | Evidence | Side letter, page 4, section 7 |
A worked example: a fund side letter
Consider a side letter between a private fund and an investor. A search index stores the side letter as text. A legal ontology graph stores the side letter as the six facts below, each linked to the source passage.
| Subject | Relationship | Object | Source |
|---|---|---|---|
| Acme Pension Trust | investor in | Acme Growth Partners IV, L.P. | Subscription agreement, page 2 |
| Acme Pension Trust | capital commitment | $50,000,000 | Subscription agreement, page 2 |
| Side letter dated 2024-03-14 | amends | Limited partnership agreement, as to Acme Pension Trust | Side letter, page 1 |
| Side letter, section 7 | grants | Most favored nation election | Side letter, page 4 |
| MFN election | election window | 30 days after delivery of the MFN compendium | Side letter, page 4 |
| MFN compendium delivery | starts | Election deadline (scheduled event) | Side letter, page 4 |
With those six facts, your lawyers can ask questions that a folder or a keyword search cannot answer. Which investors in Fund IV have an MFN election with a window shorter than 45 days? Which elections open after the final closing? What did the firm agree on MFN exclusions across the last ten funds?
Your lawyers receive each answer with links to the source passages. The associate checks the side letter in seconds, instead of rereading every fund document.
Legal ontology graph, knowledge graph, taxonomy and vector index
| Approach | Contains | Questions your lawyers can ask | Limit |
|---|---|---|---|
| Taxonomy (practice area list, DMS folders) | Categories and tags | Which document type applies, and where is the document filed? | Each document is stored in a single folder, and the relationships between documents are lost |
| Vector index (retrieval) | Passages of text as embeddings | Which passages read like the question? | Accuracy falls as the document set grows; no identity for a party or a matter |
| Generic knowledge graph | Entities and relationships, with types the extraction model chooses | Which entities connect to Acme? | The same party can receive different types, and a client and a counterparty can merge |
| Legal ontology graph | Typed legal facts with evidence | Which investors have an MFN window shorter than 45 days? | Your lawyers define the ontology for each practice before extraction begins |
Most firms need the vector index and the legal ontology graph together. Retrieval finds the passage, and the graph contains the identity, relationships and evidence. We compare the two approaches in RAG versus knowledge graph for legal work, and we explain why retrieval accuracy falls as the number of documents grows.
What makes a graph legal
- The matter is the unit of confidentiality. Every fact about a deal or a case belongs to a matter. Ethical walls and document permissions apply to the facts, so a lawyer outside a wall never receives a fact from a walled matter.
- Parties are roles. The same company can be a client in one matter and a counterparty in the next. A legal ontology graph models buyer, lender, investor and counsel as dated roles, not as entity types.
- Versions are separate documents. A third draft and the executed agreement are different documents. The system answers from the executed agreement unless the lawyer asks about drafts.
- Defined terms have scope. A defined term means what the agreement says the term means, and the definition often appears forty pages from the clause that uses the term.
- Events have a modality. A deadline is a required event, a closing is an occurred event, and an allegation in a complaint is an alleged event. With one event type and a modality, your firm keeps the graph consistent across practices.
- Amendments are dated changes. An amendment changes a provision without erasing the original text. The graph contains both versions with effective dates, so a lawyer can ask which terms applied on a given date.
- Every value has evidence. Each value includes the quoted passage from the source document. A value without evidence is sent to a lawyer for review and never appears in an answer as a confident fact.
Standards a legal ontology graph can start from
Your firm can begin with public standards. Four public standards contain much of the reference vocabulary.
- SALI LMSS, published by the SALI Alliance, covers areas of law, services, industries, locations, player roles and other matter attributes, in an OWL file with more than 18,000 tags.
- FOLIO, maintained by the ALEA Institute, contains more than 18,000 legal concepts and began in 2024 as a fork of LMSS.
- LKIF Core covers norms, rights, legal roles and legal actions, in OWL modules.
- Akoma Ntoso, an OASIS Standard since August 2018, defines the structure of legislation, debates and judgments in XML.
None of the four standards contains the negotiated values your lawyers compare across deals, such as an election window or a commitment threshold. Your firm defines those values in a firm-level ontology that extends the standards.
How a firm builds a legal ontology graph
- Start with the questions. Collect the questions partners, associates and knowledge lawyers ask about one practice. Each question becomes a test the graph has to pass.
- List the documents and events. Identify the documents the practice drafts and receives, and the dated events the practice tracks.
- Define the negotiated terms as properties. An MFN election has a window, a trigger and exclusions. Your lawyers compare deals by those properties, so your lawyers define each property in the ontology with an example from a real clause.
- Model parties as roles. Investor, lender, buyer and counsel are dated roles a person or an organization plays in a matter.
- Extract against the ontology, with evidence. Software reads each document against the published ontology and returns only the values defined in the ontology, each with the quoted passage.
- Validate with your lawyers, then measure. Lawyers review a sample, and the team measures accuracy for each field against answers the lawyers approved.
- Connect the graph to your AI tools. Claude, ChatGPT, Copilot and your firm's applications query the same graph, under the same permissions.
How to measure a legal ontology graph
Measure the graph with field accuracy, question accuracy and evidence coverage.
- Field accuracy is the share of extracted values that match the answers your lawyers approved.
- Question accuracy is the share of the practice's real questions the graph answers correctly.
- Evidence coverage is the share of facts with a verified quote from the source document.
In Reframe's published benchmark on 1,000 fund documents, Reframe built more than 28,000 entities and more than 70,000 relationships. On 66 funds the system had never seen, Reframe extracted the fund-level terms with 99.5 percent accuracy. Against retrieval search, errors fell 45 percent.
Questions about legal ontology graphs
Is a legal ontology graph the same as a legal knowledge graph?
A legal knowledge graph is any graph of legal entities and relationships. A legal ontology graph is a legal knowledge graph whose types and rules come from a defined legal ontology. Your lawyers define the meaning of every node and edge before extraction begins.
Does a legal ontology graph replace the document management system?
No. Your documents stay in iManage, NetDocuments or SharePoint. The graph contains facts about the documents, with links back to each source document in the DMS.
How does a legal ontology graph reduce AI hallucinations?
The AI answers from facts with evidence, and your lawyer opens the source passage for each fact. A value without evidence is sent to review and never appears in an answer.
Does a firm have to build a legal ontology from scratch?
No. Your firm can start from SALI LMSS or FOLIO for the reference vocabulary. Your lawyers then define the negotiated terms and the firm-specific types they compare across matters.