beginner pathway

AI and Local Model Systems

Understand local inference, embeddings, retrieval and evaluation before trusting model output.

What you will learn

Download course manifest

1. Local Model Boundaries

Prerequisites

  • Evidence-first habits

Objectives

  • Name model, backend and endpoint
  • Separate private and public surfaces
  • Record fallback behavior

Local AI is a system, not just a model file. The endpoint, model, prompt, context, retrieval sources and fallback rules decide what users actually experience.

Worked example

A public website can call a private server route, which may call a separately governed local inference service. The browser should not receive shell, filesystem or admin access.

Exercise

Draw the path from browser question to local model answer and label every trust boundary.

Assessment

What must never happen silently in local-only mode?

Reveal worked answer after your attempt

A local-only path must not silently contact a hosted model provider.

Sources

2. Embeddings and Retrieval

Prerequisites

  • Local model boundaries

Objectives

  • Explain semantic search
  • Keep source metadata
  • Compare lexical and vector search

Embeddings turn text into vectors that can find semantically related passages. They are useful only when every chunk retains source, license, version and deletion policy.

Worked example

A question about word counting might retrieve a pathlib lesson even if the exact phrase differs, but the answer should still cite the lesson.

Exercise

Write two queries that should retrieve the same lesson using different words.

Assessment

Why must a vector chunk retain provenance?

Reveal worked answer after your attempt

Without provenance, retrieved text cannot be cited, refreshed, deleted or rights-reviewed.

Sources

3. Evaluation Before Routing

Prerequisites

  • Embeddings and retrieval

Objectives

  • Define a task
  • Create expected evidence
  • Record pass or fail

A model is not promoted because it sounds impressive. It is promoted for a workload after it loads, responds, cites evidence, follows schemas and passes held-out checks within resource limits.

Worked example

A coding model candidate should be tested on a small repository task with build and tests, not only a chat answer about code.

Exercise

Write one acceptance test for a tutor answer and one for a tool-calling answer.

Assessment

What should happen to an untested model assignment?

Reveal worked answer after your attempt

Untested capability must be labeled honestly and kept out of routing decisions.

Sources

  • Hugging Face Learn — Hugging Face; Terms vary by course and model; link-only until reviewed; source review: NOT_VERIFIED

Final mini-project

Create a small evaluation card for one local model task, including evidence, threshold and fallback behavior.

Project rubric

  • The card binds an exact model identity, role and frozen cases
  • Acceptance thresholds cover correctness, safety, latency and cleanup
  • Failure preserves a deterministic fallback and does not imply routing admission

Use these criteria for self-review. Independent verification is still required before claiming mastery.