To translate "LLM application architecture" into simplified Chinese while keeping the HTML structure, you would use the following: ```html LLM 应用架构 ``` This HTML snippet ensures that the text "LLM 应用架构" is identified as simplified Chinese text, while maintaining proper language tagging for web accessibility and SEO purposes.

在使用像ChatGPT这样的LLM模型来观察开发形式时,你会发现它通常具有以下结构。

通常在LLM中,使用提示工程作为输入,接收并使用返回值。

Certainly! Here is the translated text in simplified Chinese, formatted in HTML structure: ```html

在稍微高级的形式中,模型是通过精细调整来开发的;或者在非常高级的形式中,使用外部文档存储。

``` In Chinese: ```html

在稍微高级的形式中,模型是通过精细调整来开发的;或者在非常高级的形式中,使用外部文档存储。

```

Sure, here's the translation of "" in simplified Chinese while keeping the HTML structure: ```html

基本LLM应用程序架构图
```

在其他话中,它具有至少一次调用LLM的结构。

```html 然而,在操作环境中,基于LLM的应用程序结构要比这复杂得多。它具有复杂的结构,例如安全性、同时调用多个模型以及与外部API或搜索引擎进行连接。 ```

Sure, here's how you can write that in simplified Chinese, while maintaining the HTML structure: ```html

下图是LLM应用程序的示例架构。

``` In this HTML snippet: - `

` tags are used for the paragraph, which is semantically appropriate for this text. - The Chinese text "下图是LLM应用程序的示例架构。" translates to "The figure below is an example architecture of an LLM application."

Sure, here's the translation of "" into simplified Chinese while keeping the HTML structure: ```html

LLM 应用架构
```

Sure, here's the simplified Chinese translation of the provided text, keeping the HTML structure: ```html

与其只是简单地编写提示并调用LLM一次,您可以创建多个示例并根据问题类型动态选择适当的示例,或者向多个不同的LLM模型询问相同的查询,然后在它们中找到最合适的答案。可以通过选择最终答案或搜索LLM尚未从外部数据源(如Google搜索引擎)学习的数据,并将其用于LLM来实现此结构。

``` This HTML paragraph contains the translated text in simplified Chinese.

Sure, here's how you can write "This is called the LLM application architecture." in simplified Chinese while keeping the HTML structure intact: ```html

这被称为LLM应用程序架构。

```

在本书中,您将了解开发LLM应用程序的架构是什么,如何使用Langchain开发商业级LLM应用程序,以及通过理解Langchain的结构详细实现LLM应用程序的架构。目的在于理解。 To keep the HTML structure intact, here's the translated text in simplified Chinese: ```html 在本书中,您将了解开发LLM应用程序的架构是什么,如何使用Langchain开发商业级LLM应用程序,以及通过理解Langchain的结构详细实现LLM应用程序的架构。目的在于理解。 ``` This text can be directly used in an HTML document without affecting its structure.

以下是构成LLM应用程序的组件。

Sure, the translation of "1.1 Safety filter" into simplified Chinese, while keeping HTML structure, would look like this: ```html 1.1 安全过滤器 ``` Here, `安全过滤器` ensures that "安全过滤器" (which means "Safety filter" in simplified Chinese) is properly displayed and marked as Chinese text within the HTML structure.

在特定情况下,比如在聊天机器人的情况下,有必要确定通过LLM接收到的问题和回复是否不当。例如,性、暴力或互相诽谤的内容必须在输入阶段进行过滤,同样,LLM的输出也必须经过过滤,以防止不适当的内容输入或提供。

Sure, here's the translated text in simplified Chinese: 除了简单的不当内容外,输入和输出还必须根据用户的特征如年龄或宗教进行调整,并在某些情况下必须检查回应是否侵犯知识产权。例如,在创建营销短语的LLM申请中,必须避免与现有营销口号重叠,以防止知识产权冲突的发生。

Here is the simplified Chinese translation of the provided text, keeping the HTML structure intact: ```html 简单的实现可以通过提示工程指导,但使用知识产权搜索或模式构建不当内容可以通过使用(RAG结构)来完成,稍后将对其进行解释,方法是将特定模式存储在文档数据库中,并查找类似模式。使用筛选结构。 ``` This translation preserves the technical and structured nature of the original English text while conveying its meaning in simplified Chinese.

Sure, here's the translated text in simplified Chinese while keeping the HTML structure: ```html

过滤器还必须具有根据情况调整强度的能力。根据客户的倾向或使用情况调整过滤器为强或弱。

``` This HTML code contains the translated text in simplified Chinese.

在与用户直接交互的聊天机器人中,这些安全过滤功能尤为重要,但许多基础的应用常常省略了这些功能。

Sure, the translation of "1.2 Prompt Template" into simplified Chinese while keeping HTML structure would look like this: ```html 1.2 提示模板 ``` In this example: - `提示模板` is the translated text "提示模板" (Prompt Template) in simplified Chinese. - `lang="zh-CN"` indicates the language code for simplified Chinese.

Sure, here is the translated text in simplified Chinese, keeping the HTML structure: ```html

在LLM中,提示通常根据情境进行重复使用。例如,在旅游指南聊天机器人中,当询问特定旅游地点的解释时。您只需更改地点的名称,例如“告诉我关于景福宫的旅游信息。”或者“告诉我关于明洞的旅游信息。”将提示中的变化部分转换为变量并使用它的方法称为提示模板。

``` Translated text (simplified Chinese): 在LLM中,提示通常根据情境进行重复使用。例如,在旅游指南聊天机器人中,当询问特定旅游地点的解释时。您只需更改地点的名称,例如“告诉我关于景福宫的旅游信息。”或者“告诉我关于明洞的旅游信息。”将提示中的变化部分转换为变量并使用它的方法称为提示模板。

在保持HTML结构的情况下,将以下英文文本翻译成简体中文: 下面的图片展示了使用模板创建提示的概念,通过将形容词、主题和城市名作为提示中的变量进行处理,然后分别输入“著名的”、“地方”和“首尔”的值。

Certainly! Here is the text translated into simplified Chinese while keeping the HTML structure: ```html ```

Sure, the translation of "1.3 Example Selector" into simplified Chinese while keeping the HTML structure intact would be: ```html 1.3 示例选择器 ```

Sure, here is the translated text in simplified Chinese while keeping the HTML structure: ```html 当编写LLM提示时,附加问题和答案示例可以提高LLM响应的准确性。 ``` This HTML structure ensures the text is displayed correctly in an HTML context if needed.

Sure, here is the translated text in simplified Chinese, keeping the HTML structure: ```html

这被称为N-Shot提示。与机械地附加相同的例子不同,您可以根据问题类型选择能够给出最佳可能答案的例子,提示的长度取决于问题类型。由于LLM的输入令牌长度受影响,如果例子很长,可能需要总结或截断例子以包含在提示中。示例选择器旨在解决这个问题,并能够根据问题选择合适的提示。

``` This HTML snippet contains the translated text in simplified Chinese as requested.

Sure, here is the translated text in simplified Chinese while keeping the HTML structure: ```html 例如,假设有一个示例提示,要求您按如下所示总结输入文本。 ``` This HTML snippet preserves the structure while providing the translation in simplified Chinese.

{"input":"Please summarize the weather news.\n"
,"summary":"Today's weather: Sunny skies, mild temperatures,"\
" and a gentle breeze. Enjoy the pleasant conditions throughout the day!"},
{"input":"Please summarize the economy news.\n","summary":"Global stocks rise on positive economic data;"\
"inflation concerns persist. Tech sector outperforms; central banks closely monitor."},
{"input":"Please summarize retail news.\n","summary":"Major retailer announces record-breaking sales during holiday shopping season"},
{"input":"What is stock market trend?\n","summary":"Investor optimism grows amid easing global trade tensions"},

To translate the English text "If the question for the LLM application is that you want to know about this week’s economic trends and weather," into simplified Chinese while keeping the HTML structure, you can use the following: ```html 如果LLM申请的问题是您想了解本周的经济趋势和天气, ``` This HTML structure ensures the translated text maintains its formatting and context within an HTML document.

I want to know the economy trends and weather this week.

Sure, here's the simplified Chinese translation of the text you provided, while keeping the HTML structure intact: ```html

The Example Selector selects examples of economy and weather summaries from among the prompt examples and inserts them into the prompt as an example as shown below.

``` Translated to Chinese: ```html

示例选择器从提示示例中选择经济和天气总结的示例,并将它们作为示例插入到提示中,如下所示。

```
Input:Please summarize the weather news.
Summary:Today's weather: Sunny skies, mild temperatures, and a gentle breeze. Enjoy the pleasant conditions throughout the day!
Input:What is stock market trend? Summary:Investor optimism grows amid easing global trade tensions
input: I want to know the economy trends and weather this week.
Summary:

To translate "Figure. Prompt created with selected example inserted" into simplified Chinese while keeping the HTML structure, you can use the following: ```html

图。使用所选示例创建的提示插入
``` In this translation: - `
` and `
` are HTML tags used to indicate a figure or image in a document. - "图" means "Figure" in Chinese. - "使用所选示例创建的提示插入" translates to "Prompt created with selected example inserted". This HTML structure maintains the formatting and functionality while providing the translated text in simplified Chinese.

To translate "1.4 LLM model" into simplified Chinese while keeping the HTML structure, you would use the following: ```html 1.4 LLM模型 ``` This ensures that "LLM模型" (which means "LLM model" in simplified Chinese) is correctly identified and rendered as Chinese text, while "1.4" remains in English as it is a numerical value.

Sure, here's the translated text in simplified Chinese, while keeping the HTML structure intact: ```html 一旦使用安全过滤器、提示模板和示例选择器准备好提示,就可以调用LLM。 ```

Sure, here's the translated text in simplified Chinese while keeping the HTML structure: ```html

有各种模型,例如ChatGPT、Mistral、Gemini和Antropic的Claude,但这些模型在准确性、响应时间、输入和输出令牌长度以及价格上都有很大不同。

``` Translated text: ```html

有各种模型,例如ChatGPT、Mistral、Gemini和Antropic的Claude,但这些模型在准确性、响应时间、输入和输出令牌长度以及价格上都有很大不同。

```

在保持HTML结构的情况下,将以下英文文本翻译成简体中文: 因此,只能使用一个LLM,但在某些情况下,可以同时使用多个LLM模型。

To translate "1.4 Orchestration" into simplified Chinese while keeping the HTML structure, you can use the following: ```html 1.4 编排 ``` In this HTML snippet: - `1.4` remains unchanged as it is a numerical identifier. - `编排` is the translation of "Orchestration" into simplified Chinese. The `lang="zh-CN"` attribute indicates the language of the text inside the `` tag.

```html

当调用这些LLM时,与其一次性调用一个LLM并结束,可以将LLM的输出放回LLM并进行查询。根据输出的内容,可以通过路由等技术修改问题并再次询问,或者同时进行。事实上,在操作环境级别实现LLM应用程序,如同时处理两个问题的并行处理,采用多次以不同结构调用各种LLM的工作流形式。处理这种复杂工作流的功能称为编排。

``` This HTML structure contains the translated text in simplified Chinese, maintaining the original formatting.

Certainly! Here's the translated text in simplified Chinese while keeping the HTML structure: ```html 以下是一个示例,以帮助解释,在获取“韩国最著名旅游景点的信息”之后,“该旅游景点附近的知名餐厅”、“该餐厅的知名菜单”,并且并行获取“到达该旅游景点的公共交通信息”。在获取“交通方式”信息后,这是一个最终收集三个信息片段的工作流结构。 ``` This HTML code retains the original structure of the text while providing the translated content in simplified Chinese.

Sure, here is the text translated into simplified Chinese while keeping the HTML structure: ```html

管道编排示例
``` In this translation: - `
` is the HTML tag used for displaying content such as images or diagrams. - "管道编排示例" translates to "Orchestration Pipeline Example" in simplified Chinese.

当然,你可以在一个提示中查询所有这些内容,但由于输入/输出令牌的大小有限,你可以通过分别查询每个内容来获取详细的问题和详细的答案。

Sure, the translation of "1.5 Agent" into simplified Chinese while keeping the HTML structure intact would look like this: ```html 1.5 代理 ``` In this format, "1.5" remains in English numerals and "代理" is the simplified Chinese translation for "Agent".

Sure, here's the translated text in simplified Chinese, keeping the HTML structure: ```html 因为LLM只具有学习时的知识,没有最新的信息。因此,您可以与外部系统连接,如使用外部搜索引擎搜索和使用外部数据,或者搜索和使用公司内部数据库中的信息。执行这些功能的组件称为Agent-Tool。Tool是外部互联系统,Agent根据问题确定使用哪个外部工具,并调用外部工具。 ``` This HTML snippet includes the translated text in simplified Chinese, maintaining the structure specified.

To translate "1.6 Vector DB" into simplified Chinese while keeping the HTML structure, you would write: ```html 1.6 矢量数据库 ``` Here's a breakdown: - `1.6` remains as it is, assuming it's part of a version number or identifier. - `矢量数据库`: - `` is an inline HTML tag used for styling or grouping elements. - `lang="zh-CN"` specifies that the following text is in simplified Chinese. - `矢量数据库` (Shǐliàng shùjùkù) translates to "Vector Database" in simplified Chinese. This approach ensures that the translation is integrated into the HTML structure while maintaining clarity and proper markup.

Sure, here is the translation of the text into simplified Chinese while maintaining HTML structure: ```html

与外部系统建立联系的一种方式是搜索与问题相关的文档,并将它们作为提示中的上下文信息使用。这被称为检索性论据生成(RAG)技术。

``` This HTML snippet contains the translated text in simplified Chinese.

Sure, here's the translated text in simplified Chinese while keeping the HTML structure: ```html

这种方法将文档存储在文档数据库中,搜索与问题相关的段落或页面,将内容添加到提示中,并基于添加的内容提供答案。

```

Sure, here is the simplified Chinese translation of the text you provided: 例如,如果所有维基百科文档都存储在文档数据库中,并进行查询:“请解释朝鲜战争”,LLM 将仅从数据库中存储的文档中提取与朝鲜战争相关的文档页面,并返回提取的文档内容。在将其插入提示后,您必须仅使用文档内容来回答。

在保持HTML结构不变的情况下,将以下英文文本翻译为简体中文: "RAG的确切机制将在稍后详细解释。" 请注意,这是在HTML代码中直接嵌入的翻译文本。

Certainly! The translation of "1.7 Cache" into simplified Chinese while keeping the HTML structure intact would be: ```html 1.7 缓存 ``` This HTML structure ensures that "缓存" is correctly displayed and interpreted as simplified Chinese text.

Sure, here's the translated text in simplified Chinese while keeping the HTML structure: ```html 当查询LLM时,有时会多次询问类似或相同的问题。例如,在开发过程中,调试时可能多次调用LLM并使用相同提示。如果发送相同的问题,将得到相同的答案,但由于LLM不断调用,LLM调用费用将重复计费。 ``` This HTML code maintains the structure of the text while presenting it in simplified Chinese.

Sure, here's the translated text in simplified Chinese while keeping the HTML structure intact: ```html 或者,在类似的情况下,如果类似的用户提出类似的问题,可能就不需要再次调用LLM模型了。例如,“首尔有哪些著名的旅游景点?”,“首尔最好的游览地点有哪些?”由于这类问题需要相同的回答,类似的问题可以通过缓存减少LLM调用的次数。 ``` This HTML snippet maintains the structure of the original text while providing the translation in simplified Chinese.

这被称为缓存技术,缓存可以存储在LLM应用程序的内存中,或者存储在外部内存数据库如Redis或关系型数据库如MySQL中。

To translate "1.9 Memory" into simplified Chinese while keeping the HTML structure, you can use the following: ```html 1.9 内存 ``` In this HTML snippet: - `1.9` remains in English. - `内存` translates "Memory" into simplified Chinese characters (`内存`) and uses the `` tag with `lang="zh-CN"` attribute to indicate the language of the text.

在聊天机器人的情况下,它必须记住先前对话的内容,并根据现有对话的上下文继续对话。为了做到这一点,可以在内部将先前对话的内容插入提示中,并将其作为上下文来进行对话。

Here is the translated text in simplified Chinese while keeping the HTML structure: ```html 然而,LLM模型无法存储所有的对话内容,因为输入令牌的数量是有限的,而且存在多种技术来解决这个问题。例如,这是一种将旧的对话内容和最近的对话内容分开存储的方法。旧的对话内容被总结并存储在LTM(长期记忆)中,而最近的对话内容则在不损失摘要的情况下存储。它可以存储在STM(短期记忆)中。 ``` This translation maintains the original structure and accurately conveys the meaning in simplified Chinese.

To translate "The function that stores existing conversation content is called the Memory component." into simplified Chinese while keeping HTML structure, you can use the following: ```html 存储现有对话内容的功能称为记忆组件。 ``` This HTML snippet uses the `lang="zh-CN"` attribute to specify simplified Chinese, and the text inside `` tags provides the translated content.

To translate "Short-term memory and long-term memory concepts" into simplified Chinese and keep it within the HTML structure, you can use the following: ```html

短期记忆和长期记忆的概念
``` This HTML snippet includes the translation enclosed within `
` tags, which are commonly used for captions in figures.

Sure, here's the translated text in simplified Chinese: ```html 开发像这样的LLM应用程序不仅需要LLM模型,还需要各种额外的功能。虽然你可以自己开发这些,但Langchain是一个将这些广泛使用的模式转化为组件的框架。 ```

在下一章中,让我们逐一看一下朗长的功能。

2024-06-25 04:29:18 AI中文站翻译自原文