OAI-SE Responses API & Vector Stores MEDIUM
PRODUCTION SCENARIO
Meridian Insurance keeps 4,200 policy PDFs covering six US states in one vector store, and every file carries a state attribute. Agents in Texas keep receiving answers that cite Ohio policy language.

Which change limits each agent's file search to their own state's documents?

Answering here is anonymous. Nothing is saved unless you sign in.

Show answer and explanation

Answer: Add a filters object to the file_search tool comparing state to the agent's own state

The file_search tool takes a filters object with a comparison type, an attribute key and a value, so retrieval itself is restricted to files carrying the agent's state. Naming the state in the query only nudges semantic similarity and excludes nothing, a developer-message rule acts after the chunks have been retrieved and paid for, and capping max_num_results at 1 narrows the result set without changing which state ranks first.
Free

Keep practicing OAI-SE

24 original OAI-SE practice questions, each with an explanation and a source link. No account needed.

Start free practice set → Timed, explained, free