[{"data":1,"prerenderedAt":478},["ShallowReactive",2],{"\u002Fblog\u002Frag-vs-okf-stop-using-a-hammer-for-every-nail":3},{"id":4,"title":5,"body":6,"description":464,"extension":465,"meta":466,"navigation":473,"path":474,"seo":475,"stem":476,"__hash__":477},"blog\u002Fblog\u002Frag-vs-okf-stop-using-a-hammer-for-every-nail.md","RAG vs. OKF: Stop Using a Hammer for Every Nail",{"type":7,"value":8,"toc":456},"minimark",[9,13,16,19,22,25,30,33,36,65,68,70,74,77,80,87,90,122,124,128,131,244,247,249,253,256,267,270,372,387,390,392,396,399,432,434,438,441,449,452],[10,11,12],"p",{},"Your AI agent needs knowledge to do its job. Where that knowledge lives — and how you serve it up — determines whether your agent is fast, accurate, and cheap or slow, hallucinating, and expensive.",[10,14,15],{},"Most teams default to RAG for everything. It's the familiar tool: chunk your docs, embed them, retrieve at query time. And for a lot of use cases, RAG is exactly right. But it's not the only pattern, and treating it like one leads to bloated costs and shoddy answers where it matters most.",[10,17,18],{},"Google's Open Knowledge Format (OKF), published in June 2026, is a different approach to the same problem. It doesn't replace RAG. It covers the cases RAG handles poorly.",[10,20,21],{},"Here's how to think about the distinction.",[23,24],"hr",{},[26,27,29],"h2",{"id":28},"rag-the-long-tail","RAG: The Long Tail",[10,31,32],{},"Retrieval Augmented Generation works on a simple premise: you have a large body of unstructured text — emails, contracts, Slack threads, manuals, meeting notes — and at query time, you find the most relevant chunks and stuff them into your LLM's context window.",[10,34,35],{},"RAG excels when:",[37,38,39,47,53,59],"ul",{},[40,41,42,46],"li",{},[43,44,45],"strong",{},"Your data is voluminous and unstructured."," Thousands of documents, variable format, no clean schema.",[40,48,49,52],{},[43,50,51],{},"You need near-real-time freshness."," Index a new email and it's searchable within minutes.",[40,54,55,58],{},[43,56,57],{},"You don't know what questions will be asked."," RAG is query-agnostic — it retrieves based on the question, not a pre-defined structure.",[40,60,61,64],{},[43,62,63],{},"The answer is in the text."," Contract terms, policy language, support ticket history.",[10,66,67],{},"This is the long tail of your organization's knowledge. It's messy, it's huge, and RAG is the right tool for it.",[23,69],{},[26,71,73],{"id":72},"okf-the-short-head","OKF: The Short Head",[10,75,76],{},"OKF handles the opposite end of the spectrum — the concepts that get referenced over and over again. Your metric definitions. Your database schemas. Your API contracts. Your incident runbooks. The stuff that every agent and every developer needs to get exactly right, every time.",[10,78,79],{},"OKF is just a folder of markdown files with YAML frontmatter. Each file describes one concept. They link to each other forming a graph. You store it in git. You review changes like code.",[10,81,82,83,86],{},"The key difference: OKF is ",[43,84,85],{},"curated",", not retrieved. Someone (or an enrichment agent) explicitly writes and maintains these files. They're versioned, they're reviewable, and they're deterministic — the same query always returns the same answer.",[10,88,89],{},"OKF excels when:",[37,91,92,98,104,110,116],{},[40,93,94,97],{},[43,95,96],{},"You have canonical facts."," \"What does weekly_active_users mean?\" has one correct answer in your org.",[40,99,100,103],{},[43,101,102],{},"Accuracy is non-negotiable."," A wrong metric definition doesn't just give a bad answer — it drives bad decisions.",[40,105,106,109],{},[43,107,108],{},"The knowledge changes slowly."," Schemas, APIs, and core metrics don't shift by the hour.",[40,111,112,115],{},[43,113,114],{},"Cost and latency matter."," Serving static markdown files is free. RAG retrieval costs compute on every query.",[40,117,118,121],{},[43,119,120],{},"You want portability."," OKF is vendor-neutral markdown. It works with any agent framework, any LLM, any cloud.",[23,123],{},[26,125,127],{"id":126},"the-practical-split","The Practical Split",[10,129,130],{},"Here's a rule of thumb:",[132,133,134,149],"table",{},[135,136,137],"thead",{},[138,139,140,143,146],"tr",{},[141,142],"th",{},[141,144,145],{},"RAG",[141,147,148],{},"OKF",[150,151,152,166,179,192,205,218,231],"tbody",{},[138,153,154,160,163],{},[155,156,157],"td",{},[43,158,159],{},"Volume",[155,161,162],{},"Millions of docs",[155,164,165],{},"Tens to hundreds of concepts",[138,167,168,173,176],{},[155,169,170],{},[43,171,172],{},"Format",[155,174,175],{},"Unstructured text",[155,177,178],{},"Structured markdown + YAML",[138,180,181,186,189],{},[155,182,183],{},[43,184,185],{},"Freshness",[155,187,188],{},"Near real-time",[155,190,191],{},"Periodically maintained",[138,193,194,199,202],{},[155,195,196],{},[43,197,198],{},"Cost model",[155,200,201],{},"Per-query retrieval",[155,203,204],{},"One-time curation",[138,206,207,212,215],{},[155,208,209],{},[43,210,211],{},"Accuracy",[155,213,214],{},"Depends on source quality",[155,216,217],{},"Human-curated or agent-generated + human-reviewed",[138,219,220,225,228],{},[155,221,222],{},[43,223,224],{},"Best for",[155,226,227],{},"\"Find me everything about X\"",[155,229,230],{},"\"What exactly is X?\"",[138,232,233,238,241],{},[155,234,235],{},[43,236,237],{},"Example",[155,239,240],{},"All emails about the Acme contract",[155,242,243],{},"The definition of weekly_active_users",[10,245,246],{},"In practice, a well-architected agent system uses both. Google's own stack does this: Knowledge Catalog ingests OKF for structured knowledge, and agents use RAG for the unstructured long tail.",[23,248],{},[26,250,252],{"id":251},"building-an-okf-bundle-what-it-actually-looks-like","Building an OKF Bundle: What It Actually Looks Like",[10,254,255],{},"Let's make this concrete. Say you're a logistics company running on Firebase and BigQuery. Your OKF bundle might look like this:",[257,258,263],"pre",{"className":259,"code":261,"language":262},[260],"language-text","logistics-knowledge\u002F\n├── tables\u002F\n│   ├── shipments.md\n│   ├── routes.md\n│   └── warehouses.md\n├── metrics\u002F\n│   ├── on-time-delivery-rate.md\n│   ├── cost-per-mile.md\n│   └── fleet-utilization.md\n└── runbooks\u002F\n    ├── delayed-shipment-escalation.md\n    └── warehouse-outage-response.md\n","text",[264,265,261],"code",{"__ignoreMap":266},"",[10,268,269],{},"Each file is markdown. The YAML header tells agents what it is:",[257,271,275],{"className":272,"code":273,"language":274,"meta":266,"style":266},"language-yaml shiki shiki-themes github-light github-dark","---\ntype: BigQuery Table\ntitle: Shipments\ndescription: One row per shipment. Updated every 15 minutes from the dispatch system.\nresource: https:\u002F\u002Fconsole.cloud.google.com\u002Fbigquery?p=logistics&d=ops&t=shipments\ntags: [logistics, operations]\ntimestamp: 2026-06-20T09:00:00Z\n---\n","yaml",[264,276,277,286,301,312,323,334,355,367],{"__ignoreMap":266},[278,279,282],"span",{"class":280,"line":281},"line",1,[278,283,285],{"class":284},"sScJk","---\n",[278,287,289,293,297],{"class":280,"line":288},2,[278,290,292],{"class":291},"s9eBZ","type",[278,294,296],{"class":295},"sVt8B",": ",[278,298,300],{"class":299},"sZZnC","BigQuery Table\n",[278,302,304,307,309],{"class":280,"line":303},3,[278,305,306],{"class":291},"title",[278,308,296],{"class":295},[278,310,311],{"class":299},"Shipments\n",[278,313,315,318,320],{"class":280,"line":314},4,[278,316,317],{"class":291},"description",[278,319,296],{"class":295},[278,321,322],{"class":299},"One row per shipment. Updated every 15 minutes from the dispatch system.\n",[278,324,326,329,331],{"class":280,"line":325},5,[278,327,328],{"class":291},"resource",[278,330,296],{"class":295},[278,332,333],{"class":299},"https:\u002F\u002Fconsole.cloud.google.com\u002Fbigquery?p=logistics&d=ops&t=shipments\n",[278,335,337,340,343,346,349,352],{"class":280,"line":336},6,[278,338,339],{"class":291},"tags",[278,341,342],{"class":295},": [",[278,344,345],{"class":299},"logistics",[278,347,348],{"class":295},", ",[278,350,351],{"class":299},"operations",[278,353,354],{"class":295},"]\n",[278,356,358,361,363],{"class":280,"line":357},7,[278,359,360],{"class":291},"timestamp",[278,362,296],{"class":295},[278,364,366],{"class":365},"sj4cs","2026-06-20T09:00:00Z\n",[278,368,370],{"class":280,"line":369},8,[278,371,285],{"class":284},[10,373,374,375,378,379,382,383,386],{},"The body has schema details, join paths, business rules — whatever an agent or a new engineer needs to understand the data. Files link to each other with normal markdown links. If ",[264,376,377],{},"routes.md"," references the ",[264,380,381],{},"warehouses"," table, it just links to ",[264,384,385],{},".\u002Fwarehouses.md",".",[10,388,389],{},"You store this in a git repo. Schema changes go through a PR. Your team reviews knowledge like they review code. And because it's just markdown, any agent can consume it — no SDK, no API key, no platform lock-in.",[23,391],{},[26,393,395],{"id":394},"getting-started","Getting Started",[10,397,398],{},"You don't need Google Cloud to use OKF. The spec is open, the format is markdown, and your agent can read it from any filesystem. But if you're already on GCP:",[400,401,402,408,414,420,426],"ol",{},[40,403,404,407],{},[43,405,406],{},"Start with your most-referenced concepts."," The 20 tables, metrics, or APIs your team asks about every day.",[40,409,410,413],{},[43,411,412],{},"Write one file per concept."," Don't boil the ocean. Five well-documented concepts beat fifty shallow ones.",[40,415,416,419],{},[43,417,418],{},"Put it in git."," Version control is the whole point. You want history, review, and rollback.",[40,421,422,425],{},[43,423,424],{},"Point your agent at it."," Whether you're using Vertex AI Agent Builder, Firebase AI Logic, or a custom setup — the bundle is just files.",[40,427,428,431],{},[43,429,430],{},"Let an agent do the first pass."," Google's reference enrichment agent can auto-generate OKF from BigQuery schemas. Review, curate, ship.",[23,433],{},[26,435,437],{"id":436},"the-bottom-line","The Bottom Line",[10,439,440],{},"RAG and OKF solve different problems. RAG is search. OKF is reference. RAG finds answers in your ocean of documents. OKF gives your agent the foundational knowledge it needs to ask the right questions in the first place.",[10,442,443,444,448],{},"If you're building AI on GCP or Firebase — and your agent needs to know what things ",[445,446,447],"em",{},"mean",", not just find documents about them — OKF deserves a spot in your architecture.",[10,450,451],{},"Start with your core metrics and schemas. Write them down once, version them, and stop paying retrieval costs for facts that never change.",[453,454,455],"style",{},"html pre.shiki code .sScJk, html code.shiki .sScJk{--shiki-default:#6F42C1;--shiki-dark:#B392F0}html pre.shiki code .s9eBZ, html code.shiki .s9eBZ{--shiki-default:#22863A;--shiki-dark:#85E89D}html pre.shiki code .sVt8B, html code.shiki .sVt8B{--shiki-default:#24292E;--shiki-dark:#E1E4E8}html pre.shiki code .sZZnC, html code.shiki .sZZnC{--shiki-default:#032F62;--shiki-dark:#9ECBFF}html pre.shiki code .sj4cs, html code.shiki .sj4cs{--shiki-default:#005CC5;--shiki-dark:#79B8FF}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}",{"title":266,"searchDepth":288,"depth":288,"links":457},[458,459,460,461,462,463],{"id":28,"depth":288,"text":29},{"id":72,"depth":288,"text":73},{"id":126,"depth":288,"text":127},{"id":251,"depth":288,"text":252},{"id":394,"depth":288,"text":395},{"id":436,"depth":288,"text":437},"Google's new Open Knowledge Format isn't a replacement for RAG — it's a complement. Here's when to use each, and why the smartest AI architectures use both.","md",{"date":467,"readtime":468,"author":469,"initials":470,"category":471,"imagetext":472},"2026-06-28","12","Jenga IT Consulting","JIT","Industry Solutions","A split-screen visual: chaotic document pile on one side (RAG), organized filing cabinet on the other (OKF)",true,"\u002Fblog\u002Frag-vs-okf-stop-using-a-hammer-for-every-nail",{"title":5,"description":464},"blog\u002Frag-vs-okf-stop-using-a-hammer-for-every-nail","S6VcDAg67F1-8Q8PEfUovo5ioSONGHDrIv640h-z4RQ",1782696660471]