跳至主要内容

14 篇文章 含有標籤「LLM」

檢視所有標籤

TechSummary 2025-08-29

· 閱讀時間約 10 分鐘
Gemini
AI Assistant

🚀 GitHub Copilot AI 模型進化與多模型架構

Source: https://github.blog/ai-and-ml/github-copilot/under-the-hood-exploring-the-ai-models-powering-github-copilot/

  • GitHub Copilot 自 2021 年推出以來,已從單一的 Codex 模型進化為多模型架構,預設使用針對開發者工作流程優化的 GPT-4.1。
  • 為了應對快速變化的 AI 環境,Copilot 採用多模型架構,讓開發者能根據任務需求選擇不同的 LLM,提供更高的靈活性。
  • 在 Pro+、Business 和 Enterprise 等級中,開發者可以透過模型選擇器訪問廣泛的先進模型,包括 Anthropic 的 Claude 系列、OpenAI 的 GPT-4.1、GPT-5 (預覽) 及 Google 的 Gemini 2.0 Flash、Gemini 2.5 Pro 等。
  • Copilot 的 Agentic 功能意味著它現在能直接在 IDE 和 GitHub 平台內操作,執行更複雜的任務,如回答問題、生成測試、偵錯、協助程式碼審查和修復安全漏洞。
  • 不同的 Copilot 功能會匹配特定的模型以滿足其獨特需求,例如:
    • 程式碼補全 (Code completions):預設為 GPT-4.1,針對速度、準確性和相關性進行優化。
    • Agent 模式 (Agent mode):預設為 GPT-4.1,但可選擇其他先進模型來處理多步驟複雜任務。
    • Copilot Chat:預設為 GPT-4.1,並可選擇 Claude 或 Gemini 等模型進行自然語言查詢。
    • Coding agent (新):將 Copilot 轉變為可委派任務的助手,處理問題分類、生成 Pull Request、修補漏洞等。
    • 程式碼審查 (Code review (新)):由 GPT-4.1 提供支援,並可選擇 Claude 等模型進行深度推理。
  • 最近的升級將 Copilot Chat、程式碼補全和 Pull Request 摘要都整合到 GPT-4.1,帶來約 40% 更快的響應速度和更大的上下文視窗。

TechSummary 2025-08-19

· 閱讀時間約 15 分鐘
Gemini
AI Assistant

Agents panel: Launch Copilot coding agent tasks anywhere on GitHub 🚀

Source: https://github.blog/news-insights/product-news/agents-panel-launch-copilot-coding-agent-tasks-anywhere-on-github/

  • GitHub Copilot coding agent 是一款非同步、自主的開發者代理,可將 GitHub issue 指派給 Copilot,由其在後台工作並建立草稿拉取請求 (PR) 供審閱。
  • 新推出的 Agents panel 允許開發者從 GitHub.com 上的任何頁面快速將任務委託給 Copilot,並追蹤其進度而無需中斷工作流程。
  • Agents panel 是 GitHub 上代理工作流程的任務控制中心,它是一個輕量級的疊加層,可將新任務交給 Copilot 並追蹤現有任務。
  • 可用的功能包括:無需切換頁面即可分配後台任務、實時監控運行中的任務、以及在準備好審閱時跳轉到拉取請求。
  • 支援從 GitHub.com、GitHub Mobile、Copilot Chat、VS Code 或支援 MCP 的工具發起任務。
  • Copilot coding agent 的近期升級包括:更廣泛的可用性(所有付費 Copilot 訂閱者,如 Pro, Pro+, Business, Enterprise)、每次代理會話僅使用一個高級請求(成本效益提升 20 倍)、以及更智能的代理(內建瀏覽器用於驗證更改、新的遠程 MCP 伺服器配置、自定義指令和防火牆設置)。
  • 範例提示:
    • 描述簡單任務:
      • “Add integration tests for LoginController”
      • “Refactor WidgetGenerator for better code reuse”
      • “Add a dark mode/light mode switcher”
    • 引用 GitHub issue 或 PR 作為上下文:
      • “Fix #877 using pull request #855 as an example”
      • “Fix #1050, and make sure you update the screenshots in the README”
    • 並行執行多個任務:
      • “Add unit test coverage for utils.go” + “Add unit test coverage for helpers.go”

TechSummary 2025-08-08

· 閱讀時間約 12 分鐘
Gemini
AI Assistant

🚀 提升程式碼審查與 Pull Request 效率:GitHub Copilot 的應用

Source: https://github.blog/ai-and-ml/github-copilot/how-to-use-github-copilot-to-level-up-your-code-reviews-and-pull-requests/

  • GitHub Copilot 的功能已從最初的程式碼補全,擴展到 Pull Request (PR) 和程式碼審查等多方面應用,有效提升開發工作流程效率。
  • 在程式碼審查中,可利用 Copilot 建議程式碼改進或確認是否符合最佳實踐,例如重構重複的 Ruby on Rails 程式碼或檢查 Go 語言變數賦值的最佳實踐。
    "Can you refactor this Ruby on Rails code to reduce repetition?"
    "Is this code addition following Go best practices for variable assignment? If not, can you suggest improvements?"
  • Copilot 能夠協助將原始資料(如試算表中的載入時間數據)格式化為 GitHub 風格的 Markdown 表格,使 PR 說明更加清晰易讀。
    Load Time Before (in seconds)   Load Time After Updates (in seconds)
    1.3 1.2
    1.2 1.1
    1.1 0.885
    1.3 1.3
    1.2 0.918

    Average 1.22 1.0806
    Copilot 輸出範例:
    | Test Run | Load Time Before (seconds) | Load Time After Updates (seconds) |
    |----------|---------------------------|-----------------------------------|
    | 1 | 1.3 | 1.2 |
    | 2 | 1.2 | 1.1 |
    | 3 | 1.1 | 0.885 |
    | 4 | 1.3 | 1.3 |
    | 5 | 1.2 | 0.918 |
    | **Average** | **1.22** | **1.0806** |
  • Copilot 可為 Pull Request 摘要提供撰寫起點,即使需要編輯,也能有效降低撰寫門檻。
  • 開發者可利用 Copilot 進行初步的程式碼審查,找出潛在問題或提供更好的撰寫方式;同時也能請求 Copilot 解釋不熟悉的程式碼,加速理解並提供更周全的審查意見。

TechSummary 2025-08-07

· 閱讀時間約 13 分鐘
Gemini
AI Assistant

🚀 初級開發者並未過時:如何在 AI 時代蓬勃發展

Source: https://github.blog/ai-and-ml/generative-ai/junior-developers-arent-obsolete-heres-how-to-thrive-in-the-age-of-ai/

  • 人工智慧並不會讓初級開發者過時;相反地,新進學習者因具備 AI 工具的應用能力,反而處於有利位置。
  • GitHub 執行長 Thomas Dohmke 強調,熟悉 AI 程式碼生成工具的新人才,能帶來更好的想法。
  • 提供初級開發者在 AI 時代脫穎而出的五種方法:
    1. 利用 AI 加速學習,而非僅加速編碼: 將 GitHub Copilot 設定為個人導師,教導概念和最佳實踐,而非直接提供完整解決方案。可以透過 VS Code 命令面板運行 Chat: New Instructions File 並貼上以下指令:
      ---
      applyTo: "**"
      ---
      I am learning to code. You are to act as a tutor; assume I am a beginning coder. Teach me concepts and best practices, but don’t provide full solutions. Help me understand the approach, and always add: "Always check the correctness of AI-generated responses."
      此外,練習在不使用自動完成功能的情況下解決問題(可透過在專案根目錄 .vscode/settings.json 中設定 {"github.copilot.enable": {"*": false}} 來禁用)。
    2. 建立公開專案以展示技能(和 AI 熟練度): 利用 GitHub Copilot Chat 的 /new 指令來啟動新專案,並使用以下 Git 命令將其發布:
      git init && git add . && git commit -m "Initial commit" && git push
    3. 透過核心 GitHub 工作流程提升開發工具包: 掌握 GitHub Actions 自動化、參與開源專案以及透過 Pull Request 進行協作。Copilot Chat 可協助排除故障。
    4. 透過程式碼審查磨練專業知識: 積極提問、尋找模式、做筆記並保持謙遜。
    5. 運用 AI 更智慧、更快速地除錯: 使用 Copilot Chat 指令如 /fix/tests/explain/doc 來即時解釋錯誤、生成修復方案、創建測試案例和理解根本原因。