Retrieval supplies evidence
Retrieval-augmented generation brings relevant document passages into model context before an answer is produced. It is useful when the answer depends on a knowledge base rather than only model knowledge. Keep document permissions attached to the retrieval request.
Hosted file search belongs to its documented API
OpenAI documents file_search as a Responses API tool using uploaded files and vector stores. The hosted tool performs semantic and keyword retrieval. Set up the vector store and ingestion first; uploading a file alone is not the same as preparing a searchable knowledge base.
Connect retrieval to Agents API
For managed Agents API work, expose your retrieval service as an application function or MCP tool using the supported tool schema. Return relevant passages with source identifiers. Do not assume a Responses file_search configuration is accepted unchanged in an Agents API session.
Workspace files solve a different problem
Sandbox files provide a working filesystem for scripts and artifacts. A vector store provides a retrieval index. Neither is automatically a replacement for application storage or access controls. Evaluate relevance, answer grounding, and citation accuracy separately.
Read the official reference
Check the source for current API fields, account requirements, and service limits.
OpenAI: tools-file-search