Skip to main content

AI Knowledge Bank โ€” Overview

This is the knowledge bank: what I should know as an AI applications engineer โ€” general theory for all AI notes going forward, organised as a three-tier progression. It is paired with the Learnings folder: what I actually did โ€” the decisions I made, things I discovered, and mistakes I hit and fixed.

The two are linked both ways: a concept links down to any of my implementations via a Related implementations line, and each learning links up to the concept it relates to.

What belongs where: Knowledge bank = generic theory, true regardless of any one project. Learnings = my concrete record on a real project. Keep implementation detail out of the theory; link to it instead.


The three tiersโ€‹

TierForCovers
01 ยท FoundationsThe beginner concepts you need before anything else makes sensetokens, context windows, embeddings, temperature, model routing, why RAG exists, structured outputs, prompt anatomy, what an agent actually is
02 ยท IntermediateThe builder concepts โ€” how real systems are put together and tunedRAG design & tuning, chunking, vector-DB tradeoffs, evals, agent patterns (ReAct, state machines, tool use), cost management, prompt versioning, context engineering, observability, multi-model orchestration, provider adapters & gateways
03 ยท ExpertThe production/systems concepts that separate a demo from a servicemulti-agent tradeoffs, prompt caching, security & guardrails, graceful degradation, MCP, scaling, when not to use AI, human-in-the-loop design

Read them in order once. After that, use them as a lookup โ€” jump to the concept you need.


The build loopโ€‹

The cycle this knowledge base runs on:

  1. Build something (on the Data Patch Agent or anything else) and record it in Learnings.
  2. Tell the assistant what you learned, decided, or fixed.
  3. The assistant analyses it against the reference and does one of three things:
    • Not covered yet โ†’ researches the theory (with sources) and adds it to the right tier, then links your learning under Related implementations.
    • Covered and aligned โ†’ doesn't rewrite theory; just adds a Related implementations link to your learning.
    • Covered but your approach diverges โ†’ flags it and explains why, and you still choose whether to log it.

The full mechanics live in ASSISTANT_PROMPT.md.


A roll-up of every concept that currently has one of my implementations linked to it. Grows as learnings accumulate; concepts with nothing built yet aren't listed.

Concept (reference)Related implementation (learning)
Model routingCheap model to classify, strong model to generate
Structured outputsStructured outputs, in practice
Vector-DB tradeoffspgvector over Qdrant for V2
Graceful degradationV2 drops the JSON-parse retry
The provider adapter layerUsage telemetry broke every call site ยท Separate API keys per model family

The committed stackโ€‹

Absorbed from the old roadmap: the tools this practice standardises on, so you stop tool-shopping and start building.

LayerChoice
RuntimeClaude Code / Copilot Agent Mode
Context & promptsMarkdown โ€” CLAUDE.md, version-controlled prompt files
Structured outputsPydantic (Python) / JSON schema + Zod (TS)
Vector storePostgres + pgvector
ModelsClaude Sonnet (reasoning-heavy) + Haiku (cheap classification)
EvalsHand-rolled: golden set + LLM-as-judge
ObservabilityLangfuse (free tier)
Docsthis Docusaurus repo

Deliberately avoided for the flagship: LangChain / CrewAI / AutoGen โ€” hand-write the loop so you understand it.


Companion documentsโ€‹

The reference book explains the concepts. These go deeper on specific things and are linked from the tiers rather than duplicated:

  • Glossary โ€” fast lookup for any term. Skim once, return when a word trips you.
  • Building an Agentic System โ€” the step-by-step build recipe (the how-to).
  • AI-First Methodology โ€” the six components of an AI-first engineering practice.
  • Reading List โ€” the essays and sources behind this book.
  • Open Questions โ€” things not yet fully understood; the inbox for future reference sections.