Modern Neovim — AI Coding (Part 2)

Let’s continue our journey on AI coding with Neovim.

alpha2phi
9 min readMay 6, 2023
Modern Neovim — AI Coding (Part 2)

In this article, we will deep dive into the OpenAI models and develop Neovim modules using Python and Lua for AI coding.

This article is part of the Modern Neovim series.

The Neovim configuration files are available in this repository.

Getting Started

The OpenAI API can be applied to virtually any task that involves understanding or generating natural language, code, or images. In this article, we will focus on using the APIs specifically for coding.

Before we deep dive into the details, let’s get started with the basics.

Prompt Design and Engineering

Designing a good prompt is essential to ensure good results with the OpenAI language models.

Designing the prompt is essentially how we “program” the model, usually by providing some instructions or a few examples.

Below are the basic guidelines extracted from the OpenAI documentation.

  • Show and tell. Make it clear what you want either through instructions, examples, or a combination of the two. If you want the model to rank a list of items in alphabetical order or to

--

--

alpha2phi

Software engineer, Data Science and ML practitioner.