THE LIFECYCLE OF A CODE AI COMPLETION
Code completion tools provide background LLMs with the right context, such as related files and code snippets from the project. This process, known as retrieval augmented generation (RAG), helps guide LLMs to produce more accurate code completions. Sourcegraph's team has detailed the engineering optimizations they implemented to improve code suggestion quality and speed with Cody autocomplete. For example, they found that including whitespace at the end of prompts causes significantly worse responses.