0基础学会无代码在亚马逊云科技AWS上利用LLM和智慧体(Agent)开发客服机器人

news2024/11/16 2:56:39

简介:

小李哥将继续每天介绍一个基于亚马逊云科技AWS云计算平台的全球前沿AI技术解决方案,帮助大家快速了解国际上最热门的云计算平台亚马逊云科技AWS AI最佳实践,并应用到自己的日常工作里。

本次介绍的是如何利用亚马逊云科技大模型托管服务Amazon Bedrock中大语言模型Titan Text G1和智慧体Agent开发一个客服对话机器人,本文将通过真实样例和场景分享Agent是如何工作的以及Agent处理复杂逻辑任务时的具体思维链。本架构设计全部采用了云原生Serverless架构,提供可扩展和安全的AI解决方案。通过Amazon API Gateway和AWS Lambda将应用程序与AI模型集成,并利用数据库RDS服务保存客户的信息个个性化设置。本方案的解决方案架构图如下:

什么是智慧体(Agent)

Amazon Bedrock 的Agent智慧体是一项利用GenAI自动化、流程化复杂逻辑任务的工具,它允许开发者创建、部署和管理智能对话和自动化流程。通过结合AI和自然语言处理技术,Agent智慧体能够与用户进行自然对话,实现任务自动化和信息获取。在亚马逊云科技上,开发者可以利用Amazon Bedrock平台简化Agent的开发流程,从而专注于提升用户体验,降低成本和开发工作量。

优势

高度定制化

支持多种语言和对话模式,满足不同业务需求。

无缝集成

与AWS生态系统中的服务如Lambda、RDS等深度集成,易于部署和扩展。

灵活性强

通过简单的API和服务角色设置,开发者可以快速定义和管理对话流程。

高效部署

支持自动化测试和部署,缩短开发周期,提高上线速度。

本方案包括的内容: 

  1. 学习如何搭建、配置、使用亚马逊云科技上的主流大模型和开发服务,如Amazon Bedrock,Amazon RDS、AWS Secrets Manager 和 AWS Lambda 。

  2. 在Amazon Bedrock 上创建一个Agent代理。

  3. 利用无服务器计算服务Lambda 定义智慧体的应用逻辑。

  4. 利用不同运行场景测试Agent代理,部署并展示真实客户交互场景。

项目搭建具体步骤:

1. 首先我们确认我们在Amazon Bedrock上已经开启了Titan Text G1 - Premier模型的访问权限。再点击左侧的Agents功能。

2. 创建一个Agent

3. 为Agent起一个名字“cs-bot-agent”,并点击创建

4. 接下来我们为Agent添加必要的Agent resource role用于Agent访问其他服务,如Lambda,S3等。同时我们选择模型Amazon Titan Text G1.

5. 接下来我们为Agent添加Instruction, 为Agent定义工作流逻辑并提供背景信息。

You are an agent that helps customer purchase shoes. Retreive customer details like customer ID and preferred activity based on the name. The check inventory for the shoes bests fit activity matching customer preferred activity. Generate response with shoe ID, style description and colors based on shoes inventory details. if multiple matches exists, display all of them to the user. After customer indicates they would like to order the shoe, use the shoe ID corresponding to their choice and customer ID from intial customer details retrieved, to place the order for the shoe.

6. 保存Agent配置

7. 添加Agent的Action Groups,定义Agent执行的逻辑

8. 为action group起名字“cs_bot_action_group”,并选择类型“Define with APIs Schemas”

9. 在这里我们选择一个Lambda函数作为Invocation,agent需要执行API操作时将会调用该函数,并上传API Schema,这里的API Schema用于定义Agent调用的API结构,API schema为OpenAPI格式。

API Schema如下:

{
"openapi": "3.0.0",
    "info": {
        "title": "Customer Service Bot API",
        "version": "1.0.0",
        "description": "Customer service APIs for a retail store selling shoes"
    },
    "paths": {
        "/customer/{CustomerName}": {
            "get": {
                "summary": "Get customer information",
                "description": "Based on provided customer name, return customer information like customer ID, preferred activity and others",
                "operationId": "getCustomerInfo",
                "parameters": [{
                    "name": "CustomerName",
                    "in": "path",
                    "description": "Customer Name",
                    "required": true,
                    "schema": {
                        "type": "string"
                    }
                }],
                "responses": {
                    "200": {
                        "description": "Get customer information",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "array",
                                    "items": {
                                        "type": "object",
                                        "properties": {
                                            "CustomerID": {
                                                "type": "int",
                                                "description": "This is the Customer ID used to place the order"
                                            },
                                            "Addr1": {
                                                "type": "string",
                                                "description": "Customer billing address line1"
                                            },
                                            "Addr2": {
                                                "type": "string",
                                                "description": "Customer billing address line2"
                                            },
                                            "City": {
                                                "type": "string",
                                                "description": "Customer billing city"
                                            },
                                            "State": {
                                                "type": "string",
                                                "description": "Customer billing state"
                                            },
                                            "Zipcode": {
                                                "type": "string",
                                                "description": "Customer billing zipcode"
                                            },
                                            "PreferredActivity": {
                                                "type": "string",
                                                "description": "Customer preferred activity"
                                            },
                                            "ShoeSize": {
                                                "type": "int",
                                                "description": "Customer shoe size"
                                            },
                                            "OtherInfo": {
                                                "type": "string",
                                                "description": "Additional information about customer like interests"
                                            }
                                        }
                                    }
                                }
                            }
                        }
                    }
                }
            }
        },
        "/place_order": {
            "get": {
                "summary": "Sub task to place an order on behalf of the customer",
                "description": "Place an order for a shoe by creating an Order record and updating inventory in the database",
                "operationId": "placeshoeOrder",
                "parameters": [{
                    "name": "ShoeID",
                    "in": "query",
                    "description": "Shoe ID to place an order",
                    "required": true,
                    "schema": {
                        "type": "int"
                    }
                },
                {
                    "name": "CustomerID",
                    "in": "query",
                    "description": "Customer ID to place an order",
                    "required": true,
                    "schema": {
                        "type": "int"
                    }
                }],
                "responses": {
                    "200": {
                        "description": "Order has been placed",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "description": "Your order has been placed"
                                        }
                                    }
                                }
                            }
                        }
                    }
                }
            }
        },
        "/check_inventory": {
            "get": {
                "summary": "Returns all details related to shoes, including inventory details",
                "description": "Checks inventory for shoes and returns all availale information about available shoes, including shoe ID, shoe colors, inventory, best fit activity, style description and price ",
                "operationId": "checkShoeInventory",
                "responses": {
                    "200": {
                        "description": "Returns Shoe information",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "ShoeID": {
                                            "type": "int",
                                            "description": "This is the shoe ID for this shoe"
                                        },
                                         "BestFitActivity": {
                                            "type": "string",
                                            "description": "Best fit activity for this shoe"
                                        },
                                         "StyleDesc": {
                                            "type": "string",
                                            "description": "Detailed description of the shoe"
                                        },
                                         "ShoeColors": {
                                            "type": "string",
                                            "description": "The colors of this shoe"
                                        },
                                         "Price": {
                                            "type": "string",
                                            "description": "Price of this shoe"
                                        },
                                         "InvCount": {
                                            "type": "int",
                                            "description": "Inventory count"
                                        }
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }    
}

10. 接下来我们对Agent进行测试,在测试页面输入“Hi! I want to buy shoes.”

11. 我们得到了Agent的回复,询问我们的名字。在页面右侧我们也可以查看Agent按照CoT推理的步骤。

下面我分享一个agent的trace样例,里面包括了Agent和用户的对话记录,CoT思考过程,以及Agent调用API执行应用逻辑的记录和得到的响应结果。

{
  "modelInvocationInput": {
    "inferenceConfiguration": {
      "maximumLength": 2048,
      "stopSequences": [],
      "temperature": 0,
      "topK": 1,
      "topP": 1.000000013351432e-10
    },
    "text": "System: A chat between a curious User and an artificial intelligence Bot. The Bot gives helpful, detailed, and polite answers to the User's questions. In this session, the model has access to external functionalities.\nTo assist the user, you can reply to the user or invoke an action. Only invoke actions if relevant to the user request.\nYou are an agent that helps customer purchase shoes. Retreive customer details like customer ID and preferred activity based on the name. The check inventory for the shoes bests fit activity matching customer preferred activity. Generate response with shoe ID, style description and colors based on shoes inventory details. if multiple matches exists, display all of them to the user. After customer indicates they would like to order the shoe, use the shoe ID corresponding to their choice and customer ID from intial customer details retrieved, to place the order for the shoe.\n\nThe following actions are available:\n### Module: cs_bot_action_group\n\nname: cs_bot_action_group\ndescription: {None}\nactions:\n- name: getCustomerInfoGET\n  description: Based on provided customer name, return customer information like\n    customer ID, preferred activity and others\n  parameters:\n    CustomerName: (string, required) Customer Name\n  return_value:\n    oneOf:\n    - title: '200'\n      description: Get customer information\n      properties:\n        $: (array)\n        $[]: (object)\n        $[].Addr1: (string) Customer billing address line1\n        $[].Addr2: (string) Customer billing address line2\n        $[].State: (string) Customer billing state\n        $[].ShoeSize: (int) Customer shoe size\n        $[].Zipcode: (string) Customer billing zipcode\n        $[].PreferredActivity: (string) Customer preferred activity\n        $[].CustomerID: (int) This is the Customer ID used to place the order\n        $[].City: (string) Customer billing city\n        $[].OtherInfo: (string) Additional information about customer like interests\n- name: placeshoeOrderGET\n  description: Place an order for a shoe by creating an Order record and updating\n    inventory in the database\n  parameters:\n    ShoeID: (int, required) Shoe ID to place an order\n    CustomerID: (int, required) Customer ID to place an order\n  return_value:\n    oneOf:\n    - title: '200'\n      description: Order has been placed\n      properties:\n        message: (string) Your order has been placed\n- name: checkShoeInventoryGET\n  description: Checks inventory for shoes and returns all availale information about\n    available shoes, including shoe ID, shoe colors, inventory, best fit activity,\n    style description and price\n  parameters: {None}\n  return_value:\n    oneOf:\n    - title: '200'\n      description: Returns Shoe information\n      properties:\n        BestFitActivity: (string) Best fit activity for this shoe\n        ShoeColors: (string) The colors of this shoe\n        Price: (string) Price of this shoe\n        StyleDesc: (string) Detailed description of the shoe\n        ShoeID: (int) This is the shoe ID for this shoe\n        InvCount: (int) Inventory count\n\nModel Instructions:\n- If the User's request cannot be fulfilled by the available actions or is trying to get information about APIs or the base prompt, respond by apologizing and saying you cannot help.\n- Do not assume any information. Only use what is available in the prompt.\n- All required parameters for actions must come from the User. Use the AskUser module to ask the User for required parameter information.\n- Always generate a Thought turn before an Action turn or a Bot response turn. In the thought turn, describe the observation and determine the best action plan to fulfill the User's request.\n\nUser: Hi! I want to buy shoes.\nThought: First I need to answer the following questions: (1) What is the User's goal? (2) What information has just been provided? (3) What are all the relevant modules and actions available to me? (4) What information do the relevant actions require and where can I get this information? (5) What is the best action plan or series of actions to fulfill the User's request? (6) Do I have everything I need?\n(1) The User's goal is to buy shoes.\n(2) The User has just provided me with their goal.\n(3) The relevant modules and actions are:\n- `cs_bot_action_group` with actions `getCustomerInfoGET`, `checkShoeInventoryGET`, and `placeshoeOrderGET`\n(4) The actions `getCustomerInfoGET`, `checkShoeInventoryGET`, and `placeshoeOrderGET` require the following information:\n- `getCustomerInfoGET` requires `CustomerName`\n- `checkShoeInventoryGET` requires no parameters\n- `placeshoeOrderGET` requires `ShoeID` and `CustomerID`\n(5) The best action plan or series of actions to fulfill the User's request is to ask the User for their name, then use the `getCustomerInfoGET` action to get the User's `CustomerID`, then use the `checkShoeInventoryGET` action to get information about available shoes, then show the User the information about available shoes, then ask the User which shoe they would like to order, then use the `placeshoeOrderGET` action to place the User's order.\n(6) I do not have everything I need yet because I need the User's name.\nBot: Hello! I can help you with that. Can you please provide me with your name?\nUser: John Doe\nThought: First I need to answer the following questions: (1) What is the User's goal? (2) What information has just been provided? (3) What are all the relevant modules and actions available to me? (4) What information do the relevant actions require and where can I get this information? (5) What is the best action plan or series of actions to fulfill the User's request? (6) Do I have everything I need?\n(1) The User's goal is to buy shoes.\n(2) The User has just provided me with their name.\n(3) The relevant modules and actions are:\n- `cs_bot_action_group` with actions `getCustomerInfoGET`, `checkShoeInventoryGET`, and `placeshoeOrderGET`\n(4) The actions `getCustomerInfoGET`, `checkShoeInventoryGET`, and `placeshoeOrderGET` require the following information:\n- `getCustomerInfoGET` requires `CustomerName`\n- `checkShoeInventoryGET` requires no parameters\n- `placeshoeOrderGET` requires `ShoeID` and `CustomerID`\n(5) The best action plan or series of actions to fulfill the User's request is to use the `getCustomerInfoGET` action to get the User's `CustomerID`, then use the `checkShoeInventoryGET` action to get information about available shoes, then show the User the information about available shoes, then ask the User which shoe they would like to order, then use the `placeshoeOrderGET` action to place the User's order.\n(6) I have everything I need.\nBot: Action: cs_bot_action_group.getCustomerInfoGET(CustomerName=\"John Doe\")\nResource: {\"CustomerID\": 1, \"CustomerName\": \"John Doe\", \"Addr1\": \"123 Main St\", \"Addr2\": \"Apt 1\", \"City\": \"Chicago\", \"State\": \"IL\", \"Zipcode\": \"60601\", \"PreferredActivity\": \"Running\", \"ShoeSize\": 10.5, \"OtherInfo\": \"Enjoys trail running\"}\nThought: First I need to answer the following questions: (1) What is the User's goal? (2) What information has just been provided? (3) What are all the relevant modules and actions available to me? (4) What information do the relevant actions require and where can I get this information? (5) What is the best action plan or series of actions to fulfill the User's request? (6) Do I have everything I need?\n(1) ",
    "traceId": "d176267b-a468-4852-98e0-53bbbc862c0e-1",
    "type": "ORCHESTRATION"
  },
  "rationale": {
    "text": "The User's goal is to buy shoes.\n(2) The User has just provided me with their name, and the `getCustomerInfoGET` action has returned information about the User.\n(3) The relevant modules and actions are:\n- `cs_bot_action_group` with actions `getCustomerInfoGET`, `checkShoeInventoryGET`, and `placeshoeOrderGET`\n(4) The actions `getCustomerInfoGET`, `checkShoeInventoryGET`, and `placeshoeOrderGET` require the following information:\n- `getCustomerInfoGET` requires `CustomerName`\n- `checkShoeInventoryGET` requires no parameters\n- `placeshoeOrderGET` requires `ShoeID` and `CustomerID`\n(5) The best action plan or series of actions to fulfill the User's request is to use the `checkShoeInventoryGET` action to get information about available shoes, then show the User the information about available shoes, then ask the User which shoe they would like to order, then use the `placeshoeOrderGET` action to place the User's order.\n(6) I have everything I need.",
    "traceId": "d176267b-a468-4852-98e0-53bbbc862c0e-1"
  },
  "invocationInput": {
    "actionGroupInvocationInput": {
      "actionGroupName": "cs_bot_action_group",
      "apiPath": "/check_inventory",
      "executionType": "LAMBDA",
      "verb": "get"
    },
    "invocationType": "ACTION_GROUP",
    "traceId": "d176267b-a468-4852-98e0-53bbbc862c0e-1"
  },
  "observation": {
    "actionGroupInvocationOutput": {
      "text": "[{\"ShoeID\": 1, \"BestFitActivity\": \"Running\", \"StyleDesc\": \"Lightweight mesh runners\", \"ShoeColors\": \"Red, Blue\", \"Price\": 129.98, \"InvCount\": 250}, {\"ShoeID\": 2, \"BestFitActivity\": \"Hiking\", \"StyleDesc\": \"Durable leather hiking boots\", \"ShoeColors\": \"Brown, Black\", \"Price\": 240, \"InvCount\": 120}, {\"ShoeID\": 3, \"BestFitActivity\": \"Casual\", \"StyleDesc\": \"Slip on canvas shoes\", \"ShoeColors\": \"White, Grey\", \"Price\": 54.99, \"InvCount\": 88}, {\"ShoeID\": 4, \"BestFitActivity\": \"Running\", \"StyleDesc\": \"Breathable mesh runners\", \"ShoeColors\": \"Pink, Purple\", \"Price\": 67.35, \"InvCount\": 300}, {\"ShoeID\": 5, \"BestFitActivity\": \"Hiking\", \"StyleDesc\": \"Waterproof hiking boots\", \"ShoeColors\": \"Tan, Olive\", \"Price\": 99.99, \"InvCount\": 200}, {\"ShoeID\": 6, \"BestFitActivity\": \"Casual\", \"StyleDesc\": \"Fashionable leather loafers\", \"ShoeColors\": \"Brown, Burgundy\", \"Price\": 249.99, \"InvCount\": 115}, {\"ShoeID\": 7, \"BestFitActivity\": \"Running\", \"StyleDesc\": \"Cushioned running shoes\", \"ShoeColors\": \"Black, Lime\", \"Price\": 75.99, \"InvCount\": 118}, {\"ShoeID\": 8, \"BestFitActivity\": \"Hiking\", \"StyleDesc\": \"Rugged all-terrain boots\", \"ShoeColors\": \"Black, Grey\", \"Price\": 64.99, \"InvCount\": 999}, {\"ShoeID\": 9, \"BestFitActivity\": \"Casual\", \"StyleDesc\": \"Comfortable slip-on sneakers\", \"ShoeColors\": \"Navy, White\", \"Price\": 49.99, \"InvCount\": 293}, {\"ShoeID\": 10, \"BestFitActivity\": \"Running\", \"StyleDesc\": \"Lightweight racing flats\", \"ShoeColors\": \"Yellow, Orange\", \"Price\": 129.99, \"InvCount\": 912}, {\"ShoeID\": 11, \"BestFitActivity\": \"Hiking\", \"StyleDesc\": \"Supportive backpacking boots\", \"ShoeColors\": \"Brown, Green\", \"Price\": 34.99, \"InvCount\": 800}, {\"ShoeID\": 12, \"BestFitActivity\": \"Casual\", \"StyleDesc\": \"Canvas slip-on shoes\", \"ShoeColors\": \"Grey, Blue\", \"Price\": 39.99, \"InvCount\": 810}]"
    },
    "traceId": "d176267b-a468-4852-98e0-53bbbc862c0e-1",
    "type": "ACTION_GROUP"
  }
}

12. 我们再次输入名字:“John Doe”, 得到如下的回复,在右侧可以看到agent每一步的推理过程。

13. 测试微调结束后,接下来我们对这个Agent进行部署,首先我们点击:"create alias"

14. 为agent部署起一个名字“first-draft-1”,并点击创建

以上就是在亚马逊云科技上利用LLM和Agent智慧体搭建客服对话机器人、自动化复杂任务的全部实操步骤。欢迎大家关注小李哥,未来获取更多国际前沿的生成式AI开发方案。

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.coloradmin.cn/o/1961054.html

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈,一经查实,立即删除!

相关文章

【解决方法】git clone出现 curl 56 OpenSSL SSL_read: Connection was reset, errno 10054

当我们克隆别人的项目出现以下提示信息时候 remote: Enumerating objects: 7095, done. error: RPC failed; curl 56 OpenSSL SSL_read: Connection was reset, errno 10054 error: 2292 bytes of body are still expected fetch-pack: unexpected disconnect while reading s…

Python(C++)大尺度分层边值时变图统计推理并行算法

🎯要点 🎯分层结构制定生成模型 | 🎯贝叶斯模型选择程序 | 🎯分层结构图的信息性 | 🎯分层模型适应实值边协变量的网络 | 🎯分层模型适应时变网络,划分层对应于检测变化点 | 🎯定义…

Python中15个让你代码更优雅的上下文管理器用法

文末赠免费精品编程资料~~ 今天,我们要探索的是Python中一个超级实用又往往被低估的特性——上下文管理器。这可不是普通的魔法,它能让你的代码更加整洁、安全,还能自动处理资源,就像变魔术一样。准备好,让我们一起揭…

一分多行列转换(Gbase版)

1、源数据表结构 CREATE TABLE "sf_ref_pd_config" ("I_BATCH_NO" decimal(5,0) DEFAULT NULL COMMENT 批次ID,"V_ASSET_CLASS_NAME" varchar(200) DEFAULT NULL COMMENT 资产类型,"N_EXEC_ID" decimal(5,0) DEFAULT NULL COMMENT 执…

pyjwt:Python 中的 JWT 处理专家

文章目录 探索 pyjwt:Python 中的 JWT 处理专家简介:为何选择 pyjwt?什么是 pyjwt?安装 pyjwtpyjwt 的基本使用1. 编码JWT2. 解码JWT3. 验证签名4. 过期时间5. 自定义头部 场景应用场景一:用户登录场景二:A…

深度学习的数据类型总结

文章目录 1.基本概念1.比特(bit):2. **字节**(Byte):2. **数据类型**: 2. 相互转化 1.基本概念 1.比特(bit): 计算机中最小的数据存储单位,用 0 和 1 表示。信息传输速…

python制作一个AI聊天机器人-【python教程】教你用python制作一个AI聊天机器人,源码可分享,零基础也能实现!

要制作一个基本的AI聊天机器人,我们可以使用Python的多个库,其中一个非常流行且易于上手的是Rasa。一个简单的入门示例,我们可以使用pyttsx3,是一个Python库,用于将文本转换为语音。 它提供了一个简单易用的接口&#…

【ThingsBoard初体验】本地运行源码踩坑记录

前言 运行源码之前,请先编译源码。这很重要!!! 官网源码编译教程:http://www.ithingsboard.com/docs/user-guide/contribution/yuanmabianyi/ 如果编译过程中出现报错,请看我上一篇文章:【Thing…

《LeetCode热题100》---<滑动窗口篇两道>

本篇博客讲解LeetCode热题100道滑动窗口篇中的两道题 第一道:无重复字符的最长子串 第二道:找到字符当中的所有字母异位词 第一道:无重复字符的最长子串 哈希滑动窗口 class Solution {public int lengthOfLongestSubstring(String s0) {int…

nginx出现Refused to apply inline style because it violates

Content Security Policy的错误。根据错误提示,nginx拒绝应用内联样式,因为它违反了内容安全策略(Content Security Policy)。内容安全策略是一种浏览器机制,用于防止潜在的安全漏洞,通过限制从外部来源加载…

初步入门C ++之继承的概念

继承 ​ 继承,他的功能就如同他的名字一样,可以继承一个类的数据和方法,然后增添一些自己独有的数据和方法: 根据我们之前讲解初步入门C之类的例子,假如我们现在有一个长方体的类,它和长方型类唯一不一样…

屏幕录制与视频编辑的新纪元Camtasia Studio 2024

在数字化时代,视频已成为我们日常工作和生活中不可或缺的一部分。无论是教育、培训、营销还是娱乐,高质量的视频内容都发挥着至关重要的作用。而提到屏幕录制和视频编辑软件,Camtasia Studio无疑是一个家喻户晓的名字。随着2024年新版本的发布…

【Vue3】自定义组件

【Vue3】自定义组件 背景简介开发环境开发步骤及源码 背景 随着年龄的增长,很多曾经烂熟于心的技术原理已被岁月摩擦得愈发模糊起来,技术出身的人总是很难放下一些执念,遂将这些知识整理成文,以纪念曾经努力学习奋斗的日子。本文…

Java基本语法学习的案例练习

本文是在学习过C语言后,开始进行Java学习时,对于基本语法的一些案例练习。案例内容来自B站黑马编程课 1.HelloWorld 问题介绍;请编写程序输出“HelloWorld”. public class HelloWorld { public static void main(String[] args) { System.out.print…

树状机器学习模型综述(含python代码)

树状机器学习模型综述 树状模型是机器学习中一种非常重要的算法类别,因其直观的结构和良好的可解释性而广泛应用于分类和回归任务。本文将综述几种常见的树状模型,包括决策树、随机森林、LightGBM、XGBoost和CatBoost,讨论它们的原理、用途以…

高品质定制线缆知名智造品牌推荐-精工电联:高压线缆行业定制服务的领航者

定制线缆源头厂家推荐-精工电联:高压线缆行业定制服务的领航者 在当今这个高度信息化的社会,电力传输与分配系统的稳定运行至关重要。作为连接各个电力设备的纽带,高压线缆的质量直接关系到电力系统的安全性和稳定性。在定制高压线缆行业中&a…

【RK3568】点亮eDP屏幕+双屏异显

一、驱动eDP屏幕 一般来说,屏幕的规格书中会找到屏幕的相关参数,如没有,也可直接找屏幕厂商要,首先打开屏幕的规格书,搜索EDID Table,可找到如下信息: (1)显示时序配置 将…

越是熟人之间,越要注意这三个方面

不管什么时候,不管与谁相处,社交的边界和底线永远都是不变的。 对待陌生人的时候,我们总会按照既定的章法和礼节行事,可是在对待熟人的时候,很多人却忘了这些章法和礼节。虽然彼此熟悉了,不需要那么在乎章…

狗都能看懂的Imitation Learning的讲解

上一篇博客讲述了奖励稀疏时的训练方法。实际场景中,可能难度还会更大一些。很多场景很难有一个明确的reward,甚至没有reward。那么这里就提出模仿学习,即agent模仿expert的操作。具体两个方法是:Behavior Cloning、Inverse Reinf…