Glossary

术语表

Fundamental Concepts

基本概念

Prompt: A prompt is the input, typically in the form of a question, instruction, or statement, that a user provides to an AI model to elicit a response. The quality and structure of the prompt heavily influence the model’s output, making prompt engineering a key skill for effectively using AI.

提示词(Prompt):提示词是用户提供给 AI 模型的输入,通常以问题、指令或陈述的形式出现,用于引发响应。提示词的质量和结构极大地影响模型的输出,使提示词工程成为有效使用 AI 的关键技能。

Context Window: The context window is the maximum number of tokens an AI model can process at once, including both the input and its generated output. This fixed size is a critical limitation, as information outside the window is ignored, while larger windows enable more complex conversations and document analysis.

上下文窗口(Context Window):上下文窗口是 AI 模型一次可以处理的最大 token 数量,包括输入和生成的输出。这个固定大小是一个关键限制,因为窗口外的信息会被忽略,而更大的窗口可以实现更复杂的对话和文档分析。

In-Context Learning: In-context learning is an AI’s ability to learn a new task from examples provided directly in the prompt, without requiring any retraining. This powerful feature allows a single, general-purpose model to be adapted to countless specific tasks on the fly.

上下文学习(In-Context Learning):上下文学习是 AI 直接从提示词中提供的示例学习新任务的能力,无需任何重新训练。这个强大的功能允许单个通用模型即时适应无数特定任务。

Zero-Shot, One-Shot, & Few-Shot Prompting: These are prompting techniques where a model is given zero, one, or a few examples of a task to guide its response. Providing more examples generally helps the model better understand the user’s intent and improves its accuracy for the specific task.

零样本、单样本和少样本提示(Zero-Shot, One-Shot, & Few-Shot Prompting):这些是提示技术,其中向模型提供零个、一个或几个任务示例来指导其响应。提供更多示例通常有助于模型更好地理解用户意图,并提高特定任务的准确性。

Multimodality: Multimodality is an AI’s ability to understand and process information across multiple data types like text, images, and audio. This allows for more versatile and human-like interactions, such as describing an image or answering a spoken question.

多模态(Multimodality):多模态是 AI 理解和处理多种数据类型(如文本、图像和音频)信息的能力。这允许更多样化和类人的交互,例如描述图像或回答口头问题。

Grounding: Grounding is the process of connecting a model’s outputs to verifiable, real-world information sources to ensure factual accuracy and reduce hallucinations. This is often achieved with techniques like RAG to make AI systems more trustworthy.

基础化(Grounding):基础化是将模型输出连接到可验证的真实世界信息源的过程,以确保事实准确性并减少幻觉。这通常通过 RAG 等技术实现,使 AI 系统更值得信赖。

Core AI Model Architectures

核心 AI 模型架构

Transformers: The Transformer is the foundational neural network architecture for most modern LLMs. Its key innovation is the self-attention mechanism, which efficiently processes long sequences of text and captures complex relationships between words.

Transformers:Transformer 是大多数现代 LLM 的基础神经网络架构。其关键创新是自注意力机制,可以高效处理长文本序列并捕获单词之间的复杂关系。

Recurrent Neural Network (RNN): The Recurrent Neural Network is a foundational architecture that preceded the Transformer. RNNs process information sequentially, using loops to maintain a “memory” of previous inputs, which made them suitable for tasks like text and speech processing.

循环神经网络(Recurrent Neural Network, RNN):循环神经网络是 Transformer 之前的基础架构。RNN 按顺序处理信息,使用循环来维护先前输入的”记忆”,这使它们适合文本和语音处理等任务。

Mixture of Experts (MoE): Mixture of Experts is an efficient model architecture where a “router” network dynamically selects a small subset of “expert” networks to handle any given input. This allows models to have a massive number of parameters while keeping computational costs manageable.

专家混合(Mixture of Experts, MoE):专家混合是一种高效的模型架构,其中”路由器”网络动态选择一小部分”专家”网络来处理任何给定的输入。这允许模型拥有大量参数,同时保持可管理的计算成本。

Diffusion Models: Diffusion models are generative models that excel at creating high-quality images. They work by adding random noise to data and then training a model to meticulously reverse the process, allowing them to generate novel data from a random starting point.

扩散模型(Diffusion Models):扩散模型是擅长创建高质量图像的生成模型。它们通过向数据添加随机噪声,然后训练模型精确地逆转该过程来工作,允许它们从随机起点生成新颖的数据。

Mamba: Mamba is a recent AI architecture using a Selective State Space Model (SSM) to process sequences with high efficiency, especially for very long contexts. Its selective mechanism allows it to focus on relevant information while filtering out noise, making it a potential alternative to the Transformer.

Mamba:Mamba 是一种最新的 AI 架构,使用选择性状态空间模型(SSM)以高效率处理序列,特别是对于非常长的上下文。其选择性机制允许它专注于相关信息同时过滤噪声,使其成为 Transformer 的潜在替代方案。

The LLM Development Lifecycle

LLM 开发生命周期

The development of a powerful language model follows a distinct sequence. It begins with Pre-training, where a massive base model is built by training it on a vast dataset of general internet text to learn language, reasoning, and world knowledge. Next is Fine-tuning, a specialization phase where the general model is further trained on smaller, task-specific datasets to adapt its capabilities for a particular purpose. The final stage is Alignment, where the specialized model’s behavior is adjusted to ensure its outputs are helpful, harmless, and aligned with human values.

强大语言模型的开发遵循明确的顺序。它始于预训练(Pre-training),在大量通用互联网文本数据集上训练大规模基础模型,以学习语言、推理和世界知识。接下来是微调(Fine-tuning),这是一个专业化阶段,在较小的特定任务数据集上进一步训练通用模型,以使其能力适应特定目的。最后阶段是对齐(Alignment),调整专业化模型的行为,以确保其输出有帮助、无害且与人类价值观保持一致。

Pre-training Techniques: Pre-training is the initial phase where a model learns general knowledge from vast amounts of data. The top techniques for this involve different objectives for the model to learn from. The most common is Causal Language Modeling (CLM), where the model predicts the next word in a sentence. Another is Masked Language Modeling (MLM), where the model fills in intentionally hidden words in a text. Other important methods include Denoising Objectives, where the model learns to restore a corrupted input to its original state, Contrastive Learning, where it learns to distinguish between similar and dissimilar pieces of data, and Next Sentence Prediction (NSP), where it determines if two sentences logically follow each other.

预训练技术:预训练是模型从大量数据中学习通用知识的初始阶段。这方面的顶级技术涉及模型学习的不同目标。最常见的是因果语言建模(CLM),其中模型预测句子中的下一个单词。另一种是掩码语言建模(MLM),其中模型填充文本中故意隐藏的单词。其他重要方法包括去噪目标,其中模型学习将损坏的输入恢复到其原始状态,对比学习,其中它学习区分相似和不相似的数据片段,以及下一句预测(NSP),其中它确定两个句子是否在逻辑上相互跟随。

微调技术:微调是使用较小的专业化数据集将通用预训练模型适应特定任务的过程。最常见的方法是监督微调(SFT),其中模型在标记的正确输入输出对示例上进行训练。一个流行的变体是指令调优,专注于训练模型更好地遵循用户命令。为了使此过程更高效,使用参数高效微调(PEFT)方法,顶级技术包括 LoRA(低秩适应),仅更新少量参数,以及其内存优化版本 QLoRA。另一种技术,检索增强生成(RAG),通过在微调或推理阶段将模型连接到外部知识源来增强模型。

Alignment & Safety Techniques: Alignment is the process of ensuring an AI model’s behavior aligns with human values and expectations, making it helpful and harmless. The most prominent technique is Reinforcement Learning from Human Feedback (RLHF), where a “reward model” trained on human preferences guides the AI’s learning process, often using an algorithm like Proximal Policy Optimization (PPO) for stability. Simpler alternatives have emerged, such as Direct Preference Optimization (DPO), which bypasses the need for a separate reward model, and Kahneman-Tversky Optimization (KTO), which simplifies data collection further. To ensure safe deployment, Guardrails are implemented as a final safety layer to filter outputs and block harmful actions in real-time.

对齐和安全技术:对齐是确保 AI 模型行为与人类价值观和期望保持一致的过程,使其有帮助且无害。最突出的技术是基于人类反馈的强化学习(RLHF),其中在人类偏好上训练的”奖励模型”指导 AI 的学习过程,通常使用近端策略优化(PPO)等算法来保持稳定性。已经出现了更简单的替代方案,例如直接偏好优化(DPO),它绕过了对单独奖励模型的需求,以及 Kahneman-Tversky 优化(KTO),它进一步简化了数据收集。为确保安全部署,实施护栏作为最终安全层,以实时过滤输出并阻止有害行为。

Enhancing AI Agent Capabilities

增强 AI 智能体

AI agents are systems that can perceive their environment and take autonomous actions to achieve goals. Their effectiveness is enhanced by robust reasoning frameworks.

AI 智能体是能够感知其环境并采取自主行动以实现目标的系统。它们的有效性通过强大的推理框架得到增强。

Chain of Thought (CoT): This prompting technique encourages a model to explain its reasoning step-by-step before giving a final answer. This process of “thinking out loud” often leads to more accurate results on complex reasoning tasks.

思维链(Chain of Thought, CoT):这种提示技术鼓励模型在给出最终答案之前逐步解释其推理。这种”大声思考”的过程通常会在复杂推理任务上产生更准确的结果。

Tree of Thoughts (ToT): Tree of Thoughts is an advanced reasoning framework where an agent explores multiple reasoning paths simultaneously, like branches on a tree. It allows the agent to self-evaluate different lines of thought and choose the most promising one to pursue, making it more effective at complex problem-solving.

思维树(Tree of Thoughts, ToT):思维树是一种高级推理框架,其中智能体探索多个推理路径,就像树上的分支一样。它允许智能体探索不同的思路并选择最有希望的路径,使其在复杂问题解决方面更有效。

ReAct (Reason and Act): ReAct is an agent framework that combines reasoning and acting in a loop. The agent first “thinks” about what to do, then takes an “action” using a tool, and uses the resulting observation to inform its next thought, making it highly effective at solving complex tasks.

ReAct(推理与行动,Reason and Act):ReAct 是一个智能体,在循环中结合推理和行动。Agent 首先”思考”要做什么,然后使用工具采取”行动”,并使用结果观察来通知其下一个想法,使其在解决复杂任务方面非常有效。

Planning: This is an agent’s ability to break down a high-level goal into a sequence of smaller, manageable sub-tasks. The agent then creates a plan to execute these steps in order, allowing it to handle complex, multi-step assignments.

规划(Planning):这是智能体将高级目标分解为一系列较小的、可管理的子任务的能力。然后智能体使用计划来按顺序执行这些步骤,使其能够处理复杂的多步骤任务。

Deep Research: Deep research refers to an agent’s capability to autonomously explore a topic in-depth by iteratively searching for information, synthesizing findings, and identifying new questions. This allows the agent to build a comprehensive understanding of a subject far beyond a single search query.

深度研究(Deep Research):深度研究是指智能体迭代搜索信息、综合发现和识别新问题来自主深入探索主题的能力。这允许智能体获得对主题的全面理解,远超单个搜索查询。

Critique Model: A critique model is a specialized AI model trained to review, evaluate, and provide feedback on the output of another AI model. It acts as an automated critic, helping to identify errors, improve reasoning, and ensure the final output meets a desired quality standard.

批评模型(Critique Model):批评模型是一种专门的 AI 模型,经过训练可以审查、评估和提供关于另一个 AI 模型输出的反馈。它充当自动批评者,有助于识别错误、改进推理并确保最终输出符合期望的质量标准。

Index of Terms

术语索引

This index of terms was generated using Gemini Pro 2.5. The prompt and reasoning steps are included at the end to demonstrate the time-saving benefits and for educational purposes.

此术语索引使用 Gemini Pro 2.5 生成。提示词和推理步骤包含在末尾,以展示 AI 辅助索引创建的效率优势并用于教育目的。

A

A

B

B

C

C

D

D

E

E

F

F

G

G

H

H

I

I

J

J

K

K

L

L

M

M

N

N

O

O

P

P

Q

Q

R

R

S

S

T

T

U

U

V

V

W

W

Z

Z

Prompt

提示词

Below is the prompt that was utilized to create this index of terms.

以下是用于创建此术语索引的提示词。

do you read https://docs.google.com/document/d/1rsaK53T3Lg5KoGwvf8ukOUvbELRtH-V0LnOIFDxBryE/edit?tab=t.0 and all the related documents in the first page Please extract all the titles for each chapter. and print them. Then process the content of all the individual chapters, and create a detailed index used for publishing, a list of words or phrases (‘headings’) and associated pointers (‘locators’) to where useful material relating to that heading can be found in a document or collection of documents. I don’t want a sample index. I want the full index, with 100 index terms
请阅读 https://docs.google.com/document/d/1rsaK53T3Lg5KoGwvf8ukOUvbELRtH-V0LnOIFDxBryE/edit?tab=t.0 及第一页中的所有相关文档。请提取各章节的所有标题并打印出来。然后处理所有独立章节的内容,创建一个用于出版的详细索引,包含单词或短语列表(”标题”)以及指向文档或文档集合中相关有用材料位置的指针(”定位符”)。我不需要示例索引,而是要求完整的索引,包含 100 个索引术语

Gemini 2.5: Reasoning Steps

Gemini 2.5:推理步骤

Beginning Index Creation

开始创建索引

I’ve initiated the process by reading the Google Doc provided. Currently, I’m focusing on understanding the user’s request: extracting chapter titles to build a detailed index. I’m carefully reviewing the document, looking for clear structural elements that would indicate chapter breaks. I’m hoping to identify consistent formatting or keywords that will guide the indexing process.

我已启动索引创建流程,首先阅读了提供的 Google 文档。目前,我专注于理解用户需求:提取章节标题以构建详细索引。正在仔细审查文档内容,寻找能够标识章节分隔的清晰结构元素,期望能够识别出一致的格式模式或关键词来指导索引过程。

Defining Index Extraction Process

定义索引提取流程

I’m now fully immersed in this task. I’ve broken down the user’s request into actionable steps. My initial focus is using Workspaces to access the main Google Doc. Following this, I’ll parse the document to locate and retrieve related documents, which will also be accessed using the same tool. Finally, I will extract all chapter titles from all the documents, and create a comprehensive index. I’ve planned the detailed process.

现在已完全投入到此任务中。已将用户请求分解为可执行的步骤:初始阶段使用 Workspaces 访问主 Google 文档,接着解析文档以定位并检索相关文档(同样使用 Workspaces 工具),最后从所有文档中提取章节标题并创建全面索引。已规划完整的详细流程。

Refining the Extraction Strategy

完善提取策略

The user’s instructions are clear: read a Google document, its related documents, and build a detailed index of chapter titles. I’ve devised a multi-step plan: Workspaces will first access the main document, then I’ll parse it to find and read related documents, also using Workspaces. I’m now focusing on extracting titles and forming the detailed index with the required terms. I’m prioritizing accuracy to meet the user’s specific demands for a comprehensive index.

用户指令明确:阅读 Google 文档及其相关文档,构建章节标题的详细索引。已制定多步骤计划:Workspaces 首先访问主文档,然后解析并检索相关文档,同样使用 Workspaces。当前专注于提取标题并使用所需术语构建详细索引,优先确保准确性以满足用户对综合索引的特定要求。

1 . Establish user intent:

1. 确定用户意图

I’ve determined the user wants a chapter title list and comprehensive index from the Google Doc and related documents. Now I need to figure out the most effective method for this extraction and indexing process. I’m exploring potential API functionalities to streamline this task, and will need to assess the best strategy for handling different document structures.

已明确用户需求:获取来自 Google 文档及相关文档的章节标题列表和综合索引。现在需要确定最有效的提取和索引方法,正在探索潜在的 API 功能来简化此任务,并评估处理不同文档结构的最佳策略。

3. Considering Tool Use

3. 考虑工具使用

I’ve extracted the chapter URLs from the main document using a regular expression. Now, I’m ready to utilize Workspaces to retrieve the actual content of each chapter. Once I have the text for each chapter, I’ll proceed with indexing.

已使用正则表达式从主文档中提取了章节 URL。现在准备利用 Workspaces 检索各章节的实际内容。一旦获得各章节文本,将立即开始索引工作。

Accessing chapter content:

访问章节内容

I’ve successfully identified the URLs for each chapter from the main document, which I can now use with Workspaces. My next step is to retrieve the content from these URLs, which will then allow me to generate the index. I’m focusing on efficiency, aiming to process this information quickly.

已成功从主文档中识别出各章节 URL,现在可使用 Workspaces。下一步是从这些 URL 检索内容,以便生成索引。专注于效率优化,旨在快速处理这些信息。

Fetching Chapter Content

获取章节内容

I’ve successfully identified the chapter URLs from the main document and am ready to utilize Workspaces. My plan involves extracting these URLs, batching the calls for efficiency, and then processing the retrieved content to create the desired index. This ensures all relevant information is captured, paving the way for a comprehensive and accurate result.

已成功从主文档中识别出章节 URL,准备使用 Workspaces。计划包括提取这些 URL、批量处理调用以提高效率,然后处理检索内容以创建所需索引。这确保捕获所有相关信息,为全面准确的结果奠定基础。

Initiating URL Retrieval

启动 URL 检索

I’ve now successfully extracted the chapter URLs from the main document. Currently, I’m setting up calls to the Workspaces tool, preparing to fetch the content of each chapter. The goal is to obtain the necessary text for indexing. This information will then facilitate the creation of the index with at least 100 terms as requested.

现已成功从主文档中提取章节 URL。目前正在设置对 Workspaces 工具的调用,准备获取各章节内容。目标是获取索引所需的文本内容,进而促进创建包含至少 100 个术语的索引。

Initiating Chapter Extraction

启动章节提取

I’ve successfully identified and extracted the chapter URLs from the main document, which I’ve included above. I am now proceeding to use Workspaces for each URL to obtain the chapter content. The goal is to obtain the necessary text for indexing. This information will then facilitate the creation of the index with at least 100 terms as requested. I’ve begun to retrieve this information.

已成功从主文档中识别并提取章节 URL(如上所列)。现在继续为每个 URL 使用 Workspaces 以获取章节内容。目标是获取索引所需的文本,进而促进创建包含至少 100 个术语的索引。已开始检索相关信息。

Orchestrating Chapter Retrieval

编排章节检索

I’ve extracted the chapter URLs and initiated a call to Workspaces. I’m currently retrieving the content for each chapter. To ensure a smooth process, I’m batching the calls to prevent any rate-limiting issues. This should enable me to efficiently compile the text needed for the index.

已提取章节 URL 并发起对 Workspaces 的调用。目前正在检索各章节内容。为确保流程顺畅,正在进行批量调用处理以防止速率限制问题。这应能高效编译索引所需文本。

Decoding User Request

解码用户请求

I’ve determined the user’s need: they require two primary deliverables: first, a comprehensive list of chapter titles extracted from Google Docs, and second, a detailed index containing a minimum of one hundred key terms. The process of extracting titles seems straightforward, while curating the index will involve more nuanced analysis.

已明确用户需求:两个主要交付成果——从 Google 文档提取的章节标题综合列表,以及包含至少一百个关键术语的详细索引。提取标题的过程相对直接,而策划索引则需要更细致的分析工作。

Extracting Titles and Indexing

提取标题和索引

I’ve successfully identified the user’s need: extracting chapter titles from the provided documents and compiling a comprehensive index. I’ve fetched the content of 31 Google Docs, including the main document and its chapters. I’ve confirmed that no additional tools are needed. My plan involves two steps: first, extracting chapter titles from the document filenames, and second, meticulously processing the text to build the index with key terms and chapter locators.

已成功识别用户需求:从提供文档中提取章节标题并编制综合索引。已获取 31 个 Google 文档的内容,包括主文档及其各章节。确认无需额外工具。计划包含两个步骤:首先从文档文件名中提取章节标题,其次精心处理文本内容,使用关键术语和章节定位符构建索引。

Developing an Extraction Plan

制定提取计划

I’ve refined my approach to tackle the user’s request. I’ve now formulated a precise plan: firstly, I will compile the chapter titles from the filenames of the 31 fetched documents. Secondly, and more complexly, I will meticulously analyze the content to create a comprehensive, alphabetically ordered index exceeding 100 entries. I have finalized my extraction and indexing strategy and can now commence execution.

已完善处理用户请求的方法。现制定精确计划:首先从 31 个已获取文档的文件名中编制章节标题,其次(更复杂的部分)精心分析内容以创建超过 100 个条目的综合、按字母顺序排列的索引。已最终确定提取和索引策略,现在可以开始执行。

Crafting the Extraction Strategy

制定提取策略

My approach is well-defined: I will compile chapter titles from the filenames of the 31 fetched documents. Subsequently, I’ll analyze the content meticulously to construct an alphabetically organized index exceeding 100 entries. I’ve finalized the extraction and indexing strategy and can now commence implementation. The user’s goal of a detailed index, covering content from diverse chapters and appendices within the Agentic Design Patterns series, is now within reach. I’ll focus on delivering a thorough response, going beyond a mere sample index.

方法已明确定义:从 31 个已获取文档的文件名中编制章节标题,随后精心分析内容以构建按字母顺序组织、超过 100 个条目的索引。已最终确定提取和索引策略,现在可以开始实施。用户获取详细索引的目标——涵盖 Agentic 设计模式系列中各个章节和附录的内容——现已触手可及。将专注于提供全面响应,超越简单的示例索引。

Defining the Approach

定义方法

I’ve clarified the user’s need: I will extract chapter titles from the document filenames. Following that, I will carefully create an index exceeding 100 entries, arranging them alphabetically and noting their chapter locations. I am prepared to begin the indexing and extraction process.

已明确用户需求:从文档文件名中提取章节标题,随后精心创建超过 100 个条目的索引,按字母顺序排列并注明章节位置。准备开始索引和提取过程。