Cursarium logoCursarium
beginnerFree

Pair Programming with a Large Language Model

by Laurence Moroney · DeepLearning.AI

4.5
(4,200 reviews)
70K+ enrolled1 hourUpdated 2024-02

Our Verdict

Worth it — with caveats

Pair Programming with a Large Language Model is a free, roughly one-hour DeepLearning.AI short course taught by Laurence Moroney (then Google AI Lead) and built with Google, teaching a reusable prompt structure (priming, question, decorator) for using an LLM to improve, simplify, test, debug, and document code. The instruction is clear and the prompt-template thinking transfers to any model, but the course was built entirely on Google's PaLM API (text-bison), which Google deprecated and decommissioned in October 2024. As a result the notebooks no longer run against the original API, and learners on DeepLearning.AI's own forum report that the google-generativeai methods shown in the course were removed from current SDK versions. Our take: it remains a useful 60-minute mental-model primer on prompt patterns for coding, but treat the specific PaLM/text-bison code as outdated and port the ideas to Gemini, ChatGPT, or another current assistant.

The conceptual content (a clean priming/question/decorator prompt template and coding-assistant use cases) is genuinely useful and model-agnostic, and the price is free. However, the entire course is built on Google's PaLM API which was decommissioned in October 2024, so the hands-on code is broken and learners report the SDK methods no longer exist. Worth an hour for the patterns; not a reliable hands-on lab in 2026.

Best for: Developers and data folks with basic Python who want a fast, free intuition for how to prompt an LLM to refactor, simplify, test, debug, and document code using a structured template, rather than ad-hoc prompts. Good for beginners to LLM-assisted coding and for anyone who wants Laurence Moroney's clear framing of prompt design without a third-party framework like LangChain.

Skip if: People who want working, runnable, up-to-date code (the PaLM/text-bison API is decommissioned), anyone seeking a certificate (none is offered), experienced prompt engineers who already use coding assistants daily, and learners wanting depth on conversational/multi-turn debugging workflows or modern tools like GitHub Copilot, Cursor, or Gemini Code Assist.

About This Course

Use LLMs as a coding assistant for writing, debugging, and explaining code through prompt engineering patterns.

What You'll Learn

Programmatically call an LLM API and control output with parameters such as temperature (0.0 for deterministic results)
Build a reusable string-based prompt template with three parts: priming (context), the question/task, and a decorator (output-formatting instruction)
Use an LLM to improve, simplify, and refactor existing code with explanations
Generate test cases for your code and suggest more efficient implementations
Debug code and get fixes by prompting the model effectively
Reduce technical debt by having the LLM explain and document a complex, unfamiliar codebase
Apply prompt phrasing tricks (e.g. 'show me' vs 'write code') that change the quality and depth of responses

Curriculum

Getting Started with PaLM

Introduction to programmatically interacting with an LLM via the Google PaLM API: passing a message to the model, setting parameters like temperature, using the text generation (text-bison) model, and handling API calls (including a retry decorator).

Using a String Template

Builds the core reusable prompt template from a single string with three elements: priming (background/context to prepare the model), the question (the coding task), and a decorator (instructions on how to format the answer).

Pair Programming Scenarios

Applies the template to real coding tasks: improving and simplifying code, writing test cases, making code more efficient, and debugging, all through prompt engineering rather than a framework like LangChain.

Technical Debt

Uses the LLM to tackle technical debt by explaining and documenting a complex existing codebase so it is easier to understand and maintain.

Prerequisites

  • Basic Python programming (ability to read and run simple functions)
  • General familiarity with calling an API helps but is taught in the first lesson
  • No prior machine learning or LLM experience required (beginner level)

Instructor

Laurence Moroney

Instructor · DeepLearning.AI

Pros & Cons

Pros

  • Free, short (about 1 hour), and beginner-friendly with hands-on Jupyter notebooks and free PaLM API access during the course
  • Teaches a clean, reusable priming/question/decorator prompt template that transfers to any LLM, not just PaLM
  • Laurence Moroney is widely praised by learners as a clear, practical instructor
  • Concretely covers the most useful coding-assistant tasks: refactoring, simplifying, testing, debugging, and documenting code
  • Deliberately avoids third-party frameworks (no LangChain), so you learn the underlying prompt mechanics directly

Cons

  • Built entirely on Google's PaLM API (text-bison), which Google decommissioned in October 2024, so the original notebooks no longer run and learners on the DeepLearning.AI forum report the SDK methods were removed
  • No certificate of completion is offered
  • Uses only a text-generation model and single-shot prompts; skips conversational/multi-turn flows that are often better for iterative debugging and documentation
  • Despite the Google partnership it does not cover Google's code-specialized models, and content has not been refreshed for the Gemini era

Alternatives To Consider

Frequently Asked Questions

Is Pair Programming with a Large Language Model free?

Yes — Pair Programming with a Large Language Model is free to access. Free to take on learn.deeplearning.ai with free PaLM API access provided in-course. No certificate. Note: because the PaLM API is decommissioned, reproducing the labs locally now requires porting the code to a current API such as Google's Gemini (google-generativeai generate_content) or another provider.

Who is Pair Programming with a Large Language Model for?

Developers and data folks with basic Python who want a fast, free intuition for how to prompt an LLM to refactor, simplify, test, debug, and document code using a structured template, rather than ad-hoc prompts. Good for beginners to LLM-assisted coding and for anyone who wants Laurence Moroney's clear framing of prompt design without a third-party framework like LangChain.

What will you learn in Pair Programming with a Large Language Model?

Programmatically call an LLM API and control output with parameters such as temperature (0.0 for deterministic results); Build a reusable string-based prompt template with three parts: priming (context), the question/task, and a decorator (output-formatting instruction); Use an LLM to improve, simplify, and refactor existing code with explanations; Generate test cases for your code and suggest more efficient implementations.

What are the prerequisites for Pair Programming with a Large Language Model?

Basic Python programming (ability to read and run simple functions); General familiarity with calling an API helps but is taught in the first lesson; No prior machine learning or LLM experience required (beginner level).

Is Pair Programming with a Large Language Model worth it?

The conceptual content (a clean priming/question/decorator prompt template and coding-assistant use cases) is genuinely useful and model-agnostic, and the price is free. However, the entire course is built on Google's PaLM API which was decommissioned in October 2024, so the hands-on code is broken and learners report the SDK methods no longer exist. Worth an hour for the patterns; not a reliable hands-on lab in 2026.

How we reviewed this course

This is an independent editorial assessment by Cursarium, based on DeepLearning.AI's published course materials and aggregated public learner feedback (last reviewed 2026-06). We have not independently completed the course. Links to providers are standard references, not paid placements.