LLM Foundations & Enterprise AI Stack
AI engineering fundamentals, how LLMs are trained and work, inference and its optimisation, prompting, fine-tuning in depth, dataset engineering, evaluation methodology and pipelines, model selection, a progressive application architecture, user feedback, the enterprise AI reference stack, on-premise and hybrid deployment, LLMOps, GenAI adoption strategy and hybrid AI in financial services.
Every AI architecture decision rests on a handful of facts about large language models: they predict tokens, they have a fixed context window, they cost money per token, and they are non-deterministic. This module turns those facts into architecture.
Articles
- AI engineering fundamentalsWhat AI engineering is and how it differs from ML engineering and full-stack engineering, the three layers of the AI engineering stack, foundation-model use cases, and how to plan an AI application: use-case evaluation, the role of AI and humans, defensibility, usefulness thresholds, milestones and the last-mile problem.
- How LLMs workTokens, embeddings, the transformer, attention, context windows, sampling and the training stages that turn a next-token predictor into an assistant — explained simply, with diagrams and review questions.
- Training, scaling & samplingHow foundation models are made and why they behave as they do: training data and its biases, model size, parameters, tokens and FLOPs, scaling laws and compute-optimal training, supervised fine-tuning, preference fine-tuning (RLHF, DPO), sampling strategies, test-time compute, structured outputs, and the probabilistic roots of inconsistency and hallucination.
- Inference, latency & costWhat happens when you call an LLM: prefill and decode, the KV cache, time to first token, throughput, batching, streaming, quantization, prompt caching, rate limits and how to estimate cost.
- Inference optimisationA deeper look at LLM inference: compute-bound vs memory-bandwidth-bound workloads, TTFT, TPOT, goodput, MFU and MBU, accelerators, model-level optimisations (quantisation, distillation, speculative decoding, inference with reference, parallel decoding, attention and KV-cache optimisation, kernels) and service-level optimisations (continuous batching, prefill/decode disaggregation, prompt caching, tensor and pipeline parallelism).
- Prompt & context engineeringSystem prompts, few-shot examples, chain-of-thought, structured output, prompt templates and context engineering — how to make LLM behaviour reliable enough for production.
- Prompting vs RAG vs fine-tuningThe three ways to adapt an LLM to your enterprise — what each changes, what each costs, when to use which, and how LoRA, PEFT and distillation fit in. With a decision tree.
- Fine-tuning in depthWhen to fine-tune and when not to, how fine-tuning relates to RAG, the memory math of inference and training, numerical formats and quantisation, parameter-efficient fine-tuning (adapters, LoRA, QLoRA), serving many LoRA adapters, model merging and multi-task fine-tuning, and the hyperparameters that matter.
- Dataset engineeringA data-centric view of AI: what data you need for fine-tuning and evaluation, data quality, coverage and quantity, acquisition and annotation, rule-based, simulated and AI-powered data synthesis, data verification and the limits of synthetic data, model distillation, and processing — inspection, deduplication, cleaning, filtering and formatting.
- Evaluation methodologyWhy open-ended AI is hard to evaluate, language-modelling metrics (entropy, cross-entropy, perplexity, bits-per-byte), exact evaluation (functional correctness, pass@k, exact match, lexical and semantic similarity), AI as a judge — how to use it, its biases and limits — and comparative evaluation with pairwise preferences and Elo-style rankings.
- Evaluating AI systemsEvaluation-driven development, the criteria that matter (domain capability, generation quality, factual consistency, safety, instruction following, roleplay, cost and latency), navigating public benchmarks and data contamination, and a step-by-step evaluation pipeline: components, rubrics, business metrics, methods, annotated data, slicing, sample size and evaluating the evaluator.
- Model selectionHow to choose LLMs: capability tiers, open-weight vs proprietary, benchmarks and their limits, a weighted scoring matrix, model routing and cascades, and avoiding lock-in.
- Enterprise AI stackThe layers of an enterprise AI platform — infrastructure, models, AI gateway, data and knowledge, orchestration and agents, applications, LLMOps, security and governance — with a reference architecture, request flow and platform-team operating model.
- AI engineering architectureA progressive reference architecture for AI applications: start with a single model call, then add context, input and output guardrails, a model router and gateway, exact and semantic caching, agent patterns and write actions — with monitoring, observability, drift detection and pipeline orchestration around it.
- User feedbackWhy user feedback is proprietary data, explicit vs implicit feedback, conversational signals (early termination, error correction, complaints, sentiment, regeneration, conversation length and diversity), when and how to collect feedback without annoying users, feedback biases and degenerate feedback loops, and how feedback becomes a data flywheel.
- On-prem & hybrid deploymentWhere GenAI should run — public API, cloud-managed, sovereign cloud, on-premise or air-gapped — and how to design a hybrid platform: data-classification routing, security, data privacy, GPU capacity and TCO, governance, and integration with existing enterprise systems.
- LLMOps & observabilityHow to operate LLM applications: tracing with OpenTelemetry, offline and online evaluation, prompt and model versioning, guardrails, cost control, resilience patterns, deployment strategies and incident handling.
- GenAI adoption strategyHow an enterprise adopts generative AI at scale: an adoption maturity model, use-case discovery and prioritisation, build vs buy vs embed, model and deployment strategy, the operating model, business case and value measurement, responsible-use guardrails, people and change, and a 24-month roadmap.
- Hybrid AI in financial servicesThe practical decisions behind on-premise and hybrid AI in banks, insurers and asset managers: use-case placement for analytics, customer service, financial crime, investment research and document intelligence; vendor selection examples; trade-offs across quality, latency, compute, security and reliability; lifecycle costs; stack placement; model-weight ownership; and the needs the market still does not meet.