Official guide · OpenAI
Let the model find the relevant passage instead of pasting every document
Index reference files and retrieve relevant excerpts at question time so answers can stay connected to the material they rely on.
Original source
File search | OpenAI API
OpenAI · Official guide · checked 2026-07-15
What the source is saying
File search combines retrieval with response generation over uploaded files.
Try it in your work
Open the linked pattern for a reusable template, variables to change, and an example output shape.
Open the practical pattern →Keep in mind
Retrieval quality depends on the source files and the question. Important claims still need a source check.