How-to guide

How to use OKF with RAG

Use OKF with RAG by cleaning source files before indexing them for retrieval.

Short answer

Use OKF with RAG by cleaning source files before indexing them for retrieval.

Prerequisites

Step-by-step tutorial

  1. Create OKF files for stable source concepts.
  2. Keep one concept per file.
  3. Index files with tags and titles.
  4. Evaluate retrieved chunks.
  5. Update stale files before reindexing.

Copyable example

How to use OKF with RAG example
---
type: RAG Source Document
title: Support policy source file
description: Prepares a support policy for retrieval with frontmatter and clear sections.
resource: https://openknowledgeformat.online/guides/how-to-use-okf-with-rag/
tags: [okf, guide, example]
timestamp: 2026-06-21T00:00:00Z
---

# Purpose

Explain the stable facts, boundaries, owner notes, and related links for this concept.

# Links

- Validator: https://openknowledgeformat.online/okf-validator/
- Examples: https://openknowledgeformat.online/okf-examples/

Common mistakes

Validation method

  1. Paste the file into the OKF Validator.
  2. Fix errors before warnings.
  3. Check links and source claims manually.
  4. Add the file to the bundle index.

FAQ

Common questions

Does this require a database?

No. A folder of Markdown files is enough for the first version.

Can I automate this?

You can generate drafts, but owners should review source accuracy and boundaries.

Related pages

OKF Tutorial

Use the main tutorial for the full workflow.

Open page

OKF Examples

Compare bundle structures.

Open page

OKF Validator

Check the file before publishing.

Open page