本文へスキップ

コード補完とコーディング支援

エディタ上でコードを補完・説明・修正する

入力テキストコードコード

本ページの本文は英語で提供されています。タイトルと導入は日本語化されています。

この能力とは何か

Takes the code context around the cursor plus an intent — complete a line, change a function, explain the logic — and outputs an edit that can be adopted directly. Its constraint is consistency with the existing repository rather than producing an isolated snippet. Unlike code generation it makes local changes inside existing files and conventions, and therefore leans more on context.

技術的にどう実現するか

A common approach concatenates the current file, nearby symbols and retrieved related snippets into the prompt so the model completes or rewrites within full context; repository-level assistants use code retrieval to surface relevant definitions and call sites. Edit requests are often framed as generating a patch that is then applied, which makes review and rollback easy. The system is tightly coupled to the IDE and needs low-latency inference with incremental context updates.

代表的な製品

4

Microsoft

GitHub Copilot

エディタ上で文脈に沿ってコードを補完・改写する

2能力
ツール フリーミアム
テキストコードコード
2021

Anysphere (Cursor)

Cursor

リポジトリ全体を文脈にするデスクトップコードエディタ

3能力
アプリ フリーミアム
テキストコードコード
2023

Anthropic

Claude Code

ターミナルから多段のコーディング作業をこなすエージェント

3能力
ツール クローズド
テキストコードコード
2025

Cognition (Devin)

Devin

シェル・エディタ・ブラウザを備えた自律型コーディングエージェント

4能力
アプリ クローズド
テキストコードコード
2024

関連する組織

代表的な用途

  • Line-by-line completion while coding
  • Bug fixes and refactoring suggestions
  • Explaining code and onboarding into an unfamiliar repo
  • Writing tests and doc strings

どう評価するか

Suggestion acceptance rate
Share of suggestions developers keep, closest to real experience
pass@k
One-shot success on tasks with tests
Test pass rate for a single edit
Whether the repository tests still pass after one edit

限界と難しさ

  • It edits the wrong variable or misses call sites, producing code that clashes with the surrounding semantics
  • Repository understanding is capped by the context window, so distant constraints are missed in large projects
  • It can emit outdated or insecure patterns that the author must review

背景にある概念

自然言語処理と大規模言語モデル

Transformer アーキテクチャ中級

「一語ずつの伝言」を「全員が同時に話す会議」に置き換え、長距離依存を一跳で届かせる

4関連
図解 2 · データ 2

AI エンジニアリング・安全性・倫理

検索拡張生成初級

知識をパラメータに詰め込むより、外に置いて必要なときに引く —— 持ち込み可の試験のように

4関連
図解 2 · データ 1