基礎知識指南

生成式 AI:它是什麼、如何運作,以及它的侷限在哪裡

生成式 AI 是人工智慧的一個分支,它透過學習大量範例的統計模式,來產生新的內容,例如文字、圖像、音訊、影片或程式碼,並輸出符合這些模式的新結果。

聆聽此指南AI 語音敘述 · ~9 min

本頁閱讀時間 10 分鐘
  1. 概述
  2. 重點摘要
  3. 深入探討
  4. 追蹤語言模型如何寫出一個句子
  5. 現實世界的實施
  6. 生成式 AI 的未來:它是什麼、如何運作,以及它的侷限在哪裡
  7. 付諸實踐
  8. 資料來源與延伸閱讀
  9. 不斷探索
  10. 常見問題

概述

這很重要,因為同樣的幾項技術現在驅動著被超過一億人使用的聊天機器人、圖像工具和程式碼助手,而且它們的輸出可能聽起來或看起來很有說服力,但實際上卻是錯誤的。

重點摘要

  1. 生成式 AI 學習其訓練資料的統計模式,然後樣本化出符合這些模式的新文字、圖像、音訊或程式碼。
  2. 像 GPT-3 這樣的大型語言模型,會透過預測前文之後最合適的下一個片段,一次生成一個 token(詞元)。
  3. 大多數圖像生成器使用擴散模型,它從隨機雜訊開始,並在文字提示的引導下逐步去除雜訊。
  4. 2017 年 6 月發表的論文《Attention Is All You Need》中提出的 Transformer 架構,是幾乎所有現代大型語言模型的基礎。
  5. NIST 2024 年的《生成式 AI 輪廓》將「幻覺」(confabulation),即自信但錯誤的輸出,列為生成式 AI 造成或惡化的十二項風險之一。
  6. 史丹佛 AI 指數 2025 年報告指出,從 2022 年 11 月到 2024 年 10 月,GPT-3.5 級別的推理成本降低了超過 280 倍。

深入探討

Generative AI is software that makes new things rather than only sorting or scoring existing ones. A traditional machine learning model might look at an email and answer one question: spam or not spam. A generative model can write a reply to that email, draw a picture to go with it, or read it aloud in a synthetic voice. The word generative comes from statistics. A generative model learns an approximation of the probability distribution behind its training data, which is a precise way of saying it learns what typical examples look like and how their parts tend to fit together. Once it has that, it can sample, meaning it can draw new examples that resemble the training data without copying any single one of them.

The most familiar kind is the large language model (LLM), the engine inside chatbots. Text is first cut into tokens, which are short chunks of words or characters. During pretraining the model reads an enormous amount of text and is asked, over and over, to predict the next token from all the tokens before it. Each wrong guess produces an error score, and a procedure called gradient descent nudges the model's parameters, the adjustable numbers inside it, to make that error a little smaller next time. GPT-3, described by OpenAI researchers in May 2020, had 175 billion parameters. When a user types a prompt, the trained model repeats one simple loop: compute a probability for every possible next token, pick one (sometimes the most likely, sometimes a random draw controlled by a setting called temperature), append it, and go again until the answer is finished.

Pretraining alone produces a model that continues text but does not reliably follow instructions. Developers therefore add a second stage. In instruction tuning, the model is trained further on examples of requests paired with good answers. In reinforcement learning from human feedback (RLHF), people rank several model answers, a separate reward model learns to predict those rankings, and the language model is then optimized to score well on that reward model. MIT Technology Review's history of ChatGPT notes that OpenAI's InstructGPT, trained this way in early 2022, followed instructions better and produced less offensive and less false text than the base GPT-3 model, and that ChatGPT was built on the same approach.

Images are usually made with a different mechanism called diffusion. In training, a picture is corrupted with a little random noise, then a little more, over many steps until nothing but static is left. A neural network is trained to undo one step at a time by predicting the noise that was added. To generate, the model starts from pure static and removes noise step by step, guided by a text description, until a clean image appears. The 2020 paper Denoising Diffusion Probabilistic Models by Ho, Jain and Abbeel showed this approach could match or beat earlier methods on image quality, reporting a Frechet Inception Distance (FID, a measure where lower means generated images are statistically closer to real ones) of 3.17 on the CIFAR-10 dataset. An older approach, the generative adversarial network (GAN), introduced by Ian Goodfellow and colleagues in June 2014, trains two networks against each other: a generator that makes fakes and a discriminator that tries to tell fakes from real data.

The key milestones fit on a short timeline. GANs arrived in 2014. In June 2017 the paper Attention Is All You Need introduced the transformer, an architecture that lets every token weigh its relationship to every other token; its English-to-French translation model trained in 3.5 days on eight GPUs and set a new single-model accuracy record. OpenAI's GPT series built on the transformer: GPT-2 in 2019 with 1.5 billion parameters, GPT-3 in 2020, InstructGPT in January 2022 and ChatGPT in late November 2022, according to MIT Technology Review. Diffusion models matured in 2020 and drove the wave of text-to-image tools that followed. Most current systems for text, code, images, audio and video combine these two ideas, transformers and diffusion, in different proportions.

It helps to compare generative AI with the alternatives. Predictive or discriminative AI, such as a fraud detector or a medical image classifier, outputs a label or a number and can be checked against a known right answer, so its accuracy is easy to measure. Generative output is open-ended: there are many acceptable answers to a writing prompt, which makes quality harder to measure and errors harder to spot. Search engines retrieve documents that already exist and point to them; a language model composes new text and, unless it is connected to a retrieval system, cannot show where a statement came from. Rule-based software is predictable and auditable, while generative models are flexible but can give different answers to the same question.

The limitations are well documented. The US National Institute of Standards and Technology (NIST), in its July 2024 Generative AI Profile (NIST AI 600-1), lists twelve risks that generative AI creates or makes worse. The one most users meet first is confabulation, NIST's term for confidently stated but false content, often called hallucination. Others include harmful bias, leaks of private data, intellectual property questions, easier production of disinformation, help for cyberattacks, and environmental costs from heavy computing. Models also have a training cutoff, so they do not know about recent events unless they are given current documents, and they can be steered by cleverly written inputs. None of these problems is fully solved, which is why outputs that matter need checking against a trusted source.

Cost runs on two tracks. Training a frontier model requires thousands of specialized chips for weeks or months, and the Stanford AI Index 2025 reports that the training compute used for notable models has been doubling about every five months. Using a model, called inference, has become far cheaper: the same report finds that the price of querying a system performing at GPT-3.5's level fell more than 280-fold between November 2022 and October 2024, while hardware costs have dropped about 30% a year and energy efficiency has improved about 40% a year. For an individual, that means capable tools are often free or cost a modest monthly subscription. For an organization, the real costs are usually integration, data preparation, review of outputs and the work of deciding where a fallible but fast drafting tool is safe to use.

04工作範例

追蹤語言模型如何寫出一個句子

  1. 從提示詞開始,例如「法國的首都被稱為」,並想像它被分割成詞元(token),大約一個詞一個詞元。

  2. 模型將每個詞元轉換為數字向量,並將整個序列傳遞到其 Transformer 層中,透過注意力機制將每個詞與其他詞連結起來。

  3. 在最後一個位置,它會為其詞彙表中的每個詞元輸出一個分數;經過 softmax 運算後,「 巴黎」的機率可能接近 0.9,而其他詞元則分攤剩餘的機率。

  4. 在低溫度設定下,模型會選擇「 巴黎」;在高溫度設定下,它偶爾會選擇機率較低的詞元,句子就會走向不同的方向。

  5. 被選中的詞元會被附加到提示詞後面,整個預測過程再次運行以產生下一個詞元,例如句號。

  6. 重複此循環,直到模型發出特殊的結束詞元或達到長度限制為止,然後將結果與受信賴的來源進行比對。

它顯示了什麼

學習者最終能對下一個詞元的生成有清晰的理解:每個詞都是在所有先前詞元的條件下進行抽樣猜測的結果。為了驗證這個概念,可以向聊天機器人多次詢問同一個事實問題;用詞上的微小變化展現了抽樣的運作過程,而任何錯誤的回答則說明了為什麼輸出結果需要經過驗證。

現實世界的實施

聊天助理:根據《麻省理工科技評論》(MIT Technology Review)對該產品歷史的記載,ChatGPT 於 2022 年 11 月下旬由 OpenAI 作為網路應用程式發布,大約兩個月後就吸引了約 1 億名用戶。

客戶支援:Brynjolfsson、Li 和 Raymond 對 5,172 名客服代表的研究發現,使用生成式 AI 助理平均使每小時解決的問題數量提高了約 15%,其中經驗較少的員工獲得的提升最大。

圖像創作:由 2020 年的「去噪擴散概率模型」(Denoising Diffusion Probabilistic Models)論文所普及的擴散模型,能一步步將隨機雜訊轉化為圖片,這個相同的概念也是廣泛用於插圖和設計草稿的文字轉圖像工具的基礎。

寫作與草擬:GPT-3 是一個在 2020 年描述、擁有 1750 億個參數的模型,能夠撰寫出讓人類評估員難以區分是否為人類所寫的新聞風格文章,這既是一項能力,也是一項錯誤資訊的風險。

企業投資:史丹佛大學 2025 年人工智慧指數(Stanford AI Index 2025)報告指出,隨著企業將生成式 AI 納入日常軟體中,它在 2024 年在全球吸引了 339 億美元的私人投資,較 2023 年成長了 18.7%。

生成式 AI 的未來:它是什麼、如何運作,以及它的侷限在哪裡

Several open problems shape the direction of work. Reliability is the largest: NIST's 2024 profile treats confabulation as a core risk, and researchers are testing retrieval from trusted documents, citation checking and models that state their uncertainty, none of which yet removes errors entirely. Efficiency is a second front. The Stanford AI Index 2025 documents rapid declines in inference cost alongside training compute that keeps doubling roughly every five months, so the field is pulling in two directions at once: very large frontier models and small models cheap enough to run on a phone or laptop. A third direction is multimodality, meaning single models that take in and produce text, images, audio and video together, and agents, which are generative models allowed to call tools, browse or run code to finish multi-step tasks. Each of these adds new ways to fail, so evaluation methods are being developed alongside them. Policy is moving too. Content provenance labels for AI-generated media, court cases over training data, and risk frameworks such as NIST AI 600-1 will influence what developers may train on and how outputs must be disclosed. Economic effects remain uncertain: field studies such as Brynjolfsson, Li and Raymond's customer-support study show measurable productivity gains in specific jobs, but how those results generalize across whole industries is still being measured.

付諸實踐

為什麼這很重要

  • 更明確的決策. 它可以幫助您將清晰的技術聲明與行銷語言分開。
  • 成本與預算. 在花費金錢或時間之前,您可以提出更好的實施問題。
  • 團隊與工作流程. 具有共同理解的團隊可以做出更好的產品、政策和學習決策。

留意

  • 不同的團隊可能會以不同的方式使用相同術語,因此請儘早定義範圍。
  • 基準測試可能看起來很強大,但實際效能卻參差不齊。
  • 忽視數據品質和評估計劃通常會產生脆弱的結果。

後續步驟

  1. 從您需要的結果的簡單語言定義開始。
  2. 在測試之前選擇一種成功指標和一種失敗條件。
  3. 使用代表性資料運行小型試點,而不是完善的演示集。
  4. 記錄《生成式 AI:它是什麼、如何運作以及它的不足之處》(Generative AI: What It Is, How It Works and Where It Falls Short)在哪裡能提供幫助,以及在哪裡採用較簡單的方法會更好。

資料來源與延伸閱讀

  1. arXiv (Goodfellow et al., 2014)生成對抗網絡
  2. arXiv (Vaswani et al., 2017)您所需要的就是關注
  3. arXiv (Brown et al., 2020)Language Models are Few-Shot Learners
  4. arXiv (Ho, Jain and Abbeel, 2020)去噪擴散機率模型
  5. MIT Technology ReviewChatGPT 無處不在。以下是它的由來
  6. National Institute of Standards and Technology人工智慧風險管理框架:生成式人工智慧剖析(NIST AI 600-1)
  7. Stanford Institute for Human-Centered AI2025年人工智慧指數報告
  8. arXiv (Brynjolfsson, Li and Raymond)Generative AI at Work

不斷探索

免費電子報

獲取每日 AI 簡報

每個工作日上午提供三則經過驗證的 AI 新聞,以淺顯易懂的英文撰寫。永久免費,無廣告。

每個工作日一封電子郵件。一鍵取消訂閱。我們絕不出售或分享您的地址。

測試一下自己

參加《生成式 AI:它是什麼、如何運作以及它的不足之處》(Generative AI: What It Is, How It Works and Where It Falls Short)隨堂測驗

每個答案皆有即時回饋,通過課程後可獲得具備可驗證 ID 的可分享證書。

開始測驗

支持免費的 AI 教育。AI Understanding 是一個 501(c)(3) 非營利組織——絕無廣告,絕無付費牆。 捐款

常見問題

什麼是生成式 AI:它是什麼、如何運作以及有哪些不足?

生成式 AI 是人工智慧的一個分支,透過學習大量範例的統計模式,創造出新的內容,如文字、圖像、音訊、影片或程式碼,並產生符合這些模式的全新輸出。它之所以重要,是因為同樣的幾項技術現在支援聊天機器人、圖像工具與程式碼助理,已被超過一億人使用;同時,這些輸出雖然看起來或聽起來很可信,卻仍可能是錯誤的。

哪個輸出最能說明指引中所述的生成式人工智慧?

該指南描述了產生的輸出,例如文字、圖像、音訊和程式碼。

流暢產生的摘要包含在其來源中未找到的聲明。審稿人該做什麼?

該指南警告說,提供的來源可以提高相關性,但輸出可能仍包含不受支援的主張。

哪一個描述與指南中基於擴散的影像生成相符?

指南稱,擴散系統學習將雜訊表示轉換為樣本。

評估產生的程式碼時應該檢查什麼?

該指南建議檢查程式碼行為並執行有意義的測試。

為什麼要打開並檢查生成的引文?

指南指出,看似合理的引文可能不存在,必須經過驗證。