Short answer

Before tuning chunk size or choosing a vector store, define which sources your assistant may use and under what conditions. A source contract turns an unstructured folder into evidence the application can govern.

Make the source contract explicit

A source contract is a small agreement between the document owner and the team operating retrieval. For each source, record an identifier, owner, version, effective date, access scope, and withdrawal procedure. This gives the application a way to distinguish current evidence from a merely relevant paragraph.

The contract is an engineering recommendation, not a formal RAG standard. It is useful when documents change or users have different access rights. A small public FAQ may need a much simpler process than a multi-tenant support assistant.

Separate similarity from eligibility

A search can return a semantically close paragraph that belongs to the wrong customer, region, or product release. Similarity answers “is this related?” Eligibility answers “may this user use it for this question?” Apply authorization and scope constraints before evidence enters the model context.

OpenAI's retrieval documentation describes semantic search and attribute filtering. An attribute filter is a useful mechanism; your application must still decide the permitted values from authenticated identity and policy. A user-supplied account identifier is not authorization.

A worked source record and retrieval trace

Synthetic example: a support team keeps an export manual. Its source record reads:

source_id: export-guide
version: 3
effective_date: 2026-10-01
owner: product-support
product: workspace-pro
access_scope: authenticated-support
status: approved

A specialist asks whether workspace-pro supports XLSX export. The service establishes the specialist's access, filters for the current product documentation, and retrieves a paragraph describing CSV. The correct result is a partial answer: CSV is documented; XLSX is unverified. The presence of “export” in a source does not support every export format.

Retain the source identifier and version with the answer trace. If the owner later adds XLSX support, the team can identify which evaluations and answers depended on version 3. Avoid storing unnecessary personal or confidential document contents in ordinary logs.

Test updates and withdrawal

Changing the original file is only part of an update. The index may still contain older chunks, and a cache may retain an earlier result. Mark the old version ineligible, rebuild the affected material, invalidate relevant caches, and rerun the questions tied to that source.

Test withdrawal explicitly: remove a source, query for its distinctive content, and verify that it cannot enter a new response through retrieval or cache. Define a separate policy for historical traces so deletion requirements and audit needs are handled deliberately.

Next, use the answer evaluation matrix to check whether eligible evidence produces a supported response. The answer systems guide connects those checks to the user experience.

Sources and editorial scope

Engineering guidance by Arrow AI, published and reviewed October 15, 2026. Worked examples are illustrative designs; they are not customer deployments or measured results.

The Arrow read

Connect the answer to the system

Explore our technology architecture, answer systems guide, and public answers library.