Google OKF + RAG: The Ultimate AI Agent Architecture

The video presents a hybrid AI agent architecture combining Google Cloud’s Open Knowledge Format (OKF) for precise, curated knowledge with Retrieval Augmented Generation (RAG) for scalable, unstructured data handling, addressing the limitations of each approach alone. This integrated system uses a routing layer to direct queries appropriately, enhancing answer accuracy, trustworthiness, and coverage while reducing hallucinations in AI responses.

The video discusses the challenges and solutions in building AI agents that answer questions accurately using company knowledge. It begins by illustrating a common problem with AI agents that rely solely on training data or simple retrieval augmented generation (RAG). For example, when asked about a business’s refund window, the AI might confidently provide an incorrect answer because it guesses from training data without accessing the actual policy document. RAG improves this by breaking documents into chunks, converting them into vectors, and retrieving the closest matches to answer queries. However, this chunking process can disrupt context and order, leading to hallucinations and unreliable answers, especially for precise, high-stakes questions.

To address these limitations, the video introduces Google Cloud’s Open Knowledge Format (OKF), launched in June 2026. OKF uses curated knowledge stored as structured markdown files with metadata, preserving the original document’s order and semantic relationships. This approach allows AI agents to provide exact, auditable, and trustworthy answers with direct citations to source files. While OKF excels in precision and reliability, it requires manual curation and cannot easily scale to cover vast, messy, or unpredictable document collections.

The key insight presented is that the choice between RAG and OKF is a false dichotomy. Instead, the best AI agent architecture combines both approaches. OKF serves as the curated, canonical knowledge base for high-stakes, exact answers, while RAG handles the long tail of unstructured, exploratory queries across large archives. A routing layer directs queries to the appropriate system based on their nature, enabling the agent to leverage OKF’s precision and RAG’s scale simultaneously. This hybrid model reduces hallucinations and improves trustworthiness without sacrificing coverage.

The video further explains how RAG works technically, using embedding models to convert document chunks into vectors stored in vector databases, which enable fast semantic search. It also details OKF’s structure, emphasizing its use of markdown files with front matter metadata, human-authored semantic links, and version control via Git. This structure ensures deterministic retrieval and easy auditing. The combination of these two knowledge layers, managed by a thin router, allows AI agents to deliver accurate, contextually rich answers while maintaining scalability and flexibility.

Finally, the video dispels myths about the two approaches: OKF does not replace RAG, especially for large or fuzzy datasets, and simply increasing context window size is not a solution to retrieval challenges. Instead, a team effort involving data owners curating OKF bundles and engineers managing RAG pipelines, integrated through frameworks like Langchain or Llama Index, creates a powerful, grounded AI agent. This hybrid OKF plus RAG architecture represents the future of AI knowledge stacks, blending curated structure with raw retrieval to achieve both precision and breadth.