Build OKF
Generate OKF
How Docklee turns your documents, apps, and Dock writes into concepts and the links between them.
Writing a knowledge graph by hand takes months, and it's out of date as soon as it's done. Docklee generates OKF from the content you already have. Add a source to an OKF container, or write to one with Dock, and concepts and links are built for you.
Send content to an OKF container
Choose OKF when you add a source in Sources, or declare the container on a write:
from docklee import Dock
dock = Dock(container="okf")
dock.capture(
"The orders table joins the customers table on customer_id and feeds the monthly revenue metric.",
type="knowledge",
)
dock.flush_sync()How it works
- Extract concepts. Docklee reads the content and pulls out the distinct ideas in it, with a title, a description, key facts, and the entities each one mentions.
- Match existing concepts. Each new concept is compared with the concepts you already have. A match enriches the existing concept instead of creating a copy. See Merging and conflicts.
- Classify. Each concept is placed in a domain, such as engineering, product, or finance, and given a type from the semantic vocabulary, such as
database-table,policy, ormetric. - Discover links. Concepts that mention the same entities are compared, and Docklee records how they relate, in which direction, and how confident it is. Only links with a confidence of at least 0.60 are kept.
- Write the bundle. Each concept becomes a Markdown file with structured frontmatter, filed under its domain, and the bundle's index is updated. See Concept files.
- Index. The concepts and links are indexed for retrieval, and question facets are written for each concept. See How OKF retrieval works.
Domains
Concepts are filed into folders by domain:
| Domains |
|---|
engineering, product, sales, marketing, finance, operations, hr, legal, customer-success, research |
A large domain is split into sub-domains, so no folder grows too big to browse.
Guarantees
| Guarantee | What it means |
|---|---|
| Repeatable | The same content produces the same concepts, types, domains, and links. |
| Nothing lost | A merge keeps the sources of both sides. A conflict keeps both versions. |
| Recoverable | If a later step fails, the concepts from earlier steps are kept. |
| Always classified | If a model call fails, rule-based classification still files and types every concept. |
| Traceable | Every concept records the source and chunk it came from. |
Generating OKF costs more at ingest than vector processing, because building concepts and links takes model calls. It's paid once per piece of content, and structural questions are then answered at almost no cost.
Next steps
Your content is now concepts. See what a concept file holds next.