Module 04 - Pair Programming with AI-Powered Tools

AI-Powered Pair Programming

There two new modes of programming: no code development and AI-assisted development. The former provides interactive interfaces which allow users to build websites and applications without writing any code, while the latter incorporates features such as predictive code completion and active debugging assistance.

Within this module, we cover several ways in which immunologists can integrate AI into their programming workflow. We highlight the distinction between interacting with AI chatbots within internet browsers compared to AI-assisted pair programming within interactive development environments (IDE).


Table of Contents

  1. AI-Powered Pair Programming
  2. No-Code Development
  3. AI-Assisted Software Development
  4. GitHub Copilot
    1. Setting up Github Copilot in VSCode
  5. OpenAI GPT API Developer Key
  6. OpenAI’s GPT-3.5 and GPT-4
  7. Microsoft BioGPT
  8. AutoGPT
  9. GPT-Engineer
  10. GPT API in RStudio
  11. GPT In-Browser Integrations

No-Code Development

No-code development platforms are systems which allow users to create software applications through graphical user interfaces without traditional computer programming. Compared to low-code development models, the no-code approach relies on prebuilt templates which eliminate the need to write any lines of code to achieve a functioning prototype.

If you’re curious about no-code app builders, check these out:

AI-Assisted Software Development

On the other hand, AI-assisted software development consists of working collaboratively with an AI agent to write, revise, and debug code. These AI-powered tools enable us to express what we want in natural language and have it translated directly into the code which computers can understand.

Read more on this topic:

GitHub Copilot

Github Copilot is an AI coding assistant which was trainined on billions of lines of code. Check out their documentation to learn more about specific features.

Github Copilot https://github.com/features/copilot

  • Free 30 day trial
  • Pricing
    • Individual accounts are $10/mo or $100/yr
    • Business accounts on enterprise GitHub, $19/user/mo
    • A free subscription for GitHub Copilot is available to verified students, teachers, and maintainers of popular open-source repositories on GitHub
      • Students can apply for free access via GitHub Student Developer Pack but might work for any .edu email
    • More info on pricing here

Setting up Github Copilot in VSCode

Visual Studio Code (VSCode) is one type of interactive development environment (IDE) which allows you to integrate Github Copilot into the interface as you code.

One perk of the VSCode application that you are able to sign into your institution’s HPC/server directly from the application where you write all your other code. VSCode also supports multiple programming languages and relevant libary extensions.

To install Github Copilot in Visual Code Studio, follow these instructions.

OpenAI GPT API Developer Key

ChatGPT and the GPT API both come from OpenAI, but they are distinct AI products.

  • More on OpenAI’s pricing tiers
  • ChatGPT API and ChatGPT Plus subscription are billed separately.
    • The API has its own pricing. Basically gives you a developer API key to use in other places where you’re actively developing an app or need GPT integrated into your working environment
    • You can start at $5 credit and cap the costs for small-time development & testing the waters
  • Price per token - You can think of tokens as pieces of words used for natural language processing. For English text, 1 token is approximately 4 characters or 0.75 words
  • GPT-4, With broad general knowledge and domain expertise, GPT-4 can follow complex instructions in natural language and solve difficult problems with accuracy.
    • 8K context and 32K context have different pricing
  • GPT-3.5Turbo, Optimized for dialogue
    • 4K context and 16K context are priced differently too
  • Other models available -
    • Fine-tuning models (Ada, Babbage, Curie, Davinci)
    • Embedding models (Ada V2)
    • Image Models (build DALL-E directly into your models)
    • Audio models (whisper can transcribe speech to text and translate languages)

OpenAI’s GPT-3.5 and GPT-4

If you’re curious about the performance differences between GPT-3.5 and GPT-4, check out this blogpost on Substack:

GPT comparison

Alt Text: (Source: Substack)

GPT comparison plot

Alt Text: (Source: Substack)

Microsoft BioGPT

BioGPT, a domain-specific generative model pre-trained on large-scale biomedical literature, has achieved human parity, outperformed other general and scientific LLMs, and could empower biologists in various scenarios of scientific discovery.

Microsoft BioGPT

Alt Text: (Source: )

An online user set up a playground on HuggingFace where you can enter some text (a prompt) and the model will continue the text based on data from biomedical literature.

BioGPT Playground

Alt Text: (Source: )

AutoGPT

AutoGPT is worth checking out, despite it being a quite experimental open-source project. It appears to be the next progression of ChatGPT, where the main difference is it uses GPT-4, has access to the internet (which alone is a game changer), has the ability to execute code (specifically it can keep reiterating code until it gets it right), has plugins for imaging as well as speech-to-text / text-to-speech, and lastly can run indefinitely if you would like it to.

Check it out here.

GPT-Engineer

Another open-source project that seems quite similar to AutoGPT is GPT-Engineer. The tagline for this tool is that you specific what you want to build, the AI asks for clarifications, and then builds it by generating an entire codebase based on a prompt.

GPT API in RStudio

Although the most extensive AI pair programming resources appears to be built for the VSCode platform, there are multiple resources for using ChatGPT and GPT API in RStudio.

Here are several resources to check out if you’d like to use RStudio:

GPT In-Browser Integrations

There are countless options for using ChatGPT in your browser. One reason for using ChatGPT in this format is when you need to scale your queries beyond the simple copy & paste interface.

Here are several resources if you’re interested:


© 2023 Anonymized Authors per NeurIPS Workshop Submission Policies [MIT License]