Skip to Content

Core Concepts

How OKF retrieval works

How an engine finds the concepts a question is about, follows their links, and returns a small, ranked set of context.

A question like "How does the orders table feed revenue reporting?" isn't answered by any single passage. The answer is a path from one concept to another. Vector RAG looks for the one passage closest to the question. Docklee OKF retrieval finds where to start, then follows the links, so it can answer questions that need several steps.

Read this page to understand why OKF answers relationship questions well, and why it returns so little text.

How it works

  1. Read the question. Docklee works out the intent, such as a relationship, a definition, or a change over time, and picks out the things the question names.
  2. Find entry concepts. It matches the question against concept titles, types, tags, and descriptions, with titles weighted most. It also matches by meaning against the questions each concept answers. See Question facets.
  3. Keep the right types. Concepts whose type doesn't fit the intent are set aside. A question about how tables join keeps tables and drops playbooks.
  4. Follow the links. From the entry concepts, it walks the graph up to three links away, weighting each step by the link's confidence and how far it is from the start. This is how it finds concepts the question never named.
  5. Add context from the folder. A concept's place in the bundle, and the concepts next to it, add context.
  6. Rank by freshness and authority. Newer concepts, and concepts many others link to, rank higher.
  7. Handle disagreement. A superseded concept is dropped. Contradicting concepts are both kept and marked.
  8. Score confidence. Each result gets one confidence score built from every step above.
  9. Keep only what's relevant. From the top concepts, only the paragraphs that match the question are kept, along with the links between them.
  10. Fit the budget. The context is trimmed to a token budget, keeping links and high-confidence paragraphs first.

Most of these steps are plain computation, with no model calls.

Question facets

A concept about remote work might never use the words "can I do my job from home". When a concept is indexed, Docklee writes the different ways people might ask for it and indexes those questions too. A question then matches the questions a concept answers, not only its own wording.

Facets only add matches. If they can't be written for a concept, the concept is still indexed and found the usual way.

An example

ConceptLinks
Orders tablejoins-with Customers table, feeds-into Revenue metric
Revenue metricdocuments Monthly revenue report
Monthly revenue reportowned-by Finance team

"Who owns the report that orders feed into?" starts at the orders table, follows feeds-into to the revenue metric, then documents to the report, and owned-by to the finance team. A similarity search would need one passage that says all of that at once.

What comes back

OKF results are merged with any vector results and returned through the same calls:

  • lynk.query writes its answer from them, with citations.
  • lynk.retrieve returns them as chunks, alongside vector chunks.

See Query OKF.

Next steps

You know how OKF retrieval works. Decide where it beats vector search next.

On this page