• Your AI Assistant Is Dumb Because You Haven’t Told It How You Think—So I Built a System That Does

    Building a Three-Tier Context System for Amazon Q

    Taking a Step Back

    I’d been building an automated podcast workflow for months —AWS Lambda functions, Step Functions orchestration, Amazon Bedrock for script generation. But I decided to hit pause. I’d been looking for a new role within the company and with a new role came new technical demands and I needed to coordinate a relocation from Austin to Seattle. Also, I’d enrolled in Python and SQL classes to sharpen my skills. Since I’d be leading AI transformation programs, I needed to understand what these models were actually producing, not just trust their output. This loss of momentum provided me with an opportunity to make a much needed adjustment.

    See, a few weeks in, I’d noticed a pattern: I was spending more time fixing my AI assistant’s narratives and code than learning from it. For example, it was providing verbose code implementations where I preferred minimal ones. SQL queries were formatted wrong. There was no awareness of my 20 years of experience prior to my time at the company or how I actually worked. That meant it was time to make my AI smarter, not by waiting for better models, but by teaching it my personalized thought process as a systems workflow.

    The Problem

    My Amazon Q (an AI coding assistant that lives in your code editor) wasn’t working for me the way I wanted it to. The AI had no clue about my background. Results were theoretical rather pragmatic and if nothing else, I make it a point to think about the environmental impacts of overusing AI.

    I had context files: a professional background, details about my communication style, and a philosophical framework for how I live my life, but they weren’t organized for daily work or structured for the actual tasks I do: technical program management, data engineering, SQL analytics, AWS infrastructure, and security assessments.

    The Solution: Three Tiers of Context

    I needed this context to loads automatically for simple tasks, needed to enable quick-access patterns for common work, and the ability to perform deep references for complex projects. I figured this three-tier system could work because it mirrors how a person thinks: automatic habits, quick recall, and deep knowledge when needed. I wanted no friction for simple requests, and little to no overhead for complex ones. I wanted my system to think like my internal system. I went with a three-tier approach.

    Tier 1: Automatic Baseline (Package Rules)

    Where: `[workspace]/.amazonq/rules/` 

    Size: 200-500 characters 

    Activation: Automatic—no `@` syntax needed

    Goal: Lightweight reminders that load for every request. Think muscle memory.

    What I created:

    – `python.md` – Minimal code, NumPy (library for fast numerical computing) for numerical work, list comprehensions (Python’s concise way to transform data)

    – `sql.md` – ANSI syntax (standard SQL that works across databases), explicit JOINs (clear table relationships), clean formatting

    Every Python request now knows I want concise code. Every SQL query follows my formatting. Plus, it’s included automatically!

    Tier 2: Quick Patterns (Saved Prompts)

    Where: `~/.aws/amazonq/prompts/` 

    Size: 1-2KB 

    Activation: Manual—type `@prompt-name`

    Goal: Medium-detail guidance for common patterns. Quick to invoke, reusable across projects.

    What I created:

    – `@py-data-science` – NumPy (numerical computing), pandas (data manipulation), ML basics, visualization

    – `@py-ml-advanced` – Neural networks (AI models that learn patterns), NLP (natural language processing), computer vision (image analysis)

    – `@py-aws` – Boto3 (AWS SDK for Python), Lambda (serverless functions), S3 (cloud storage), DynamoDB (NoSQL database), Step Functions (workflow orchestration)

    – `@sql-analytics` – Window functions (calculations across rows), CTEs (Common Table Expressions—reusable query blocks), joins, optimization

    – `@cybersecurity` – Risk assessment, compliance (GDPR, HIPAA, PCI DSS), OWASP (web security standards)

    – `@my-voice` – Writing style, professional context

    Example: `@py-data-science cluster customer data using K-means`

    Tier 3: Deep Reference (Full Skills Files)

    Where: `~/.kiro/skills/` 

    Size: 10-50KB 

    Activation: Manual—type `@filename`

    Goal: Comprehensive reference with full examples and edge cases. For complex work that needs complete context.

    What I created:

    – `python-programming-rules.md` – Complete Python standards, AI/ML/Data Science patterns

    – `sql-programming-standards.md` – Full SQL reference with class notes

    – `cybersecurity-expert.md` – GRC (Governance, Risk, Compliance), NIST frameworks (cybersecurity standards), regulatory standards

    – `aws-data-engineering-cert.md` – 30 chapters of AWS certification material

    Example: `@python-programming-rules.md build a neural network training pipeline`

    How I Built It

    First attempt: I tried fine-tuning a Mistral-7B model (customizing an AI model with my personal data) on my personal context. To do this, I built a full RAG pipeline (Retrieval-Augmented Generation—a system that finds relevant information and uses it to generate responses), built my “personality” by chunking my context files and 51k tweets into small pieces, and created embeddings (mathematical representations of text). Then I built a FAISS vector index (a searchable database of those representations), generated 1000 Q&A pairs and trained it using QLoRA (efficient fine-tuning technique) in Google Colab (free cloud computing with GPUs—graphics processors that speed up AI training, 6 hours). Then I ran inference (getting responses from the model) locally on my M3 Mac using MLX (Apple’s machine learning framework optimized for Mac chips).

    It worked. The model responded in my voice, understood my background. But it was overkill. Training took 6 hours, required 14GB disk space, and inference was slower than Amazon Q. Even worse, I couldn’t easily update it as I discovered new patterns in my classes. It was a snapshot, not a living system.

    I quickly realized I didn’t necessarily need a custom model – the fast way to get what I wanted was improved context management.

    I used Google’s NotebookLM (an AI research assistant that synthesizes information from multiple documents) to harmonize my scattered knowledge into structured contexts. Using my three existing notebooks for Python/AI/ML patterns, moral guardrails, professional context and communication style, NotebookLM found the patterns, I used them to jumpstart my the three-tier “thinking” system.

    To incorporate my study notes (AWS Data Engineering cert, SQL classes), I created symlinks (shortcuts that point to files in another location — think location aliases on Mac) to my Obsidian vault instead of copying. Updates to my class notes automatically flow into the skills system so there is no manual syncing and the system would grow as I learned.

    Step 1. NotebookLM for Knowledge Synthesis

    I used Google’s NotebookLM to jumpstart the skills creation:

    Notebook 1: Python programming standards and AI/ML patterns

    Notebook 2: Moral guardrails (Stoicism, Taoism, strategic realism)

    Notebook 3: Professional context and communication style

    NotebookLM synthesized my scattered notes, study materials, and preferences into coherent frameworks.

    Step 2. Study Notes Integration

    Since I’m currently studying for AWS Data Engineering Associate certification and taking SQL classes. Rather than manually copying notes, I created symlinks (file shortcuts that automatically reflect changes in the original) to my Obsidian vault (my personal knowledge base):

    – `sql-class-notes.md` → Obsidian SQL notes

    – `aws-data-engineering-notes.md` → Obsidian AWS cert notes

    Updates to my study notes automatically reflect in the skills system. No manual syncing.

    Step 3. Generating a Skills Registry

    To account for my past skill, I created `skills.json` (a configuration file) to register all skills with metadata (information about each skill):

    “`json

    {

      “id”: “python-programming-rules”,

      “triggers”: [“python”, “.py”],

      “enabled”: true

    }

    “`

    Before vs. After

    Before this, my AI generated generic AI responses that ignored my preferences. This made me spend extra time editing its verbose code down to what I wanted. Afterwards, it returned personalized responses that matched my writing and coding style on the first pass. The difference isn’t just quality – it’s efficiency.

    The system also scales context to task complexity:

    For Simple tasks = Tier 1 only (automatic) 

    For More Common Pattern = Tier 1 + Tier 2 (one `@prompt`) 

    For the Most Complex Work = All three tiers (full context)

    An Example: “Write a script to cluster customer data”

    Before:

    – 100+ lines of verbose code

    – Generic pandas patterns

    – No awareness of my AWS-centric workflow

    – Time spent editing down to what I actually wanted

    After (Simple): Just ask

    – Tier 1 auto-loads

    – Concise, efficient solution

    After (Better): `@py-data-science cluster customer data`

    – Tier 1 + Tier 2

    – NumPy vectorization (fast array operations), scikit-learn patterns (machine learning library), proper train/test split (separating data for training and validation)

    – Matches my data science workflow

    After (Production): `@py-ml-advanced @python-programming-rules.md build a neural network pipeline`

    – All three tiers

    – Production-ready: error handling, logging, type hints

    – My coding standards, ML patterns, optimization techniques

    How to Use It

    Amazon Q already supports this three-tier system with no plugins or configuration changes. I just place the files in the right places.

    Setup:

    1. Package rules → `[workspace]/.amazonq/rules/` (auto-loads)

    2. Saved prompts → `~/.aws/amazonq/prompts/` (invoke with `@prompt-name`)

    3. Skills files → `~/.kiro/skills/` (invoke with `@filename`)

    That’s it.

    Markdown files in specific locations.

    Simple, portable, and most importantly version-controllable.

    Real-World Examples

    These aren’t hypothetical. I actually use this for my personal projects. Examples are:

    Data Engineering:

    “`

    @py-aws create a Lambda that processes S3 events and writes to DynamoDB

    “`

    Gets: AWS-specific patterns, proper error handling, CloudWatch logging (AWS monitoring service), IAM best practices (security permissions)

    SQL Analytics:

    “`

    @sql-analytics write a query analyzing customer cohorts with retention metrics

    “`

    Gets: Window functions (calculations across related rows), CTEs (reusable query blocks), proper formatting—exactly how I write SQL

    Security Assessments:

    “`

    @cybersecurity assess the security risks of this architecture

    “`

    Gets: NIST frameworks (government cybersecurity standards), compliance considerations, OWASP patterns (web security best practices)

    Writing:

    “`

    @my-voice write a blog post about [topic]

    “`

    Gets: My professional context, communication style, philosophical framework

    Why It Works

    The three-tier system mirrors how I actually think:

    Tier 1 = Muscle memory (automatic habits)

    Tier 2 = Working memory (quick pattern recall)

    Tier 3 = Reference library (deep knowledge when needed)

    You don’t load everything into working memory for every task. You have automatic responses, quick pattern recognition, and deep knowledge you reference when needed. The system replicates this—the most efficient way to balance context richness with cognitive load.

    Automatic baseline for consistency. Quick patterns for efficiency. Deep reference for complexity.

    Behold: A Living System

    The system evolves as I learn. Symlinks to my Obsidian vault means study notes automatically update the skills files. As I complete my AWS Data Engineering cert and SQL classes, that knowledge flows directly into the context system.

    New patterns → Tier 2 prompts 

    Deep expertise → Tier 3 files

    This isn’t a one-time setup. Its a living system that grows with my expertise.

    Current use:

    – Python data engineering

    – SQL query development for executive reporting

    – AWS infrastructure design and Lambda development

    – Security assessments and compliance documentation

    – Blog posts and technical writing

    The Bottom Line

    AI assistants are only as good as the context you give them. But manually invoking context every time kills productivity.

    The three-tier system solves this with:

    – Automatic baseline standards (Tier 1)

    – Quick-access patterns for common work (Tier 2)

    – Deep reference for complex tasks (Tier 3)

    It’s not about teaching the AI everything. It’s about organizing your knowledge so the AI can access it at the right level of detail for each task.

    Simple requests → simple context 

    Common patterns → proven solutions 

    Complex work → comprehensive reference

    The system respects both the AI’s context window and your time. Neither is infinite. Both are valuable.

    Files Created:

    – 2 package rules (Tier 1)

    – 6 saved prompts (Tier 2)

    – 4 comprehensive skills files (Tier 3)

    – 1 user guide

    – 1 system README

    Total Setup Time: ~2 hours 

    Daily Time Saved: Immeasurable—every interaction is now personalized

    The system works because it respects how humans actually works – quick defaults for routine tasks, deeper context when complexity demands it.

    Up next: Setting up a Clawdbot on my Mac Mini, injecting it with my personality and morals, and giving it a job.

  • Phase 2 – Testing Enhanced Daily Briefing Structure Improvements


    I’ll go back and talk about earlier parts of the project like why I wanted to do it, but since our tech stack is starting to stick (for now) I wanna mark the milestone.

    What the project is though, feels like as good a place as any to start. My hypothesis, I happen to think that there’s better ways to get information than using social media as your hub. Since I’ve dabbled in AI as a practitioner for years, generative AI felt like the point to dive in and see what it can really do.

    Up until the start of the pandemic, I usually had some type of tech project going on. Some of them started out great, but life does life things and progress gets slow. You drift toward new opportunities but I’ve found the team you pull together along the way walks away with new experience and insights.

    I figured I’d pick that energy back up while I upskill and try to find a problem to play with. In this case: how difficult is it for an LLM to create 20-30 minute briefings on the latest news at a scheduled frequency. And could one extend capability that to create custom “personas” for users to adjust their content preference weights toward certain content like sports.

    So i picked the tech stack I’m most familiar with (AWS) and started to build around it. Keep in mind, this will certainly evolve over time. This post just happens to be the one where I chose a pattern for the audio content. I thought about it like a podcast when it started but the people who have listened to an episode or two think it feels more like a newscast and I agree.

    I’m also using AI as an assistant, mostly to investigate fixes in my pipelines and workflows. What I’m discovering about the development experience is that you still need to understand the software development process to multiply your efficiency.

    I’m also discovering I’m going to also spend a lot of time cleaning up technical debt. AI doesn’t clean up after itself. You’re constantly deleting things it build during debugging. And if you don’t keep a periodically refreshed context file, forget about it. It’s a trade off early on but by the time you scale, all those kinks will be worked out as a partnership between your engineers and your customers.

    The sample script I was aiming for is below. After experimenting with it, it was too restrictive. Also I hadn’t done enough pre-processing of the data, like removing words that don’t add much value to a sentence to improve model responses more efficiently. The data pipeline at that time was also missing recommendations on what weight to assign to article quality.

    The result was a set of summaries, spoken with conviction, but lacking citation in the way it would be presented in a broadcast format. At scale, eventually not validating that trust with listeners up front feels like it’s too critical a risk to ignore.

    Playing around with Temperature, Top-K, and Top-P revealed this model (Titan Lite) out-the-box not be good enough at this time for the end result I’m looking for. Up next is experimenting with a couple of other models available in Bedrock’a marketplace and comparing it to the results from fine-tuning the base model.

    I’m ok with hitting my token limit. At least it gives me some time to research and build out some of the other end-state features like user authentication, integrating subscription onboarding, adding advanced security controls, and testing pipeline automations, while setting operations alarms, actions and goals.

    Let’s see how far one day a week and one day a weekend will get me heading into the new year.

    Sample Script – Listen to Today’s Episode

    This is a test post demonstrating the new enhanced blog structure for better content discovery.

    Topics Covered Today

    • AI Regulation Updates from the EU
    • Cryptocurrency Market Analysis
    • Cybersecurity Breach at Major Tech Company
    • New Quantum Computing Breakthrough

    Episode Summary

    This test episode demonstrates the enhanced content structure for better discovery and navigation. We cover major developments in AI regulation, cryptocurrency markets, cybersecurity incidents, and quantum computing advances.

    Episode Stats:

    • Sources analyzed: 5 RSS feeds
    • Generated: 2025-12-14 at 19:30 UTC
    • Voice: Danielle (AWS Polly Neural)
    • Duration: 18-20 minutes