DeepSeek AI 寫 Code 大測試:中國開源 AI 勁過 Gemini?

Ai




明日屬於今天擁抱它的人

我測試了DeepSeek AI的編程能力——這是它失敗的地方

DeepSeek會成為人工智能的新寵嗎?這款中國開源聊天機器人在編程測試中超越了一些知名的人工智能,儘管它所用的基礎設施遠少於競爭對手。

撰文:David Gewirtz,資深貢獻編輯
2025年1月28日 早上5:24 PT

DeepSeek在上週末突如其來地進入了全球視野。它之所以引人注目有三個主要原因:

1. 它是一款來自中國的人工智能聊天機器人,而非美國的產品。
2. 它是開源的。
3. 它所需的基礎設施遠少於我們所熟悉的大型人工智能工具。

鑒於美國政府對TikTok及其可能涉及的中國政府代碼的擔憂,來自中國的新人工智能無疑會引起關注。ZDNET的Radhika Rajkumar在她的文章《為什麼中國的DeepSeek可能會破裂我們的人工智能泡沫》中深入探討了這些問題。

在這篇文章中,我們不討論政治,而是將DeepSeek置於我曾經對10個其他大型語言模型進行的同一套編程測試中。

簡單來說:表現令人印象深刻,但並不完美。我們來深入了解。

測試1:編寫WordPress插件
這個測試其實是我第一次測試ChatGPT編程能力的測試。當時,我的妻子需要一個WordPress插件,以幫助她為她的在線小組運行一個參與設備。

她的需求相當簡單。插件需要接受一個名字列表,每行一個名字。然後,它必須對名字進行排序,如果有重複的名字,則需要將它們分開,以免並排列出。

我當時沒有時間為她編寫代碼,所以我決定隨意挑戰AI。令我驚訝的是,它成功了。

從那時起,這就成為我評估AI編程能力的首個測試。這需要AI知道如何為WordPress框架設置代碼,並能夠清晰地遵循提示來創建用戶界面和程序邏輯。

大約只有一半的AI能完全通過這個測試。不過,現在我們可以把DeepSeek加入勝利者行列。

DeepSeek成功創建了用戶界面和程序邏輯,完全符合要求。目前為止,DeepSeek已經通過了四項測試中的一項。

測試2:重寫字符串函數
有用戶抱怨他無法在捐款輸入框中輸入美元和美分。原本的代碼僅允許輸入美元。因此,這次測試的內容是給AI提供我寫的例程,要求它重寫以允許同時輸入美元和美分。

通常,這會導致AI生成一些正則表達式驗證代碼。DeepSeek確實生成了有效的代碼,儘管還有改進的空間。DeepSeek寫的代碼過於冗長且重複。我最擔心的是,DeepSeek的驗證確保了最多兩位小數的驗證,但如果輸入一個非常大的數字(例如0.30000000000000004),則使用parseFloat不具備明確的四捨五入知識。

我會給DeepSeek這一項,因為這些問題並不會導致程序在用戶運行時崩潰,並且會生成預期的結果。

這讓DeepSeek的成績來到四項測試中的兩項勝利。

測試3:找出一個令人厭煩的錯誤
這是一個我曾經面對的一個非常煩人的錯誤,難以追蹤的測試。我再次決定看看ChatGPT是否能解決這個問題,它成功了。

挑戰在於答案並不明顯。實際上,挑戰的關鍵在於有一個明顯的答案,根據錯誤信息,但這個明顯的答案是錯誤的。這不僅讓我困惑,還經常讓一些AI困擾。

解決這個錯誤需要理解WordPress中具體API調用的工作原理,能夠超越錯誤信息查看代碼,然後找到錯誤所在。

DeepSeek也通過了這一項,讓我們的勝利數量來到三項,已經超過了Gemini、Copilot、Claude和Meta。

會不會DeepSeek一舉成功?讓我們來看看。

測試4:編寫腳本
又一個失敗。這是一個具有挑戰性的測試,因為它要求AI理解三個環境之間的相互作用:AppleScript、Chrome對象模型和一個名為Keyboard Maestro的Mac腳本工具。

我本來會認為這是一個不公平的測試,因為Keyboard Maestro並不是一個主流的編程工具。但ChatGPT輕鬆應對了這個測試,準確理解了每個工具處理問題的部分。

不幸的是,DeepSeek並沒有這種水平的知識。它不知道需要將任務拆分為對Keyboard Maestro和Chrome的指令。它對AppleScript的知識也相當薄弱,寫出的AppleScript自定義例程不符合語言的本土特性。

這讓DeepSeek的總成績為三項正確測試和一項失敗。

總結思考
我發現DeepSeek堅持使用像gmail.com這樣的公共雲電子郵件地址(而不是我正常的企業域名電子郵件地址)讓我感到不便。它的響應能力也有幾次失敗,導致進行測試的過程比我希望的要長。

在一天的時間裡,我一度不確定是否能寫這篇文章,因為我在註冊時遇到了這個錯誤:

DeepSeek的在線服務最近遭遇了大規模的惡意攻擊。為了確保服務的持續性,註冊暫時限制為+86的電話號碼。現有用戶可以正常登錄。感謝您的理解和支持。

然後,我成功進入並進行了測試。

DeepSeek似乎在生成的代碼上過於冗長。測試4中的AppleScript代碼既錯誤又過於冗長。測試2中的正則表達式代碼是正確的,但可以用更易於維護的方式來編寫。

我確實對DeepSeek超越Gemini、Copilot和Meta感到印象深刻。但它似乎仍然停留在舊版GPT-3.5的水平,這意味著還有很大的改進空間。

對於一個全新的工具,運行在比其他工具低得多的基礎設施上,這可能是一個值得關注的AI。

你怎麼看?你試過DeepSeek嗎?你在使用任何人工智能來支持編程嗎?請在下方評論告訴我們。

以上文章由特價GPT API KEY所翻譯及撰寫。而圖片則由FLUX根據內容自動生成。

🎬 YouTube Premium 家庭 Plan成員一位 只需 HK$148/年

不用提供密碼、不用VPN、無需轉區
直接升級你的香港帳號 ➜ 即享 YouTube + YouTube Music 無廣告播放

立即升級 🔗

🎨 Nano Banana Pro 圖像生成器|打幾句說話就出圖

想畫人像、產品圖、插畫?SSFuture 圖像生成器支援 Flux Gemini Nano Banana Pro 改圖 / 合成, 打廣東話都得,仲可以沿用上一張圖繼續微調。

🆓 Flux 模型即玩,不用登入
🤖 登入後解鎖 Gemini 改圖
📷 支援上載參考圖再生成
⚡ 每天免費額度任你玩
✨ 即刻玩 AI 畫圖
A dynamic, ultra-realistic action shot of a snowboarder performing a high-air jump on a snowy mountain slope. The rider wears a bright green winter jacket, black snow pants, gloves, and a dark beanie, with reflective goggles catching the cold mountain light. A cloud of visible breath escapes from the rider’s mouth in the freezing air. Snow explodes upward from the snowboard, creating sharp, frozen particles suspended mid-air. The background features a dramatic high-altitude landscape with forested slopes and distant mountains under soft, cold blue lighting. Capture cinematic contrast, DSLR realism, 85mm lens, f/2.8, crisp details, slow-motion energy, dynamic composition, atmospheric depth, high-clarity sports photography. Use the original face exactly as it is, without changing a details. A female model with sharp features, defined cheekbones, and intense, direct eye contact (though eyes are slightly in shadow from the hat).
• Aesthetic: Vintage fashion, Pin-up, 1950s/1960s style, high-glamour, summer resort wear.
• Lighting: Bright, harsh sunlight creating high contrast and crisp shadows. The light should perfectly illuminate the skin and the vibrant colors of the dress.
• Color Palette: Dominated by vibrant yellow, crisp white, and bold red, accented by deep black.
Specific Outfit & Details:
• Dress: A bright yellow halter-neck sundress with a classic white polka-dot pattern. It has a fitted, sweetheart neckline or bustier-style top that enhances the silhouette.
• Accessories:
• A very large, wide-brimmed sun hat in crisp white (or light straw/fabric) that casts a shadow over the upper face.
• A matching yellow polka-dot scarf tied closely around the neck (like an ascot or choker-style).
• Large, striking black statement earrings (circular, drop, or bead style).
• Bold red lipstick is a key feature, contrasting sharply with the yellow and white.
Technical/Camera Details:
• Shot: Close-up or medium-close-up portrait, focusing on the torso, neckline, face, and hat.
• Depth of Field: Shallow (low f-stop), with the model in sharp focus and the background slightly blurred (bokeh).
• Background: Out-of-focus, suggesting a bright outdoor location, with abstract shapes of boats/yachts (white and red accents visible) in a marina setting. A low-angle, wide-lens street shot in a bustling cityscape (similar to Shibuya, Tokyo). A young woman crouches confidently beside a modified, glossy purple sports car with a Japanese license plate. She wears a black graphic tee, cargo pants, white sneakers, and silver jewelry. The background features tall glass skyscrapers, colorful billboards, neon signage, and warm late-afternoon lighting. Strong perspective distortion emphasizes the height of the buildings and the car’s aggressive stance. The mood is stylish, bold, and modern, capturing urban automotive culture with a cinematic, hyper-real aesthetic. High detail, high contrast, crisp reflections, editorial fashion vibe, dynamic street energy.