I’m building a RAG assistant using the Responses API with the file_search tool and an existing vector store.
I’m seeing intermittent false-negative retrieval. The same prompt, sent in separate new chats, sometimes retrieves the expected files and answers correctly, and sometimes file_search is invoked but returns zero results. There are no API/platform errors. The response completes normally.
Setup:
const tools: any[] = tenantData.vector_store_id
? [
{
type: "file_search",
vector_store_ids: [tenantData.vector_store_id],
max_num_results: 10,
},
]
: [];
const response = await openai.responses.create(
{
model: "gpt-5-nano",
instructions,
input: message,
tools,
previous_response_id: (conv.last_response_id as any) ?? undefined,
stream: true,
include: ["file_search_call.results"],
},
{ signal: request.signal },
);
Example prompt:
Summarize the work experience of the individual in the documents.
Failed run:
{
"type": "file_search_call",
"status": "completed",
"resultCount": 0,
"queries": [
"Summarize the work experience of the individual in the documents.",
"work experience of the individual in the documents",
"individual's work history in the uploaded documents",
"CV or resume in uploaded documents",
"professional experience of the individual named in the documents"
],
"resultFiles": []
}
Successful run with the same prompt, same vector store, separate new chat:
{
"type": "file_search_call",
"status": "completed",
"resultCount": 10,
"queries": [
"Summarize the work experience of the individual in the documents.",
"What is the individual's work experience mentioned in the uploaded documents?",
"CV or resume included in the documents: summarize work history.",
"Work history of the person described in the documents.",
"Profile or professional experience of the individual in the files."
],
"resultFiles": [
{ "filename": "<resume document>", "score": 0.9306 },
{ "filename": "<resume document>", "score": 0.925 },
{ "filename": "<project report>", "score": 0.8229 },
{ "filename": "<project report>", "score": 0.8015 }
]
}
This does not look like the model choosing not to use the tool. The tool is called in both cases. The issue is that one completed file search returns no files, while another completed file search for the same prompt/vector store returns the expected files.
An identical prompt, only seconds apart will either fail to yeild file search results or return the correct response, seemingly at random.
This behaviour has only started in the last week or so, nothing in my codebase or vector store has siginificantly changed, and reverting to a month old version does not resolve this issue.
Thank you for any help.