{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "## AI Agents and Tools for Coding" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "The world of AI tools for coding is evolving rapidly... and everything we talk about in this lesson will likely be out of date soon. This discussion is intended to provide a bit of guidance that will likely remain relevant, even as the agents themselves evolve. We will not discuss an exhaustive list of agents, and instead we will touch on a few that are popular right now (August 2025). Our goal is to shed a bit of light on how AI could augment your workflow, how they are being used to generate new code that you may interact with, and how they can also waste your time or lead you down rabbit holes.\n", "\n", "The AI tools we will discuss today are:\n", "- ChatGPT (AI chat bot)\n", "- GitHub Co-Pilot (AI assistant in your IDE)\n", "- Cursor (AI-native IDE)\n", "- Claude Code (AI command line tool)\n", "\n", "The differences between these tools include the size and scope of their _context_ window in addition to their level of autonomy, interactivity, and control. The more *agentic* a tool is, the more it is able to reason, debug, execute code, and generate new content on its own.\n", "\n", "The above tools are primariliy based on these Large-language models (LLMs), all of which are proprietary:\n", "- Anthropic's Claude models (Claude Opus, Claude Sonnet, and Claude Haiku)\n", "- OpenAI's GPT models (GPT-3.5, GPT-4, GPT4-Turbo)\n", "\n", "The tools listed above tend to have tiered access with subscription plans, and in general their usage is capped, even for subscribers. Their usage limits are also changing constantly.\n", "\n", "Open Source (free) LLMs include: \n", "- LLaMA\n", "- Mistral\n", "- Falcon\n", "- Gemma" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "#### **What is the context window?**\n", "\n", "A token is a piece of information (i.e., text). This might be a few characters, not necessarily even an entire word. The _context window_ defines how many tokens a tool can consider at once when processing a request. This means that tools with larger context windows can handle more complex tasks. Tokens might be text from the internet, from the conversation history, from previous conversations, from local files, or from documents that you have manually \"added\" to the conversation. Once you hit the limit of the tools context window it will either forget old information, or condense it somehow to free up space for new tokens.\n", "\n", "The tools above all have context windows of varying sizes. This also changes how expensive a request or action might be. Actions that require or use lots of tokens are more expensive. You may never actually see \"token\" usage, depending on what tool you are using. Token usage is, however, at least part of what defines whether you have hit your usage limit for these tools." ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "#### **What are these models trained on?**\n", "\n", "- GitHub public repositories\n", "- Stack Overflow\n", "- Technical documentation\n", "- Programming textbooks and tutorials\n", "- Natural language + code mix (e.g., docstrings, commit messages)\n", "- Some (like Claude and GPT-4) are multi-modal and can reason about code in text, files, and diagrams." ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "#### **Chat GPT**" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "#### **GitHub Co-Pilot**" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "#### **Cursor**" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "#### **Claude**" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "#### **Tips**\n", "\n", "- Ask specific questions or for specific tasks (these tools can put 2 and 2 together, but they may not do it the way you want them to.)\n", "- Provide plenty of context. The rule of thumb is to describe your situation first, as if you were talking to a coworker. Follow this up with the problem/question that you have. \n", "- Ask for references or clarification! Point out if something doesn't seem right, you can force the tool to check/regenerate it's answer with more attention to detail.\n", "- When using an AI tool to generate code, provide clear tasks and ask for it to check in with you along the way.\n", "- AI is really good at gathering information from all corners of the internet. Use it to learn about topics you are unfamiliar with. Do not use it to answer questions for which you would want to know exact assumptions that have been made or if you care about the details being correct.\n", " - Example: ChatGPT is good at generating outlines. It is not (currently) good at actually providing technical writing that is correct. \n", "- Identify tasks for which AI will actually be better than you. Do not ask it to do something that is niche, that you already know how to do. It will make mistakes and bad assumptions. \n", "- The best tasks for AI are the ones where you know what needs to be done _and you know how to check for correctness_ but you haven't had the time to figure out the exact implementation. At the point where the tool is deciding what is _correct_ and what is _done_ you will end up with some useless code on your hands.\n", "\n", "If you are too vague with your questions or ask these tools to do too much at once, they will go off in some pretty wild/unproductive directions. You may end up spending more time double checking what it did than you would have if you had done the work yourself. It is worth thinking about when and where to use AI in your workflow, such that you make your work better not worse.\n" ] }, { "cell_type": "markdown", "metadata": {}, "source": [] } ], "metadata": { "kernelspec": { "display_name": "Python 3", "language": "python", "name": "python3" }, "language_info": { "name": "python", "version": "3.13.5" } }, "nbformat": 4, "nbformat_minor": 2 }