Written by Ukeje Goodness✏️
With the advent of artificial intelligence (AI), developers and individuals across many walks of life have explored using the technology in various fields. In October 2021, GitHub released the Copilot AI tool that shipped with IDE extensions for code autocompletion. Copilot has since garnered great popularity because of its effectiveness.
Replit is one of the most popular online-based IDEs, and in September 2022, they announced that they had added support for an AI Mode that incorporated modern AI into their IDE features. The AI Mode includes a machine learning-enabled pair programmer to complete your code, among other features, with the goal of increasing your productivity.
In this article, you’ll learn about Replit’s Ghostwriter, its features, and how you can use Ghostwriter in your REPLs. We’ll cover the following:
- What is Ghostwriter?
- How Ghostwriter works
- Ghostwriter’s features
- Why you should use Ghostwriter
- What’s next for Ghostwriter
- Ghostwriter vs. Copilot
What is Ghostwriter?
Ghostwriter is an AI engine for the online Replit IDE that helps with code autocompletion and development by recommending code based on your operations. The experience of working with Ghostwriter is similar to Replit’s Multiplayer Mode, except that you get to collaborate with the AI as a pair programmer that recommends code to fit your use case.
Ghostwriter is rumored to be over twice as fast as GitHub’s Copilot AI, making web development faster while reducing much of the hassle and increasing productivity. Ghostwriter was publicly released on 31 October 2022 as part of the Replit AI Mode. Like Copilot, Ghostwriter is a paid service.
How Ghostwriter works
Ghostwriter suggests your subsequent lines and statements of code by analyzing previous lines you’ve written in the language, the packages you installed, and other interactions.
Replit built Ghostwriter on the open source scene based on Salesforce’s Codegen, using Nvidia’s FasterTransformer and Triton server for highly optimized decoders, and the knowledge distillation process of the CodeGen model from two billion parameters to a faster model of one billion parameters.
Ghostwriter’s features
Ghostwriter is similar to many other programming AI applications but it includes improvements and features that you won’t find in other AI tools.
Here are a few of the features Ghostwriter enables you to use in your code REPLs:
Code suggestion and autocompletion
Ghostwriter suggests autocompletions for your code, and functions for speedy development in a simple and interactive manner, similar to using a regular pair programming tool.
Code generation
With Ghostwriter, you can generate lines of code, functions, files, and programs. Replit introduced the “Generate Code” feature in June 2022, featuring an AI that generates code from your word specification.
With Ghostwriter, you get to describe the program's behavior or function, and the AI returns the code for your app’s development.
Code explanations
Replit provides an Explain Code button for code explanations powered by OpenAI’s codex:
You select the code in your editor and then choose the Explain Code feature that presents an explanation of your specified line or code, function, or any other parts of your code.
Semantic search
Semantic search is one of the most useful features in Replit’s AI Mode. With semantic search, you can enter a query for code and retrieve code results that match your query.
The tool returns multiple results of code snippets from popular open source repositories that you can use in your project.
Why you should use Ghostwriter
Ghostwriter and the other AI Mode features are among the most significant upgrades to Replit over the years, especially for speedy development.
With Ghostwriter as your pair programmer enabling you to quickly write functional code, you will eventually reduce your development time.
Ghostwriter’s code explanation feature also boosts collaboration among teams because you can easily use the feature to check for code functionalities without going through the hassle of communication.
Because Replit doesn’t share your code from the AI Mode features, and Ghostwriter is just a code recommendation tool, you can use the AI for critical purposes. Replit only asks for feedback so they can improve the AI for yourself and other users. You retain the right of your REPLs depending on the license of your REPL.
What’s next for Ghostwriter
Ghostwriter is now available for public use as part of Replit’s AI Mode and you’ll be able to use the AI tool in any of your REPLs, irrespective of the license.
Replit hopes to improve Ghostwriter’s features for better productivity and workflows. Features for learning new concepts, code analysis, and more will be available in the AI Mode. In the future, Ghostwriter will also include post-training quantization of weights, activation to int8
precision, optimized kernels for reduced latency, and, eventually, higher model accuracy.
Replit is also planning for Ghostwriter to feature autoregressive language models for improved interactivity and further training of the LLMs (Large Language Models) with deep reinforcement learning for features like user feedback, test accuracy, and runtime errors.
Ghostwriter vs. Copilot
Ghostwriter and Copilot are code AI tools, and they share similar features. Just like Ghostwriter, Copilot supports automatic code completion, and Copilot has a feature similar to Replit’s Codegen for generating code based on specific queries.
The tools support code generation and code explanation with OpenAI’s codex; however, there are distinct features for each of them.
Copilot supports extra features, like unit testing and generating complex algorithms to match conventions and contexts, which Ghostwriter does not. Ghostwriter is also only available on Replit’s editor, unlike Copilot, which is available on many IDEs and editors from VS Code to all JetBrains IDEs (WebStorm, GoLand, etc).
You can check out this article to learn more about GitHub’s Copilot AI tool and how you can get started developing with the tool.
Feature | Replit’s Ghostwriter | GitHub’s Copilot |
---|---|---|
Code completion | Yes | Yes |
Availability | Replit | VS Code, JetBrains IDEs, and more |
Code generation | Yes | Yes |
Other features | Testing and complex algorithm generation |
Conclusion
In this article, you learned about the features of Replit’s Ghostwriter, an AI engine that helps with code autocompletion, and compared it to GitHub’s Copilot. Since Ghostwriter is only available on Replit, you can use the AI when you use Replit, and choose Copilot when you’re using your favorite IDE apps.
Latest comments (0)