Amazon Bedrock Learns to Answer Each Customer in Their Own Style from a Single Knowledge Base
The same documents serve customers in different regions and internal teams, yet they need different answers. Amazon Bedrock Managed Knowledge Base now supports retrieval instructions, which set the language, format, and answer rules for each tenant once. A customer in the Central region asking about returns gets an answer in Spanish: 45 days from delivery, followed by a source line. The instruction does not restrict document access; metadata filters are needed for that.
AI-processed from AWS Machine Learning Blog; edited by Hamidun News
Imagine one set of product and legal documents powering several assistants at once. Customers in different countries need answers in their own language, with their own date and currency formats. Support needs a short note for a ticket, and lawyers need their own wording. AWS has added retrieval instructions to Amazon Bedrock Managed Knowledge Base, which let you tailor answers for each such "tenant" without multiplying prompts across applications.
What problem this solves
Previously, you could not set the answer style for agentic retrieval, and it could change from query to query. If you needed a fixed voice or a strict format, you had to turn off answer generation, call the model yourself, and maintain a prompt in every application.
Now the rules are written once as a managed, versioned Bedrock resource, and each request simply references it. When you change an instruction, you can pin a version so that applications move to the new one when you are ready.
The instruction belongs to an AWS account and region, not to a specific knowledge base. It has four fields:
- persona: who answers, with what tone, and in what language;
- answerFormat: how the answer is structured, including how source links are formatted;
- retrievalGuidance: how the agent interprets the question and what it searches for first;
- answerPolicy: whether to answer at all and how to handle off-topic questions.
The persona, answerFormat, and answerPolicy fields work only when generateResponse=true (the default). retrievalGuidance applies in any case.
Example: a smart home across three regions
In the example, AWS uses a fictional company, AnyCompany Smart Home, which sells a controller and sensors in three regions. A shopping assistant serves all three, while support, field sales, and legal have built internal assistants on the same documents. Each region and each team counts as a separate tenant, making six in total. Each has its own instruction, pinned to version 1.
For the Central region, the instruction requires answering in Spanish, addressing customers with "usted," writing dates as day/month/year (for example, 31/12/2026), and writing amounts with a decimal comma and a currency code (for example, 5,00 USD). The last line of the answer begins with "Source:" and names the main document file.
The difference on a returns question is clear. Without an instruction, the assistant lists return windows for all regions and asks where the device was bought. With an instruction and the customer's region specified, the answer is short: 45 days from the date of delivery, in Spanish, with a source line at the end citing central-returns-addendum.md.
The instruction lifecycle works as follows. CreateRetrievalInstruction returns HTTP 202, after which Bedrock validates the fields asynchronously, and you poll for the result. If validation fails, lastTransitionStatusReasons shows the cause. After successful validation, the instruction becomes ACTIVE, and DRAFT points to its current content. The CreateRetrievalInstructionVersion command saves an immutable, numbered version. In a request, you name the instruction and, optionally, the version (DRAFT by default). The first Planning event in the trace contains appliedInstruction, which shows which version produced the response.
What the instruction does not do
AWS stresses the main limitation directly: this is not an authorization boundary and not data isolation. The instruction does not restrict which documents the agent can retrieve. On a shared knowledge base, a question from Sales Region North may return applications from the Central and South regions, and even notes that no one should see. In the example, these are two restricted engineering notes that belong to no tenant.
Therefore, access must be restricted separately, through metadata or separate knowledge bases. In the example, 32 short documents are stored in Amazon S3, and each has region, audience_team, and sensitivity metadata. The backend selects the instruction version and a metadata filter based on the authenticated tenant, and adds a short tenant line to the message. That line helps the instruction fill in values for this specific tenant, but the instruction itself does not choose those values. The same approach works with a separate knowledge base per tenant. A single request can search up to five knowledge bases, and the instruction applies to all of them.
A few technical details:
- an update replaces the instruction in full, including the description, so the required fields must be resent;
- the customerEncryptionKeyArn key can be set only at creation; it cannot be added or changed later;
- you need a recent version of Boto3, since older versions lack operations for retrieval instructions;
- AgenticRetrieveStream has no AWS CLI command and must be called through the SDK;
- the Python and TypeScript sample code is on GitHub and runs in us-east-1 by default.
What this means in practice
For teams building multi-tenant RAG products, the feature removes the homegrown prompt layer in each application. Response rules live in one place, can be rolled out one tenant at a time, and you can check the trace to see which version produced a given response. This suits SaaS providers with diverse customers and regulated companies that need a mandatory disclaimer in answerPolicy or a fixed citation format in answerFormat. A team that feeds answers into code can get strict JSON through answerFormat without a separate generation step. Security remains your responsibility, however: metadata filters, database separation, and IAM conditions based on the tenant tag.
- Nov 25, 2026AI Data Centers Push the US Toward Gas: Meta's Louisiana Site Now Plans 10 Power Stations Instead of 3
- Nov 25, 2026Amazon Is Negotiating with Meta to Let Its Muse Agent Back In, Which Accounts for 51% of Agentic Orders
- Nov 25, 2026Qwen on 5,600 AWS Lambda Functions Reads 4,000 Tokens in 17 Seconds and Costs 80x More Than Google
- Nov 25, 2026Y Combinator startup Versine gives AI agents a wallet to pay 100 people at once
Key Questions Answered
What problem this solves?
Previously, you could not set the answer style for agentic retrieval, and it could change from query to query. If you needed a fixed voice or a strict format, you had to turn off answer generation, call the model yourself, and maintain a prompt in every application. Now the rules are written once as a managed, versioned Bedrock resource, and each request simply references it. When you change an instruction, you can pin a version so that applications move to the new one when you are ready.
What are the key details on Example: a smart home across three regions?
In the example, AWS uses a fictional company, AnyCompany Smart Home, which sells a controller and sensors in three regions. A shopping assistant serves all three, while support, field sales, and legal have built internal assistants on the same documents. Each region and each team counts as a separate tenant, making six in total. Each has its own instruction, pinned to version 1.
What the instruction does not do?
AWS stresses the main limitation directly: this is not an authorization boundary and not data isolation. The instruction does not restrict which documents the agent can retrieve. On a shared knowledge base, a question from Sales Region North may return applications from the Central and South regions, and even notes that no one should see. In the example, these are two restricted engineering notes that belong to no tenant.
Ship AI Faster with Founders, Engineers & Weekly Architecture Reviews
Inside Vibe Club (hamidun.com/club) — weekly live masterminds with Zhemal Khamidun, Tech Radar, full LMS access, and 370+ production Claude Code skills.
Daily 60-sec AI Voice Brief + Weekly Production AI Agent Playbook
Listen to a 60-second AI news brief every morning and get a weekly hands-on playbook for shipping AI agents to production — tools, MCP servers and patterns that work. Curated by Jemal Hamidun, Head of AI at Alpina Digital.
