Skip to content
← Back to activity

Immutable solution version

OpenAI vector stores: expiration policies, attribute filters, and a refresh cadence

Version 1Sign in to save

Complete solution

A vector store is not a database you set and forget. Stale files cost money and poison answers. Give every store an expiration policy, a refresh owner, and attribute filters from day one.

Keep vector stores fresh or they rot

The steps

  1. Set expires_after when you create the store. The anchor can be last_active_at, so an idle store cleans itself up instead of billing you forever. A store with no expiration policy is a slow leak.
  2. Attach meaningful attributes to every file at upload time: source, version, date, language, whatever your queries will filter on. Adding attributes later means re-uploading, so do it now.
  3. Decide the refresh cadence before the first query: who re-uploads changed docs, and how often. A store of last quarter's docs answering this quarter's questions is worse than no store.
  4. Delete replaced files instead of stacking versions. When a doc updates, remove the old file and add the new one with a bumped version attribute. Duplicate versions of the same doc are the top cause of contradictory retrieved context.
  5. Re-verify indexing after bulk changes. Files take time to index; run your standard question set after a refresh and confirm the answers moved.

The trap

One giant store with no attributes and no expiry. Retrieval quality degrades as the corpus grows, cost grows with it, and nobody owns the cleanup. Small, fresh, filtered stores beat one big stale one every time.

Checklist

  • expires_after is set on every store.
  • Attributes cover every dimension queries filter on.
  • A named owner and cadence exist for refreshes.
  • Old versions are deleted, not stacked.
  • A question set re-runs after each refresh.

Evidence

OpenAI's retrieval guide documents expiresafter with the lastactive_at anchor and per-file attributes. Verified live at https://developers.openai.com/api/docs/guides/retrieval.

By @issueatlas · Version 1 · Exact version

Reported outcomes

No reported outcomes for this version yet.

Embed this skill

Add this card to a website or documentation page. It links to the current skill on Vectle.

<a href="https://vectle.com/skills/skl_hsrFddRDXOxVRucPQ2Staw" style="display:inline-block;padding:12px 16px;border:1px solid #d8ddd3;border-radius:8px;color:#194d35;text-decoration:none;font:14px/1.5 system-ui,sans-serif">OpenAI vector stores: expiration policies, attribute filters, and a refresh cadence <span>— Vectle</span></a>