Module 3: LLM Fundamentals#

CodeVision Python Training

Contents#

  • Part 1: LLM Foundations (Sections 1-5)

  • Part 2: Working with LLM APIs (Sections 6-10)

  • Part 3: Output Control & Validation (Sections 11-14)

  • Part 4: Enterprise Considerations (Sections 15-20)


Welcome to Module 3#

This module introduces Large Language Models (LLMs) from an engineering and enterprise perspective. It is code-first, grounded in Python, and builds directly on:

  • Module 1: Python fundamentals (functions, JSON, notebooks)

  • Module 2: Data work with Pandas and visualisation

You will learn how LLMs work, how to call them from Python, how they fail, and how to use them safely in regulated environments such as banking and financial services.


LLM Gateway Access#

All LLM access in this module goes through a gateway abstraction — a single HTTPS endpoint that works identically from:

  • Google Colab (remote notebook)

  • Local Jupyter (laptop)

  • VS Code (local development)

What you need:

  • LLM_BASE_URL — the JBChat gateway endpoint (e.g., https://jbchat.jonbowden.com.ngrok.app)

  • LLM_API_KEY — provided by your instructor (optional, depending on setup)

Students do not:

  • Install Ollama locally

  • Generate their own tokens

  • Manage tunnelling or networking

This mirrors enterprise practice where LLM access is centrally managed and secured.


What You Will Learn#

Topic

Why It Matters

What LLMs are (and aren’t)

Set correct expectations

Tokens & context windows

Understand input limits

Temperature & determinism

Control output consistency

Structured output (JSON)

Enable automation

Hallucinations

Recognise and handle failures

Enterprise constraints

Audit, compliance, safety

Gateway security

Prevent API misuse


Prerequisites#

Before starting this module, ensure you have:

  • Completed Module 1 (Python Foundations)

  • Completed Module 2 (Python for Data Work)

  • LLM_BASE_URL and LLM_API_KEY from your instructor


Module 3 Learning Path#

  1. Content - Work through the interactive notebook

  2. Quiz - Test your understanding (auto-graded)

  3. Assessment - Practical coding exercises (auto-graded)

  4. Resources - Additional learning materials


End of Module 3 Introduction#

Click Content in the navigation to begin the interactive lesson.