GPT WORLD / INDEPENDENT CODEX FIELD MANUAL Source review · 2026-07-31

Retrospective edition / RETRIEVAL

Separate retrieval from generation

Embeddings support semantic comparison; a production retrieval layer also needs chunk ownership, metadata filters, freshness, citations, and deletion.

01 / DECIDE

Architecture decision

Use it when answers must be grounded in a controlled corpus rather than relying on model memory.

Embeddings support semantic comparison; a production retrieval layer also needs chunk ownership, metadata filters, freshness, citations, and deletion. Map input, output, state, and side effects as one observable path before deciding which layer owns separate retrieval from generation.

02 / BUILD

Three-step implementation

  1. 01

    Frame the contract

    Write down the caller, data classification, success condition, timeout, cancellation, and ownership. Use it when answers must be grounded in a controlled corpus rather than relying on model memory.

  2. 02

    Build one narrow path

    Implement one end-to-end path with request correlation, typed state, and reversible failure handling. Embeddings support semantic comparison; a production retrieval layer also needs chunk ownership, metadata filters, freshness, citations, and deletion.

  3. 03

    Prove the outcome

    Turn acceptance into a repeatable fixture, contract test, or browser test. A golden query set measures relevant recall, citation precision, stale-document leakage, and no-answer behavior.

03 / BOUND

Production boundary

Enforce document-level authorization before retrieval and remove deleted or revoked content from every derived index.

04 / PROVE

Acceptance evidence

A golden query set measures relevant recall, citation precision, stale-document leakage, and no-answer behavior.

SOURCE / HTTP

Reproducible source probe

curl -fsSI 'https://developers.openai.com/api/docs/guides/embeddings' | sed -n '1,5p'