Share via

Do knowledge files in Azure AI Foundry require File Search tool (especially with GPT-5 vs GPT-4)?

Meenakshi Kathiresan 90 Reputation points
2026-04-21T20:38:45.1+00:00

I’m trying to understand the correct setup for using knowledge files in Azure AI Foundry / Azure AI Agents.

We are uploading knowledge files (documents) to be used by the agent, but I’m unclear whether we must explicitly add the File Search (vector store) tool for them to be usable.

What we’ve observed:

  • With GPT-4, the agent sometimes appears to work even without explicitly enabling File Search.
  • With GPT-5, the same setup does not seem to reliably use the knowledge files unless the File Search tool is added.
  1. Is File Search mandatory for knowledge files to be used at runtime in Foundry agents?
  2. Why does GPT-4 appear to work without explicitly enabling it, while GPT-5 seems to require it?
  3. Is GPT-5 more strictly dependent on tool-based retrieval rather than implicit context usage?
  4. Is there any way to trace or inspect retrieval/tool calls (e.g., see whether File Search was invoked, what chunks were retrieved, or why it was not triggered)?
Azure AI Search
Azure AI Search

An Azure search service with built-in artificial intelligence capabilities that enrich information to help identify and explore relevant content at scale.


1 answer

Sort by: Most helpful
  1. Q&A Assist
    2026-04-21T20:39:06.86+00:00
    AI generated content. This question contains an answer created with AI from Q&A Assist. Learn more
    1. Knowledge files in Azure AI Foundry agents are backed by the File search tool and its vector store. For agents to search and use uploaded documents at runtime, the File search capability must be in place, because it is what parses, chunks, embeds, stores, and retrieves content from those files. File search is the mechanism that enables agents to “answer questions from proprietary or confidential content” and “search through documents you upload directly (PDFs, Word docs, code files)” without external infrastructure. Without this retrieval mechanism, models only see what is in the prompt and cannot dynamically query the uploaded files.
    2. File search performs hybrid retrieval (keyword + semantic) over a vector store with default chunking (800-token chunks, 400-token overlap, up to 20 chunks in context) and query rewriting/reranking before injecting results into the model context. This is a tool-based retrieval pattern, not an implicit feature of GPT-4 or GPT-5 themselves. Any apparent behavior where GPT-4 “works” without explicitly enabling File search is due to how the agent configuration or portal wiring is set up (for example, a default or implicit file-search-backed knowledge base), not because GPT-4 can natively access knowledge files without a retrieval tool. The model alone does not index or search uploaded files.
    3. GPT-5 is not described as having a different retrieval mechanism in the provided material; the retrieval behavior is defined by the File search tool and vector store, not by the model version. The tool is responsible for:
      • Query rewriting
      • Breaking complex queries into parallel searches
      • Hybrid search over vector stores
      • Reranking and selecting chunks to send to the model
      This means both GPT-4 and GPT-5 rely on the same tool-based retrieval pattern when using Foundry agents with knowledge files. Any stricter dependence observed with GPT-5 is an effect of configuration (for example, needing the File search tool attached) rather than a model-specific implicit retrieval capability.
    4. File search uses a vector store with explicit limits and behavior:
      • Each vector store can hold up to 10,000 files.
      • Only one vector store can be attached to an agent and one to a conversation.
      • Supported file types and encodings are constrained (for example, .pdf, .docx, .json, .md, .txt, .py, etc., with UTF-8/UTF-16/ASCII for text MIME types).
      If files are outside these constraints, or if the vector store is not correctly attached, retrieval will not occur even if the files are uploaded.
    5. The context provided does not describe a built-in tracing or inspection feature that exposes detailed File search tool calls (such as which chunks were retrieved, or why a tool was not triggered) for Foundry agents. It only describes the internal behavior (query rewriting, hybrid search, reranking) and the limits. Any deeper tracing (for example, logging tool invocations and retrieved chunks) would need to rely on capabilities outside the provided documentation.

    In practice, to ensure knowledge files are used at runtime with both GPT-4 and GPT-5 in Azure AI Foundry agents:

    • Ensure the File search tool (vector store) is configured and attached to the agent.
    • Ensure files are in supported formats/encodings and within vector store limits.
    • Use File search when the scenario matches: searching uploaded documents, answering from proprietary content, or processing large files without external search infrastructure.

    References:

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.