Gợi ý mã và trợ lý lập trình
Viết tiếp, giải thích và sửa mã ngay trong trình soạn thảo
Toàn văn của trang này được trình bày bằng tiếng Anh; tiêu đề và phần dẫn đã được bản địa hóa.
NĂNG LỰC NÀY NGHĨA LÀ GÌ
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.
Làm ra sao về mặt kỹ thuật
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.
Sản phẩm tiêu biểu
4GitHub Copilot
2021Hoàn thiện và viết lại mã trong trình soạn thảo theo ngữ cảnh
Cursor
2023Trình soạn thảo mã trên máy tính lấy cả kho mã làm ngữ cảnh
Claude Code
2025Tác nhân lập trình hoàn thành việc nhiều bước ngay trong terminal
Devin
2024Tác nhân lập trình tự chủ có shell, trình soạn thảo và trình duyệt riêng
Tổ chức liên quan
Cách dùng tiêu biểu
- Line-by-line completion while coding
- Bug fixes and refactoring suggestions
- Explaining code and onboarding into an unfamiliar repo
- Writing tests and doc strings
Đánh giá nó tốt hay không thế nào
- 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
Ranh giới và điểm khó
- 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
Các khái niệm đằng sau
Kiến trúc Transformer
Thay cách truyền từng từ bằng một phòng họp nơi mọi từ cùng lên tiếng, để phụ thuộc xa chỉ còn cách một bước
Sinh văn bản tăng cường truy xuất
Thay vì nhồi kiến thức vào tham số, hãy để nó ở ngoài và tra khi cần — như thi mở sách
Kỹ thuật prompt và căn chỉnh
Làm cho mô hình hữu ích, trung thực và vô hại khó hơn việc chỉ phóng to nó