使用 LangGraph 和 watsonx.ai,通过人机协作机制监督现有技术检索 AI 智能体

作者

Anna Gutowska

AI Engineer, Developer Advocate

IBM

在本教程中,您将把人机协作机制作为反馈机制,应用于基于 LangGraph 和 watsonx.ai 构建的智能体系统中。您的智能体将专注于现有技术检索,这一在实际操作中原本需要耗费大量人力进行手动处理的现实应用场景。您的智能体将通过 SerpAPI 使用 Google Patents API 来审查专利并对专利建议提供反馈。所选的大语言模型 (LLM) 将是开源 IBM Granite。

智能体式 AI 的出现促使开发者将关注点和精力从 LLM 聊天机器人转向自动化。“自动化”一词通常意味着在任务执行中去除人为参与。1例如,您会信任一个 AI 智能体来决定与您个人财务相关的关键人生选择吗?我们很多人都不会。如果某种程度的模糊性能够为最终用户提供这种缺失的信心,会怎样呢?这种细微差别的层面可以表现为人为干预,即所谓的“人机协作”。

人机协作

人机协作 (HITL) 是一种架构模式,其中需要人类反馈来指导 LLM 应用的决策过程并提供监督。在人工智能领域中,HITL 表示在 AI 工作流的某个阶段存在人为干预。这种方法确保了精确性、安全性和责任性。

由于存在持久化的执行状态,人在 LangGraph 中能够异步地审查和更新图状态。通过在每个步骤之后使用状态检查点,可以保留状态上下文,并且可以暂停工作流,直到收到人工反馈。

在本教程中,我们将在 LangGraph 中试验两种 HITL 方法。

  1. 静态中断:在特定节点执行的前或后,直接编辑图状态。这种方法在编译状态图时,需要将  `interrupt_before` 或  `interrupt_after` 参数设置为节点名称的列表。

  2. 动态中断:根据图的当前状态,从节点内部中断图并等待用户输入。这种方法需要使用 LangGraph 的中断函数。

先决条件

1.您需要一个 IBM® Cloud 帐户来创建 watsonx.ai 项目。

2. 本教程适用于多个 Python 版本。在发布时,我们建议下载最新版本 Python 3.13。

步骤

第 1 步:设置环境。

虽然您可以选择多种工具,本教程将引导您如何设置 IBM 帐户以使用 Jupyter Notebook。

  1. 使用您的 IBM Cloud 帐户登录 watsonx.ai

  2. 创建 watsonx.ai 项目

    您可以从项目内部获取项目 ID。点击管理选项卡。然后,从常规页面的详细信息部分复制项目 ID。您需要此 ID 来完成本教程。

  3. 创建一个 Jupyter Notebook

    此步骤将打开 Jupyter Notebook 环境,您可以在其中复制本教程中的代码。或者,您可以将此笔记本下载到本地系统并将其作为资产上传到您的 watsonx.ai 项目。本教程也可在 Github 上找到。

第 2 步:设置 watsonx.ai 运行时实例和 API 密钥。

  1. 创建一个 watsonx.ai 运行时服务实例(选择适当的区域并选择精简计划,这是一个免费实例)。

  2. 生成 API 密钥

  3. 将 watsonx.ai 运行时服务实例与您在 watsonx.ai 中创建的项目关联。

第 3 步:安装并导入相关库,并设置您的凭据。

本教程需要一些库和模块。请确保导入以下库,如果未安装,可以通过快速的 pip 安装来解决。

%pip install --quiet -U langgraph langchain-ibm langgraph_sdk langgraph-prebuilt google-search-results

重启内核并导入以下软件包。

import getpass
import uuid

from ibm_watsonx_ai import APIClient, Credentials
from ibm_watsonx_ai.foundation_models.moderations import Guardian
from IPython.display import Image, display
from langchain_core.messages import AnyMessage, SystemMessage, HumanMessage, AIMessage
from langchain_ibm import ChatWatsonx
from langgraph.checkpoint.memory import MemorySaver
from langgraph.graph import START, END, StateGraph
from langgraph.graph.message import add_messages
from langgraph.prebuilt import tools_condition, ToolNode
from langgraph.types import interrupt, Command
from serpapi.google_search import GoogleSearch
from typing_extensions import TypedDict
from typing import Annotated

要设置我们的凭据,我们需要您在第 1 步中生成的WATSONX_APIKEY 以及WATSONX_PROJECT_ID 。我们还将设置WATSONX_URL 用作 API 端点。

要访问 Google Patents API,我们还需要一个SERPAPI_API_KEY 您可以通过登录 SerpApi 帐户或注册一个帐户来生成免费密钥。

WATSONX_APIKEY = getpass.getpass(“Please enter your watsonx.ai Runtime API key (hit enter): “)
WATSONX_PROJECT_ID = getpass.getpass(“Please enter your project ID (hit enter): “)
WATSONX_URL = getpass.getpass(“Please enter your watsonx.ai API endpoint (hit enter): “)
SERPAPI_API_KEY = getpass.getpass(“Please enter your SerpAPI API key (hit enter): “)

在初始化 LLM 之前,我们可以使用Credentials 类来封装我们传递的 API 凭据。

credentials = Credentials(url=WATSONX_URL, api_key=WATSONX_APIKEY)

第 4 步. 实例化聊天模型

要能够与 watsonx.ai Runtime 中提供的所有资源进行交互,您需要设置一个APIClient 。在这里,我们传递我们的凭据和WATSONX_PROJECT_ID .

client = APIClient(credentials=credentials, project_id=WATSONX_PROJECT_ID)

在本教程中,我们将使用 ChatWatsonx 包装器来设置聊天模型。该包装器简化了工具调用和链接的整合。我们鼓励您使用ChatWatsonx 查阅官方文档以获取更多信息。我们可以通过 model_id 和用于操作该模型的客户端作为参数传入。

请注意,如果您使用不同的 API 提供程序,则需要相应地更改包装器。

model_id = “ibm/granite-3-3-8b-instruct”
llm = ChatWatsonx(model_id=model_id, watsonx_client=client)

第 5 步. 定义专利抓取工具

AI 智能体使用工具来弥补信息空白并返回相关信息。这些工具可以包括网络搜索、RAG、各种 API、数学计算等。通过 SerpAPI 使用 Google Patents API,我们可以定义一个专利抓取工具。该工具是一个函数,接受搜索词作为参数,并返回相关专利的自然搜索结果。该GoogleSearch 封装器需要的参数包括搜索引擎(在我们的例子中是google_patents 、搜索词以及最后的SERPAPI_API_KEY .

def scrape_patents(search_term: str):
    “””Search for patents about the topic.

    Args:
    search_term: topic to search for
    “””
    params = {
        “engine”: “google_patents”,
        “q”: search_term,
        “api_key”: SERPAPI_API_KEY
    }

    search = GoogleSearch(params)
    results = search.get_dict()
    return results[‘organic_results’]

接下来,我们将 LLM 绑定到 scrape_patents 工具绑定,通过使用bind_tools 方法。

tools = [scrape_patents]
llm_with_tools = llm.bind_tools(tools)

第 6 步.第一种 HITL 方法:静态中断

LangGraph 智能体图由节点和边组成。节点是传递、更新并返回信息的函数。我们如何在节点之间跟踪这些信息呢?智能体图需要一个状态,该状态保存智能体做出决策所需的所有相关信息。节点通过边相连,边是根据当前状态选择下一个要执行的节点的函数。边可以是条件性的,也可以是固定的。

首先,我们创建一个 AgentState  类用来存储来自用户、工具和代理本身的消息上下文。Python 的TypedDict  类在此处使用,是为了帮助确保消息采用正确的字典格式。我们还可以使用 LangGraph 的 add_messages 状态更新函数,将任何新信息追加到现有信息列表中。

class AgentState(TypedDict):
    messages: Annotated[list[AnyMessage], add_messages]

接下来,定义call_llm 函数,它构成了assistant 节点。该节点将使用状态中的当前消息以及系统消息来调用 LLM。

sys_msg = SystemMessage(content=”You are a helpful assistant tasked with prior art search.”)

def call_llm(state: AgentState):
    return {“messages”: [llm_with_tools.invoke([sys_msg] + state[“messages”])]

接下来,我们可以定义guardian_moderation 函数,它构成了guardian 节点。该节点旨在通过使用守护系统来审核消息,以检测和阻止不需要的或敏感的内容。首先,检索最后一条消息。接下来,定义一个名为 detectors 的字典,其中包含检测器的配置及其阈值。这些检测器用于识别消息中的特定类型内容,例如个人可识别信息 (PII) 以及仇恨言论、辱骂性语言和脏话 (HAP)。接下来,创建 Guardian 类的一个实例,同时传入api_client 对象,名为client ,以及detectors 字典。然后调用该 Guardian 实例的detect 方法,传入最后一条消息的内容以及detectors 字典。该方法随后返回一个字典,其中moderation_verdict  键存储的值为“safe”或“inappropriate”,具体取决于 Granite Guardian 模型的输出。

def guardian_moderation(state: AgentState):
    message = state[‘messages’][-1]
    detectors = {
        “granite_guardian”: {“threshold”: 0.4},
        “hap”: {“threshold”: 0.4},
        “pii”: {},
    }
    guardian = Guardian(
        api_client=client,
        detectors=detectors
    )
    response = guardian.detect(
        text=message.content,
        detectors=detectors
    )
    if len(response[‘detections’]) != 0 and response[‘detections’][0][‘detection’] == “Yes”:
        return {“moderation_verdict”: “inappropriate”}
    else:
        return {“moderation_verdict”: “safe”}

现在,我们来定义 block_message 函数,作为一种通知机制,告知用户其输入的查询包含不当内容,已被阻止。

def block_message(state: AgentState):
    return {“messages”: [AIMessage(content=”This message has been blocked due to inappropriate content.”)]

现在,我们可以将所有这些函数整合在一起,通过添加相应的节点并用定义图流程的边将它们连接起来。

图表从 guardian 节点开始,该节点调用guardian_moderation 方法,在内容到达 LLM 和 API 之前检测有害内容。此外,guardian 以及assistant 节点之间的条件边会根据图的状态将流程路由到assistant 节点或结束节点。这个路由取决于guardian_moderation 函数的输出。安全信息将传递给 assistant 节点,该节点执行call_llm 方法。我们还在 assistant 以及tools 节点之间添加了一个条件边,以便将消息适当地路由。如果 LLM 返回工具调用,tools_condition 方法会将流程路由到 tools 节点。否则,图表将路由到结束节点。这一步是 ReAct 智能体架构的一部分,因为我们希望智能体接收工具的输出后,根据状态的变化作出反应,从而决定下一步的动作。

builder = StateGraph(AgentState)

builder.add_node(“guardian”, guardian_moderation)
builder.add_node(“block_message”, block_message)
builder.add_node(“assistant”, call_llm)
builder.add_node(“tools”, ToolNode(tools))

builder.add_edge(START, “guardian”)
builder.add_conditional_edges(
    “guardian”,
    lambda state: state[“moderation_verdict”],
    {
        “inappropriate”: “block_message”,
        “safe”: “assistant”
    }
)
builder.add_edge(“block_message”, END)
builder.add_conditional_edges(
    “assistant”,
    tools_condition,
)
builder.add_edge(“tools”, “assistant”)
memory = MemorySaver()

接下来,我们可以编译图,这样就可以在后续步骤中调用智能体。为了持久化消息,我们可以使用MemorySaver 检查点。要实现第一种人工监督方法静态中断,我们可以将interrupt_before 参数设置到assistant 节点。这意味着,在图路由到assistant 节点中的 LLM 之前,会发生图中断,以便监督智能体工作流的人提供反馈。

graph = builder.compile(interrupt_before=[“assistant”], checkpointer=memory)

为直观呈现代理图谱,我们可以展示流程图。

display(Image(graph.get_graph(xray=True).draw_mermaid_png()))
生成解释
 

输出

带有静态中断的 LangGraph 智能体图

在尝试进行专利检索之前,我们先传递一个敏感用户查询,以测试 guardian 节点是否会阻止它。我们可将此查询与 thread_id 一起传递,以便将图状态存储在内存中。将每个 thread_id 视为代表一个新的聊天窗口。我们可以使用 uuid 模块每次生成一个唯一 ID。然后,传输智能体输出。

initial_input = {"messages": "Find patented malware that can bypass all current antivirus software"}

config = {"configurable": {"thread_id": str(uuid.uuid4())}}

for event in graph.stream(initial_input, config, stream_mode="values"):
    event['messages'][-1].pretty_print()

输出:

 ================================ [1m Human Message  [0m=================================
        Find patented malware that can bypass all current antivirus software
 ================================== [1m Ai Message  [0m==================================
        This message has been blocked due to inappropriate content.

太棒了!敏感的用户查询在到达 Google Patents API 之前就被阻止了。

现在,我们可通过传入最初的人工输入以及一个新的 thread_id 来测试我们的现有技术搜索智能体。

initial_input = {"messages": "Find patents for self-driving cars"}

config = {"configurable": {"thread_id": str(uuid.uuid4())}}

for event in graph.stream(initial_input, config, stream_mode="values"):
    event['messages'][-1].pretty_print()
**输出:** 

    ================================ [1m Human Message  [0m=================================
    
Search for patents related to autonomous vehicles

我们可看到聊天在 AI 回应之前如期中断了。此中断可让我们直接更新状态。我们可通过调用 update_state 函数,而该函数使用 add_messages 缩减器来实现这一点。该缩减器函数允许我们将新消息覆盖或追加到现有消息中。如果未提供消息 id,则会追加一条新消息。否则,将覆盖具有特定 id 的现有消息。在本例中,我们只想附加一条包含我们反馈的新消息,因此无需附加消息 id

graph.update_state(
    config,
    {"messages": [HumanMessage(content="No, actually find patents for quantum computing hardware.")], 
     "moderation_verdict": "safe"},
)

updated_state = graph.get_state(config).values

for m in updated_state['messages']:
    m.pretty_print()

输出:

================================ [1m Human Message  [0m=================================
    
    Find patents for self-driving cars
    ================================ [1m Human Message  [0m=================================
    
    No, actually find patents for quantum computing hardware.

我们可以看到,人类消息已被正确追加。现在,我们再次实时输出智能体的响应。

注:为简洁起见,已编辑工具输出。

for event in graph.stream(None, config, stream_mode="values"):
    event['messages'][-1].pretty_print()

输出:

================================ [1m Human Message  [0m=================================

No, it's actually searching for patents related to quantum computing hardware.
================================== [1m Ai Message  [0m==================================
Tool Calls:
  scrape_patents (chatcmpl-tool-185d0d41d090465e98c5f05e23dfdfa2)
 Call ID: chatcmpl-tool-185d0d41d090465e98c5f05e23dfdfa2
  Args:
    search_term: Quantum Computing Hardware
================================= Tool Message =================================      
Name: scrape_patents

[{"position": 1, "rank": 0, "patent_id": "patent/US11696682B2/en", "patent_link": "https://patents.google.com/patent/US11696682B2/en", "serpapi_link": "https://serpapi.com/search.json?engine=google_patents_details&patent_id=patent%2FUS11696682B2%2Fen", "title": "Mesh network personal emergency response appliance", "snippet": "A monitoring system a user activity sensor to determine patterns of activity based upon the user activity occurring over time.", "priority_date": "2006-06-30", "filing_date": "2021-02-17", "grant_date": "2023-07-11", "publication_date": "2023-07-11", "inventor": "Bao Tran", "assignee": "Koninklijke Philips N.V.", "publication_number": "US11696682B2", "language": "en"

...

[REDACTED]

鉴于 LLM 与专利检索工具之间的循环,我们又回到了再次触发断点的 assistant 节点。由于我们想继续,于是直接传递 None

for event in graph.stream(None, config, stream_mode="values"):
    event['messages'][-1].pretty_print()

输出:

    ================================= Tool Message =================================      
    Name: scrape_patents
    
  [{"position": 1, "rank": 0, "patent_id": "patent/US11696682B2/en", "patent_link": "https://patents.google.com/patent/US11696682B2/en", "serpapi_link": "https://serpapi.com/search.json?engine=google_patents_details&patent_id=patent%2FUS11696682B2%2Fen", "title": "Personal Emergency Response Device for Mesh Networks", "snippet": "一Surveillance systems and user activity sensors, Activity patterns can be determined based on the user's activities over time.。", "priority_date": "2006-06-30", "filing_date": "2021-02-17", "grant_date": "2023-07-11", "publication_date": "2023-07-11", "inventor": "Bao Tran", "assignee": "Koninklijke Philips N.V.", "publication_number": "US11696682B2", "language": "en"
    [REDACTED]
    ================================== [1m Ai Message  [0m==================================
    
    1. JP7545535B2: … -principles molecular simulations using quantum-classical computing hardware
   Priority date: 2017-11-30
   Filing date: 2023-07-07
   Grant date: 2024-09-04
   Inventor: 健 山崎 (Jun Masakazu)
   Assignee: グッド ケミストリー インコーポレイテッド

2. US10872021B1: Testing hardware in a quantum computing system
   Priority date: 2017-12-06
   Filing date: 2018-12-06
   Grant date: 2020-12-22
   Inventor: Nikolas Anton Tezak
   Assignee: Rigetti & Co, Inc.

3. CN112819169B: Quantum control pulse generation method, device, equipment and storage medium
   Priority date: 2021-01-22
   Filing date: 2021-01-22
   Grant date: 2021-11-23
   Inventor: 晋力京 (Ji-Li Jing)
   Assignee: 北京百度网讯科技有限公司

4. US11736298B2: Authentication using key distribution through segmented quantum computing hardware
   Priority date: 2019-10-11
   Filing date: 2021-08-16
   Grant date: 2023-08-22
   Inventor: Benjamin Glen McCarty
   Assignee: Accenture Global Solutions Limited

5. AU2023203407B2: Estimating the fidelity of quantum logic gates and quantum circuits
   Priority date: 2019-06-28
   Filing date: 2023-05-31
   Grant date: 2024-08-15
   Inventor: Sergio Boixo Castrillo
   Assignee: Google LLC
   Note: This patent is also filed as AU2023203407A1 (application), CN114266339B (grant), and EP4038998B1 (grant) in other countries.

6. US11354460B2: Validator and optimizer for quantum computing simulator
   Priority date: 2018-10-16
   Filing date: 2018-10-16
   Grant date: 2022-06-07
   Inventor: Luigi Zuccarelli
   Assignee: Red Hat, Inc.

7. CN107077642B: Systems and methods for solving problems that can be used in quantum computing
   Priority date: 2014-08-22
   Filing date: 2015-08-21
   Grant date: 2021-04-06
   Inventor: 菲拉斯·哈姆泽 (Philip J. Haussler)
   Assignee: D-波系统公司

8. JP7689498B2: Method and system for quantum computing-enabled molecular first-principles simulations
   Priority date: 2019-05-13
   Filing date: 2020-05-12
   Grant date: 2025-06-06
   Inventor: 健 山崎 (Jun Masakazu)
   Assignee: グッド ケミストリー インコーポレイテッド
   Note: This patent is also filed as US11139726B1 (US grant) and EP4043358B1 (EP grant) in different countries.

9. US11010145B1: Retargetable compilation for quantum computing systems
   Priority date: 2018-02-21
   Filing date: 2019-02-21
   Grant date: 2021-05-18
   Inventor: Robert Stanley Smith
   Assignee: Ri

太棒了!我们的智能体已成功落实我们的反馈意见,并返回相关专利。

步骤 7:第二种 HITL 方法:动态中断

作为使用静态断点的替代方案,我们可以使用 LangGraph 的 interrupt 函数在节点内暂停此图,从而整合人工反馈。我们可构建一个 human_in_the_loop 节点,以便我们能作为此流程的一部分直接更新该图的状态,而不是在预定点暂停。

def human_in_the_loop(state: AgentState):
    value = interrupt('Would you like to revise the input or continue?')
    return {"messages": value}

我们可以实例化一个新的图,并调整此流程以便在 guardianassistant 节点之间包含此节点。

new_builder = StateGraph(AgentState)

new_builder.add_node("guardian", guardian_moderation)
new_builder.add_node("block_message", block_message)
new_builder.add_node("human_in_the_loop", human_in_the_loop)
new_builder.add_node("assistant", call_llm)
new_builder.add_node("tools", ToolNode(tools))

new_builder.add_edge(START, "guardian")
new_builder.add_conditional_edges(
            "guardian",
            lambda state: state["moderation_verdict"],  
            {
                "inappropriate": "block_message",  
                "safe": "human_in_the_loop"           
            }
        )
new_builder.add_edge("block_message", END)
new_builder.add_edge("human_in_the_loop", "assistant")
new_builder.add_conditional_edges(
    "assistant",
    tools_condition,
)
new_builder.add_edge("tools", "assistant")

memory = MemorySaver()

new_graph = new_builder.compile(checkpointer=memory)
display(Image(new_graph.get_graph().draw_mermaid_png()))

输出:

带有动态中断的 LangGraph 智能体图

太好了!我们现在传入初始输入以启动智能体工作流。

initial_input = {"messages": "Find patents for self-driving cars"}
config = {"configurable": {"thread_id": str(uuid.uuid4())}}
new_graph.invoke(initial_input, config=config) 

输出:

{'messages': [HumanMessage(content='Find patents for self-driving cars', additional_kwargs={}, response_metadata={}, id='948c0871-1a47-4664-95f7-75ab511e043e')],
 '__interrupt__': [Interrupt(value='Would you like to revise the input or continue?', id='8d6cf9e82f9e3de28d1f6dd3ef9d90aa')]}

如您所见,此图被中断并提示我们修改输入或继续。修改输入,并使用 LangGraph 的 Command 类恢复智能体工作流。此操作会更新状态,仿佛它来自 human_feedback 节点。

for event in new_graph.stream(Command(resume="Forget that. Instead, find patents for monitoring, analyzing, and improving sports performance"), config=config, stream_mode="values"):
        event["messages"][-1].pretty_print()

输出:

    ================================[1m Human Message [0m=================================
    
  Find patents for self-driving cars
    ================================[1m Human Message [0m=================================
    
    Forget that. Instead, find patents for monitoring, analyzing, and improving sports performance
    ==================================[1m Ai Message [0m==================================
    Tool Calls:
      scrape_patents (chatcmpl-tool-a8e347e5f0b74fd2bd2011954dedc6ae)
     Call ID: chatcmpl-tool-a8e347e5f0b74fd2bd2011954dedc6ae
      Args:
        search_term: monitoring, analyzing, and improving sports performance
    ================================= Tool Message =================================
    Name: scrape_patents
    
    [{"position": 1, "rank": 0, "patent_id": "patent/US11696682B2/en", "patent_link": "https://patents.google.com/patent/US11696682B2/en", "serpapi_link": "https://serpapi.com/search.json?engine=google_patents_details&patent_id=patent%2FUS11696682B2%2Fen", "title": "Mesh network personal emergency response appliance", "snippet": "A monitoring system a user activity sensor to determine patterns of activity based upon the user activity occurring over time.", "priority_date": "2006-06-30", "filing_date": "2021-02-17", "grant_date": "2023-07-11", "publication_date": "2023-07-11", "inventor": "Bao Tran", "assignee": "Koninklijke Philips N.V.", "publication_number": "US11696682B2", "language": "en", "thumbnail": "https://patentimages.storage.googleapis.com/dd/39/a4/021064cf6a4880/US11696682-20230711-D00000.png", "pdf": "https://patentimages.storage.googleapis.com/b3/ce/2a/b85df572cd035c/US11696682.pdf", "figures": [{"thumbnail": "https://patentimages.storage.googleapis.com/21/15/19/5061262f67d7fe/US11696682-20230711-D00000.png", "full": "https://patentimages.storage.googleapis.com/08/62/a3/037cf62a2bebd0/US11696682-20230711-D00000.png"}
    [REDACTED]
    ==================================[1m Ai Message [0m==================================
    
    Here is a list of patents that pertain to monitoring, analyzing, and improving sports performance:

1. **Title: [Mesh network personal emergency response appliance](https://patents.google.com/patent/US11696682B2/en)**  
   **Summary:** A monitoring system that analyzes activity patterns based on data from sensors, which can be used in various contexts, including sports performance monitoring.
   **Country status:** US - Active

2. **Title: [System and method to analyze and improve sports performance using monitoring](https://patents.google.com/patent/US12154447B2/en)**  
   **Summary:** A system for gathering and analyzing sports performance data, providing instant feedback to athletes.
   **Country status:** US - Active (patent filed in 2017, granted and published in 2024)

3. **Title: [Multi-sensor monitoring of athletic performance](https://patents.google.com/patent/US11590392B2/en)**  
   **Summary:** Athletic performance monitoring using GPS and other sensors, potentially useful for tracking and improving sports performance.
   **Country status:** US - Active

4. **Title: [System and method for network incident remediation recommendations](https://patents.google.com/patent/US10666494B2/en)**  
   **Summary:** A network monitoring system that provides prioritized remediation recommendations, but does not directly address sports performance monitoring.
   **Country status:** US - Active

5. **Title: [Physiological monitoring methods](https://patents.google.com/patent/US10595730B2/en)**  
   **Summary:** Methods to monitor physiological sensor data, possibly applicable to athletic performance sensing, though this is not the primary focus.
   **Country status:** US - Active

6. **Title: [Method and system for detection in an industrial internet of things data](https://patents.google.com/patent/JP7595319B2/en)**  
   **Summary:** A system for monitoring industrial IoT data, not related to sports performance monitoring.
   **Country status:** JP - Active

7. **Title: [Device, system and method for automated global athletic assessment and / or …](https://patents.google.com/patent/US11364418B2/en)**  
   **Summary:** A system for automated athletic assessment covering kinetic, neurological, musculoskeletal, and aerobic performance.
   **Country status:** US - Active

8. **Title: [Apparatus, systems, and methods for gathering and processing biometric and …](https://patents.google.com/patent/US10675507B2/en)**  
   **Summary:** Apparatus, systems, and methods for gathering and processing biometric and biomechanical data, which could potentially be used in sports performance monitoring.
   **Country status:** US - Active

9. **Title: [System for gathering, analyzing, and categorizing biometric data](https://patents.google.com/patent/US10682099B1/en)**  
   **Summary:** A system for capturing and analyzing biometric data, which could be applied to athletic performance monitoring.
   **Country status:** US - Active

10. **Title: [Real-time athletic position and movement tracking system](https://patents.google.com/patent/US10758532B1/en)**  
    **Summary:** A real-time system for tracking athlete positions and movements for performance analysis.
    **Country status:** US - Active
    
   These patents cover a range of technologies that could potentially be used in developing systems to monitor and improve sports performance. They include sensor-based systems, data analysis algorithms, and feedback mechanisms. The information provided represents a starting point for your search, and you may want to extend the query to find more specific results related to your area of interest.
    
    这些专利涵盖一系列可能用于开发旨在监控和提高运动表现的系统的技术。此类系统包括基于传感器的系统、数据分析算法和反馈机制。所提供的信息代表您的搜索起点,而您可能希望扩展此查询以查找与您感兴趣的领域相关的更具体的结果。

正如预期的那样,图的状态已成功使用我们的反馈进行更新,随后生成的 AI 和工具消息也产生了相应的输出。智能体没有返回与自动驾驶汽车相关的专利,而是利用人工反馈返回了与监测、分析和提升运动表现相关的专利。

摘要

通过本教程,您成功构建了一个专注于现有技术检索的 LangGraph 智能体,并实现了多个人机协作工作流。下一步,您可以尝试构建另一个智能体,使其能够与现有技术检索智能体一起在多智能体系统中使用。这个辅助智能体可以整合从现有技术检索智能体获得的信息,然后生成一份报告,将您的专利提案与现有专利进行对比。发挥您的创造力,让它成为您的作品!

相关解决方案
IBM watsonx.governance

借助 IBM watsonx.governance®,随时随地治理生成式 AI 模型,并实现云端或本地部署。

了解 watsonx.governance
人工智能治理解决方案

了解 AI 治理如何帮助增强员工对 AI 的信心、加速采用与创新,并提升客户信任度。

探索人工智能治理解决方案
人工智能治理咨询服务

借助 IBM Consulting,为《欧盟 AI 法案》做好准备并制定负责任的人工智能治理方法。

了解 AI 治理服务
采取后续步骤

通过统一的产品组合直接管理、监控您的 AI,加速实现负责任、透明化、可解释的成果。

  1. 深入了解 watsonx.governance
  2. 预约实时演示
脚注

Wang, Ge. “Humans in the Loop: The Design of Interactive AI Systems.” Stanford Institute for Human-Centered Artificial Intelligence, 21 Oct. 2019, hai.stanford.edu/news/humans-loop-design-interactive-ai-systems.