Sanjoy is a senior engineering and technology leader with over 20.7 years of experience in corporate IT, specializing in multi-tenant SaaS architecture, distributed systems design, cloud-native architecture, and Agentic AI. His is AWS Certified Solutions Architect – Professional and TOGAF certified. He architects scalable, resilient, secure, and cost-efficient enterprise platforms, taking complex technology initiatives from architectural vision to production. This site brings together the reference architectures, decision frameworks, books, and technical insights that shape his approach to enterprise architecture and engineering leadership. Let’s talk.
Reference architectures, decision frameworks and build guides for AI platform teams: agents, context, retrieval, model routing and governance, designed for production on AWS.
For CTOs, VPs of Engineering, Heads of AI, and Solution and Enterprise Architects, AI Architects
Consumers
Models and data
AI engineering is the discipline that makes AI features dependable: the practices, tooling and tests that turn a model call into a product component.
CASES = load_cases("evals/refund_policy.jsonl")
def test_answer_quality():
scores = [grade(answer(c.question), c.expected) for c in CASES]
assert mean(scores) >= 0.90, "Quality gate failed: do not release"Agents change what a platform must provide. Design the runtime, the boundaries and the controls first, then let teams build on them.
| Step | Agent | Action | Status |
|---|---|---|---|
| plan | support-agent | Break request into steps | Done |
| retrieve | support-agent | Search policy knowledge base | Done |
| tool | billing-agent | crm.get_account (MCP) | Done |
| approve | support-agent | Refund over limit | Human review |
| respond | support-agent | Draft reply with citations | Done |
From documents in S3 to grounded answers with citations. Choose each stage deliberately and measure retrieval before you tune the model.
import boto3
client = boto3.client("bedrock-agent-runtime")
answer = client.retrieve_and_generate(
input={"text": "What is our refund policy for enterprise plans?"},
retrieveAndGenerateConfiguration={
"type": "KNOWLEDGE_BASE",
"knowledgeBaseConfiguration": {
"knowledgeBaseId": "KB_ID",
"modelArn": "arn:aws:bedrock:<region>::foundation-model/<model-id>",
},
},
)
print(answer["output"]["text"])An agent that works in a notebook still needs evaluation, guardrails, observability and cost control before it reaches users.
| Control | What it covers | Level |
|---|---|---|
| Evaluation | Golden sets, regression gates | Required |
| Guardrails | PII, prompt injection, topic limits | Required |
| Observability | Traces, token and cost per request | Required |
| Model routing | Cheap model first, escalate on need | Recommended |
| Human oversight | Approval on high-impact actions | Required |
AI can speed up every stage of delivery. The gain holds only when each stage has clear inputs, checks and a person accountable for the outcome.
| Stage | AI does | Human gate |
|---|---|---|
| Requirements | Draft stories and acceptance criteria | Product owner signs off |
| Design | Propose options against architecture decisions | Architect approves |
| Build | Coding agents work in scoped repos | Tests must pass |
| Test | Generate and expand test suites | Engineer reviews coverage |
| Release | Summarise changes, check policy | Human approves merge |
| Operate | Triage incidents, suggest fixes | On-call decides |
Architecture thinking for AI and technology leaders.

Most AI initiatives stall between the whiteboard and the build team. Here is the framework I use to carry an idea from business case to a design an engineering team can execute.
Read the post
A practical framework for production-grade LLM applications, from context and reasoning to security, evaluation and operations.

Size and design AI infrastructure by connecting workload to tokens, memory, compute, networking, serving and economics.

How Python AI applications use multi-core CPUs, NUMA memory, threads, processes, the GIL and GPUs to scale.
Go deeper on the thinking behind the architectures.
A chatbot answers questions. An agentic system plans, calls tools, uses context and takes actions toward a goal, so it needs orchestration, scoped permissions, evaluation and human oversight designed into the architecture, not added afterwards.
A shared layer that gives every team the same way to run agents: orchestration, access to context and tools, guardrails, evaluation and cost control. Teams build agents on it instead of rebuilding the plumbing each time.
As much as the business risk allows and no more. Set autonomy limits per action: let agents act freely on low-impact, reversible steps, and require human approval for high-impact or irreversible ones. Review those limits as evaluation results improve.
Retrieval quality depends on ingestion, chunking, embeddings, access control and evaluation as much as on the index. The guide covers each stage and the trade-offs between managed and custom options.
Use RAG when answers depend on private or frequently changing knowledge, because you can update the data without retraining. Consider fine-tuning when you need consistent style, format or behavior, or a smaller and cheaper model to do a narrow task. Many systems combine both.
Beyond a working demo, it needs evaluation sets with quality gates, guardrails, observability for quality, latency and cost, security and access control, and human oversight on high-impact actions.
Treat cost as an architecture concern. Route simple requests to smaller models and escalate only when needed, cache where it is safe, set token budgets, and track cost per request alongside quality so you can see what each outcome costs.
The 28-Category AI Architecture Decision Framework is a structured way to make connected AI architecture decisions across intelligence, knowledge, retrieval, agentic execution, trust, quality, economics and evolution. Use it when designing a new AI system or assessing an existing one.
The architectural intent that bridges business ambition and detailed engineering. It sets the capabilities, boundaries, principles and trade-offs that must stay coherent while implementation evolves, so teams share a direction without being told every detail.
AI can assist at every stage, from requirements and design to code, tests, release and operations. The gains hold only when each stage has clear inputs, quality checks and a named person accountable for the result.
No. The reference examples use AWS services, but the underlying patterns, such as retrieval design, orchestration, evaluation and governance, apply on other clouds and on-premises with different building blocks.
CTOs, VPs of engineering, heads of AI, Solution and enterprise architects, and AI architects who have to move AI work from prototype to production.
Tell me what you are building and which decisions are blocking you.