Free live cohort on Google Meet — register your interest →
FRESHER

AI Engineering Fundamentals

Outcome: junior AI engineer–ready

You don’t need a math degree to start here. “Do I need to learn ML math first?” is the most common thing that stops people from starting — and for this path, the answer is no. That question belongs to Path 3 (ML Engineering on AWS), which is about training and owning models. This path is about applied AI engineering: calling LLMs well, wiring them into real systems, and shipping things that work in production. If you can write Python and call an API, you can do every project below.

The order matters. Each project below builds a specific, real skill — not a toy demo — and the 12 are sequenced so each one assumes the skills from the ones before it. By the end you’ll have built and deployed a full AI assistant, not just followed a tutorial.

← Back to all paths

Start with the smallest real thing: a CLI that loads a PDF or text file and actually answers questions about it, with streaming output and exact source citations for every answer. This is the project that proves you can wire an LLM into a real tool a person could actually use — everything after this assumes you’re comfortable with that loop.

What you’re building

document-chat sends the entire document to the model as context on every question and requires the model to quote its source for every claim — no retrieval, no vector database, no chunking. That’s deliberate: it’s the simplest version of “an LLM that knows about your data,” and it’s also the version that breaks in an instructive way once the document gets too big (more on that below). Project 3 in this path builds the retrieval-based version that fixes that limit — this project is what makes you feel the limit firsthand first.

The request lifecycle

Document-chat request flow: load file, check it fits the context window, assemble the prompt, stream the model's response, then verify every citation against the source text before showing the final answer

Every question your CLI answers moves through this same path. The two decision points — “fits in context window?” and “cites real source text?” — are exactly the two places a naive implementation fails silently instead of failing loudly.

Core concepts, three levels deep

1. Tokens

  • Definition: the sub-word units the model actually counts, prices, and limits on — not the same thing as words or characters. A single word can be one token or several.
  • In this project: every question you ask against a document sends the entire document as tokens, on every single request — there’s no chunking or caching in this version, so you’ll watch the token count add up directly as you test.
  • Practical consequence: pin down the real per-request cost using your provider’s pricing before you ship. For this project, document size — not code complexity — is the dominant cost driver.

2. Context window

  • Definition: the fixed per-request token budget covering system prompt + document + question + answer, combined. It is not persistent memory — it resets on every call.
  • In this project: this is your CLI’s core constraint. A document only “works” if document tokens + prompt scaffolding + expected answer tokens fits inside the model’s context window, full stop.
  • Practical consequence: count tokens and check them against your chosen model’s limit before calling the API, and fail with a clear message. A silent truncation or a raw provider error is a worse user experience than an honest “this document is too large for this tool” — and it’s exactly the gap Project 3’s retrieval pipeline exists to close.

3. Streaming generation

  • Definition: the model produces output by repeatedly sampling one token at a time from a probability distribution over its vocabulary. There is no “generate the whole answer, then send it” step happening behind the scenes — streaming just exposes that one-token-at-a-time process to your CLI instead of buffering it.
  • In this project: streaming is what makes a multi-paragraph answer feel instant instead of a silent multi-second wait. You consume the provider’s stream and print tokens to the terminal as they arrive.
  • Practical consequence: your error handling has to account for partial output — what does your CLI do if the connection drops halfway through an answer? Decide that behavior and test it; it’s easy to only ever exercise the happy path.

4. Hallucination and citation grounding

  • Definition: the model can state a fabricated fact with exactly the same fluent confidence as a true one, because next-token prediction has no built-in truth-check step.
  • In this project: this is why “exact source citations for every answer” is a hard requirement, not a nice-to-have. A citation is a claim the user can verify (“this is from page 4, paragraph 2”) — an answer without one is a claim they just have to trust.
  • Practical consequence: design the prompt so the model is instructed to quote directly from the supplied document, then validate in code that the quoted text actually appears in the source before you show it to the user. An unverified citation is barely better than no citation — the model can hallucinate a citation exactly as easily as it hallucinates a fact.

Decision rules

If…Then…
The document comfortably fits well under the model’s context windowStuff the whole document into context — this project’s approach is the right one; don’t reach for retrieval you don’t need yet
The document exceeds the context window, or users need to search across many documentsYou need retrieval (RAG) — that’s Project 3, not this one
The answer needs to be traceable to an exact quoteAlways validate the citation against the source text in code — never trust the model’s claim about its own citation
Users will ask multi-turn follow-up questionsTrack conversation history as tokens too — it counts against the same context-window budget as the document

Common mistakes

  • Truncating the document silently instead of surfacing a clear “this document is too large” error before the API call fails confusingly on its own.
  • Rendering a citation before validating it — you can’t check a quote against the source text until you have the complete sentence, so validate after the stream finishes, not before.
  • Trusting a model-stated citation (“this is from page 4”) without checking it — the model can hallucinate a citation exactly like it hallucinates a fact; the check has to happen in your code, not in the prompt alone.

Key concepts at a glance

ConceptOne-line definitionWhy it matters for document-chat
TokenThe unit the model counts, prices, and limits onDetermines your real per-request cost
Context windowFixed per-request budget for prompt + document + answerThe hard limit this project’s whole design works within
StreamingModel output produced one token at a timeWhy the CLI can show partial output instantly
HallucinationFluent but potentially false output, with no built-in truth-checkWhy every citation must be verified in code, not just requested in the prompt
Go deeper: How LLMs Actually Work — the full concept walkthrough (tokens, embeddings, attention, temperature, hallucination) →

The baseline for any AI Engineer / LLM Application Developer role — proves you can take an LLM call from idea to a working CLI tool, not just a notebook experiment.

What's next

If you want to apply what you just built inside a real engineering job right away, Path 2 takes the same project-based approach and points it at workflows you already do every day, like code review and PR summaries. If your goal is owning full ML systems instead, training, serving, and monitoring, Path 3 covers that ground directly. Neither path requires you finish here first. AI-Augmented Engineering →