Skip to main content

NGXP Tech

Google’s Open Knowledge Format (OKF) vs. RAG: An Architectural Analysis of AI Agent Memory

by Prakash Dhanasekaran

1.  What Is Google’s Open Knowledge Format (OKF)?

The Open Knowledge Format (OKF) is an open, vendor-neutral specification published by Google Cloud under the Apache 2.0 license. It represents organizational knowledge as UTF-8 Markdown files with YAML frontmatter. Concepts can link to one another through standard Markdown links, allowing consuming tools to traverse those relationships. OKF defines the format; it does not prescribe a particular runtime or guarantee that every consumer will traverse links in the same way.

OKF formalizes the “LLM wiki” pattern without requiring a hosted runtime, proprietary endpoint, or specific query engine. Agents and people can read and maintain a corpus of Markdown documents with structured metadata. When those documents are curated and kept current, they can give an agent direct access to documented business rules instead of requiring it to reconstruct them from scattered source material for every prompt.

Structural Mechanics of an OKF Bundle

The official OKF v0.2 specification defines a file format rather than a runtime. An OKF bundle does not require a proprietary SDK or background daemon, although a consuming application may still need code or tools to load, validate, search, or act on the files:

  • Single-Concept Documents: Each Markdown file describes one concept, such as a table schema, metric definition, API contract, or Its path identifies the concept within the bundle; treat the path as stable by convention, not as an immutable identifier, because moving or renaming the file changes that path.
  • YAML Frontmatter Header: Delimited by three dashes (—) at the top of each file, this section carries machine-readable metadata. To keep authoring friction minimal, the specification defines only one mandatory field: type. Recommended descriptive fields include title, description, resource, and tags.
  • Structured Markdown Body: Below the frontmatter header, the file contains human- and machine-readable text, SQL queries, code snippets, execution caveats, and business logic.
  • Graph Traversal via Relative Links: Concepts can reference related entities with bundle-relative Markdown links (for example, [Customer Dimension](/tables/dim_customers.md)). These links let consumers navigate relationships without a separate graph Backlinks or dependency maps require a consumer or tool to build them; the links alone do not automatically provide those views.
  • Progressive Disclosure via Reserved Files: The optional index.md files can list directory contents and support progressive Optional log.md files record changes under ISO 8601 date headings; they are not required in every bundle.

// REPRESENTATIVE OKF BUNDLE DIRECTORY LAYOUT

Directory Root: /bundles/core/
├── index.md                 # Reserved directory registry
├── log.md                   # Reserved ISO-dated audit ledger
├── tables/
│   └── dim_customers.md     # Target entity
└── metrics/
    └── weekly_active_users.md   # References /tables/dim_customers.md

2. Technical Limitations of Vector RAG for Canonical Knowledge

Retrieval-Augmented Generation (RAG) remains useful for exploratory search across large, unstructured document collections. In a common vector-based RAG pipeline, documents are split into chunks, converted into numerical embeddings, and indexed in a vector database. At query time, the system embeds the user’s query and retrieves a ranked set of candidate chunks—often using similarity measures such as cosine similarity—to provide context to the language model. Production systems may also use keyword search, metadata filters, or reranking.

Vector-based RAG can work well across unstructured archives, but relying on similarity retrieval alone for precise, high-stakes business facts can introduce several risks. These are design risks, not inevitable failures; metadata filters, hybrid search, reranking, source controls, and validation can reduce them:

FAILURE MODE 1: CONTEXT FRAGMENTATION ACROSS ARBITRARY CHUNKS

Chunking methods—including fixed-window, recursive, and sentence-based approaches—can split text at boundaries that do not match the document’s meaning. In technical material, a SQL join condition or compliance caveat may land in a different chunk from the passage retrieved for a query. The risk depends on chunking strategy, overlap, retrieval settings, and whether the pipeline uses reranking or neighbouring-chunk expansion.
FAILURE MODE 2: DIVERGENCE BETWEEN SEMANTIC PROXIMITY AND FACTUAL PRECISION

Vector search ranks content by similarity, not by organizational authority or date alone. A deprecated metric definition and a current standard may both look relevant to the query. Metadata filters, version-aware indexing, source ranking, and reranking can help distinguish them, but similarity scores by themselves do not establish which source is authoritative.
FAILURE MODE 3: LIMITED EXPLICIT RELATIONSHIP MODELLING IN BASIC VECTOR RETRIEVAL

Vector retrieval typically returns ranked passages rather than a formally modelled relationship graph. The model may need to infer relationships from those passages unless the system also supplies structured links, metadata, a knowledge graph, or tools for explicit traversal.
FAILURE MODE 4: STALE CONTEXT CAN PASS THROUGH WITHOUT VALIDATION

If a retrieval pipeline returns an outdated or incomplete passage, it may still pass that text to the model unless freshness checks or validation rules catch the problem. The model can then produce a confident but incorrect answer. This risk is not unique to vector retrieval, and monitoring quality depends on the safeguards implemented around retrieval and generation.

3. Comparative Architecture: OKF v0.2 vs. RAG vs. Data Catalogs

To evaluate how these technologies position themselves across the enterprise data stack, we have mapped their architectural characteristics side by side:

Architectural Dimension Open Knowledge Format (OKF v0.2) Retrieval-Augmented Generation (RAG) Traditional Enterprise Data Catalogs
System Category Knowledge representation and interchange standard Runtime search, retrieval, and context-augmentation pipeline Enterprise data governance and asset inventory system
Core Operating Mechanism Agents read and parse curated Markdown and YAML files directly from a filesystem Depending on the design, text may be chunked, embedded, indexed for keyword search, and retrieved or reranked at query time Table schemas, columns, and operational tags are exposed through catalog-specific interfaces, which may include APIs
Optimal Knowledge Domain Curated “known-knowns” (metric definitions, schemas, policies, system runbooks) Broad, unstructured corpora (customer service tickets, email archives, product documentation) Low-level database structures (column types, data distributions, partition definitions)
Relational Modeling Explicit, traversable graph created through standard relative Markdown hyperlinks Implicit; inferred dynamically by the language model across retrieved text fragments May provide lineage graphs through catalog-specific services or metadata stores
Runtime Infrastructure No format-specific runtime required (files can live in Git or a standard filesystem) Varies by design; may include embedding models, search indexes, chunking, filters, and reranking May include catalog services, metadata crawlers, APIs, and client libraries
Freshness & Version Control Git commits, branch pull-request reviews, and frontmatter stale_after dates Freshness depends on the ingestion and update pipeline; changed content may require re-embedding or index updates Automated metadata crawlers and periodic schema synchronization jobs

4. The OKF v0.2 Trust Layer: Machine-Readable Integrity

OKF v0.1 included basic descriptive metadata, including an optional timestamp. OKF v0.2 adds standard fields for provenance, generation, verification, lifecycle status, freshness, and attested computation. Consuming systems can use these fields to assess where a document came from, whether it has been verified, and whether it has passed its freshness deadline. The format records these signals; the consuming system must still interpret and enforce them.

The specification organizes these controls across five defined pillars:

Pillar 1: Provenance (sources)

Identifies the upstream assets from which a concept is derived. Each entry inside the YAML sources list can record objective credibility signals: author (the origin actor), usage_count (number of executions within a defined usage_window), and last_modified (ISO 8601 timestamp of source asset update).
Pillar 2: Trust Tiering (generated & verified)

Records the origin of the document content alongside an array of explicit verification records. Consuming agents evaluate these fields to derive one of three standardized advisory trust tiers: unverified (no records), machine-confirmed (checked solely by automated validation jobs), or human-reviewed (at least one human sign-off).
Pillar 3: Freshness (stale_after)

Specifies an absolute ISO 8601 datetime with a mandatory UTC offset (for example, 2026-12-31T23:59:59Z). By adopting an absolute timestamp instead of a relative duration, consumers evaluate whether context is stale through a deterministic date comparison.
Pillar 4: Lifecycle (status)

Tracks the operational lifecycle of a concept using three standardized enumerations: draft, stable, or deprecated. If omitted from the frontmatter block, the specification dictates that consumers treat the status as stable.
Pillar 5: Attestation (Attested Computation)

Introduced in OKF v0.2 as a formal concept document type (type: Attested Computation). This type links a metric or calculated value directly to a sanctioned runtime (such as BigQuery or dbt), an executor script, and a deterministic code attester to support verification of sanctioned calculations.

5.  Specification Example: Illustrative Metric Concept Document

The following example illustrates an OKF v0.2 concept document representing an enterprise metric, incorporating trust signals, SQL calculation lineage, and operational caveats.

type: Metric
title: Weekly Active Users (WAU)
description: Count of distinct account IDs completing at least one qualifying workflow during each calendar week, excluding records marked as internal.
resource: https://console.cloud.google.com/bigquery?p=enterprise-prod&d=analytics&t=wau_rollup
tags:
  - engagement
  - kpi
  - executive-reporting
status: stable
generated:
  by: "catalog-synthesizer/v2"
  at: 2026-09-15T10:00:00Z
verified:
  - by: "human:analytics-engineering-lead"
    at: 2026-09-16T14:22:00Z
stale_after: 2026-12-31T23:59:59Z
sources:
  - resource: /queries/weekly-active-users.sql
    title: Illustrative WAU Aggregation Query
    author: "human:data-platform-core"
    usage_count: 1420
    last_modified: 2026-09-14T08:30:00Z

Weekly Active Users (WAU)

Weekly Active Users measures core platform adoption by counting distinct account IDs that complete a qualifying workflow. This example excludes records marked as internal; any additional bot, health-check, or test-traffic exclusions should be added if the source data exposes those flags.

Calculation Logic & Data Lineage

This illustrative query reads qualifying events from the Events Fact Table. The table and column names are examples and have not been checked against a live database schema. Before using the query for production reporting, verify the source schema, event definitions, internal-account flag, and required exclusions. If the metric must include only verified accounts, join the Customers Dimension using the validated account key; that join is not shown in this sample.
The BigQuery WEEK date part starts weeks on Sunday, so confirm that this matches the organization’s reporting definition.

SELECT
    DATE_TRUNC(DATE(event_timestamp), WEEK) AS activity_week,
    COUNT(DISTINCT account_id) AS weekly_active_users
FROM `enterprise-prod.analytics.fact_events`
WHERE event_type IN (
    'project_saved',
    'pipeline_deployed',
    'report_exported'
)
AND is_internal_account = FALSE
GROUP BY 1;

Consumption Notes & Edge Cases

  • Multi-Seat Accounts:
    Multi-user enterprise accounts qualify as active if any assigned member executes a qualifying workflow during the calendar week.
  • Decommissioned Endpoints:
    Legacy tracking endpoints (/api/v1/ping) were decommissioned on 2026-06-01. If records from these endpoints remain in the source table, add an explicit exclusion; this sample query does not show that filter.

6. Architectural Evaluation: Does OKF Replace RAG?

No. OKF and RAG solve different problems. OKF provides a portable way to represent curated knowledge; RAG retrieves relevant context from a corpus at runtime. A system can use OKF for authoritative, structured concepts and RAG for broad discovery, with the choice depending on the workload and controls required.

Treating OKF as a wholesale replacement for RAG overlooks the variety of knowledge held across an enterprise. Manually curating every customer-support transcript, engineering discussion, or vendor document as an individual concept would be impractical. Such large and frequently changing collections are often better served by search and retrieval pipelines.

Conversely, using similarity search alone to retrieve authoritative table schemas, compliance policies, or metric definitions can return incomplete or outdated context. Curated concept documents, explicit metadata, version control, and validation can help reduce that risk; a well-designed RAG pipeline can also use these controls.

KNOWLEDGE DOMAIN TAXONOMY & ARCHITECTURAL FIT

ILLUSTRATIVE CANONICAL ENTERPRISE CORE (e.g., 100–5,000 concepts)

- Operational Scope: Core database schemas, corporate KPIs, incident runbooks, architecture decision records
- Domain Characteristics: High operational stakes, low document volume, strong need to prevent factual errors
- Recommended Solution: Open Knowledge Format (OKF 2) via direct filesystem or Model Context Protocol
- Operating Mode: Explicit document traversal; consumers interpret verification and freshness metadata

ILLUSTRATIVE UNSTRUCTURED LONG-TAIL DISCOVERY (e.g., 100,000–10,000,000 documents)

- Operational Scope: Customer support tickets, Slack/chat histories, call transcripts, technical whitepapers
- Domain Characteristics: High volume, high churn rate, tolerant of statistical similarity matching
- Recommended Solution: Retrieval-Augmented Generation (Hybrid Dense Vector + BM25 Lexical Retrieval)
- Operating Mode: Top-K semantic similarity matching with relevance reranking

The Two-Tier Hybrid Memory Architecture

  • Tier 1: Curated Ground-Truth Core (OKF via Model Context Protocol or Filesystem): Store reviewed business definitions, schemas, policies, and runbooks in a Git-tracked OKF bundle. An agent can inspect an index or load a specific concept Trust and freshness metadata are signals for the consuming system to check, not guarantees that the content is correct or current.
  • Tier 2: Unstructured Discovery Lake (Dense Vector + BM25 Hybrid RAG): Use an embedding and indexing pipeline for large, changing collections such as customer messages, service logs, and PDFs. Hybrid retrieval can combine semantic similarity with BM25 keyword matching, with filters and reranking where useful.
  • Cross-Tier Operational Integration: Well-structured OKF files can improve chunk boundaries and metadata quality when indexed for retrieval, but the outcome depends on the indexing pipeline, parser, chunking rules, and metadata mapping.

7. Implementation Roadmap: Preparing Repositories for OKF

Engineering teams can prepare internal documentation for use by AI agents through seven practical structuring and validation steps. These are implementation recommendations, not requirements imposed by the OKF specification:

Phase 1: Bounded Scope Definition Select a single, well-defined operational domain with high query frequency—such as core data warehouse table documentation, incident response playbooks, or key business metrics.
Phase 2: Single-Concept Decomposition Break monolithic wiki articles and multi-topic documentation files into modular Markdown documents that each address a single operational entity.
Phase 3: Baseline Frontmatter Enforcement Ensure that every concept document includes a valid YAML frontmatter header with the mandatory type field. Add recommended fields such as title and description, and include verified and stale_after when appropriate for the concept.
Phase 4: Explicit Graph Cross-Linking Replace informal, inline textual mentions with relative Markdown links (such as [Orders Schema](/tables/orders.md). This practice allows parsing scripts and agent toolkits to construct a navigable relationship graph.
Phase 5: Version Control Integration Store the knowledge bundle within a Git repository. Manage changes using pull-request reviews, assign review responsibility to designated domain owners, and maintain major version histories inside log.md.
Phase 6: Automated CI Validation Implement continuous integration checks (such as a GitHub Action) to validate YAML syntax, confirm that internal relative links resolve successfully, and flag concept files whose stale_after date has passed.
Phase 7: Agent Interface Deployment Connect the validated bundle directly to coding assistants, operational tools, or autonomous agents using Model Context Protocol (MCP) servers or local filesystem tools, enabling models to inspect canonical facts without intermediate database layers.

8. Frequently Asked Questions (FAQ)

Does Google’s Open Knowledge Format replace RAG?

No. OKF and RAG address different parts of the knowledge-access problem. OKF can represent curated business facts in linked Markdown files with structured metadata, while RAG retrieves relevant passages from larger corpora at query time. Many systems can use both: OKF for maintained reference knowledge and RAG for discovery across large or frequently changing collections.
What is the primary difference between OKF and RAG?

RAG is a retrieval pipeline that finds relevant context at query time; vector-based implementations commonly embed document chunks and rank them by similarity. OKF is a vendor-neutral knowledge representation format that organizes concepts in Markdown files with YAML frontmatter and optional links. Agents can read those files directly, while any verification or freshness checks depend on the metadata present and how the consuming system handles it.
What capabilities were added in the OKF v0.2 specification?

The v0.2 specification adds fields and conventions for five areas: provenance (sources and optional source-level signals), trust (generated and verified metadata from which consumers can derive advisory tiers), freshness (stale_after timestamps), lifecycle (draft, stable, or deprecated status), and attestation (the Attested Computation concept type and associated fields). These fields support validation; they do not by themselves prove that a claim is true.
Is Google Cloud or Vertex AI required to use OKF?

No. OKF is published under the Apache 2.0 license and is designed to be vendor-neutral. A bundle consists of UTF-8 Markdown files with YAML frontmatter and can be stored in Git or a standard filesystem. Local scripts, MCP servers, or other applications can make the files available to agents; the format itself does not require Google Cloud or Vertex AI, though a particular deployment may need additional tooling.

9. Join the Technical Discussion

How should engineering teams manage knowledge for autonomous AI agents: through Retrieval-Augmented Generation (RAG), a structured format such as Google’s Open Knowledge Format (OKF), or a hybrid architecture that combines both?

We’d like to hear from developers, AI researchers, and system architects working with vector databases, embedding models, knowledge graphs, agent memory, and enterprise retrieval pipelines. Have you encountered problems with retrieval accuracy, stale context, inconsistent facts, or the maintenance of canonical knowledge in production systems? Which architectural choices have worked for your workloads?

Share your technical perspective in the comments. If you have questions about implementation, data organisation, retrieval strategies, version control, or integration with agent frameworks, leave them below. We welcome detailed technical questions and informed debate.

Follow us for more AI architecture analysis, engineering research, and practical technology guides. If there’s a specific implementation challenge or emerging technology you’d like us to examine next, let us know.

***Disclaimer***

This article reflects our research and interpretation of the cited technical documentation. It is not an official statement from Google or any other organisation mentioned. Specifications and project documentation can change; consult the current official specification before making implementation decisions.

Some links in this article may be affiliate links. If you buy something through one of these links, we may earn a small commission at no extra cost to you. These commissions help support the site and our work. They do not affect how we assess or discuss products. Comments and opinions shared by readers belong to the people who post them and do not necessarily represent our views. Information on this site is provided for general purposes, and we cannot guarantee a particular result from using it. Where professional advice is needed, consult a qualified professional.

All product names, logos, and trademarks belong to their respective owners. They are used for identification only and do not imply endorsement or affiliation.

You may also like

Leave a Comment

-
00:00
00:00
Update Required Flash plugin
-
00:00
00:00