Home / Insights / Generative AI and LLMs

Generative AI and LLMs

Managed Knowledge Base or Your Own Retrieval Stack? A 2027 Architecture Decision After Foundry IQ, Bedrock and Gemini File Search

At Ignite on 17 to 20 November 2026, Microsoft added knowledge graphs, a dedicated retrieval model and automatic provisioning to Foundry IQ. AWS, Google and OpenAI already sell managed retrieval. Every major platform now offers to run your enterprise knowledge search for you. Here is how to decide what to hand over, what to keep, and how to stay free to change your mind.

TopicsGenerative AI and LLMsAI Agents and Automation

Key takeaways

  • Managed retrieval is now the default offer. Amazon Bedrock Managed Knowledge Base reached general availability in June 2026, Gemini API File Search went multimodal in May, OpenAI ships file search as a hosted tool, and Foundry IQ will stop requiring a separate Azure AI Search resource, with a serverless preview due in December 2026.
  • The real choice is about ownership, not vendors. Split retrieval into eight layers and decide, layer by layer, whether the platform or your team owns it. Most organisations should buy the plumbing and keep the retrieval contract, the permission model and the evaluation set.
  • Permissions decide more than relevance does. Check that the managed service trims results by the user’s real access rights at query time, propagates deletions, and keeps tenants apart. OWASP lists vector and embedding weaknesses as a top-ten LLM risk for 2025.
  • Price models differ in shape, not only level. Some providers charge at indexing and pass retrieved text through as model tokens; others charge for storage, queries or capacity. Model your own corpus and query volume before you compare.
  • Put your own interface in front of any platform. A thin retrieval API with a fixed response shape and a test set built from your own questions lets you start managed in 2027 and move later without rewriting every agent.

What changed in 2026

Two years ago, building enterprise knowledge search meant assembling parts: a document parser, a chunking script, an embedding model, a vector database, a keyword index, a re-ranker, a sync job for each source system and a layer of prompt code to stitch it together. Each part was a decision, and each decision was yours to maintain. In 2026 the major platforms packaged those parts into a single managed service and started competing on how much of the work they take away.

The sequence is worth knowing because it shows where the market is heading:

  • 5 May 2026, Google. Gemini API File Search added multimodal indexing with the Gemini Embedding 2 model, custom key-value metadata for filtering at query time, and page-level citations so an answer can point to the page of the PDF it came from.
  • 17 June 2026, AWS. Amazon Bedrock Managed Knowledge Base became generally available as a fully managed RAG service with six native connectors (Amazon S3, SharePoint, Confluence, Google Drive, OneDrive and a web crawler), automatic syncing, managed vector storage, hybrid search, document ranking and agentic retrieval for multi-hop questions, wired into Bedrock AgentCore.
  • Ongoing, OpenAI. File search is a hosted tool in the Responses API: you upload files to vector stores, the model decides when to search, and responses carry file citations. It combines semantic and keyword search and supports metadata filters.
  • 17 to 20 November 2026, Microsoft. At Ignite, Microsoft added knowledge graphs to Foundry IQ in public preview, so developers can supply an ontology and let the service map how documents and entities relate while recording the source of each connection. It also introduced Microsoft-Retriever-1, a retrieval model that reformulates queries in the vocabulary of your documents and decides whether more searches are needed, with the stated aim of cutting searches, latency and token use. And it announced that knowledge bases will no longer require a separately provisioned Azure AI Search resource, with a serverless, usage-based managed service entering public preview in December 2026.

Put together, the message from every platform is the same: stop building retrieval plumbing and let us run it. For many teams that is good advice. But the pitch arrives at a moment when most organisations are still struggling to turn AI pilots into production systems. Gartner’s survey of 1,303 organisations, published on 1 September 2026, found that only 22% had successfully scaled AI across multiple business units or adopted an AI-first approach. Knowledge search is often the first AI system that has to cross that line, because it touches every department’s documents and every department’s permissions.

The question for a CTO is therefore not “managed or custom?” in the abstract. It is: which parts of retrieval are commodity plumbing that a platform will run better and cheaper than you, and which parts encode your organisation’s knowledge, risk and rules so they must stay under your control?

The eight layers of a knowledge search system

Every enterprise knowledge search system, managed or not, does the same eight jobs. Listing them separately is the most useful thing you can do before a vendor meeting, because each managed service covers a different subset, and the gaps are where projects stall.

LayerWhat it doesTypically managed wellUsually stays with you
1. Connectors and syncPulls content and changes from SharePoint, Confluence, drives, ticketing and line-of-business systemsCommon SaaS sources with standard APIsLegacy systems, custom databases, sources with unusual permission models
2. Parsing and chunkingTurns PDFs, slides, scans, tables and images into searchable unitsClean text documents, standard PDFsEngineering drawings, complex tables, forms where layout carries meaning
3. Embeddings and indexCreates vectors and keyword indexes and stores themAlmost everything; this is the most commoditised layerDomain vocabularies where a general model underperforms on your test set
4. Retrieval planningRewrites queries, decides how many searches to run, combines keyword, vector and graph resultsIncreasingly, through agentic retrieval and dedicated retrieval modelsThe rules for which sources are authoritative for which questions
5. PermissionsEnsures each user only retrieves content they are allowed to seeSources whose access lists the connector understandsRow-level rules, contractual restrictions, need-to-know policies not stored in the source
6. Citations and provenanceShows where an answer came from, down to file, page or passageFile and page citations are now standardVersion history, document status (draft, approved, superseded)
7. EvaluationMeasures whether retrieval finds the right evidence for real questionsBasic tracing and logsThe test set itself, and the judgement of what a correct answer is
8. Operations and observabilityLatency, cost, failed syncs, drift in quality over timeInfrastructure metricsBusiness metrics, alerting on quality regressions, ownership of fixes

Two patterns stand out. First, the layers that platforms manage best (3, 4 and the infrastructure part of 8) are exactly the ones where in-house teams historically spent most engineering time for the least differentiation. Second, the layers that stay with you (5, 7 and the business rules inside 4 and 6) are where your organisation’s knowledge and risk actually live. A managed service does not remove those; it only removes the excuse for not doing them properly.

Three architecture patterns for 2027

In our architecture work we see three workable patterns. None is universally right. The point is to choose one deliberately rather than drifting into it because a pilot happened to use a particular SDK.

Pattern A: fully managed, inside your main cloud

You use the knowledge service of the cloud or model platform you already run on: Bedrock Managed Knowledge Base on AWS, Foundry IQ on Azure, File Search with Gemini, or OpenAI’s vector stores. Agents call the platform’s retrieval tool directly. You configure connectors, metadata and access, and you write prompts and evaluation. This is the fastest path to a working assistant and the right default for a first internal use case with mainstream sources.

Pattern B: managed index, owned retrieval contract

You still let a platform do ingestion, embeddings, indexing and much of the retrieval planning. But agents and applications never call that platform directly. They call your own retrieval service, a thin API that applies your permission checks, adds source-authority rules, logs every query against your evaluation framework and returns results in a fixed format. Behind it you can run one managed index or several. This is the pattern we recommend for most mid-sized and large organisations in 2027, because it captures most of the managed-service savings while keeping the decisions that matter in your code.

Pattern C: your own stack

You run the search engine, vector store, embedding model and orchestration yourself, in your own cloud account or data centre, possibly with open-weight models. This is the right answer when data cannot leave a defined perimeter, when retrieval quality on your content clearly beats the managed options in testing, or when search is itself your product. It is the most expensive pattern to staff, and the one where quality most often decays after the original team moves on.

QuestionA: Fully managedB: Managed index, owned contractC: Own stack
Time to first useful pilotFastestSlightly slower (build the API first)Slowest
Engineering you maintainLowModerate: one service plus evaluationHigh: every layer
Control of permissions logicPlatform’s modelYours, on top of the platform’sFully yours
Switching cost laterHigh: agents bound to one SDKLow to moderate: swap the back endNot applicable; you own it
Data perimeter optionsThe provider’s regions and termsThe provider’s, with your filtering in frontAnything you can run
Typical fitFirst use case, one cloud, mainstream sourcesSeveral assistants and agents sharing one knowledge layerStrict sovereignty, search as product, proven quality gap

Seven criteria that decide the pattern

Score each criterion for your first two or three use cases, not for the whole organisation. The answer often differs between an HR policy assistant and a contract-analysis agent.

  1. Permission fidelity. Can the service reproduce, at query time, who may see each document and each part of it? If access rules live outside the source systems (in contracts, project membership or a separate entitlement system), you will need your own enforcement layer, which pushes you towards Pattern B or C.
  2. Data perimeter and retention. Where are documents, embeddings and logs stored, for how long, and can you meet your residency obligations with the regions the service offers? Bedrock Managed Knowledge Base, for example, launched in a specific list of US, Asia Pacific, European and GovCloud regions; check the current list against your requirements rather than assuming coverage.
  3. Corpus shape and size. Mostly clean text, or scanned forms, drawings and spreadsheets? A few gigabytes, or terabytes with frequent change? Google’s File Search documentation recommends keeping each store under 20 GB for optimal latency and notes that stored size is roughly three times the input once embeddings are included. Limits like these shape your design.
  4. Question complexity. If most questions are single-document lookups, plain hybrid search is enough. If they require following links across documents, such as which suppliers and products a new regulation affects, you need multi-hop retrieval or a knowledge graph. This is exactly what Foundry IQ’s graphs and Bedrock’s agentic retrieval target, but test them on your own questions.
  5. Latency and cost model. Agentic retrieval improves hard answers by running more searches, which costs time and tokens. Decide which user journeys can tolerate a slower, more thorough answer and which need a fast one.
  6. Debuggability. When an answer is wrong, can you see which queries were issued, what came back, and why the model chose what it chose? OpenAI’s file search, for instance, does not return search results by default; you must request them explicitly. Make full traces a requirement.
  7. Portability. How hard would it be to move in two years? Count the places where agents, prompts and front ends depend on one vendor’s tool format and citation schema.

A simple rule of thumb from these criteria: if criteria 1 and 2 are easy and the rest are moderate, Pattern A is fine. If any of criteria 1, 6 or 7 is hard, choose Pattern B. Choose Pattern C only when criterion 2 rules out every managed option or when your own tests show a quality gap the business will pay to close.

Permissions and security: the questions to ask

Knowledge search changes the security model of an organisation in a quiet but important way. Before, a document hidden three folders deep in a SharePoint site was protected partly by obscurity. A good retrieval system removes the obscurity. If the permission model is wrong, it will surface exactly the documents people were never meant to find, and do so confidently, with citations.

The OWASP Top 10 for LLM Applications 2025 lists vector and embedding weaknesses (LLM08) as one of its ten risks, covering unauthorised access and data leakage through misaligned access controls, cross-context leaks in multi-tenant stores, and poisoning of the knowledge base with harmful content. Managed services address parts of this, but none can know rules that exist only in your organisation. Use the following checklist with every vendor and with your own team.

  • Query-time trimming. Are results filtered by the requesting user’s identity at query time, or only by what the connector’s service account could read at ingestion time? The second is a data leak waiting to happen.
  • Permission change latency. When someone leaves a project, how long until their access to its documents disappears from search? Ask for the sync interval for access lists, not just for content.
  • Deletion propagation. When a document is deleted or a retention period expires, are its chunks, embeddings, graph entities and cached answers removed too? Ask how this is verified.
  • Tenant and team isolation. If several business units or clients share one service, is isolation enforced by separate stores, or only by metadata filters your code must never forget?
  • Poisoning and prompt injection. Any document an employee can edit becomes text the model reads. Decide which sources are authoritative, label untrusted ones, and keep agents that can take actions away from content anyone can write.
  • Knowledge graphs as a new surface. A graph links entities across documents. Check that a relationship derived from a restricted document cannot be revealed through a query about an unrestricted one. Foundry IQ records the source of each connection, which makes this testable; test it.
  • Logs. Query logs contain what people ask, which can be as sensitive as the documents. Agree where they are stored, who can read them and how long they are kept.

In Pattern B, most of these checks live in your retrieval service, which is the main reason that pattern exists. You can apply your entitlement system, block restricted sources for certain agents, and log every request in one place, whatever index sits behind it.

Comparing cost models honestly

Managed knowledge services are priced in very different shapes, which makes headline comparisons misleading. Google’s File Search is a useful illustration: according to its documentation, you pay for embeddings at indexing time at normal embedding prices, storage is free, query-time embeddings are free, and retrieved document text is charged as ordinary context tokens for the model. Microsoft describes the coming Foundry IQ managed service as serverless and usage-based. Other services charge for storage, per query or for provisioned capacity. The same workload can look cheap under one model and expensive under another.

Build a small cost model from five drivers, using your own numbers and each provider’s current price page on the day you compare:

DriverWhat to measureWhy it matters
Initial indexingTotal content volume after parsing, in tokensA one-off cost, but repeated whenever you change embedding model or chunking
ChurnShare of content that changes each monthRe-indexing cost and sync load; high in ticketing and wiki sources
StorageIndexed size including vectors, often a multiple of raw textCan dominate for large archives that are rarely queried
QueriesQuestions per user per day, times users, times searches per questionAgentic retrieval multiplies searches per question
Retrieved contextPassages returned per search, times passage lengthUsually the largest variable cost, paid as model input tokens

The last two rows are where engineering choices move money. Limiting the number of results returned, which OpenAI’s file search exposes directly as a parameter, reduces tokens and latency, sometimes at a cost in answer quality. Re-ranking and better metadata filters let you return fewer, better passages. A retrieval model that decides when it has enough evidence, as Microsoft claims for Retriever-1, attacks the same cost from the other side. Measure the trade-off on your test set rather than accepting a default.

Remember the cost that does not appear on any invoice: the people who keep quality up. A managed service removes database administration and pipeline maintenance. It does not remove content ownership, evaluation, or the work of fixing the answers users complain about. Budget for those in every pattern.

The retrieval contract that keeps you portable

The single most valuable architectural decision in this area costs very little: define your own retrieval contract before you write your second agent. A contract is a small, stable interface that every assistant, agent and application uses to ask for evidence. Behind it, you can use one managed service today and another, or your own stack, tomorrow.

A practical contract specifies:

  • Request: the question, the calling user’s identity (never a shared service account), the calling application or agent, optional filters such as department, document status or date range, and a mode such as fast or thorough.
  • Response: a list of passages, each with a stable source identifier, title, link, location (page, section or row), document version and status, a relevance score, and the reason it passed permission checks.
  • Trace: the sub-queries actually issued, the back end used, timings and token counts, written to your own log store.
  • Guarantees: a maximum latency for each mode, a maximum number of passages, and a rule that empty results are returned as empty rather than padded with weak matches.

Expose the contract as an internal API, and optionally as a tool through the Model Context Protocol so that different agent frameworks can call it in the same way. Then build an adapter per back end. Moving from one managed service to another becomes a new adapter plus a rerun of your evaluation set, rather than a rewrite of every agent.

The evaluation set is the other half of portability. A few hundred real questions with known correct sources, drawn from each department and refreshed every quarter, lets you compare back ends on facts instead of demos. We describe how to build one in our guide to building a test set for enterprise knowledge search. Without it, the platform decision is made on whichever vendor presented best.

A six-week bake-off plan

If you are choosing a knowledge platform for 2027, a structured comparison over six weeks is enough to make a defensible decision. This is the plan we recommend; adjust the scope to your organisation.

WeekWorkOutput
1Choose two use cases with different risk levels. Collect 150 to 300 real questions and their correct sources. Map the permission rules for the content involved.Evaluation set and permission map
2Write the retrieval contract and a thin service skeleton. Select two managed candidates, usually your main cloud’s service plus one alternative, and optionally one self-hosted baseline.Contract specification and shortlist
3 to 4Ingest the same content into each candidate through adapters. Run the evaluation set in fast and thorough modes. Record recall of correct sources, citation accuracy, latency and cost per hundred questions.Comparable results table
5Run the security checklist: permission trimming with test users, a permission revoked mid-test, a deleted document, a planted instruction inside a document.Security findings per candidate
6Estimate annual cost from your five drivers, assess portability, and decide on a pattern and a primary back end. Agree on owners for content, evaluation and operations.Decision record and 2027 roadmap

Three rules make the bake-off useful. Use the same content and questions for every candidate. Include at least one question type that needs multi-hop reasoning, because that is where 2026’s new features differ most. And keep the permission tests in scope even if the pilot users all have broad access; production users will not.

If keyword, vector and hybrid retrieval are still open questions for your content, read our comparison of retrieval approaches for enterprise knowledge search. If you plan to let the model plan its own searches, our article on agentic RAG and its risks covers the failure modes to test for. When you are ready to build, our enterprise knowledge search team can run the bake-off with you, and our private AI deployment practice covers Pattern C when data must stay inside your perimeter.

Frequently asked questions

Is building our own RAG stack still worth it in 2027?

Sometimes. Build your own when data cannot leave a perimeter that no managed service meets, when search quality is a competitive feature of your product, or when your test set shows a clear quality gap that the business values. For internal assistants on mainstream sources, a managed index behind your own retrieval contract is usually the better use of engineering time.

Do we need a knowledge graph now that Foundry IQ and others support them?

Only if your important questions need connections across documents, such as linking regulations to suppliers and products, or people to projects and contracts. Graphs add an ontology to design and maintain. Test multi-hop questions with plain hybrid search and agentic retrieval first; add a graph where those clearly fail. Our article on GraphRAG and knowledge graphs covers the trade-offs.

Should we pick the knowledge service of the cloud we already use?

It is a sensible default, because identity, networking, billing and data residency are already set up there. But treat it as a hypothesis to test in the bake-off rather than a conclusion, and put your retrieval contract in front so the choice stays reversible.

Can one knowledge layer serve both chat assistants and autonomous agents?

Yes, and it should, but with different policies. An agent that can send emails or update records should be restricted to authoritative, access-controlled sources, while a read-only assistant may search more widely. The retrieval contract is where you apply those per-caller rules.

How often should we re-run the comparison?

Re-run your evaluation set whenever you change back end, embedding model, chunking or retrieval settings, and review the platform choice at least once a year. Managed services changed substantially during 2026 and will keep changing in 2027.

Sources and methodology

Guidance reflects PoliteTech’s architecture and delivery experience and the public sources below. Product capabilities, limits and pricing structures were checked in each provider’s own announcement or documentation on the access date and change often; preview features may change before general availability. Claims about Microsoft-Retriever-1’s effect on searches, latency and tokens are vendor claims. The architecture patterns, criteria, checklists and bake-off plan are PoliteTech guidance, not findings from the sources.

  1. InfoWorld: Microsoft adds knowledge graphs, retrieval model to Foundry IQ for better AI grounding — accessed 26 November 2026. Supports the Foundry IQ knowledge graphs in public preview, ontology configuration and source recording, Microsoft-Retriever-1 and its stated aims, removal of the separate Azure AI Search requirement, and the serverless, usage-based managed service entering public preview in December 2026.
  2. Microsoft: Ignite 2026 Book of News — accessed 26 November 2026. Supports the Ignite 2026 dates, 17 to 20 November 2026.
  3. AWS: Amazon Bedrock Managed Knowledge Base is now generally available (17 June 2026) — accessed 26 November 2026. Supports the general availability date, the six native connectors, automatic syncing, managed vector storage, hybrid search, document ranking, agentic retrieval, AgentCore integration and the launch regions.
  4. Google: Gemini API File Search is now multimodal (5 May 2026) — accessed 26 November 2026. Supports multimodal indexing with Gemini Embedding 2, custom metadata filters and page-level citations.
  5. Google AI for Developers: File Search documentation — accessed 26 November 2026. Supports the pricing structure (embeddings charged at indexing, free storage and query-time embeddings, retrieved tokens charged as context), the store size recommendation of under 20 GB and the note that stored size is about three times the input.
  6. OpenAI API documentation: File search — accessed 26 November 2026. Supports file search as a hosted Responses API tool over vector stores, semantic and keyword search, file citations, metadata filtering, the result-limit parameter and that search results are not returned by default.
  7. Gartner: Survey finds only 22% of organizations have successfully scaled AI across multiple business units (1 September 2026) — accessed 26 November 2026. Supports the 22% figure and the survey of 1,303 respondents.
  8. OWASP Gen AI Security Project: LLM08:2025 Vector and Embedding Weaknesses — accessed 26 November 2026. Supports the classification of vector and embedding weaknesses as a top-ten LLM risk, including unauthorised access, data leakage and knowledge base poisoning in RAG systems.

Choosing a knowledge platform for 2027?

Tell us your sources, permission rules and first use cases. We will help you define a retrieval contract, build an evaluation set from your own questions, run a fair bake-off between managed services and a self-hosted baseline, and design a knowledge layer your assistants and agents can share.