01Chapter 1: What inline completions are and how ghost text worksThis chapter assumes you can edit code in an IDE such as VS Code or a JetBrains IDE. It also assumes you know that a large language model (LLM) predicts text from a prompt, and that you can read short Python or TypeScript snippets. Later chapters build on the ideas introduced here.3 min read
02Chapter 2: Building the request: prefix, suffix and related contextThis chapter assumes you can read Python, know that a language model predicts text from a prompt, and have used ghost-text completions in an editor. It covers what goes into a completion request and how that context is chosen.3 min read
03Chapter 3: Fill-in-the-middle promptingThis chapter assumes you know what a large language model is, can read Python, and understand the prefix and suffix context described in the previous chapter. It covers how a model is asked to write text between two pieces of existing code.3 min read
04Chapter 4: When to ask: triggering, debouncing and cancelling requestsThis chapter assumes you can read TypeScript or Python, know that an editor calls extension code on events, and understand that a model request takes noticeable time. Context assembly and fill-in-the-middle prompts are covered in earlier chapters.3 min read
05Chapter 5: Cleaning model output before showing itThis chapter assumes you know how a fill-in-the-middle (FIM) prompt is built and that you can read short Python and TypeScript snippets. A model's raw output is not safe to show as it is. This chapter covers the cleanup between the model's reply and the ghost text on screen.3 min read
07Chapter 7: Writing a completion provider in an editor extensionThis chapter assumes you can read TypeScript, have built or at least run a VS Code extension, and know the earlier chapters' ideas: prefix and suffix context, debouncing, and cancellation. Here you will see how those ideas map onto the editor's extension API.3 min read
08Chapter 8: Using recent edits as contextThis chapter assumes you know how a completion request is built from the prefix and suffix (the text before and after the cursor), and that you can read a diff. It covers edit history: the record of what you just changed, and why a model can use it to guess what you will change next.3 min read
09Chapter 9: Next edit suggestions: predicting the edit, not just the textThis chapter assumes you know how inline completions work: the model gets the text before and after the cursor and returns ghost text at the cursor. It also assumes you can read a unified diff and basic Python or TypeScript.3 min read
10Chapter 10: Where the next edit goes and how it is shown as a diffThis chapter assumes you have read the chapters on next edit suggestions and on recent edit history as context. You should be comfortable reading a unified diff and know that the model receives your recent edits as part of its prompt.3 min read
11Chapter 11: Choosing between completions and next edit suggestionsThis chapter assumes you know how ghost text is shown at the cursor, how a request is built from prefix, suffix and related files, and what recent edit history is. Here you learn to pick the right feature for the change in front of you.2 min read
12Chapter 12: Measuring quality: acceptance rate, latency and retentionThis chapter assumes you know how a completion request is built and cancelled, and that you can read short Python. It covers the three measures most teams use to judge a completion or next edit suggestion feature, and the mistakes that make those numbers misleading.2 min read
13Chapter 13: Privacy, data handling and licensing considerationsThis chapter assumes you know how a completion request is assembled from the prefix, the suffix and related files. It also assumes you can read short Python. The earlier chapter on context assembly is the starting point, because everything that goes into a request is also data that can leave your ma3 min read
14Chapter 14: Common failure modes and reviewing suggestions safelyThis chapter assumes you know how a completion request is built from the prefix, the suffix and related context. It also assumes you have seen ghost text and next edit suggestions (NES) in an editor. Both features predict text, and a prediction can be wrong in ways that look right.2 min read