# Podpowiadanie kodu w edytorze

EN: **Inline code completion (fill-in-the-middle)** · id `codecompletion` · aliases: code completion, code autocompletion, fill-in-the-middle, FIM, uzupełnianie kodu, autouzupełnianie kodu

Path: [AI Atlas](https://aiatlasgraph.com/llms.txt) › [Aplikacje LLM i agenci](https://aiatlasgraph.com/t/applications.md) › [Agenci kodujący](https://aiatlasgraph.com/t/aicoding.md) › Podpowiadanie kodu w edytorze

## Description

- PL: Model dopisuje kolejne linie lub bloki kodu w miejscu kursora; systemy uczone metodą fill-in-the-middle mogą korzystać zarówno z kodu przed, jak i po luce.
- EN: A model writes the next lines or blocks of code at the cursor; systems trained with fill-in-the-middle can use code both before and after the gap.

## In one sentence

- PL: Edytor sam podsuwa dalszy ciąg kodu, który właśnie piszesz, a ty przyjmujesz go jednym klawiszem albo piszesz dalej.
- EN: Your editor suggests how the code you are typing should continue, and you accept it with one key or keep typing.

## Problem it solves

- PL: Programista traci czas na wpisywanie powtarzalnych fragmentów i szukanie, jak dokładnie wywołać znaną mu tylko z grubsza funkcję.
- EN: Programmers waste time typing repetitive code and looking up exactly how to call a function they only half remember.

## What it does

- PL: Działa jak podpowiedzi słów w telefonie, tylko że zgaduje całe linie kodu, patrząc też na to, co stoi niżej w pliku.
- EN: It works like word suggestions on a phone keyboard, but guesses whole lines of code and also looks at what comes later in the file.

## Everyday example

- PL: Zaczynasz pisać funkcję liczącą rabat, a edytor od razu proponuje jej resztę w szarym kolorze, zgodną z nazwami użytymi wyżej.
- EN: You start writing a function that calculates a discount, and the editor shows the rest of it in grey, using the names from above.

## This concerns you if you…

- PL: piszesz kod w edytorze z asystentem
- PL: chcesz szybciej poznać nieznaną bibliotekę
- EN: write code in an editor with an assistant
- EN: want to learn an unfamiliar library faster

## Keywords

fill-in-the-middle · FIM · GitHub Copilot · Codestral · Qwen2.5-Coder · StarCoder · acceptance rate · next edit suggestions

## How it works

- PL: Model uczony celem fill-in-the-middle dostaje prefiks i sufiks pliku oraz specjalne tokeny i generuje brakujący środek. Serwer dobiera kontekst z otwartych plików, ogranicza długość odpowiedzi i musi zwrócić podpowiedź w ułamku sekundy, więc używa się mniejszych, szybkich modeli.
- EN: A model trained with a fill-in-the-middle objective receives the file's prefix and suffix plus special tokens and generates the missing middle. The server picks context from open files, caps output length and must reply within a fraction of a second, so smaller fast models are used.

## Limits

- PL: Podpowiedzi wyglądają wiarygodnie także wtedy, gdy są błędne lub używają nieistniejących funkcji. Model widzi tylko wybrany fragment projektu, a zbyt częste propozycje rozpraszają; akceptowalność nie mierzy poprawności.
- EN: Suggestions look plausible even when wrong or calling functions that do not exist. The model sees only a slice of the project, frequent suggestions distract, and acceptance rate does not measure correctness.

## Key terms

- PL: **fill-in-the-middle (FIM)**: Trening, w którym model uzupełnia wycięty środek tekstu.
- PL: **prefiks i sufiks**: Kod przed kursorem i kod za kursorem podawany modelowi.
- PL: **współczynnik akceptacji**: Odsetek podpowiedzi, które programista przyjął.
- EN: **fill-in-the-middle (FIM)**: Training in which the model fills in a removed middle of text.
- EN: **prefix and suffix**: Code before and after the cursor given to the model.
- EN: **acceptance rate**: Share of suggestions the programmer accepted.

## Know first

- [Przewidywanie następnego tokenu (modele autoregresyjne) (Next-token prediction objective)](https://aiatlasgraph.com/t/nexttoken.md)
- [Strategie dekodowania (Decoding strategies)](https://aiatlasgraph.com/t/decoding.md)

## Related topics

Untyped, symmetric "see also" links.

- [Benchmarki programistyczne (Coding benchmarks)](https://aiatlasgraph.com/t/codingbench.md)

## Sources

- [Efficient Training of Language Models to Fill in the Middle](<https://arxiv.org/abs/2207.14255>) `fim-bavarian-2022` · by Mohammad Bavarian, Heewoo Jun, Nikolas Tezak, John Schulman, Christine McLeavey, Jerry Tworek, Mark Chen (OpenAI) · sponsored
- [AI-assisted Code Authoring at Scale: Fine-tuning, deploying, and mixed methods evaluation (CodeCompose)](<https://arxiv.org/abs/2305.12050>) `codecompose-2023` · by Vijayaraghavan Murali i in. (Meta) · sponsored

---

AI Atlas revision 122 (2026-10-30) · HTML: https://aiatlasgraph.com/t/codecompletion · index: https://aiatlasgraph.com/llms.txt · everything: https://aiatlasgraph.com/llms-full.txt · updated 2026-10-30
