Welcome to Codeium! This document contains information on what to expect from Codeium and how to best utilize it within your development workflows!
What is Codeium?
Codeium for Enterprises currently has Autocomplete functionality, which passively produces suggestions in grayed out text on every keystroke. The suggestion UX is best suited to accelerate you when you know roughly what to code and need to execute. Autocomplete helps you stay in the flow state, a state very key to a high developer productivity.
Tips and Tricks
Some tips on how to get the most out of your Codeium experience:
- The biggest determinant of suggestion quality is the context that is available to the model. Therefore, Codeium will perform best when you are developing in source files that already have code relevant to what you wish to write (as opposed to empty or near-empty files).
- Currently, Codeium is able to pull content from the file you are editing, as well as other nearby files. As we develop our product further, you can expect Codeium to be able to draw on even more sources of context in your codebase, which should further improve generation quality.
- Standard docstrings and comments will help Codeium Autocomplete better understand your intent for a particular piece of code, as well as using descriptive and accurate names for variables, functions, classes, etc. This is good coding practice anyways 🙂
- Extracting smaller well-defined “helper” parts from a large block of logic, such as helper functions for a large script, will likely lead to more aggregate usefulness. This is good coding practice anyways as well!
- Codeium biases towards giving shorter suggestions (usually up to 5 - 10 lines). This is because we have learned that users subconsciously do not review the entirety of longer suggestions, which makes it more likely to inadvertently introduce some errors or “hallucinations” (i.e. code that looks right but references functions or data structures that don’t actually exist). If a suggestion does not “complete” a full code block, such as a function body, accept (press tab) and look at the next suggestion, thereby building out the full desired logic incrementally.
- Autocomplete uses a passive model, which means that it works best given code that you would normally type as part of coding without an AI. This is opposed to an instructive model such as what is underlying a tool like ChatGPT, where you would provide instructions for a task. Therefore, you should not expect the autocomplete model to interpret commands, even those disguised as comments. Similarly, autocomplete is not meant to be used “interactively” such as asking questions about code. This modality will be coming to enterprises shortly as we port our Chat functionality to the enterprise offering.
- Codeium is a "fill in the middle'' model, which means that it will be able to generate code based on both content above and content below the cursor position. Codeium can also generate suggestions “inline,” i.e. when there is text both before and after the cursor on the same line - these kinds of suggestions are not available on tools such as Copilot, so keep an eye out for them!
AI is Not Perfect
First of all, the user has full ownership and is responsible for the code generated and accepted by Codeium. Do not accept suggestions blindly and properly review the code that is generated. We have made many modifications to help limit risk, such as not generating extremely long generations since it would be easier to miss a potential bug in a large block of code, but the outputs should still be carefully reviewed. We have done a lot of work to remove insecure, license-violating, and poor quality code from our training data, but LLMs are inherently large probabilistic models, and so you may be able to generate such code with enough adversarial behavior. It is best to code naturally and not attempt to "trick" the model.