<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Tom Brovender on Medium]]></title>
        <description><![CDATA[Stories by Tom Brovender on Medium]]></description>
        <link>https://medium.com/@tbrovy?source=rss-1b6ed317ed4b------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*N5ZyrfIjnZxQgBBUVZCsoQ.jpeg</url>
            <title>Stories by Tom Brovender on Medium</title>
            <link>https://medium.com/@tbrovy?source=rss-1b6ed317ed4b------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sun, 29 Nov 2026 03:55:26 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@tbrovy/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[The Gen AI Journey: Building a Semantic Cache with ElastiCache for Valkey]]></title>
            <link>https://awstip.com/the-gen-ai-journey-building-a-semantic-cache-with-elasticache-for-valkey-c3079c59ddca?source=rss-1b6ed317ed4b------2</link>
            <guid isPermaLink="false">https://medium.com/p/c3079c59ddca</guid>
            <category><![CDATA[artificial-intelligence]]></category>
            <category><![CDATA[aws-lambda]]></category>
            <category><![CDATA[aws-bedrock-agentcore]]></category>
            <category><![CDATA[semantic-caching]]></category>
            <category><![CDATA[aws-elasticache]]></category>
            <dc:creator><![CDATA[Tom Brovender]]></dc:creator>
            <pubDate>Mon, 09 Nov 2026 07:58:25 GMT</pubDate>
            <atom:updated>2026-11-10T09:38:22.133Z</atom:updated>
            <content:encoded><![CDATA[<p><em>Making our multi-agent assistant faster by reusing answers — and knowing when not to.</em></p><p>The cheapest model call is the one we never make.</p><p>In my previous article about reusable skills, we separated agent instructions from the agents themselves. Before that, we moved from single inference to multi-agent orchestration. Each step made our internal assistant more capable, but every question still triggered input checks, routing, specialist calls, and output checks — even when someone had asked essentially the same thing before.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*9WDg9NVDgxATi5U7ajRLKw.png" /></figure><p>So we asked a different question: <strong>does every question need a new agent turn?</strong></p><h3>The same question, phrased differently</h3><p>“How do I rotate a service certificate?” and “What’s the process for renewing a service’s cert?” are different strings, but similar requests.</p><p>A conventional key-value cache misses the connection. A <strong>semantic cache</strong> embeds a question, searches for nearby stored questions, and reuses a previously approved answer when the match is safe. Unlike RAG, which retrieves documents to generate an answer, semantic caching retrieves an answer already generated.</p><p>The speed benefit is obvious. The risk is less obvious: <strong>a similar question is not always the same question.</strong></p><h3>One question, two execution paths</h3><p>We added a shared cache library to two AWS Lambda handlers serving our team-chat assistant. Each eligible request follows this path:</p><ol><li>Check whether the message can be cached.</li><li>Generate a normalized, 1,024-dimensional embedding with Amazon Titan Text Embeddings V2 through Amazon Bedrock.</li><li>Search ElastiCache for Valkey for the five nearest cached questions.</li><li>Return the first candidate passing both similarity and environment checks; otherwise run the usual agent pipeline.</li><li>Store only a genuine answer that passed the output guardrail, with a TTL.</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*tEXceKXv2DbYRJVTFUHeJA.png" /><figcaption>A cache hit returns an approved answer; a miss runs the input guardrail, orchestrator, specialist agents, and output guardrail before storing.</figcaption></figure><p>The <strong>lookup happens before</strong> guardrails and agents to avoid a full turn. The <strong>write happens after</strong> the output guardrail so an unapproved answer is never stored. A cache hit skips a fresh guardrail check, which makes eligibility and access boundaries particularly important.</p><h3>Keeping the infrastructure small</h3><p>We chose ElastiCache for Valkey rather than a separate vector database. Vector search is supported on node-based clusters from Valkey <strong>8.2</strong>; <strong>9.0</strong> adds full-text, aggregation, hybrid-search capabilities, and optional durability using a Multi-AZ transactional log.</p><p>Our index uses <strong>HNSW</strong>, <strong>FLOAT32</strong>, <strong>1,024 dimensions</strong>, and <strong>COSINE</strong> distance. A vector occupies 4,096 bytes before storing the answer and index structures, so memory sizing needs headroom. The search requests five neighbors:</p><pre># why: request five neighbours so the application can reject wrong-environment matches<br>FT.SEARCH cache_idx &quot;*=&gt;[KNN 5 @embedding $vec AS distance]&quot; \<br>  PARAMS 2 vec &lt;FLOAT32_BYTES&gt; \<br>  RETURN 3 distance answer envs DIALECT 2</pre><p>The query retrieves candidates; our Python code checks their environment metadata afterward. This is <strong>client-side post-filtering</strong>, not a Valkey pre-filter.</p><p>For an assistant shared across users and agents, I would deploy <strong>one shard with at least two nodes: one primary and one replica across separate Availability Zones</strong>, with Multi-AZ and automatic failover enabled. The primary handles cache reads and writes; a replica can be promoted if the primary fails. This improves service availability, although asynchronous replication can still lose recent cache writes during failover.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*VM6ymSLQz2j1w6hmTWF2WQ.png" /><figcaption>Two Lambda entry points, a private Valkey replication group spanning two AZs, and Bedrock inference outside the VPC.</figcaption></figure><p>The cluster stays in private subnets with <strong>TLS, encryption at rest, and restricted security-group access</strong>. Cluster-aware clients use the configuration endpoint. Cache lookup and store operations still fail open: on errors, the normal agent path answers the question rather than making the cache a dependency.</p><p>This is a <strong>production recommendation</strong>, not a claim about the original measured deployment, which used a single node without a replica. For this disposable cache, replicas primarily protect availability. Valkey 9.0’s optional transactional-log durability adds stronger data-recovery options if rebuilding cached answers becomes expensive; it is not required for the design here. <a href="https://docs.aws.amazon.com/AmazonElastiCache/latest/dg/AutoFailover.html">AWS documents Multi-AZ failover</a> and <a href="https://docs.aws.amazon.com/AmazonElastiCache/latest/dg/durability.html">durability separately</a>.</p><h3>A close match is not necessarily the right match</h3><p>Valkey’s COSINE metric returns <strong>distance</strong>, not similarity. We convert it in our application:</p><pre># why: Valkey returns distance; our application thresholds on similarity<br>similarity = 1.0 - cosine_distance</pre><p>Our Titan embeddings are normalized, which makes cosine similarity equal to their dot product. The 1 - distance conversion itself works for cosine distance even without pre-normalizing vectors. A similarity of <strong>0.90</strong> corresponds to a maximum cosine distance of <strong>0.10</strong>.</p><p>Consider two requests: “Deploy this service in staging” and “Deploy this service in production.” Their embeddings may be close, but their answers cannot safely be exchanged.</p><p>We normalize environment names and compare them with stored metadata, processing candidates nearest-first:</p><pre># why: reject a close answer when its deployment environment differs<br>for candidate in sorted(candidates, key=lambda c: c[&quot;distance&quot;]):<br>    similarity = 1.0 - candidate[&quot;distance&quot;]<br>    if similarity &lt; threshold:<br>        break  # the remaining candidates are farther away<br>    if candidate[&quot;environments&quot;] != question_environments:<br>        continue<br>    return candidate[&quot;answer&quot;]<br>return None</pre><p>If all five candidates belong to another environment, we miss — even if a valid sixth match exists. That costs another agent turn, but avoids a wrong deployment answer. Query-time metadata filtering would be a worthwhile improvement.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*mMlGTVPkVbKz6rUDhEEaHQ.png" /><figcaption>Eligibility, similarity, and environment checks determine whether a candidate becomes a hit or the request goes to the agent.</figcaption></figure><h3>Six decisions that protect the answer</h3><p>Finding neighbors is straightforward. Deciding which answers <strong>must not be reused</strong> shaped our implementation:</p><p><strong>1. Thresholds are correctness controls.</strong> A lower threshold brings more hits and more risk. We recommend evaluating <strong>0.85–0.95</strong> similarity. <a href="https://docs.aws.amazon.com/AmazonElastiCache/latest/dg/semantic-caching-best-practices.html">AWS guidance</a> suggests starting at <strong>0.90–0.95</strong>. Our threshold is configurable, but we have not formally calibrated cached-answer correctness.</p><p><strong>2. Environment is a hard boundary.</strong> We built an exact environment check after vector retrieval. Account, tenant, service, and authorization scoping would need additional design.</p><p><strong>3. Follow-ups are excluded.</strong> “What about staging?” depends on previous messages. We cache standalone questions and thread-opening messages, but neither look up nor store conversational follow-ups.</p><p><strong>4. Personal and live questions are skipped.</strong> We exclude pull-request links and likely personal questions using pattern checks, and do not store failures or “nothing found” answers. These rules are heuristics — not comprehensive protection for live or user-specific data.</p><p><strong>5. Intent normalization remains future work.</strong> We strip an identity suffix before embedding, but do not yet remove greetings or sign-offs. Normalization must never remove facts that change the answer.</p><p><strong>6. Expiry exists; an exact-match lookup does not.</strong> We use a configurable TTL, but no event-driven invalidation when a runbook changes. <a href="https://docs.aws.amazon.com/AmazonElastiCache/latest/dg/semantic-caching-best-practices.html">AWS suggests</a> starting around <strong>1–4 hours</strong> for general answers and longer for static facts. We hash normalized questions for idempotent writes, but literal repeats still pay for embedding and vector search.</p><h3>What the first traces tell us</h3><p>Across roughly <strong>11 days</strong>, we inspected <strong>76 traced answer-handler requests</strong> from one observed environment: <strong>13 hits, 47 misses, and 16 skips</strong>. The cache hit rate among requests that attempted caching was <strong>21.7%</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*bPpJl7lYDMtNaouzgouoSQ.png" /></figure><p>A hit’s observed median was about <strong>34× shorter</strong> than a miss. But this is a small, potentially sampled trace set with uneven hits over time, not a reliable long-term benchmark. The timings cover the answer handler — not end-to-end chat delivery — and <strong>do not establish answer correctness or dollar savings</strong>.</p><p>One miss scored <strong>0.918 similarity</strong> but was rejected due to an environment mismatch. That illustrates why a high score alone is insufficient.</p><h3>Final Thoughts</h3><p>Multi-agent orchestration answered <strong>which specialist should respond</strong>. Reusable skills answered <strong>how specialists share capabilities</strong>. Semantic caching asks something earlier: <strong>does this question need a new agent turn at all?</strong></p><p>Our first traces show the potential latency benefit; the two-node design is our next step toward a resilient shared cache, not a configuration used to produce those numbers. The harder engineering work is keeping a shortcut from returning an answer in the wrong context. Next, I’d validate cached-answer correctness, add an exact-match fast path, and improve invalidation and metadata filtering before optimizing for hit rate.</p><p><strong>A fast answer is useful. An answer reused in the wrong context isn’t.</strong></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c3079c59ddca" width="1" height="1" alt=""><hr><p><a href="https://awstip.com/the-gen-ai-journey-building-a-semantic-cache-with-elasticache-for-valkey-c3079c59ddca">The Gen AI Journey: Building a Semantic Cache with ElastiCache for Valkey</a> was originally published in <a href="https://awstip.com/">AWS Tip</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[The Gen AI Journey: Measuring Agent Quality with AgentCore Evaluations]]></title>
            <link>https://awstip.com/the-gen-ai-journey-measuring-agent-quality-with-agentcore-evaluations-71226b65c0a7?source=rss-1b6ed317ed4b------2</link>
            <guid isPermaLink="false">https://medium.com/p/71226b65c0a7</guid>
            <category><![CDATA[amazon-bedrock]]></category>
            <category><![CDATA[generative-ai-solution]]></category>
            <category><![CDATA[aws]]></category>
            <category><![CDATA[build-ai-agents]]></category>
            <category><![CDATA[llm-evaluation]]></category>
            <dc:creator><![CDATA[Tom Brovender]]></dc:creator>
            <pubDate>Mon, 02 Nov 2026 16:11:44 GMT</pubDate>
            <atom:updated>2026-11-16T13:30:40.438Z</atom:updated>
            <content:encoded><![CDATA[<h4><em>Tracing tells us what our agents did. Evaluation helps us understand whether they did it well.</em></h4><p>As we continue building more capable AI agents, a new challenge becomes increasingly clear: Knowing an agent gave an answer is not the same as knowing it gave the correct answer.</p><p>In my <a href="https://awstip.com/the-gen-ai-journey-using-s3-as-reusable-skills-storage-9f5787789bea">previous article on S3-backed AgentCore Skills</a>, I explored how we can move reusable procedures out of growing system prompts and make them available to specialized agents.</p><p>But giving agents more capabilities also creates more ways for things to go wrong.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*CQ9JuLgfO8ougF9H3gpIkA.png" /></figure><p>An agent might choose the wrong skill, call the wrong tool, or return a convincing answer that misses the user’s actual request. None of those necessarily produces an exception.</p><p>So how do we measure the quality of an agent’s behavior, rather than just the health of its execution?</p><p>That’s where <strong>Amazon Bedrock AgentCore Evaluations</strong> comes in.</p><h3>Moving Beyond Agent Observability</h3><h3>Traces Tell Only Part of the Story</h3><p>In a multi-agent architecture, an orchestrator receives a request and delegates work to specialized subagents. Each agent can reason, call tools, and return a response.</p><p>With OpenTelemetry, we can trace that entire flow. We can see which agent ran, which tool it selected, how long an operation took, and whether an error occurred.</p><p>What the trace cannot tell us on its own is whether the decision was good.</p><p>Imagine an infrastructure agent returning an answer based on an outdated procedure. The tool call succeeds, the model responds, and the trace looks healthy. From an operational perspective, nothing failed. From the user’s perspective, the result is wrong.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*QXTtfDXKxwgnyS_QpnkrLQ.png" /><figcaption><em>We already collect agent traces in CloudWatch. The missing piece is a quality signal derived from those traces.</em></figcaption></figure><p>This is the gap between <strong>observability</strong> and <strong>evaluation</strong>. One explains what happened; the other helps us judge the outcome.</p><h3>Understanding AgentCore Evaluations</h3><p>AgentCore Evaluations builds on the telemetry we already collect. Instead of requiring evaluation logic inside every agent, it reads compatible agent spans from CloudWatch, reconstructs the relevant interaction, and sends it to an evaluator.</p><p>It can work with agents running on AgentCore Runtime or elsewhere, provided their telemetry follows the supported format.</p><p>There are two questions to answer when defining an evaluation: <strong>what are we evaluating, and how should we score it?</strong></p><h4>Choosing the Evaluation Level</h4><p>AgentCore supports three levels:</p><ul><li><strong>Session:</strong> Evaluates a conversation across multiple turns. Did the agent achieve the user’s overall goal?</li><li><strong>Trace:</strong> Evaluates a single agent turn. Was the response relevant, helpful, or correct?</li><li><strong>Tool call:</strong> Evaluates an individual tool invocation. Did the agent choose the right tool and pass the right parameters?</li></ul><p>This distinction matters in a multi-agent system. The orchestrator might be responsible for selecting the right specialist, while a specialist is responsible for producing an accurate answer. Those are different responsibilities, so they should not be measured with the same question alone.</p><h3>Choosing the Evaluator</h3><p>AgentCore offers several ways to score behavior.</p><p><strong>Built-in evaluators</strong> are managed by AWS. For example, Builtin.Helpfulness measures how helpful a response was, while Builtin.ToolSelectionAccuracy focuses on tool choice. There are also evaluators directly relevant to reusable skills: Builtin.SkillSelectionAccuracy and Builtin.SkillInstructionFollowing.</p><p><strong>Custom LLM-as-a-judge evaluators</strong> let us define the instructions, rating scale, and Bedrock model used to judge an interaction. This becomes useful when generic correctness is not enough, and we want to measure an agent against our own expected behavior.</p><p><strong>Code-based evaluators</strong> run our evaluation logic in AWS Lambda. They are a better fit for deterministic rules, such as validating an output schema or checking whether a required field exists.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*F_4_IEpxeUYP1dFRAWlIpA.png" /><figcaption><em>The evaluator decides how to score behavior; the evaluation level decides which part of the interaction it sees.</em></figcaption></figure><p>For me, the important architectural decision is to evaluate each agent against its responsibility, not apply one general quality score to the entire system.</p><h3>Bringing Evaluation Into Production</h3><h4>Online Evaluation: Scoring Live Agent Traffic</h4><p>AgentCore’s <strong>online evaluation</strong> mode continuously samples eligible live traffic and scores it without adding evaluation calls to the agent’s request path.</p><p>An online evaluation configuration connects three things: the telemetry source, a sampling rule, and the evaluators we want to run.</p><p>The source identifies the agent’s CloudWatch log groups and its OpenTelemetry service.name. The rule determines which traffic is sampled. The evaluators define what gets measured.</p><p>For example, a Terraform configuration for an orchestrator could look like this:</p><pre>resource &quot;aws_bedrockagentcore_online_evaluation_config&quot; &quot;orchestrator&quot; {<br>  online_evaluation_config_name = &quot;orchestrator_eval&quot;<br>  evaluation_execution_role_arn = aws_iam_role.evaluation.arn<br>  enable_on_create              = true<br><br>  data_source_config {<br>    cloudwatch_logs {<br>      log_group_names = [var.orchestrator_log_group]<br>      service_names   = [var.orchestrator_service_name]<br>    }<br>  }<br><br>  evaluator { evaluator_id = &quot;Builtin.Helpfulness&quot; }<br>  evaluator { evaluator_id = &quot;Builtin.ToolSelectionAccuracy&quot; }<br><br>  rule {<br>    sampling_config {<br>      sampling_percentage = 10<br>    }<br>  }<br>}</pre><p>This illustrative configuration samples 10% of eligible traffic for the named service and applies two built-in evaluators. The IAM execution role and telemetry delivery must already be configured.</p><p>The service writes evaluation results to CloudWatch Logs. Numerical scores are also published as CloudWatch metrics, which we can visualize in GenAI Observability or monitor with alarms.</p><p>That changes the conversation. Instead of asking whether an agent is responding, we can start asking whether its helpfulness or tool-selection score is declining over time.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*x0ncrzwgn8UeeZJ2-oNqdA.png" /><figcaption><em>Agents emit telemetry, AgentCore samples and evaluates it, and the resulting scores become logs and metrics we can monitor.</em></figcaption></figure><p>There is an important prerequisite here: <strong>CloudWatch Transaction Search must be enabled</strong>, and the agent’s spans must reach the log groups that evaluation reads.</p><p>The exact telemetry destination can vary between AgentCore Runtime configurations, so we need to confirm the actual log group and service.name rather than assume them.</p><p>The execution role also needs permission to read the telemetry, run the selected evaluators, and write results. A custom LLM judge may need Bedrock model access; a code-based evaluator may require permission to invoke Lambda.</p><p>This is the part I would verify first, before investing in custom scoring logic. An evaluation configuration can exist without producing a useful quality signal if it cannot find the underlying traces.</p><h3>Keeping Evaluation Part of the Architecture</h3><p>Because we already manage the agent infrastructure with Terraform, the natural direction is to make evaluation <strong>optional per agent</strong>, rather than create a separate, manually maintained process.</p><p>An orchestrator might use goal-success and tool-selection evaluators. A specialist might use correctness, faithfulness, or tool-parameter accuracy. Shared custom evaluators could be defined once and referenced by multiple agent configurations.</p><p>There is one lifecycle detail worth planning for: when an enabled online configuration uses a custom evaluator, that evaluator is locked against changes and deletion. Updating a judge’s prompt or scale therefore needs a deliberate versioning or disable-and-update strategy.</p><p>The evaluator is becoming part of the agent’s operational contract, so its changes deserve the same care as changes to the agent itself.</p><h3>What About Testing Before Deployment?</h3><p>Online evaluation helps us observe how an agent behaves in production. It does not answer every testing question.</p><p>Sometimes we already know the expected result. We may want to confirm that an agent gives a specific answer, chooses a required tool, or follows a known sequence of steps.</p><p>For that, AgentCore also provides <strong>on-demand evaluation</strong> through the Evaluate API. We can supply collected spans alongside reference inputs such as an expected response or tool trajectory, then compare the result against a threshold in a test workflow.</p><p>Unlike online evaluation, on-demand evaluation can use ground truth. That makes it useful for controlled regression tests, while online evaluation remains focused on sampled live behavior.</p><p>I see these as two complementary feedback loops: one measures behavior before a change ships, and the other monitors what happens afterward.</p><h3>Final Thoughts</h3><p>As multi-agent systems grow, measuring their quality becomes just as important as observing their execution.</p><p>Tracing gives us visibility into delegation, model calls, and tool usage. But a successful invocation is not proof of a useful answer.</p><p>AgentCore Evaluations adds a way to score that behavior at the session, trace, or tool-call level, using built-in evaluators, custom judges, or deterministic code. Online evaluation can turn those scores into CloudWatch metrics, while on-demand evaluation supports tests against expected outcomes.</p><p>For me, the bigger value is architectural: <strong>each agent can be measured against the responsibility it was designed to handle.</strong></p><p>Instead of treating quality as something we review manually after a problem appears, we can make it a signal we monitor and test as the system evolves.</p><p>The trace tells us what the agent did. The evaluation helps us decide whether it did it well.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=71226b65c0a7" width="1" height="1" alt=""><hr><p><a href="https://awstip.com/the-gen-ai-journey-measuring-agent-quality-with-agentcore-evaluations-71226b65c0a7">The Gen AI Journey: Measuring Agent Quality with AgentCore Evaluations</a> was originally published in <a href="https://awstip.com/">AWS Tip</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[The Gen AI Journey: Using S3 as Reusable Skills Storage]]></title>
            <link>https://awstip.com/the-gen-ai-journey-using-s3-as-reusable-skills-storage-9f5787789bea?source=rss-1b6ed317ed4b------2</link>
            <guid isPermaLink="false">https://medium.com/p/9f5787789bea</guid>
            <category><![CDATA[artificial-intelligence]]></category>
            <category><![CDATA[aws-bedrock]]></category>
            <category><![CDATA[aws]]></category>
            <category><![CDATA[build-ai-agents]]></category>
            <category><![CDATA[generative-ai-solution]]></category>
            <dc:creator><![CDATA[Tom Brovender]]></dc:creator>
            <pubDate>Wed, 14 Oct 2026 10:41:32 GMT</pubDate>
            <atom:updated>2026-10-15T11:45:31.001Z</atom:updated>
            <content:encoded><![CDATA[<p>As we continue building more capable AI agents, one challenge becomes increasingly clear: managing their instructions can become just as complicated as managing the agents themselves.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*39rBnxjAJcNQx00D5UZjlA.png" /></figure><p>In my <a href="https://awstip.com/the-gen-ai-journey-from-single-inference-to-multi-agent-orchestration-5d949484be87">previous article about multi-agent orchestration</a>, I shared our journey from a single AI assistant to an architecture where an orchestrator delegates requests to specialized agents, each responsible for a particular domain.</p><p>But as our architecture evolved, another challenge emerged.</p><p>Our agents were becoming more specialized, and their system prompts were growing alongside them. Domain-specific procedures, operational instructions, and expected output formats were increasingly becoming part of the agent definitions.</p><p>This raised an interesting question:</p><p><strong>What if we could separate an agent’s responsibilities from the procedures it knows how to execute?</strong></p><p>That’s where Amazon Bedrock AgentCore skills come into play, and why I believe Amazon S3 is an interesting way to manage them.</p><h3>Moving Beyond System Prompts</h3><h4>The Problem with Growing Instructions</h4><p>Traditionally, we extend an agent’s capabilities by adding instructions to its system prompt.</p><p>That works initially, but what happens when multiple agents need the same procedures?</p><p>Do we duplicate instructions across agents? Maintain multiple versions? Update every agent when a procedure changes?</p><p>Instead, we can package reusable instructions into <strong>skills</strong>, keeping system prompts focused on agent responsibilities.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*mRmoHcr0BJzzJzfUmle75A.png" /><figcaption>Duplicating procedures across agent system prompts versus attaching a single shared skill from Amazon S3</figcaption></figure><h4>Understanding AgentCore Skills</h4><p>A skill is a directory containing a SKILL.md file and optional supporting files.</p><p>The file starts with YAML frontmatter:</p><pre>---<br>name: infrastructure-review<br>description: Use when reviewing infrastructure configurations.<br>---</pre><p>The description helps the model determine when to use the skill, while the body contains its instructions.</p><p>For example:</p><pre># Infrastructure Review<br>1. Read references/standards.md.<br>2. Review the provided configuration.<br>3. Identify issues based on the standards.<br>4. Return structured findings.</pre><p>The directory looks like this:</p><pre>infrastructure-review/<br>├── SKILL.md<br>└── references/<br>    └── standards.md</pre><p>This allows us to separate the workflow from its supporting information, without embedding everything in the system prompt.</p><h3>Why Amazon S3?</h3><p>AgentCore harnesses support skills from multiple sources, including local paths, AWS-provided skills, Git repositories, and Amazon S3.</p><p>We chose S3 because it fits naturally into our Terraform/Terragrunt-managed multi-agent architecture.</p><h4>One Skill, Multiple Agents</h4><p>Imagine development, infrastructure, and security agents that all need to follow the same security standards.</p><p>Instead of maintaining three copies of those instructions, we can store one skill in S3 and attach it to all three agents.</p><p>Each harness retrieves its configured skill, while the underlying procedure remains centrally maintained.</p><p><strong>One shared source, multiple specialized agents.</strong></p><h4>Independent Updates and CI/CD</h4><p>Another advantage is separating skill content from agent infrastructure.</p><p>Terraform defines which skills an agent receives, while S3 stores the instructions.</p><p>This means we can update an existing skill without necessarily modifying Terraform or rebuilding the agent.</p><p>We can also manage skills through CI/CD: validate their structure, review changes, publish them to S3, and run a test invocation.</p><p>S3 bucket versioning helps preserve previous file versions, while Git provides a natural place to review changes.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*0lL_fjobfOEuSE-Eg7hbLA.png" /><figcaption>Skill content is reviewed, validated and published to S3 through CI/CD, while Terraform separately defines which skills each agent receives</figcaption></figure><h4>IAM-Based Access Control</h4><p>Because skills live in S3, we can use IAM to control access.</p><p>Each agent receives permissions only for its required skill prefixes.</p><p>In our Terraform module, we derive these permissions automatically from the attached skills, avoiding separate manual policy management.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*tTITLd8yJThIzyBotDFgEw.png" /><figcaption>Multi-agent architecture using Amazon Bedrock AgentCore, with reusable skills stored in Amazon S3 and access managed through IAM and Terraform</figcaption></figure><h3>Implementing S3-Backed Skills</h3><h4>Organizing the Bucket</h4><p>Each S3 skill source points to a directory prefix ending with /, rather than an individual object.</p><p>For example:</p><pre>s3_uri = &quot;s3://my-skills-bucket/infrastructure-review/&quot;</pre><p>Our bucket structure is straightforward:</p><pre>my-skills-bucket/<br>├── infrastructure-review/<br>│   ├── SKILL.md<br>│   └── references/<br>│       └── standards.md<br>├── deployment-validation/<br>│   └── SKILL.md<br>└── documentation/<br>    └── SKILL.md</pre><p>Each skill has its own prefix, making it easy to attach and manage independently.</p><h4>Connecting Skills to the Harness</h4><p>Each harness declares its attached skills, with each entry specifying one source.</p><p>For S3-backed skills, the execution role requires:</p><ul><li>s3:GetObject to read the files.</li><li>s3:ListBucket to list the relevant prefix.</li></ul><p>Our multi-agent Terraform module derives these grants from the configured S3 sources.</p><h4>Understanding Skill Loading</h4><p>Skills are fetched once per session, during the first harness invocation.</p><p>Consequently, updating S3 content doesn’t automatically update an existing session. New sessions can retrieve the updated files.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*D8RTRRCiXuTMBldA_AuyWw.png" /><figcaption>Skills are fetched from S3 on the first invocation of a session. Existing sessions keep the version they loaded, and new sessions retrieve the updated content</figcaption></figure><p>One other distinction worth mentioning: the AgentCore registry catalogs skills, but registering a skill doesn’t automatically attach it to a harness. For our use case, direct S3 attachment is sufficient.</p><h3>Testing the Integration</h3><h4>Creating a Self-Verifying Skill</h4><p>We wanted to confirm that AgentCore could retrieve not only SKILL.md, but also its supporting files.</p><p>We created a simple test:</p><pre>skill-check/<br>├── SKILL.md<br>└── references/<br>    └── facts.md</pre><p>The skill instructed the agent to respond to a “skill check” request with exactly three lines: a success marker, the skill name, and a codename from facts.md.</p><p>If the file couldn’t be read, the agent had to return fact: UNAVAILABLE.</p><p>The codename existed only in the reference file, making the test useful for verifying that the supporting content was actually accessed.</p><h4>Uploading and Invoking</h4><p>We uploaded the directory with AWS CLI:</p><pre>aws s3 cp ./skill-check/ \<br>  s3://my-skills-bucket/skill-check/ \<br>  --recursive</pre><p>We deployed a dedicated harness with the skill attached and invoked it through the InvokeHarness API using:</p><pre>do a skill check</pre><p>For this experiment, our Terraform module explicitly named the skill in the system prompt:</p><pre>name_skill_in_prompt = true</pre><h4>Results and Takeaways</h4><p>The agent returned the expected marker and the codename stored exclusively in the supporting file.</p><p>This demonstrated that the S3-backed skill was loaded and that the agent could follow its instructions to read a relative reference file.</p><p>We haven’t tested whether explicitly naming the skill in the system prompt is necessary, only that it worked in our configuration.</p><h3>Final Thoughts</h3><p>As multi-agent systems grow, maintaining their capabilities becomes just as important as defining their responsibilities.</p><p>For me, S3-backed skills provide a practical way to keep those concerns separate.</p><p>They allow us to share procedures across agents, manage changes independently, control access through IAM, and incorporate skill delivery into existing CI/CD workflows.</p><p>Our experiment confirmed that this approach works end to end for our tested scenario, but the bigger value is architectural:</p><p><strong>Instead of building agents containing every instruction they might need, we can build focused agents that consume reusable, independently maintained capabilities.</strong></p><p>And that’s the direction I believe makes sense as our multi-agent architecture continues to grow.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=9f5787789bea" width="1" height="1" alt=""><hr><p><a href="https://awstip.com/the-gen-ai-journey-using-s3-as-reusable-skills-storage-9f5787789bea">The Gen AI Journey: Using S3 as Reusable Skills Storage</a> was originally published in <a href="https://awstip.com/">AWS Tip</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[The Gen AI Journey: From Single Inference to Multi-Agent Orchestration]]></title>
            <link>https://awstip.com/the-gen-ai-journey-from-single-inference-to-multi-agent-orchestration-5d949484be87?source=rss-1b6ed317ed4b------2</link>
            <guid isPermaLink="false">https://medium.com/p/5d949484be87</guid>
            <category><![CDATA[agentic-rag]]></category>
            <category><![CDATA[agentic-ai-architecture]]></category>
            <category><![CDATA[aws-lambda]]></category>
            <category><![CDATA[bedrock-knowledge-bases]]></category>
            <category><![CDATA[amazon-bedrock-agentcore]]></category>
            <dc:creator><![CDATA[Tom Brovender]]></dc:creator>
            <pubDate>Mon, 14 Sep 2026 06:34:36 GMT</pubDate>
            <atom:updated>2026-09-28T13:02:04.927Z</atom:updated>
            <content:encoded><![CDATA[<p>Gen AI systems rarely become complex because someone decides they need more agents. They become complex because a simple architecture eventually runs into a problem it can no longer solve cleanly. In this case, that problem wasn’t the model. It was the knowledge around it.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*o6ltGPA9jptZYG67jwmsNA.png" /><figcaption>From one shared retrieval path to an orchestrator routing requests across scoped specialists</figcaption></figure><p>The first version of the assistant had a simple shape: a request came in from Slack, one knowledge base supplied context, and one model returned an answer. I covered that architecture in the previous article, <a href="https://medium.com/aws-tip/creating-your-own-gen-ai-assistant-6b2114a7d8de"><em>Creating Your Own Gen AI Assistant</em></a>. That worked until the knowledge behind it grew across several domains with similar services, environments, and terminology. Retrieval started returning plausible documents from the wrong domain, and increasing the number of retrieved chunks only created more opportunities for near-misses. The model wasn’t hallucinating from nothing. It was hallucinating from neighboring data.</p><p>Fixing that meant splitting the knowledge by domain, but once one knowledge base becomes several, something has to decide where each request belongs. The architecture changed with it: one orchestrator owns the conversation and routing, while specialized agents answer from their own scoped knowledge bases and tools. The problem was no longer how to give one model more context. It was how to make sure the right part of the system handled the right request.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*9TeisufneTatMePUWDvcPw.png" /><figcaption>The first version: two Slack entry points, but one retrieval and inference path, each request reached the same Bedrock Knowledge Base and returned through a single model response.</figcaption></figure><h4>The middle step that wasn’t there</h4><p>The original path had a middle step: move from direct inference to Bedrock Agents, let the service manage the orchestration loop, and only introduce a multi-agent design once the boundaries were proven.</p><p>That option changed while this architecture was being built. As of July 30, 2026, Bedrock Agents became Bedrock Agents Classic and new agent creation was closed to accounts without previous service usage. For new development, AWS points toward AgentCore instead. So rather than building an intermediate architecture we would eventually replace, the design moved directly to explicit orchestration.</p><h4>The orchestrator: deciding who</h4><p>Once knowledge is split by domain, something has to decide where each request belongs. That responsibility sits with the orchestrator.</p><p>The orchestrator does not answer questions itself. It has no knowledge base of its own. Its job is to understand the request, choose the right specialist, and return that specialist’s answer without rewriting it. Routing stays separate from domain knowledge.</p><p>Conversational memory lives here as well. The orchestrator owns the thread while the specialists remain stateless, so a specialist can be replaced, invoked concurrently, or added without carrying conversation state with it.</p><p>The models differ by role too. Routing is a short but high-impact decision, so the orchestrator uses the stronger model. Specialists do longer retrieval-and-answer work on the faster model.</p><p>The supervisor knows who. The specialist knows what.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Ql8ZHCGZBbpsgWxY17c1bg.png" /><figcaption>The orchestrator owns the conversation and decides who should answer. The specialists own the domain knowledge.</figcaption></figure><h4>The specialists: one bucket, four scopes</h4><p>The bucket contract from the first version stays the same: documents are still published to one place and picked up automatically. What changes is how that knowledge is indexed.</p><p>Each specialist gets its own knowledge base over a defined set of prefixes:</p><pre>s3_inclusion_prefixes = [ <br>  &quot;docs/domain_a/&quot;, <br>  &quot;playbooks/domain_a/&quot; <br>]</pre><p>A specialist searching domain_a can no longer retrieve a similarly named document from domain_b, because that document never enters its index in the first place. The retrieval boundary is enforced before the model ever sees the context.</p><p>That also let us reduce retrieval from forty or fifty chunks to around twenty. A smaller, scoped corpus needs fewer results to cover the same question, while giving unrelated documents fewer chances to compete for relevance.</p><h4>The rules the specialists share</h4><p>Scoping removes most cross-domain mistakes, but it doesn’t solve compound questions.</p><p>A request like “deploy a service with a queue and a role” can still be dominated by whichever term matches best, leaving the other required playbooks out of retrieval.</p><p>So every specialist follows the same retrieval rules: split multi-part requests into separate searches, include prerequisite playbooks explicitly, and reject similarly named entities when they don’t match what was asked for.</p><p>These rules are composed centrally into every specialist’s instruction, so they stay consistent as domains are added or changed.</p><p>Scoping is the structural fix. The prompt is the backstop, not the other way round.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*MHwGs8tLZXzet-4YlrStAA.png" /><figcaption><em>One document bucket, four scoped knowledge bases, and separate vector indexes — keeping each specialist isolated to its own domain while letting the storage layer follow those boundaries.</em></figcaption></figure><h4>Tools without multiplying code</h4><p>Each specialist exposes two kinds of actions through the MCP gateway: delegation and knowledge-base search. With four domains that creates several logical tools, but only two Lambda implementations sit behind them.</p><p>The dispatcher resolves which specialist should receive a request, while the retriever resolves which scoped knowledge base should be searched. Both use generated mappings from the same domain list, so adding another specialist changes configuration rather than application code.</p><pre>target_harnesses = { <br>  for domain in local.domains : <br>  &quot;${domain}-agent&quot; =&gt; &quot;${local.name}_${domain}_agent&quot; <br>}</pre><p>The same pattern drives the retrieval targets.</p><p>Adding a specialist adds a boundary, not another implementation.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*_NhFx79qiETI0gobkvWXoQ.png" /><figcaption>Multiple logical tools, two shared implementations: one for delegation and one for scoped retrieval.</figcaption></figure><h4>Every hop spends someone else’s time</h4><p>With one model call, a timeout is just a setting. With an orchestrator, specialist, retrieval tool, and model call behind it, latency becomes a budget shared across the whole path.</p><p>Each downstream component needs less time than the layer calling it, so a slow retrieval or specialist failure can surface before the user-facing request expires. Otherwise the system doesn’t fail where the problem happened — it simply dies at the front door.</p><p>That is one of the less obvious costs of moving from inference to orchestration: every additional hop adds capability, but it also consumes part of someone else’s time.</p><h4>What changes?</h4><p>The feedback loop from the first version still exists: when the assistant can’t answer something, that is usually a documentation problem rather than a model problem.</p><p>What changes is that the gap now has an owner.</p><p>A request is routed before retrieval happens, so when a specialist consistently fails to answer a certain class of questions, we know which domain’s documentation needs work. Knowledge gaps stop being one shared backlog and become visible per domain.</p><p>Source repositories can continue publishing documentation through the same workflow as before. The difference is that documents now land under the prefixes belonging to their domain, and those prefixes determine which specialist can retrieve them.</p><p>That makes the architecture useful beyond answering questions. One specialist performing well while another struggles is not noise to average out — it is a map of where the organization’s knowledge is strong and where it is thin.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*OXJBGA_x-NlVCDElMyi2og.png" /><figcaption>The same documentation loop, now with ownership: unanswered questions point back to the domain that needs better coverage.</figcaption></figure><p>The first version told us the assistant didn’t know.</p><p>This one tells us who should have written it down.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=5d949484be87" width="1" height="1" alt=""><hr><p><a href="https://awstip.com/the-gen-ai-journey-from-single-inference-to-multi-agent-orchestration-5d949484be87">The Gen AI Journey: From Single Inference to Multi-Agent Orchestration</a> was originally published in <a href="https://awstip.com/">AWS Tip</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Creating your own Gen AI assistant]]></title>
            <link>https://awstip.com/creating-your-own-gen-ai-assistant-6b2114a7d8de?source=rss-1b6ed317ed4b------2</link>
            <guid isPermaLink="false">https://medium.com/p/6b2114a7d8de</guid>
            <category><![CDATA[aws-bedrock-knowledgebase]]></category>
            <category><![CDATA[slack-apps]]></category>
            <category><![CDATA[aws-guardrail]]></category>
            <category><![CDATA[aws-lambda]]></category>
            <category><![CDATA[aws-bedrock]]></category>
            <dc:creator><![CDATA[Tom Brovender]]></dc:creator>
            <pubDate>Tue, 23 Jun 2026 06:30:31 GMT</pubDate>
            <atom:updated>2026-10-14T10:28:28.622Z</atom:updated>
            <content:encoded><![CDATA[<h3>The Gen AI Journey: Creating your own Gen AI assistant</h3><h4>A Slack Application and AWS native answer to institutional knowledge</h4><p>Most institutional knowledge lives in people.</p><p>Not in wikis. Not in onboarding decks. In the engineers who happened to set up RDS that one time, in the team lead who remembers which IAM policy was carved out for that one consumer.</p><p>That works until those people are in a meeting. Or on PTO. Or already answering the same question for the third time today.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*BzBgnHmx_hF_aDz88xs4eQ.png" /></figure><p>While you can save plenty of wikis or confluence pages, there is no real track of the actual change in your product over time.</p><p>That’s the gap this architecture closes by moving knowledge from around the conversation into it.</p><h3>Starting from the AWS reference</h3><p>The starting point was <a href="https://aws.amazon.com/blogs/machine-learning/create-a-generative-ai-assistant-with-slack-and-amazon-bedrock/">AWS’s blog post</a> which talks about creating a gen ai RAG assistant.</p><p>It’s a reasonable starting point. A Slack slash command, an API Gateway, a Lambda, a Bedrock knowledge base. It works.</p><p>But it doesn’t fundamentally change how knowledge moves through an organization. It’s an /ask command pointed at a single knowledge base, deployed once. That’s a feature, not an architecture.</p><p>The shift happens when the assistant stops being a single command and starts being a layered platform, one that responds in DMs, channels, and threads, governed by the same IAM, secrets, and observability primitives as the rest of the account.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*5-50OwJAiEgD2ifA41VrAQ.png" /></figure><p>That shift starts at the entry point.</p><h3>The Slack app: deciding when</h3><p>The bot exposes two surfaces at the Slack-app level: a slash command (/ask) and a DM/@mentions listener.</p><p>Behind the scenes, both post to the same API Gateway on different paths:</p><pre>paths:<br>  /slack:<br>    post:<br>      x-amazon-apigateway-integration:<br>      uri: &quot;${dm_lambda_invoke_arn}&quot;<br>  /slack/ask:<br>    post:<br>      x-amazon-apigateway-integration:<br>      uri: &quot;${ask_lambda_invoke_arn}&quot;</pre><p>On the surface, this looks like any other API definition. But what matters here is what’s missing.</p><p>There’s no embedded logic. No retrieval rules. No prompt templates.</p><p>The API decides <strong>where</strong> requests should go and delegates everything else.</p><h3>The lambdas: deciding how</h3><p>That delegation points to two lambdas:</p><ul><li>An ask lambda handles the deliberate /ask path, slash command in, answer out.</li><li>A dm lambda handles the conversational path such as DMs, @mentions, threads, follow-ups.</li></ul><p>This is where the architecture starts to take shape. Two surfaces, one knowledge base, two response shapes. The slash command answers fast. The DM lambda holds the thread.</p><pre>inputs = {<br>  function_name = &quot;${local.service.name}-dm&quot;<br>  handler       = &quot;dm.handler&quot;<br>  environment_variables = {<br>    RAG_MODEL_ID        = dependency.inference_profiles.outputs.inference_profile_arns[&quot;sonnet-4.5&quot;]<br>    KNOWLEDGEBASE_ID    = dependency.knowledge_base.outputs.knowledge_base_id<br>    GUARD_RAIL_ID       = dependency.guardrail.outputs.guardrail_id<br>    RELEVANCE_THRESHOLD = &quot;0.4&quot;<br>  }<br>}</pre><p>Same knowledge base. Same model. Different intent. The slash command knows the user wants an answer <strong>right now</strong>; the DM lambda has to decide whether the question even needs one.</p><p>That separation is what makes the system feel native to Slack. You stop thinking in terms of “the bot” and start thinking in terms of surfaces.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*IOdiSGCw7aypH6M8sn78PA.png" /></figure><h3>Inference as a platform component</h3><p>Routing inference through Bedrock is what connects this setup to the rest of the infrastructure.</p><p>The AWS reference uses a knowledge base with `RetrieveAndGenerate`. We use the same call, but everything around it is shaped to look like every other service in the account.</p><p>The model is invoked through an inference profile — not a direct model ID, but an application-inference-profile ARN that’s governed centrally per environment:</p><pre>RAG_MODEL_ID = dependency.inference_profiles.outputs.inference_profile_arns[&quot;sonnet-4.5&quot;]</pre><p>This isn’t just about which model gets called. It’s about making inference behave like any other resource on the platform — cost allocated to the right team, usage attributed to the right service, models swapped centrally without touching application code.</p><h3>Identity and trust</h3><p>Once inference moves into the account, identity becomes part of the execution model.</p><p>Slack credentials don’t ship with the lambda code. They live in Secrets Manager:</p><pre>inputs = {<br>  name        = &quot;/config/${local.service.name}&quot;<br>  secret_keys = [<br>    &quot;slack_bot_token&quot;,<br>    &quot;slack_signing_secret&quot;,<br>  ]<br>}</pre><p>The lambdas read them at cold start. The Bedrock knowledge base assumes its own role, scoped to the source S3 bucket and the OpenSearch Serverless collection. The lambdas have a separate role, scoped to invoke the inference profile, retrieve from the knowledge base, and apply the guardrail.</p><p>These inputs don’t just configure access. They define the trust boundary of the system.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Yj-fUDiuaG_AeLUIRwzWMw.png" /></figure><h3>The knowledge base: where answers live</h3><p>Even with identity in place, the lambdas don’t define what the bot knows.</p><p>They retrieve it.</p><p>The knowledge base is backed by OpenSearch Serverless and fed by an S3 bucket. The bucket is the contract: drop a markdown file in, the KB picks it up on the next sync.</p><pre>inputs = {<br>  name           = local.service.name<br>  storage_type   = &quot;OPENSEARCH_SERVERLESS&quot;<br>  opensearch_url = dependency.opensearch_collection.outputs.collection_endpoint<br>  s3_bucket_arn  = dependency.s3.outputs.arn<br>}</pre><p>What makes this different from a wiki is the contract between the bucket and the system. The bucket tells the bot what can be retrieved and where to find it. Each document is a capability — something the bot now knows how to answer.</p><p>You’re no longer maintaining a wiki. You’re publishing knowledge.</p><h3>Shared knowledge, local context</h3><p>The knowledge base introduces a useful boundary.</p><p>The bucket holds knowledge that should be reusable — runbooks, architectural decisions, onboarding flows. Every conversation maintains its own context: the channel it happened in, the user who asked, the thread it lives in.</p><p>This separation matters. Without it, you face a familiar tradeoff: either every team gets the same generic answer, or every team forks its own bot.</p><p>The bucket handles the part that should be shared. The lambda handles the part that should stay close to the conversation. Together, they let the same system behave differently in different channels — without either side having to know about the other.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1012/1*jAJEbEloHcqznxFqQm-XPQ.png" /></figure><h3>Guardrails: deciding what not to say</h3><p>The last layer is what the bot <strong>won’t</strong> do.</p><p>A Bedrock guardrail sits between every retrieval and every response, with all six content filters set to `HIGH`:</p><pre>filters_config = [<br>  { type = &quot;SEXUAL&quot;,        input_strength = &quot;HIGH&quot;, output_strength = &quot;HIGH&quot; },<br>  { type = &quot;VIOLENCE&quot;,      input_strength = &quot;HIGH&quot;, output_strength = &quot;HIGH&quot; },<br>  { type = &quot;HATE&quot;,          input_strength = &quot;HIGH&quot;, output_strength = &quot;HIGH&quot; },<br>  { type = &quot;INSULTS&quot;,       input_strength = &quot;HIGH&quot;, output_strength = &quot;HIGH&quot; },<br>  { type = &quot;MISCONDUCT&quot;,    input_strength = &quot;HIGH&quot;, output_strength = &quot;HIGH&quot; },<br>  { type = &quot;PROMPT_ATTACK&quot;, input_strength = &quot;HIGH&quot;, output_strength = &quot;NONE&quot; },<br>]</pre><p>Blocked input returns a fixed message. Blocked output is suppressed before it leaves the lambda. Neither happens at the application layer — both are enforced inside Bedrock, which means they hold whether the lambda code is correct or not.</p><p>Trust isn’t something we hope the model honors. It’s something the platform enforces.</p><h3>What changes?</h3><p>Once the agent is wired into the conversation, something different starts to happen and it isn’t on day one.</p><p>On day one, the agent only knows what’s in the bucket. A handful of runbooks, maybe an architecture doc someone exported from Confluence. Useful, but not transformative. The first questions it can’t answer are the most valuable thing it produces.</p><p>Because every gap is a prompt to write the doc.</p><p>Someone asks how to rotate a database password. The agent doesn’t know. Someone writes a one-page runbook, drops it in the bucket, and the next person who asks gets an answer in-thread. The conversation that used to interrupt three engineers becomes a single sync that benefits everyone who asks afterwards.</p><p>That’s the loop. The agent’s knowledge base is not a static export of the wiki. It’s a living surface that grows every time a question reveals a missing answer.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*d_B2m4AgfnFkd68FYIJ0GQ.png" /></figure><p>Over time, the compounding effect is the whole point.</p><p>The first month, the agent answers maybe a third of the questions in the channel. The second month, two-thirds but not because the model got smarter, but because the knowledge base got denser. The questions the agent can’t answer become rarer and more interesting, which is exactly the kind of question a human should be answering anyway.</p><p>The agent doesn’t replace human expertise. It absorbs the parts of it that should have been written down already, and frees humans to spend time on the parts that genuinely need judgment.</p><p>Instead of fielding the same five questions every week, engineers field the five questions nobody has thought of yet.</p><p>The agent handles recall. Humans handle the questions that haven’t been answered before and turning their answers into the next document the agent will retrieve.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*STNUVGjnG6tZpv5h_ph-yA.png" /></figure><p>At that point, the question changes, it’s no longer:</p><blockquote><em>Who knows this?</em></blockquote><p>It becomes:</p><blockquote><em>Has the agent learned this yet?</em></blockquote><p>And if it hasn’t that’s the next document worth writing.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=6b2114a7d8de" width="1" height="1" alt=""><hr><p><a href="https://awstip.com/creating-your-own-gen-ai-assistant-6b2114a7d8de">Creating your own Gen AI assistant</a> was originally published in <a href="https://awstip.com/">AWS Tip</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Claude Code PR Reviewer with AWS Bedrock]]></title>
            <link>https://awstip.com/claude-code-pr-reviewer-with-aws-bedrock-1a38428d0e26?source=rss-1b6ed317ed4b------2</link>
            <guid isPermaLink="false">https://medium.com/p/1a38428d0e26</guid>
            <category><![CDATA[aws-bedrock]]></category>
            <category><![CDATA[platform-engineering]]></category>
            <category><![CDATA[claude-code]]></category>
            <category><![CDATA[devops]]></category>
            <category><![CDATA[github-actions]]></category>
            <dc:creator><![CDATA[Tom Brovender]]></dc:creator>
            <pubDate>Mon, 18 May 2026 11:43:20 GMT</pubDate>
            <atom:updated>2026-05-19T08:37:20.025Z</atom:updated>
            <content:encoded><![CDATA[<h4>Building a Reasoning Layer on GitHub Actions</h4><p>Code review is where most engineering standards actually live.</p><p>Not in linters. Not in CI checks but in people.</p><p>That works until it doesn’t. Standards drift. Refactoring becomes optional. The quality of a pull request depends less on the code itself and more on who happens to review it, and how much time they have.</p><p>We’ve spent years improving how systems execute code. We’ve barely touched how systems evaluate it.</p><p>That’s the gap this architecture closes, by moving reasoning from around the workflow into it.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*4rB2J3TVjE3A8WLwSncs-w.png" /></figure><h3>From around the system to inside it</h3><p>Most teams start with a simple idea: run AI on pull requests.</p><p>It’s a reasonable starting point, but it doesn’t fundamentally change the system. Reasoning still sits outside the workflow, reacting to it rather than shaping it.</p><p>The shift happens when reasoning is no longer something that happens <strong><em>around</em></strong> the system but <strong><em>inside</em></strong> it.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/715/1*TMfRMJM9nbTX7k_G0Oq2BA.png" /><figcaption>Before vs After</figcaption></figure><p>That shift starts at the repository.</p><h3>The repository: deciding when</h3><p>The entry point looks familiar. A workflow triggers on pull request events or an explicit @claude comment:</p><pre>claude-review:<br>  if: |<br>    (github.event_name == &#39;issue_comment&#39; &amp;&amp; contains(github.event.comment.body, &#39;@claude&#39;)) ||<br>    (github.event_name == &#39;pull_request&#39; &amp;&amp; github.actor != &#39;dependabot[bot]&#39; &amp;&amp; (github.event.action == &#39;opened&#39; || github.event.action == &#39;ready_for_review&#39;))<br>  uses: &lt;your org&gt;/&lt;workflows repo&gt;/.github/workflows/claude-review.yaml@main<br>  secrets: inherit<br>  with:<br>    pr-number: ${{ github.event.pull_request.number || github.event.issue.number }}<br>    ref: ${{ github.event.pull_request.head.ref }}<br>    repository: ${{ github.event.pull_request.head.repo.full_name }}<br>    plugin: &lt;chosen-plugin&gt;@&lt;plugins-repo&gt;<br>    skill: &lt;skill-name&gt;</pre><p>On the surface, this looks like any other job definition. But what matters here is what’s missing.</p><p>There’s no embedded logic. No rules. No prompts.</p><p>The repository decides <strong><em>when</em></strong> reasoning should happen and delegates everything else.</p><h3>The reusable workflow: deciding how</h3><p>That delegation points to a reusable workflow:</p><pre>uses: &lt;your org&gt;/&lt;workflows repo&gt;/.github/workflows/claude-review.yaml@main</pre><p>This is where the architecture starts to take shape. Instead of copying logic across repositories, every project routes through a shared execution layer.</p><p>Repositories define when reasoning should happen. The reusable workflow defines how it actually works.</p><p>That separation is what makes the system maintainable. You stop thinking in terms of individual workflows and start thinking in terms of a platform capability.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*tSBsJGcvCkXRGK1Zwrsb4A.png" /><figcaption>Trigger flow</figcaption></figure><h3>The action: where layers converge</h3><p>Inside the reusable workflow, the Claude Code Action becomes the convergence point:</p><pre>uses: anthropics/claude-code-action@&lt;version&gt;<br>with:<br>  use_bedrock: &quot;true&quot;<br>  claude_args: ${{ steps.claude-args.outputs.args }}<br>  plugin_marketplaces: ${{ vars.PLUGIN_MARKETPLACE }}<br>  plugins: ${{ inputs.plugin }}</pre><p>At this point, several layers meet at once. The infrastructure layer determines where inference runs. The plugin layer defines what capabilities are available. The runtime configuration shapes how the model behaves.</p><p>The workflow is no longer a sequence of steps. It becomes a composition of concerns.</p><h4>Inference as a platform component</h4><p>Routing inference through Amazon Bedrock is what connects this setup to the rest of your infrastructure.</p><blockquote><strong>Note:</strong> Toggling use_bedrock or specifying the Bedrock model ARN on its own won’t work. Both are required for the invocation to succeed.</blockquote><p>This isn’t just about avoiding direct API calls. It’s about making inference behave like any other part of your platform which is governed by the same identity, networking, and observability primitives as everything else running in your account.</p><h3>Identity and trust</h3><p>Once inference moves into AWS, identity becomes part of the execution model.</p><p>Before the action runs, the workflow establishes who it is and what it can access.</p><p>For AWS, that means assuming a role:</p><pre>- uses: aws-actions/configure-aws-credentials@v4<br>  with:<br>    role-to-assume: ${{ vars.AWS_BEDROCK_ROLE }}<br>    aws-region: &lt;region&gt;</pre><p>For GitHub, it means authenticating through a GitHub App:</p><pre>- name: Authenticate GitHub App<br>  id: auth<br>  uses: actions/create-github-app-token@v1<br>  with:<br>    app-id: ${{ vars.CLAUDE_GITHUB_APP_ID }}<br>    private-key: ${{ secrets.CLAUDE_GITHUB_APP_PRIVATE_KEY }}<br>    repositories: |<br>      &lt;plugins-repo&gt;</pre><p>That token is then passed into the environment of the action itself:</p><pre>uses: anthropics/claude-code-action@&lt;version&gt;<br>env:<br>  GH_TOKEN: ${{ steps.auth.outputs.token }}<br>with:<br>  use_bedrock: &quot;true&quot;<br>  claude_args: ${{ steps.claude-args.outputs.args }}</pre><p>From here on, nothing re-authenticates. Everything inherits.</p><p>These inputs don’t just configure access. They define the trust boundary of the system.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*uf9TUVSWntpsvpAZZb6RWg.png" /><figcaption>Trust boundaries</figcaption></figure><h3>The marketplace: where capabilities live</h3><p>Even with identity in place, the workflow still doesn’t define behavior.</p><p>It loads it:</p><pre>plugin_marketplaces: ${{ vars.PLUGINS_MARKETPLACE_REPO }}<br>plugins: &lt;chosen-plugin&gt;@&lt;plugins-repo&gt;<br>prompt: /&lt;skill-name&gt; review my pull request</pre><p>This is where the model stops being generic. Plugins define what the system knows how to do. Skills define what it should do right now.</p><p>To make this scalable, plugins are organized into a marketplace. A good reference implementation is the <a href="https://github.com/mrlm-xyz/demo-claude-marketplace">demo-claude-marketplace</a> repository made by <a href="https://github.com/mrlm-xyz">mrlm-xyz</a>.</p><p>What makes a marketplace different from a regular repository is its structure. At the root, a manifest defines what exists:</p><pre>{<br>  &quot;name&quot;: &quot;demo-marketplace&quot;,<br>  &quot;plugins&quot;: [<br>    {<br>      &quot;name&quot;: &quot;data-toolkit&quot;,<br>      &quot;source&quot;: &quot;./claude-plugins/data-toolkit&quot;<br>    },<br>    {<br>      &quot;name&quot;: &quot;api-guardian&quot;,<br>      &quot;source&quot;: &quot;./claude-plugins/api-guardian&quot;<br>    }<br>  ]<br>}</pre><p>That file acts as the contract between the marketplace and the system. It tells Claude Code what can be loaded and where to find it.</p><p>Each plugin then packages capabilities:</p><ul><li>agents</li><li>commands</li><li>skills</li><li>integrations</li></ul><p>You’re no longer distributing prompts. You’re distributing behavior.</p><h3>Shared capabilities, local context</h3><p>The marketplace introduces a useful boundary.</p><p>Plugins define reusable capabilities that can move across teams and repositories. At the same time, each repository maintains its own context — typically through a CLAUDE.md file that captures architecture, conventions, and domain-specific details.</p><p>This separation matters. Without it, you face a familiar tradeoff: either every team gets the same generic review or every team forks its own logic.</p><p>The marketplace handles the part that should be shared. CLAUDE.md handles the part that should stay close to the codebase. Together, they let the same system behave differently in different repositories — without either side having to know about the other.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/787/1*3MifP9p0-AMAHA01_20I6w.png" /><figcaption>Shared resources vs local ones</figcaption></figure><h3>What changes?</h3><p>Once reasoning becomes part of the workflow, something fundamental shifts.</p><p>Before this, standards live outside the system. They depend on reviewers to notice issues, suggest improvements, and enforce consistency. That process is inherently uneven while some things get caught, others don’t, and the outcome varies from one pull request to another.</p><p>When reasoning moves into the workflow, that variability starts to disappear.</p><p>Standards are no longer applied manually. They are evaluated automatically, at the same moment code is introduced. Refactoring stops being something you hope a reviewer will suggest, it becomes something the system can surface consistently. Documentation and testing are no longer afterthoughts they can be assessed alongside the code itself.</p><p>This doesn’t replace human review. It changes its role.</p><p>Instead of spending time on repetitive checks and obvious issues, reviewers can focus on higher-level concerns: architecture, tradeoffs, and intent.</p><p>The system handles consistency. Humans handle judgment.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*8b2PvvkaTbFT77n8vNpJYA.png" /><figcaption>Full architecture</figcaption></figure><p>And because this layer is built from reusable workflows and versioned plugins, it behaves like the rest of your system: it can be updated centrally, versioned, and rolled out gradually. It’s not a one-off integration. It’s a layer you can operate.</p><p>Over time, that consistency compounds. Teams stop asking whether something will be reviewed — they assume it will be evaluated. Expectations become clearer. Feedback becomes more immediate.</p><p>At that point, the question changes.</p><p>It’s no longer:</p><blockquote><strong><em>Who reviewed this?</em></strong></blockquote><p>It becomes:</p><blockquote><em>What system evaluated it?</em></blockquote><p>And with that shift, standards stop being guidelines. They become part of the system itself.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=1a38428d0e26" width="1" height="1" alt=""><hr><p><a href="https://awstip.com/claude-code-pr-reviewer-with-aws-bedrock-1a38428d0e26">Claude Code PR Reviewer with AWS Bedrock</a> was originally published in <a href="https://awstip.com/">AWS Tip</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[AWS Bedrock Guardrails: Moving AI Safety Into the Infrastructure Layer]]></title>
            <link>https://awstip.com/aws-bedrock-guardrails-moving-ai-safety-into-the-infrastructure-layer-672c1edd1447?source=rss-1b6ed317ed4b------2</link>
            <guid isPermaLink="false">https://medium.com/p/672c1edd1447</guid>
            <category><![CDATA[aws]]></category>
            <category><![CDATA[aws-bedrock-guardrails]]></category>
            <category><![CDATA[aws-lambda]]></category>
            <category><![CDATA[aws-bedrock]]></category>
            <dc:creator><![CDATA[Tom Brovender]]></dc:creator>
            <pubDate>Mon, 09 Mar 2026 10:32:01 GMT</pubDate>
            <atom:updated>2026-03-10T07:28:15.809Z</atom:updated>
            <content:encoded><![CDATA[<h4>Why safety policies belong in the platform, not inside every application</h4><p>The models themselves are powerful, but their behavior is not deterministic. Even when prompts are carefully designed and context is tightly controlled, models can still produce responses that an application should not allow. For many early systems the solution was straightforward: enforce safety in the application layer.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*kbwY5Rs0n40sbPft09unfw.png" /></figure><p>Developers added moderation APIs, filtering logic, and validation rules after the model produced a response. The model generated output, and the application decided whether the result should be allowed to reach the user.</p><p>This approach works, but it introduces a subtle architectural issue.</p><p>Safety becomes <strong>application logic</strong>, not part of the AI system itself.</p><h3>Safety as Application Logic</h3><p>In many early LLM architectures the safety boundary lives inside the application layer.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*P_W4QRo3hl8j2a1UIVdxPw.png" /></figure><p>The application constructs the prompt, invokes the model, receives the response, and only then evaluates whether that response should reach the user. In practice the application ends up owning almost everything: prompt construction, model invocation, filtering logic, and moderation policies.</p><p>A simplified version of that pattern often looks like this:</p><pre>response = invoke_model(prompt)<br><br>if violates_policy(response):<br>    return &quot;Sorry, I can&#39;t answer that.&quot;<br><br>return response</pre><p>As long as a single service interacts with the model, this approach is manageable. But once multiple teams begin building AI features, the same filtering logic begins to appear everywhere. Each service implements its own rules, its own thresholds, and its own interpretation of what a safe response should look like.</p><p>Over time, safety policies begin to drift across the system.</p><h3>Moving the Boundary</h3><p>Amazon Bedrock Guardrails introduce a different architectural boundary.</p><p>Instead of embedding safety logic inside every application that calls a model, guardrails allow policy enforcement to sit directly in the model interaction layer.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/875/1*4lGKZsFeb7IhdlkC3PVO8g.png" /></figure><p>The application still sends a request to a foundation model, but now both the request and the response pass through a defined policy layer. Guardrails evaluate the interaction according to rules defined at the platform level rather than inside individual services.</p><p>At first glance this might appear like a small change. The application still invokes a model in the same way it always has. But the responsibility for enforcing safety policies has moved.</p><p>Instead of being scattered across application code, those policies now live alongside the model interaction itself.</p><p>That shift introduces a much cleaner architectural separation between application behavior, model behavior, and safety enforcement.</p><h3>Safety Becomes a Platform Capability</h3><p>Once safety policies move into the model interaction layer, the system begins to behave differently.</p><p>Policies become centralized rather than duplicated. Failures become easier to interpret because enforcement happens at a known control point. And the architecture becomes significantly more flexible.</p><p>Modern AI systems rarely rely on a single model. Different models may handle reasoning, summarization, classification, or extraction tasks. When filtering logic lives inside the application, every new model integration requires its own safety implementation.</p><p>Guardrails remove that duplication.</p><p>The same safety policies can apply regardless of which model is used.</p><h3>Guardrails as Infrastructure</h3><p>One of the more interesting aspects of guardrails is that they do not need to be defined inside applications at all.</p><p>In many environments they are created as <strong>infrastructure resources</strong>.</p><p>Instead of each service defining its own safety rules, a shared guardrail can be provisioned once and exposed to the rest of the platform. From that point forward, services do not define safety policies. They simply reference them.</p><p>Conceptually the lifecycle looks something like this:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*pGPMdCFbrj-xTp3Ypxe_UA.png" /></figure><p>A simplified infrastructure configuration might look like this:</p><pre>inputs = {<br>  create_guardrail = true<br>  guardrail_name   = &quot;shared-default-guardrail&quot;<br><br>  blocked_input_messaging   = &quot;The model cannot answer this request.&quot;<br>  blocked_outputs_messaging = &quot;The model cannot answer this request.&quot;<br><br>  filters_config = [<br>    { type = &quot;VIOLENCE&quot;, input_strength = &quot;HIGH&quot;, output_strength = &quot;HIGH&quot; },<br>    { type = &quot;HATE&quot;, input_strength = &quot;HIGH&quot;, output_strength = &quot;HIGH&quot; },<br>    { type = &quot;SEXUAL&quot;, input_strength = &quot;HIGH&quot;, output_strength = &quot;HIGH&quot; }<br>  ]<br>}</pre><p>The guardrail becomes part of the platform, just like a database endpoint or an API gateway.</p><p>Applications do not define the safety policy. They consume it.</p><h3>Access Control Becomes Part of the Safety Model</h3><p>Once guardrails are treated as infrastructure, access control becomes part of the design.</p><p>A service might have permission to invoke a model:</p><pre>actions = [<br>  &quot;bedrock:InvokeModel&quot;,<br>  &quot;bedrock:InvokeModelWithResponseStream&quot;<br>]</pre><p>But applying a guardrail requires an additional permission:</p><pre>actions = [<br>  &quot;bedrock:InvokeModel&quot;,<br>  &quot;bedrock:InvokeModelWithResponseStream&quot;,<br>  &quot;bedrock:ApplyGuardrail&quot;<br>]</pre><p>This distinction is important.</p><p>The platform controls <strong>which services are allowed to enforce which safety policies</strong>.</p><p>The application no longer decides whether safety exists.</p><h3>Applying Guardrails at Runtime</h3><p>Even when guardrails are provisioned through infrastructure, they are applied during the model invocation itself.</p><p>From the application’s perspective the interaction still looks like a normal model call. The only difference is that the request references a guardrail that already exists.</p><pre>import boto3<br>import json<br><br>client = boto3.client(&quot;bedrock-runtime&quot;)<br><br>response = client.invoke_model(<br>    modelId=&quot;model-id&quot;,<br>    contentType=&quot;application/json&quot;,<br>    accept=&quot;application/json&quot;,<br>    body=json.dumps({<br>        &quot;messages&quot;: [<br>            {&quot;role&quot;: &quot;user&quot;, &quot;content&quot;: &quot;Summarize this document&quot;}<br>        ]<br>    }),<br>    guardrailIdentifier=&quot;shared-guardrail-id&quot;,<br>    guardrailVersion=&quot;1&quot;<br>)</pre><p>The application does not implement the filtering logic itself.</p><p>The platform enforces the policy automatically.</p><h3>Guardrails in Retrieval-Augmented Systems</h3><p>The same architectural idea becomes even more interesting when working with retrieval-augmented generation.</p><p>When using Amazon Bedrock Knowledge Bases, the system retrieves relevant documents and injects them into the model context before generation occurs. Guardrails can operate across this entire flow.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Q4jRsE5PQLa3uxEKOxkt3Q.png" /></figure><p>The request passes through the guardrail layer, the system retrieves context from the knowledge base, and the resulting model response is evaluated against the same policy before reaching the user.</p><p>This ensures that safety policies remain consistent even when responses depend on retrieved knowledge.</p><h3>Guardrails Are Not a Replacement for Good System Design</h3><p>Guardrails are powerful, but they do not replace good architecture.</p><p>Prompt design still matters. Retrieval pipelines still require validation. Applications still need to define how model outputs are consumed.</p><p>Guardrails act as a <strong>policy enforcement checkpoint</strong>, ensuring model interactions stay within defined boundaries.</p><h3>A Small Feature With Large Architectural Consequences</h3><p>At first glance, guardrails may look like just another moderation feature.</p><p>Architecturally, they represent something more significant. They move safety from an application concern into a platform concern.</p><p>Once safety becomes part of the platform, AI systems can scale across teams, services, and models without duplicating policy logic everywhere.</p><p>The model still generates responses and the application still decides how to use them, but the platform defines the boundaries.</p><p>In the next article, we’ll take this a step further and walk through how these pieces come together in a simple AI system built on Bedrock — connecting guardrails, retrieval, and model invocation into a working architecture.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=672c1edd1447" width="1" height="1" alt=""><hr><p><a href="https://awstip.com/aws-bedrock-guardrails-moving-ai-safety-into-the-infrastructure-layer-672c1edd1447">AWS Bedrock Guardrails: Moving AI Safety Into the Infrastructure Layer</a> was originally published in <a href="https://awstip.com/">AWS Tip</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Bedrock Knowledge Base: Rethinking Model Context]]></title>
            <link>https://awstip.com/bedrock-knowledge-base-rethinking-model-context-e64adfb44bd4?source=rss-1b6ed317ed4b------2</link>
            <guid isPermaLink="false">https://medium.com/p/e64adfb44bd4</guid>
            <category><![CDATA[ai-engineering]]></category>
            <category><![CDATA[amazon-bedrock]]></category>
            <category><![CDATA[bedrock-knowledge-bases]]></category>
            <category><![CDATA[aws]]></category>
            <category><![CDATA[retrieve-augment-generate]]></category>
            <dc:creator><![CDATA[Tom Brovender]]></dc:creator>
            <pubDate>Sun, 22 Feb 2026 16:56:12 GMT</pubDate>
            <atom:updated>2026-03-09T08:18:41.382Z</atom:updated>
            <content:encoded><![CDATA[<p>Amazon Bedrock Knowledge Base is often introduced as a convenient way to implement Retrieval-Augmented Generation (RAG) on AWS.</p><p>But treating it as an application-level feature misses the real shift.</p><p>A Knowledge Base is not something you “add” to a model. When you adopt RAG through Bedrock, you are embedding retrieval into your infrastructure. Context stops being something dynamically constructed inside a prompt and becomes something engineered, versioned, governed, and served.</p><p>That distinction matters.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*smWPlfK2gWqKq-lbQzaWwQ.png" /></figure><p>Because once retrieval becomes infrastructure, the model is no longer responsible for figuring out what knowledge to consider. The system is.</p><p>And that boundary — between model reasoning and system responsibility — is what determines whether your architecture scales cleanly or collapses under prompt complexity.</p><h3>Traditional Context: Let the Model Figure It Out</h3><p>In many early LLM systems, retrieval is informal.</p><p>Documents are fetched. Text is appended to a prompt. The model receives everything at once and is expected to identify what matters. At small scale, this feels efficient. There are few components and little orchestration.</p><p>But the simplicity is deceptive.</p><p>As document size increases, context grows linearly with it. Token consumption becomes unstable. Latency increases because the model processes far more text than it needs. Truncation becomes unavoidable as context windows are exceeded. And when responses degrade, debugging becomes opaque because filtering and reasoning are entangled inside a single prompt.</p><p>The model ends up doing two fundamentally different jobs at the same time:</p><ul><li>Filter knowledge</li><li>Reason over knowledge</li></ul><p>Those responsibilities should not live in the same layer.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*GFNmW-WEc12wRlxDwdiLVg.png" /></figure><p>When filtering and reasoning collapse into one step, complexity accumulates inside prompts. The architecture may look simple, but its behavior becomes unpredictable.</p><h3>Retrieval as a System Responsibility</h3><p>Bedrock Knowledge Base formalizes a different boundary.</p><p>Instead of pushing documents into prompts and asking the model to sift through them, documents are ingested, chunked, embedded, and stored in a vector index backed by OpenSearch Serverless.</p><p>When a query arrives, it is embedded using a foundation embedding model, producing fixed-dimension vectors. The vector store performs similarity search against previously embedded chunks. Only the most relevant matches are selected and injected into the model’s context.</p><p>The model no longer filters knowledge.</p><p>The system does.</p><p>That shift is subtle, but it is foundational. Filtering becomes deterministic and infrastructure-driven. Reasoning becomes focused and bounded. Context stops scaling with document size and starts scaling with relevance.</p><p>This is not an optimization.</p><p>It is a reallocation of responsibility.</p><h3>Traditional vs RAG</h3><p>The architectural difference becomes clearer when visualized.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*WlBMRCugO2CGo-ftoU-gBA.png" /></figure><p>On the left, large prompts push raw context into the model and rely on it to extract signal from noise. The model acts as both retriever and reasoner, and the prompt becomes the place where complexity accumulates.</p><p>On the right, embeddings and vector search act as a filtering layer before reasoning begins. Retrieval is handled by the system. The model receives curated context and focuses solely on generating output.</p><p>The difference is not about optimization.</p><p>It is about responsibility.</p><h3>Managed Does Not Mean Simple</h3><p>Bedrock Knowledge Base abstracts retrieval orchestration, but it does not remove infrastructure complexity.</p><p>Creating a knowledge base requires an IAM role trusted by Bedrock, an OpenSearch Serverless vector collection, encryption and network policies, data access rules, and a vector index configured with the correct dimension and field mappings. Index creation must account for eventual consistency. Ingestion requires parsing and chunking configuration. If storage is encrypted, decryption permissions must be granted appropriately.</p><p>Vector storage is deterministic but unforgiving. A dimension mismatch between embedding model and index breaks retrieval. An index created too early fails provisioning. An incomplete IAM policy blocks ingestion.</p><p>If every team wires this independently, the platform fragments.</p><p>So instead of treating retrieval as a pattern, we made it as part of our infrastructure.</p><h3>RAG as Infrastructure, Not Application Logic</h3><p>We encapsulated the entire Knowledge Base configuration into a reusable Terragrunt module. From an application team’s perspective, enabling retrieval requires only three inputs:</p><pre>terraform {<br>  source = &quot;${get_repo_root()}/modules/bedrock/knowledge-base&quot;<br>}<br><br>dependency &quot;kb_role&quot; {<br>  config_path = &quot;../iam-role&quot;<br>}<br><br>dependency &quot;s3_bucket&quot; {<br>  config_path = &quot;../s3/bucket&quot;<br>}<br><br>inputs = {<br>  name          = local.service.name<br>  role_arn      = dependency.kb_role.outputs.role_arn<br>  s3_bucket_arn = dependency.s3_bucket.outputs.bucket_arn<br>}</pre><p><strong>That minimal interface is intentional.</strong></p><p>Internally, the module creates the vector collection, configures the index with correct dimension alignment, applies encryption and network policies, attaches required IAM permissions, and defines ingestion defaults. Advanced parsing or chunking strategies can still be specified, but they are validated and controlled rather than improvised per service.</p><p>Retrieval remains flexible, but it is no longer ad hoc.</p><h3>What Actually Changed</h3><p>The most visible improvements were operational. Prompt size stopped scaling with document size. Costs became predictable instead of fluctuating with every request. Latency flattened because the model was no longer processing entire documents unnecessarily. Context truncation, once a recurring edge case, largely disappeared.</p><p>But those were surface-level outcomes.</p><p>The deeper change was structural.</p><p>The model stopped filtering knowledge. It now focuses exclusively on reasoning over already curated context. Retrieval happens before inference, not during it. That separation simplifies debugging because failures can be isolated to either retrieval or reasoning. It improves observability because vector search becomes measurable infrastructure rather than invisible prompt behavior. It stabilizes system design because context is bounded by relevance rather than document length.</p><p>The model did not become smarter, instead its responsibilities became narrower and narrower responsibilities scale better.</p><h3>The Architectual Design</h3><p>The system now follows a disciplined flow. Documents are stored in object storage and ingested into the knowledge base. During ingestion, they are chunked into manageable segments and embedded into fixed-dimension vectors. Those vectors are stored in a managed vector collection.</p><p>When a query arrives, it is embedded in the same way and compared against stored vectors. The system retrieves only the most relevant chunks and injects them into the model’s context before inference begins.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*UXr7XvwfrdKJv76Kzr0HJA.png" /></figure><p>The model is no longer overloaded with raw documents. It receives curated context and performs focused reasoning.</p><p>Nothing about the model changed.</p><p>The system did.</p><h3>Why This Matters</h3><p>When people talk about RAG, the conversation usually centers on tools — embedding models, vector databases, chunk sizes.</p><p>Those decisions matter. But they’re not the real shift.</p><p>The real question is where responsibility lives.</p><p>If the model is responsible for filtering context, prompts quietly become orchestration layers. Retrieval logic hides inside text. Scaling becomes fragile because complexity accumulates in places that are hard to observe or test. When something breaks, you’re debugging wording instead of infrastructure.</p><p>If the system is responsible for retrieval, the boundary becomes clear. Retrieval is deterministic and observable. The model receives curated context and focuses on reasoning. Filtering and generation are no longer entangled.</p><p>That is what Bedrock Knowledge Base formalizes. It doesn’t make models smarter but it makes architectures cleaner.</p><h3>What Comes Next</h3><p>Retrieval solves relevance. It ensures the model sees the right information at the right time.</p><p>But relevance is only half of production AI.</p><p>The next boundary is control.</p><p>How do you enforce policy consistently? How do you prevent unsafe outputs? How do you protect sensitive data without embedding those rules inside fragile prompts?</p><p>These aren’t retrieval problems. They’re constraint problems.</p><p>In the next article, we’ll look at Bedrock Guardrails as a structural control layer around inference. If Knowledge Base moves retrieval out of the prompt, Guardrails move policy enforcement out of it as well.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*hQc8V5VpbqZqhgeYE9N3EQ.png" /></figure><p>Because organizing context is only half the architectural shift.</p><p>The other half is constraining behavior — deliberately, explicitly, and at the system level.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e64adfb44bd4" width="1" height="1" alt=""><hr><p><a href="https://awstip.com/bedrock-knowledge-base-rethinking-model-context-e64adfb44bd4">Bedrock Knowledge Base: Rethinking Model Context</a> was originally published in <a href="https://awstip.com/">AWS Tip</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Inference Profiles vs Agentic Flows]]></title>
            <link>https://awstip.com/inference-profiles-vs-agentic-flows-how-amazon-bedrock-is-reshaping-ai-architecture-7c390217e55c?source=rss-1b6ed317ed4b------2</link>
            <guid isPermaLink="false">https://medium.com/p/7c390217e55c</guid>
            <category><![CDATA[bedrock-flow]]></category>
            <category><![CDATA[aws]]></category>
            <category><![CDATA[devops]]></category>
            <category><![CDATA[amazon-bedrock]]></category>
            <category><![CDATA[artificial-intelligence]]></category>
            <dc:creator><![CDATA[Tom Brovender]]></dc:creator>
            <pubDate>Mon, 05 Jan 2026 13:40:20 GMT</pubDate>
            <atom:updated>2026-01-06T08:57:40.447Z</atom:updated>
            <content:encoded><![CDATA[<h4>How is AWS Bedrock reshaping AI architecture</h4><p>Amazon Bedrock is often described as a managed way to access foundation models on AWS. That description is technically correct, but it misses the more important shift that Bedrock introduces.</p><p>Bedrock is not just another inference surface. It is quietly pulling AI inference out of the traditional ML platform boundary and placing it directly into application architecture. That change affects how systems are designed, how responsibilities are divided, and how much intelligence we actually want models to have.</p><p>Once you start building real systems on top of Bedrock, one question keeps coming up:</p><p><strong>Am I just invoking a model, or am I orchestrating reasoning?</strong></p><p>The answer determines whether you should be thinking in terms of inference profiles or agentic flows.</p><h3>Why Bedrock Is Becoming a Core Part of Development</h3><p>Historically, AI inference on AWS lived behind a clear separation of concerns. Models were trained, deployed, and exposed through managed endpoints, usually owned by a dedicated ML or data team. Application engineers treated those endpoints as external dependencies.</p><p>Bedrock breaks that pattern.</p><p>With Bedrock, inference is no longer something you “integrate with” but something you call directly from the same places you already run business logic. Lambdas, containers, workflows, and APIs can all invoke models using the same IAM, networking, and observability primitives that engineers already understand.</p><p>That matters because most of today’s AI value is not coming from training new models. It comes from embedding reasoning into existing systems: automating decisions, reducing manual workflows, and improving user-facing features without rebuilding entire platforms around ML infrastructure.</p><p>Bedrock lowers the friction between application logic and intelligence, and that’s why it’s showing up more and more at the center of modern architectures.</p><h3>Inference Before Bedrock: The SageMaker Model</h3><p>Before Bedrock, inference on AWS almost always meant Amazon SageMaker. You trained or imported a model, deployed it behind an endpoint, scaled it, monitored it, and versioned it like any other service.</p><p>That approach is still valid and still necessary in many cases. If you train your own models, need tight control over serving infrastructure, or want to squeeze every last bit of efficiency out of GPUs, SageMaker remains the right tool.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/666/1*8e96ZZZYGoT8wshfxrciRw.png" /></figure><p>But for many application teams, that level of control is unnecessary overhead. Managing endpoints, scaling policies, and serving stacks adds complexity that has little to do with the actual product being built.</p><p>Bedrock exists precisely in that gap. It removes the operational layer when all you really want is reliable inference.</p><h3>Inference Profiles: Purposefully Boring</h3><p>Inference profiles are the most common and most important way teams use Bedrock.</p><p>An inference profile represents a specific foundation model exposed through a simple request-response interface. You send input, you get output. There are no endpoints to manage and no infrastructure decisions to make.</p><p>This design is intentional.</p><p>Inference profiles are meant for situations where the flow is already known. Your application decides what happens next. The model’s job is to transform input into output, not to decide how the system behaves.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/671/1*z1Vai4-fvru7-tQhoOutGw.png" /></figure><p>Most production AI features fall squarely into this category. Summarization, classification, rewriting, embedding generation, and structured chat all work best when inference is predictable and tightly scoped.</p><p>These profiles scale well because they are easy to reason about. Latency is stable. Costs are understandable. Failures are visible. The model does exactly what it is asked and nothing more.</p><p>In practice, inference profiles should handle the majority of AI traffic in a system.</p><h3>Where Agentic Thinking Actually Begins</h3><p>Agentic flows solve a different problem, and understanding that difference is critical.</p><p>An inference profile answers a question.<br>An agentic flow pursues a goal.</p><p>The confusion often comes from the word “agent”, which suggests autonomy or intelligence. In Bedrock, agentic flows are much more concrete than that.</p><p>At a structural level, Bedrock flows behave very similarly to <strong>AWS Step Functions</strong>. You define a flow made of nodes. Each node performs a specific task. The output of one node becomes the input to the next.</p><p>The key difference is that instead of orchestrating compute, you are orchestrating <strong>inference</strong>.</p><h3>Agentic Flows as Inference Orchestration</h3><p>Seen clearly, an agentic flow is not a single model “thinking harder”. It is a <strong>sequence of different inference steps</strong>, deliberately connected together.</p><p>One node might use a managed prompt to extract intent from input. Another node might invoke a different model to reason over that intent. A later node could summarize results, generate structured output, or prepare a response for a downstream system.</p><p>Each node has a role.<br>Each model has a responsibility.<br>Each transition is explicit.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/761/1*JahikU_EciAHBrnmv_0bDQ.png" /></figure><p>This framing makes agentic flows far easier to reason about. They are not about giving models freedom. They are about giving architects a way to express complex reasoning as a sequence of simple, observable steps.</p><p>The “agent” is not the model but the <strong>flow itself</strong>.</p><h3>Why This Distinction Matters</h3><p>Think about a document upload feature.</p><p>If a user uploads a document and wants a short summary, the system already knows what to do. Take the text and summarize it. Nothing about the task requires decision-making or sequencing. A single Bedrock model invocation does the job cleanly. This is a textbook use case for an inference profile.</p><p>Now change only one thing.</p><p>The user uploads a document and asks, “Analyze this and give me what’s important.” At this point, the system does not yet know what “important” means. It may need to identify the document type, extract key sections, reason about relevance, and only then generate a summary.</p><p>That task naturally breaks into steps, each with a different responsibility. Instead of forcing all of that into one oversized prompt, a Bedrock flow allows you to connect multiple inference steps together in a clear order.</p><p>Nothing about the models changed.<br>Only the structure of the problem did.</p><p>When the task is a single, known transformation, use an inference profile, but when the task is a sequence of dependent decisions a flow would be a better fit. That distinction keeps systems simple when they should be simple, and structured when they must be.</p><p>Bedrock does not exist to turn every system into an agent.</p><p>Most problems do not require autonomy. They require clarity, control, and predictable behavior. Inference profiles provide exactly that, and they should remain the default building block in most architectures.</p><p>Agentic flows are useful when reasoning genuinely needs to be staged, not when complexity is added for its own sake. Treated as orchestration rather than intelligence, they become understandable, testable, and maintainable.</p><p>Bedrock’s strength is not that it enables agents. It’s that it lets teams decide when <em>not</em> to use them — and still build powerful systems.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=7c390217e55c" width="1" height="1" alt=""><hr><p><a href="https://awstip.com/inference-profiles-vs-agentic-flows-how-amazon-bedrock-is-reshaping-ai-architecture-7c390217e55c">Inference Profiles vs Agentic Flows</a> was originally published in <a href="https://awstip.com/">AWS Tip</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Boosting GitHub Actions Efficiency with Merge Queue]]></title>
            <link>https://medium.com/@tbrovy/boosting-github-actions-efficiency-with-merge-queue-69377551271c?source=rss-1b6ed317ed4b------2</link>
            <guid isPermaLink="false">https://medium.com/p/69377551271c</guid>
            <category><![CDATA[continuous-integration]]></category>
            <category><![CDATA[github-actions]]></category>
            <category><![CDATA[cicd-pipeline]]></category>
            <category><![CDATA[merge-queue]]></category>
            <category><![CDATA[devops]]></category>
            <dc:creator><![CDATA[Tom Brovender]]></dc:creator>
            <pubDate>Mon, 24 Mar 2025 10:08:21 GMT</pubDate>
            <atom:updated>2025-03-24T10:08:21.014Z</atom:updated>
            <content:encoded><![CDATA[<p>In the fast-paced world of software development, maintaining a stable main branch while efficiently integrating numerous pull requests can be challenging. GitHub’s Merge Queue offers a solution to streamline this process within your Continuous Integration and Continuous Deployment (CI/CD) pipelines.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*EIxmtxHerojc2Y8B7ZU4hQ.png" /><figcaption>Branching Model for Github Actions</figcaption></figure><h3>What is a Merge Queue?</h3><p>A Merge Queue is a system that automates the merging of pull requests into a target branch. It ensures that each pull request is validated against the latest version of the base branch and any preceding pull requests in the queue. This process helps maintain branch stability by preventing incompatible changes from being merged.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*zjqQzw0YO0Z1FHAk3HvN8A.png" /><figcaption><em>Merge queue process showing pull requests entering the queue and merging into the main branch.</em></figcaption></figure><h3>Benefits of Using a Merge Queue</h3><ol><li><strong>Increased Development Velocity</strong>: By automating the merging process, developers no longer need to manually update their pull request branches or wait for status checks to complete, thereby accelerating the development workflow.</li><li><strong>Enhanced Branch Stability</strong>: The Merge Queue ensures that only pull requests that have passed all required checks, in combination with the latest base branch and queued changes, are merged. This reduces the likelihood of introducing errors or conflicts into the main branch.</li><li><strong>Efficient Handling of High Volume</strong>: For repositories with numerous daily pull requests from multiple contributors, the Merge Queue efficiently manages and automates merges, reducing bottlenecks and manual intervention.</li></ol><h3>Potential Issues with Merge Queues</h3><ul><li><strong>Increased CI Resource Usage</strong>: Each pull request added to the queue triggers Continuous Integration (CI) checks on temporary merge branches, which can lead to higher resource consumption. Teams should monitor their CI workloads to manage this impact.</li><li><strong>Configuration Complexity</strong>: Setting up a Merge Queue requires careful configuration of branch protection rules and CI workflows to ensure compatibility and optimal performance. Misconfigurations can lead to failed merges or delays.</li></ul><h3>How to Implement a Merge Queue in GitHub Actions</h3><h4>1. Configure Branch Protection Rules</h4><ul><li>Navigate to your repository settings and select the target branch.</li><li>Enable “Require merge queue” under branch protection settings.</li><li>Specify required status checks and select the desired merge method (merge, rebase, or squash).</li></ul><h4>2. Set Up CI Workflows</h4><ul><li>Before adding the merge_group parameter in your workflow, ensure that the Merge Queue has been enabled for the target branch.</li><li>Update your GitHub Actions workflows to trigger on the merge_group event:</li></ul><pre>on:<br>  pull_request:<br>  merge_group:</pre><ul><li>Including both pull_request and merge_group ensures that your workflows run for individual pull requests and for groups of pull requests in the merge queue.</li><li>Ensure that all required checks are configured to run for the merge_group event to validate the combined changes effectively.</li></ul><h4>3. Manage the Merge Queue</h4><ul><li>With the configuration in place, contributors can add their pull requests to the Merge Queue.</li><li>The system will automatically handle the merging process once all checks pass, streamlining the integration workflow.</li></ul><h3>Important Considerations</h3><h4>Understanding the merge_group Event</h4><ul><li>The merge_group event is triggered when a merge group is created in the merge queue. This event allows workflows to run tests and checks on the combined changes of the merge group before merging into the base branch.</li><li>When the merge_group event is triggered, GitHub dispatches a webhook event of type checks_requested. Your CI provider should listen for this event to perform the necessary checks.</li></ul><pre>on:<br>  merge_group:<br>    types: [checks_requested]</pre><h4>CI Resource Management</h4><ul><li>Be mindful that enabling the merge queue and configuring workflows to respond to the merge_group event can increase the load on your CI resources, as tests will run for both individual pull requests and merge groups. Plan your CI capacity accordingly to handle this additional workload.</li></ul><h4>Branch Protection Rules</h4><ul><li>Ensure that your branch protection rules are configured to require status checks that are compatible with the merge_group event. This setup guarantees that all necessary checks are completed before a merge is finalized.</li></ul><p>GitHub’s Merge Queue is an essential tool for modern development teams looking to streamline their CI/CD pipelines while maintaining branch stability. By leveraging automated merges and ensuring each pull request is tested against the latest codebase, development teams can significantly reduce integration challenges and avoid introducing breaking changes.</p><p>By following best practices and configuring GitHub Actions properly, teams can optimize their development workflow, reduce manual interventions, and enhance overall code quality. Investing in a Merge Queue setup now can lead to a smoother and more efficient development experience in the long run.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=69377551271c" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>