<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Understand on AI Vault</title><link>https://namphuongtran.github.io/ai-vault/foundations/understand/</link><description>Recent content in Understand on AI Vault</description><generator>Hugo</generator><language>en</language><atom:link href="https://namphuongtran.github.io/ai-vault/foundations/understand/index.xml" rel="self" type="application/rss+xml"/><item><title>The AI Landscape</title><link>https://namphuongtran.github.io/ai-vault/foundations/understand/ai-landscape/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://namphuongtran.github.io/ai-vault/foundations/understand/ai-landscape/</guid><description>&lt;p&gt;You don&amp;rsquo;t need to build AI models to build powerful things with them. This page places the&#10;key terms so the rest makes sense — no math required.&lt;/p&gt;&#10;&lt;h2 id="the-nesting-ai--ml--dl--genai"&gt;The nesting: AI ⊃ ML ⊃ DL ⊃ GenAI&lt;/h2&gt;&#10;&lt;ul&gt;&#10;&lt;li&gt;&lt;strong&gt;AI&lt;/strong&gt; — the broad goal of getting software to do &amp;ldquo;intelligent&amp;rdquo; tasks.&lt;/li&gt;&#10;&lt;li&gt;&lt;strong&gt;ML (machine learning)&lt;/strong&gt; — AI that learns patterns from data instead of hard-coded rules.&lt;/li&gt;&#10;&lt;li&gt;&lt;strong&gt;DL (deep learning)&lt;/strong&gt; — ML using large neural networks.&lt;/li&gt;&#10;&lt;li&gt;&lt;strong&gt;Generative AI&lt;/strong&gt; — DL models that &lt;em&gt;create&lt;/em&gt; content (text, images, code). Large language&#10;models (LLMs) and other &lt;a href="https://namphuongtran.github.io/ai-vault/foundations/understand/foundation-models/"&gt;foundation models&lt;/a&gt;&#10;live here.&lt;/li&gt;&#10;&lt;/ul&gt;&#10;&lt;pre class="mermaid"&gt;flowchart TB&#10; subgraph AI[Artificial Intelligence]&#10; subgraph ML[Machine Learning]&#10; subgraph DL[Deep Learning]&#10; GA[Generative AI - LLMs and foundation models]&#10; end&#10; end&#10; end&lt;/pre&gt;&#10;&lt;h2 id="what-changed-with-foundation-models"&gt;What changed with foundation models&lt;/h2&gt;&#10;&lt;p&gt;They&amp;rsquo;re pre-trained on huge data, general-purpose, and used through an API or a prompt. You&#10;don&amp;rsquo;t collect data or train them — you &lt;strong&gt;use&lt;/strong&gt; them and adapt their behavior with prompts,&#10;your own data (RAG), and tools.&lt;/p&gt;</description></item><item><title>Generative AI</title><link>https://namphuongtran.github.io/ai-vault/foundations/understand/generative-ai/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://namphuongtran.github.io/ai-vault/foundations/understand/generative-ai/</guid><description>&lt;h2 id="goal"&gt;Goal&lt;/h2&gt;&#10;&lt;p&gt;Own one distinction: models that &lt;strong&gt;create&lt;/strong&gt; content versus models that &lt;strong&gt;label&lt;/strong&gt; it. It&#10;sounds academic but it decides real architecture: which problems need an LLM at all, and&#10;which are cheaper solved another way.&lt;/p&gt;&#10;&lt;h2 id="generative-vs-discriminative"&gt;Generative vs. discriminative&lt;/h2&gt;&#10;&lt;ul&gt;&#10;&lt;li&gt;A &lt;strong&gt;discriminative&lt;/strong&gt; model maps input → label or score: spam / not-spam, fraud risk 0.83,&#10;positive / negative.&lt;/li&gt;&#10;&lt;li&gt;A &lt;strong&gt;generative&lt;/strong&gt; model maps input → &lt;em&gt;new content&lt;/em&gt;: text, images, audio, video, code.&lt;/li&gt;&#10;&lt;/ul&gt;&#10;&lt;pre class="mermaid"&gt;flowchart LR&#10; In[Product review] --&amp;gt; D[Discriminative model]&#10; D --&amp;gt; L[Label: positive]&#10; In --&amp;gt; G[Generative model]&#10; G --&amp;gt; C[New content: a reply to the customer]&lt;/pre&gt;&#10;&lt;p&gt;Same input, different job: the discriminative model &lt;em&gt;labels&lt;/em&gt; the review; the generative model&#10;&lt;em&gt;writes the reply&lt;/em&gt;.&lt;/p&gt;</description></item><item><title>Foundation Models</title><link>https://namphuongtran.github.io/ai-vault/foundations/understand/foundation-models/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://namphuongtran.github.io/ai-vault/foundations/understand/foundation-models/</guid><description>&lt;h2 id="what-it-is"&gt;What it is&lt;/h2&gt;&#10;&lt;p&gt;A &lt;strong&gt;foundation model&lt;/strong&gt; is a large model pre-trained on a broad range of data, then adapted&#10;to many downstream tasks. Instead of training a separate model per task, you start from one&#10;general-purpose model and specialize it.&lt;/p&gt;&#10;&lt;h2 id="key-points"&gt;Key points&lt;/h2&gt;&#10;&lt;ul&gt;&#10;&lt;li&gt;&lt;strong&gt;Pre-training&lt;/strong&gt; learns general patterns from massive data; &lt;strong&gt;fine-tuning&lt;/strong&gt; and &lt;strong&gt;prompting&lt;/strong&gt;&#10;specialize it for a task.&lt;/li&gt;&#10;&lt;li&gt;&lt;strong&gt;Parameters&lt;/strong&gt; — the learned weights; more parameters generally mean more capacity.&lt;/li&gt;&#10;&lt;li&gt;&lt;strong&gt;Context window&lt;/strong&gt; — how much text the model can consider at once (input + output).&lt;/li&gt;&#10;&lt;li&gt;&lt;strong&gt;Modalities&lt;/strong&gt; — text, image, audio, or a mix (multimodal).&lt;/li&gt;&#10;&lt;li&gt;Adaptation options, from cheapest to most involved: &lt;strong&gt;prompting → RAG → fine-tuning&lt;/strong&gt;.&lt;/li&gt;&#10;&lt;/ul&gt;&#10;&lt;blockquote&gt;&#10;&lt;p&gt;A large language model (LLM) is a foundation model specialized for text.&lt;/p&gt;</description></item><item><title>How LLMs Work</title><link>https://namphuongtran.github.io/ai-vault/foundations/understand/how-llms-work/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://namphuongtran.github.io/ai-vault/foundations/understand/how-llms-work/</guid><description>&lt;p&gt;You don&amp;rsquo;t need the math, but a few mechanics explain most of what you&amp;rsquo;ll hit as a builder.&lt;/p&gt;&#10;&lt;h2 id="tokens"&gt;Tokens&lt;/h2&gt;&#10;&lt;p&gt;Models don&amp;rsquo;t read characters or words — they read &lt;strong&gt;tokens&lt;/strong&gt;, chunks of text (roughly ¾ of a&#10;word in English). &amp;ldquo;Tokenization&amp;rdquo; is the step that splits text into tokens. Everything is&#10;counted and billed in tokens: your input &lt;strong&gt;and&lt;/strong&gt; the model&amp;rsquo;s output.&lt;/p&gt;&#10;&lt;p&gt;&lt;strong&gt;Example&lt;/strong&gt; — the same text, as the model sees it:&lt;/p&gt;</description></item><item><title>Under the Hood</title><link>https://namphuongtran.github.io/ai-vault/foundations/understand/under-the-hood/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://namphuongtran.github.io/ai-vault/foundations/understand/under-the-hood/</guid><description>&lt;p&gt;Builds on &lt;a href="https://namphuongtran.github.io/ai-vault/foundations/understand/how-llms-work/"&gt;How LLMs work&lt;/a&gt;. You don&amp;rsquo;t need this to&#10;build, but a light mental model of &lt;em&gt;what&amp;rsquo;s inside&lt;/em&gt; explains a lot of the behavior you&amp;rsquo;ll see.&lt;/p&gt;&#10;&lt;h2 id="attention-in-one-idea"&gt;Attention, in one idea&lt;/h2&gt;&#10;&lt;p&gt;LLMs are &lt;strong&gt;transformers&lt;/strong&gt;. The key trick is &lt;strong&gt;attention&lt;/strong&gt;: to predict the next token, the&#10;model looks at &lt;em&gt;all&lt;/em&gt; the tokens so far and weighs how much each one matters to the current&#10;step. &amp;ldquo;It&amp;rdquo; gets linked to the noun it refers to; a question gets linked to the relevant fact&#10;earlier in the prompt.&lt;/p&gt;</description></item><item><title>How Models Are Trained</title><link>https://namphuongtran.github.io/ai-vault/foundations/understand/training-lifecycle/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://namphuongtran.github.io/ai-vault/foundations/understand/training-lifecycle/</guid><description>&lt;p&gt;You won&amp;rsquo;t train a foundation model, but knowing &lt;em&gt;how&lt;/em&gt; one is made explains a lot of its&#10;behavior. This is awareness-level — no training techniques required.&lt;/p&gt;&#10;&lt;h2 id="the-two-big-phases"&gt;The two big phases&lt;/h2&gt;&#10;&lt;ul&gt;&#10;&lt;li&gt;&lt;strong&gt;Pre-training&lt;/strong&gt; — the model learns language and world knowledge by predicting the next&#10;token across a huge corpus. The result is a &lt;strong&gt;base model&lt;/strong&gt;: knowledgeable but not good at&#10;following instructions.&lt;/li&gt;&#10;&lt;li&gt;&lt;strong&gt;Post-training&lt;/strong&gt; — the base model is shaped into something useful:&#10;&lt;ul&gt;&#10;&lt;li&gt;&lt;strong&gt;Instruction / fine-tuning&lt;/strong&gt; — taught to follow instructions and answer helpfully.&lt;/li&gt;&#10;&lt;li&gt;&lt;strong&gt;Alignment (e.g. RLHF)&lt;/strong&gt; — tuned with human feedback to be helpful, honest, and safe.&lt;/li&gt;&#10;&lt;/ul&gt;&#10;&lt;/li&gt;&#10;&lt;/ul&gt;&#10;&lt;h2 id="why-this-matters-to-you-as-a-builder"&gt;Why this matters to you as a builder&lt;/h2&gt;&#10;&lt;ul&gt;&#10;&lt;li&gt;&lt;strong&gt;Knowledge cutoff&lt;/strong&gt; — knowledge is frozen at pre-training time. For fresh or private facts&#10;you need &lt;a href="https://namphuongtran.github.io/ai-vault/foundations/ground-in-data/rag/"&gt;RAG&lt;/a&gt;, not a newer base model.&lt;/li&gt;&#10;&lt;li&gt;&lt;strong&gt;Why it follows instructions (and refuses)&lt;/strong&gt; — that behavior comes from post-training, not&#10;magic. It&amp;rsquo;s why &lt;a href="https://namphuongtran.github.io/ai-vault/foundations/work-with-models/prompt-engineering/"&gt;prompting&lt;/a&gt; works and why&#10;models sometimes decline requests.&lt;/li&gt;&#10;&lt;li&gt;&lt;strong&gt;What fine-tuning does&lt;/strong&gt; — it adjusts &lt;em&gt;behavior and style&lt;/em&gt;, and reliably teaches narrow&#10;skills; it does &lt;strong&gt;not&lt;/strong&gt; reliably inject fresh knowledge. See&#10;&lt;a href="https://namphuongtran.github.io/ai-vault/deep-dives/adaptation/"&gt;Adaptation&lt;/a&gt;.&lt;/li&gt;&#10;&lt;/ul&gt;&#10;&lt;h2 id="example--base-vs-instruction-tuned"&gt;Example — base vs. instruction-tuned&lt;/h2&gt;&#10;&lt;p&gt;Prompt: &lt;em&gt;&amp;ldquo;Write a haiku about the sea.&amp;rdquo;&lt;/em&gt;&lt;/p&gt;</description></item><item><title>Multimodality</title><link>https://namphuongtran.github.io/ai-vault/foundations/understand/multimodality/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://namphuongtran.github.io/ai-vault/foundations/understand/multimodality/</guid><description>&lt;p&gt;Modern models aren&amp;rsquo;t text-only. A &lt;strong&gt;multimodal&lt;/strong&gt; model can take — and sometimes produce —&#10;images, audio, or video alongside text. Many tools you use (coding agents that read&#10;screenshots, chat that &amp;ldquo;sees&amp;rdquo; a photo) rely on this.&lt;/p&gt;&#10;&lt;h2 id="input-vs-output-modalities"&gt;Input vs output modalities&lt;/h2&gt;&#10;&lt;pre class="mermaid"&gt;flowchart LR&#10; T[Text] --&amp;gt; M[Multimodal model]&#10; I[Image] --&amp;gt; M&#10; A[Audio] --&amp;gt; M&#10; M --&amp;gt; OT[Text out]&#10; M --&amp;gt; OI[Image out]&lt;/pre&gt;&#10;&lt;ul&gt;&#10;&lt;li&gt;&lt;strong&gt;Vision&lt;/strong&gt; — image &lt;em&gt;in&lt;/em&gt;, text out (describe a chart, read a screenshot, extract from a PDF).&lt;/li&gt;&#10;&lt;li&gt;&lt;strong&gt;Image generation&lt;/strong&gt; — text &lt;em&gt;in&lt;/em&gt;, image out.&lt;/li&gt;&#10;&lt;li&gt;&lt;strong&gt;Speech&lt;/strong&gt; — audio ↔ text (transcription, voice interfaces).&lt;/li&gt;&#10;&lt;/ul&gt;&#10;&lt;p&gt;A model supports a specific set of these — check before you rely on one.&lt;/p&gt;</description></item><item><title>Limitations &amp; Failure Modes</title><link>https://namphuongtran.github.io/ai-vault/foundations/understand/limitations/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://namphuongtran.github.io/ai-vault/foundations/understand/limitations/</guid><description>&lt;p&gt;Knowing &lt;em&gt;how&lt;/em&gt; models fail tells you &lt;em&gt;what to add&lt;/em&gt; around them. None of these are bugs — they&#10;follow from &lt;a href="https://namphuongtran.github.io/ai-vault/foundations/understand/how-llms-work/"&gt;how LLMs work&lt;/a&gt;.&lt;/p&gt;&#10;&lt;h2 id="the-main-failure-modes"&gt;The main failure modes&lt;/h2&gt;&#10;&lt;table&gt;&#10;&#9;&lt;thead&gt;&#10;&#9;&#9;&#9;&lt;tr&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;th&gt;Failure mode&lt;/th&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;th&gt;What it is&lt;/th&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;th&gt;Mitigation&lt;/th&gt;&#10;&#9;&#9;&#9;&lt;/tr&gt;&#10;&#9;&lt;/thead&gt;&#10;&#9;&lt;tbody&gt;&#10;&#9;&#9;&#9;&lt;tr&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;Hallucination&lt;/td&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;Confident but false or unsupported output&lt;/td&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;&lt;a href="https://namphuongtran.github.io/ai-vault/foundations/ground-in-data/rag/"&gt;RAG&lt;/a&gt; + citations; ask for &amp;ldquo;I don&amp;rsquo;t know&amp;rdquo;&lt;/td&gt;&#10;&#9;&#9;&#9;&lt;/tr&gt;&#10;&#9;&#9;&#9;&lt;tr&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;Knowledge cutoff&lt;/td&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;No knowledge of recent or private facts&lt;/td&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;RAG, tools, web search&lt;/td&gt;&#10;&#9;&#9;&#9;&lt;/tr&gt;&#10;&#9;&#9;&#9;&lt;tr&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;Bad at exact math / counting&lt;/td&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;Predicts plausible tokens, doesn&amp;rsquo;t compute&lt;/td&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;Give it &lt;a href="https://namphuongtran.github.io/ai-vault/foundations/make-it-act/tool-function-calling/"&gt;tools / code&lt;/a&gt;&lt;/td&gt;&#10;&#9;&#9;&#9;&lt;/tr&gt;&#10;&#9;&#9;&#9;&lt;tr&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;Non-determinism&lt;/td&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;Same prompt → different answers&lt;/td&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;Lower temperature, constrain output, &lt;a href="https://namphuongtran.github.io/ai-vault/foundations/operate-and-govern/model-evaluation/"&gt;evaluate&lt;/a&gt;&lt;/td&gt;&#10;&#9;&#9;&#9;&lt;/tr&gt;&#10;&#9;&#9;&#9;&lt;tr&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;Prompt sensitivity&lt;/td&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;Small wording changes shift results&lt;/td&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;Test prompts against an eval set&lt;/td&gt;&#10;&#9;&#9;&#9;&lt;/tr&gt;&#10;&#9;&#9;&#9;&lt;tr&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;Bias&lt;/td&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;Reflects biases in training data&lt;/td&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;&lt;a href="https://namphuongtran.github.io/ai-vault/foundations/operate-and-govern/responsible-ai/"&gt;Responsible AI&lt;/a&gt; review, human oversight&lt;/td&gt;&#10;&#9;&#9;&#9;&lt;/tr&gt;&#10;&#9;&#9;&#9;&lt;tr&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;Context limits&lt;/td&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;Forgets or drops info beyond the window&lt;/td&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;&lt;a href="https://namphuongtran.github.io/ai-vault/foundations/work-with-models/context-engineering/"&gt;Context engineering&lt;/a&gt;&lt;/td&gt;&#10;&#9;&#9;&#9;&lt;/tr&gt;&#10;&#9;&lt;/tbody&gt;&#10;&lt;/table&gt;&#10;&lt;h2 id="the-pattern"&gt;The pattern&lt;/h2&gt;&#10;&lt;pre class="mermaid"&gt;flowchart LR&#10; H[Hallucination / cutoff] --&amp;gt; RAG[Ground with RAG &amp;#43; citations]&#10; M[Bad math / counting] --&amp;gt; Tools[Use tools and code]&#10; ND[Non-determinism] --&amp;gt; Eval[Constrain &amp;#43; evaluate]&#10; B[Bias / safety] --&amp;gt; Gov[Guardrails &amp;#43; human oversight]&lt;/pre&gt;&#10;&lt;h2 id="the-takeaway"&gt;The takeaway&lt;/h2&gt;&#10;&lt;p&gt;A model alone is unreliable for facts, math, and consistency. You make it reliable by&#10;&lt;strong&gt;surrounding it&lt;/strong&gt; — grounding it in data, giving it tools, constraining its output, and&#10;measuring it. That&amp;rsquo;s what the rest of this stage is about.&lt;/p&gt;</description></item></channel></rss>