Free · Daily brief + weekly playbookDaily 60-sec AI Voice Brief + Weekly Production AI Agent PlaybookGet the brief →
ReleaseInsight · On RadarAWS Machine Learning Blog→ original

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
Amazon Bedrock Learns to Answer Each Customer in Their Own Style from a Single Knowledge Base
Source: AWS Machine Learning Blog. Collage: Hamidun News.
Listen to article
Article Fact Sheet & Key Figures
ParameterDetails
Primary sourceAWS Machine Learning Blog ↗
Editor-in-Chief
Key metric #1The instruction is a versioned resource, and a version can be pinned to an application
Four fieldspersona, answerFormat, retrievalGuidance, answerPolicy
Key metric #3A single query searches up to five knowledge bases, and the instruction applies to all of them

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.

Story

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.

ZK
Zhemal Khamidun — Head of AI at Alpina Digital · MIPT (academic supervisor of the Tech Entrepreneurship department). Building AI products since 2019. Hamidun News is a pet project that grew into a production aggregator with 6,000+ readers.
✦ Private AI Builders Community · Vibe Club

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.

Join Vibe Club →Free intensive — waitlist
Jemal Hamidun

Editor-in-chief · Cite this analysis

Jemal Hamidun

Head of AI at Alpina Digital · Academic Supervisor of the Tech Entrepreneurship Department at MIPT

Head of AI & CPO of AlpinaGPT at Alpina Digital, Academic Lead of Tech Entrepreneurship at MIPT. Founder of Hamidun News and Vibe Academy.

Ready-to-paste citation for journalists, blogs and Telegram channels

Source: Hamidun News — Amazon Bedrock Learns to Answer Each Customer in Their Own Style from a Single Knowledge Base https://news.hamidun.com/en/news/16893/amazon-bedrock-learns-to-answer-each-customer-in-their-own-s

What do you think?
Loading comments…