基于共享上下文和自主協作的 RD Agent 生態系統

在llm+angent+mcp這個框架中

  • LLM: 依然是智能體的“大腦”,賦予它們理解、推理、生成和規劃的能力,并且也用于處理和利用共享上下文。
  • Agent: 具備特定 R&D 職能的自主單元,它們感知共享上下文,根據內置邏輯和 LLM 的推理決定自己的行動,并通過調用工具和更新共享上下文來執行任務。
  • MCP (Master Context Protocol) Service: 一個提供 API 的服務,用于:
    * 存儲和檢索所有 Agent 在特定任務或會話中的交互歷史(對話、思考、行動、觀察)。
    * 存儲和更新共享的工作狀態、關鍵變量、中間結果、需要共同關注的標記(如“需要人類審批”、“遇到沖突”)。
    * 將相關的長期記憶(Vector DB, KG)和當前任務上下文關聯起來。
    * 可能還負責事件通知,當共享上下文的某個關鍵部分更新時通知相關 Agent。

基于 LLM+Agent+MCP (Context Protocol) 的 R&D 自動化平臺

架構分層:

  1. 用戶/輸入層 (User/Input Layer): 用戶輸入 R&D 目標。一個 Task Initiator 接收輸入并創建一個新的任務會話,初始化 MCP Context。
  2. Task Orchestration (Simplified): 不再是復雜的中心 Planner 生成詳細 DAG。而是由 Task Initiator 或一個簡單的 Session Manager 啟動一個初始 Agent 或一組 Agent,并將它們指向新創建的 MCP Context。后續的流程推進主要依靠 Agent 之間的自主協作和對共享上下文的響應。
  3. Agent 層 (Agent Layer):
    • 各種 R&D Agent 實例。
    • 每個 Agent 內部結構:
      • LLM Core: Agent 的大腦。
      • Memory Module: 訪問長期記憶 (Vector DB, KG)。
      • Tool Use Module: 調用外部工具。
      • MCP Interaction Module: 通過 API 調用 MCP Service,進行以下操作:
        • GetContext(task_id): 獲取當前任務的完整或過濾后的共享上下文。
        • AppendMessage(task_id, message_type, content): 添加新的消息到歷史(如自己的思考、行動、觀察)。
        • UpdateSharedState(task_id, key, value): 更新共享工作狀態。
        • GetSharedState(task_id, key): 獲取共享狀態。
        • NotifyContextUpdate(task_id, key): (Optional) 通知 MCP Service 某個關鍵狀態已更新。
    • Agent 的決策循環 (LLM 驅動):感知上下文 (通過 MCP Service) -> LLM 推理 -> 決定行動 (工具調用或更新上下文) -> 執行行動 -> 觀察結果 -> 更新上下文 (通過 MCP Service) -> 重復。
  4. Tools & Environment 層 (Tools & Environment Layer): 外部 R&D 工具封裝為 Agent 可調用的服務。
  5. Data & Knowledge 層 (Data & Knowledge Layer): 存儲數據和長期知識。Agent 通過 Memory Module 與此層交互。MCP Service 也可能需要訪問此層來 enriquecer 上下文。
  6. MCP (Master Context Protocol) Service Layer: 專門的服務層,提供上述 MCP Interaction Module 使用的 API,管理底層存儲。
    • Context Storage: 數據庫 (如支持 JSONB 的 PostgreSQL, MongoDB) 存儲任務歷史和共享狀態。
    • Knowledge Linking: 可能與 Vector DB/KG 集成,根據上下文關聯相關知識片段。
    • Event System (Optional): Kafka/RabbitMQ 用于 Context 更新通知。
  7. Observability Layer: 收集日志、指標、追蹤。在 MCP (Context Protocol) 模式下,追蹤尤其重要,通過追溯 Agent 之間的交互和上下文變化來理解流程。
  8. Global State Monitoring & Human-in-the-Loop: 一個獨立的服務或 UI,監控 MCP Service 中存儲的全局任務狀態和關鍵標記(如“需要人類審批”)。當檢測到特定狀態時,通知人類。人類通過 UI 查看上下文,并可以通過 UI 修改共享狀態或直接與 Agent 交互(通過向 Context 中添加特定消息)。
  9. Learning & Evolution Layer: 分析 MCP Service 中存儲的豐富的交互歷史和任務結果,用于學習 Agent 協作模式、優化 Prompt、改進工具使用、訓練迭代策略。

LLM 在各層的具體作用 (Refined):

  • Task Initiator: 使用 LLM 簡單解析初始目標,決定啟動哪些初始 Agent 并初始化 MCP Context。
  • Agent (Core Logic):
    • Contextual Reasoning: LLM 接收從 MCP Service 獲取的當前上下文(歷史、狀態),結合自身角色和長期記憶,進行推理。Prompt 會包含:“你是一個 [Agent Role]。當前任務目標是 X。以下是迄今為止的討論和狀態:[從 MCP Service 獲取的歷史和狀態]。你的下一步行動是什么?思考過程和行動請記錄到上下文中。”
    • Self-Planning: LLM 在當前上下文中生成自己的行動計劃。
    • Tool Parameter Generation: LLM 根據上下文和計劃生成工具調用的具體參數。
    • Observation Interpretation: LLM 解釋工具執行結果或從 MCP Service 獲取的其他 Agent 的更新。
    • Context Formatting: LLM 生成要添加到共享上下文中的結構化或非結構化內容(思考、行動、觀察、總結、發現)。
  • Global State Monitoring / HITL: LLM 可以輔助分析共享上下文,提取關鍵摘要或檢測潛在問題,呈現給人類。

技術棧與實現思路 (基于 MCP Service):

  • MCP (Master Context Protocol) Service 實現:
    • Backend Framework: FastAPI 或 Spring Boot 構建 RESTful API。
    • Context Storage: PostgreSQL with JSONB column 或 MongoDB 存儲 Context Document。每個任務一個 Document,包含 history (array of messages) 和 shared_state (JSON object)。
    • API Endpoints:
      • /tasks/{task_id}/context: GET - 獲取上下文
      • /tasks/{task_id}/messages: POST - 添加消息到歷史
      • /tasks/{task_id}/state: GET/POST/PUT - 獲取/更新共享狀態
      • /tasks: POST - 創建新任務上下文
    • Knowledge Linking: 內部邏輯根據 Context 中的關鍵詞或實體,查詢 Vector DB 或 KG,并將相關知識片段添加到 Context 中(或提供鏈接)。
  • Agent Layer 實現:
    • Agent Framework: AutoGen (非常適合多 Agent 對話,只需調整其通信機制使用 MCP Service) 或 LangChain (構建單個 Agent)。
    • MCP Interaction Module: Agent 代碼內部封裝對 MCP Service API 的調用。
    • Agent Reasoning Prompt: 核心 Prompt 引導 Agent 使用 MCP API 獲取和更新上下文。
    • Deployment: Kubernetes 容器化部署。
  • Task Initiator & Global State Monitor:
    • 一個簡單的 Web 服務或命令行工具作為 Initiator,調用 MCP Service 創建新任務,啟動初始 Agent。
    • Global State Monitor 是一個后臺服務,定期查詢 MCP Service 的任務狀態,或監聽 Context 更新事件,并在 UI 上展示。
  • Workflow Engine (Optional / Simplified Role): 如果需要更強的流程控制(如順序執行、條件分支),Workflow Engine 仍有用武之地,但它的任務步驟不再是“調用一個 Agent 完成所有工作”,而是“等待 MCP Context 中的某個狀態達到特定值”、“向 Context 添加一條消息觸發某個 Agent”。或者,一個“流程管理 Agent”可以利用 MCP 協調其他 Agent 完成一個流程。
  • 其他層: 與之前方案類似 (Kubernetes, Kafka/RabbitMQ, Databases, Observability Stack)。

實現流程概念偽代碼:

1. MCP (Master Context Protocol) Service (Simplified FastAPI Example)

# Pseudo-code for MCP Service using FastAPI
from fastapi import FastAPI, HTTPException
from pydantic import BaseModel
from typing import List, Dict, Any
import uuid
import timeapp = FastAPI()# In-memory storage for simplicity, replace with DB in production
contexts: Dict[str, Dict[str, Any]] = {}class Message(BaseModel):sender_id: strsender_type: str # e.g., "agent", "human", "system"type: str # e.g., "thought", "action", "observation", "tool_call", "tool_result", "human_input", "status_update"content: Anytimestamp: float = Field(default_factory=time.time)class TaskContext(BaseModel):task_id: strcreated_at: float = Field(default_factory=time.time)messages: List[Message] = [] # History of interactionsshared_state: Dict[str, Any] = {} # Key-value pairs for shared state# Add fields for linked knowledge, relevant documents etc.@app.post("/tasks", response_model=TaskContext)
def create_task(initial_goal: str):task_id = str(uuid.uuid4())new_context = TaskContext(task_id=task_id, shared_state={"status": "CREATED", "initial_goal": initial_goal})contexts[task_id] = new_context.model_dump() # Store as dict for mutationprint(f"Task {task_id} created.")return new_context@app.get("/tasks/{task_id}/context", response_model=TaskContext)
def get_context(task_id: str):if task_id not in contexts:raise HTTPException(status_code=404, detail="Task not found")return TaskContext(**contexts[task_id]) # Return as Pydantic model@app.post("/tasks/{task_id}/messages")
def add_message(task_id: str, message: Message):if task_id not in contexts:raise HTTPException(status_code=404, detail="Task not found")contexts[task_id]['messages'].append(message.model_dump())# Optional: Trigger event notification hereprint(f"Task {task_id}: Added message from {message.sender_id} ({message.type})")return {"status": "success"}@app.put("/tasks/{task_id}/state")
def update_shared_state(task_id: str, state_update: Dict[str, Any]):if task_id not in contexts:raise HTTPException(status_code=404, detail="Task not found")contexts[task_id]['shared_state'].update(state_update)# Optional: Trigger event notification if specific keys updatedprint(f"Task {task_id}: Updated shared state: {state_update}")return {"status": "success"}@app.get("/tasks/{task_id}/state", response_model=Dict[str, Any])
def get_shared_state(task_id: str):if task_id not in contexts:raise HTTPException(status_code=404, detail="Task not found")return contexts[task_id]['shared_state']# Run with: uvicorn mcp_service:app --reload

2. Agent Layer: Example Agent (Literature Review Agent) - Interacting with MCP

# Pseudo-code for a Literature Review Agent's internal logic (Simplified)
from agent_core_base import AgentCore # Base class handles LLM, Memory, Tools
from tools import SearchPubMedTool, SummarizeTextTool
from mcp_client import MCPClient # Custom client for MCP Service APIclass LiteratureReviewAgent(AgentCore): # Inherit from base Agent classdef __init__(self, id, llm, memory, tools, mcp_client: MCPClient, task_id: str):super().__init__(id, llm, memory, tools)self.mcp_client = mcp_clientself.task_id = task_id # Agent is initialized for a specific task contextdef run(self):# Agent starts its execution loopprint(f"Agent {self.id}: Starting execution for task {self.task_id}")try:while True:# 1. Get current context from MCPcontext = self.mcp_client.get_context(self.task_id)current_history = context['messages']shared_state = context['shared_state']# Check if task is already completed or requires human interventionif shared_state.get('status') == 'COMPLETED' or shared_state.get('status') == 'NEEDS_HUMAN_REVIEW':print(f"Agent {self.id}: Task status is {shared_state.get('status')}. Exiting.")break # Exit loop# 2. LLM Reasoning based on context# Craft a prompt that includes the history and state from contextprompt = self.generate_reasoning_prompt(current_history, shared_state)llm_response = self.llm.chat(prompt) # Assuming chat modelthought = extract_thought_from_llm_response(llm_response) # Needs parsingaction = extract_action_from_llm_response(llm_response) # Needs parsing (tool call or update_state)# 3. Log thought to MCPself.mcp_client.add_message(self.task_id, self.id, "thought", thought)if action:action_type = action['type']action_details = action['details']# 4. Log action to MCPself.mcp_client.add_message(self.task_id, self.id, "action", action)if action_type == "tool_call":tool_name = action_details['tool_name']tool_params = action_details['tool_params']print(f"Agent {self.id}: Calling tool {tool_name} with {tool_params}")try:tool_result = self.use_tool(tool_name, tool_params)print(f"Agent {self.id}: Tool {tool_name} returned {tool_result}")# 5. Log observation/tool result to MCPself.mcp_client.add_message(self.task_id, self.id, "observation", tool_result)self.mcp_client.add_message(self.task_id, self.id, "tool_result", tool_result)# 6. Based on result, maybe update shared state?if self.check_if_literature_complete(tool_result): # Agent's own logicself.mcp_client.update_shared_state(self.task_id, {"literature_review_status": "COMPLETED", "literature_summary": tool_result['summary']})print(f"Agent {self.id}: Literature review task completed.")# Agent might choose to exit here, or LLM might decide the next step# break # Example: Exit after completionexcept Exception as tool_error:error_msg = f"Tool {tool_name} failed: {tool_error}"print(error_msg)# 5. Log error to MCPself.mcp_client.add_message(self.task_id, self.id, "observation", {"error": error_msg})self.mcp_client.update_shared_state(self.task_id, {"status": "ERROR_IN_LIT_REVIEW", "error_details": error_msg})# Agent might decide to stop or seek helpbreak # Example: Exit on major errorelif action_type == "update_state":state_updates = action_details['updates']self.mcp_client.update_shared_state(self.task_id, state_updates)print(f"Agent {self.id}: Updated shared state with {state_updates}")elif action_type == "delegate": # Example: Agent decides to delegate to another agent typetarget_agent_type = action_details['agent_type']delegation_task = action_details['task_description']# Log this delegation to the context so other agents can see itself.mcp_client.add_message(self.task_id, self.id, "delegation", {"to_agent_type": target_agent_type, "description": delegation_task})# The Session Manager or another Agent might pick this up and launch the new agent# This requires other components monitoring the contextelif action_type == "report_completion": # Agent signals its part is donefinal_summary = action_details['summary']self.mcp_client.update_shared_state(self.task_id, {"literature_review_status": "FINALIZED", "final_summary": final_summary})self.mcp_client.add_message(self.task_id, self.id, "status_update", {"status": "Literature review finalized"})print(f"Agent {self.id}: Reported finalization.")# break # Agent might exit after its specific sub-task is done# ... other action types (e.g., ask_human_for_help)else: # LLM didn't generate a valid action or signaled completion implicitly# Needs logic to detect if LLM is stuck or implicitly finishedprint(f"Agent {self.id}: LLM returned no valid action or finished.")# Maybe update state to signal potential stagnation or sub-task completion?# self.mcp_client.update_shared_state(self.task_id, {"status": "LIT_REVIEW_AGENT_STALLED"})break # Example: Exit looptime.sleep(5) # Prevent tight loop, allow other agents to potentially actexcept Exception as e:print(f"Agent {self.id} encountered fatal error: {e}")# Log fatal error and update global stateself.mcp_client.add_message(self.task_id, self.id, "system_error", {"error": str(e)})self.mcp_client.update_shared_state(self.task_id, {"status": "FATAL_ERROR", "error_source": self.id, "error_details": str(e)})def generate_reasoning_prompt(self, history, shared_state):# Craft the core prompt for the LLM, injecting relevant history and statehistory_text = "\n".join([f"{msg['sender_type']} ({msg['sender_id']}) [{msg['type']}]: {msg['content']}" for msg in history])state_text = json.dumps(shared_state, indent=2)prompt = f"""You are a {self.agent_type} with ID {self.id}. Your current task context (ID: {self.task_id}) is managed by the Master Context Protocol Service.Review the task history and shared state below. Determine your next step to contribute to the overall R&D goal defined in the shared state ('initial_goal').Your actions should be one of the following types: 'tool_call', 'update_state', 'delegate', 'report_completion', 'ask_human_for_help'.Output your thought process first, then your chosen action in JSON format. If no action is needed now, explain why.Current Shared State:{state_text}Task History:{history_text}Available Tools: {list(self.tools.keys())}Think step-by-step. What is the current situation? What needs to be done next based on the goal and state? Which action is most appropriate?"""return promptdef check_if_literature_complete(self, tool_result):# Agent-specific logic to determine if its sub-task is done# E.g., check if a summary is generated, if enough papers were reviewed, etc.pass # Placeholder# use_tool method would be similar to previous examples, calling external services# class AgentCoreBase would handle the LLM interaction and basic structure

3. Task Initiator & Global State Monitor (Simplified)

# Pseudo-code for Task Initiator (e.g., a simple script or service)
from mcp_client import MCPClientmcp_client = MCPClient(mcp_service_url="http://mcp_service:8000") # Point to MCP Servicedef start_new_rnd_task(user_goal: str):print(f"Initiating R&D task with goal: {user_goal}")# 1. Create a new context for the tasknew_context = mcp_client.create_task(user_goal)task_id = new_context['task_id']print(f"New task created with ID: {task_id}")# 2. Start initial Agent(s) and provide them with the task_id# This requires knowing which agent(s) should start based on the initial goal# This logic could be hardcoded, rule-based, or even LLM-decided by the Initiator.initial_agent_types = ["Literature Review Agent", "Hypothesis Generation Agent"] # Examplefor agent_type in initial_agent_types:# Assume a way to launch an agent instance (e.g., calling a Kubernetes API to create a Pod,# or calling an Agent Management Service)launch_agent_instance(agent_type, task_id) # This function starts the Agent processprint(f"Launched initial agent: {agent_type} for task {task_id}")print("Initial agents launched. Monitoring task state via MCP.")# Pseudo-code for Global State Monitor (e.g., a background process or UI component)
def monitor_rnd_tasks():mcp_client = MCPClient(mcp_service_url="http://mcp_service:8000")while True:# 1. Get overview of tasks (e.g., list all tasks or recent ones)tasks_overview = mcp_client.list_tasks() # Needs a list_tasks endpoint in MCP Servicefor task_summary in tasks_overview:task_id = task_summary['task_id']current_state = mcp_client.get_shared_state(task_id)print(f"Task {task_id}: Status - {current_state.get('status', 'N/A')}, Goal - {current_state.get('initial_goal', 'N/A')}")# Check for specific conditions needing human attentionif current_state.get('status') == 'NEEDS_HUMAN_REVIEW':print(f"ALERT: Task {task_id} needs human review!")# Trigger notification (email, slack) and provide link to UI showing contextif current_state.get('status') == 'FATAL_ERROR':print(f"ALERT: Task {task_id} encountered FATAL ERROR!")# Trigger notificationtime.sleep(60) # Check every minute# launch_agent_instance(agent_type, task_id) pseudo-code:
# This function is part of the Agent Management layer, not MCP itself.
# It would typically interact with Kubernetes to deploy a pod,
# passing task_id and MCP Service endpoint as environment variables or arguments
# so the Agent knows which context to join.
def launch_agent_instance(agent_type, task_id):# Example: Call Kubernetes API to create a Podk8s_client = get_kubernetes_client()pod_manifest = {"apiVersion": "v1","kind": "Pod","metadata": {"generateName": f"{agent_type.lower().replace(' ', '-')}-"},"spec": {"containers": [{"name": "agent","image": f"your_agent_image:{agent_type.lower().replace(' ', '-')}", # Need different images or config for each type"env": [{"name": "AGENT_ID", "value": str(uuid.uuid4())},{"name": "AGENT_TYPE", "value": agent_type},{"name": "TASK_ID", "value": task_id},{"name": "MCP_SERVICE_URL", "value": "http://mcp_service:8000"},# ... other env vars for LLM endpoint, DBs, etc.]}],"restartPolicy": "Never" # Or OnFailure depending on desired behavior}}k8s_client.create_namespaced_pod("default", pod_manifest)print(f"Requested Kubernetes to launch {agent_type} pod for task {task_id}")

與 Dify / AutoGen 的結合:

  • Dify: Dify 的 Agent 能力和 Workflow 可以在這個框架中用于構建單個具備復雜工具使用或 RAG 能力的 Agent 類型。您可以將一個 Dify Agent App 或 Workflow 視為一個黑盒的、可通過 API 調用的服務,這個服務內部可能集成了 LLM 和工具。然后,您的定制 Agent 代碼(如上面偽代碼中的 LiteratureReviewAgent)在需要時,不是直接調用底層工具,而是調用這個 Dify Agent 的 API 來完成一個子任務。Dify 的 RAG 和 Prompt 管理能力依然非常有用。
  • AutoGen: AutoGen 本身就是一個多 Agent 框架,它有自己的基于消息傳遞的協作機制。您可以選擇使用 AutoGen 內置的群聊或工作流,而是將 AutoGen 的 Agent 類用作構建單個 Agent 實例(它負責自身的 LLM、Tool Use 等)的基礎,然后修改 AutoGen Agent 的通信層,使其通過調用您的 MCP Service API 來發送和接收消息(即 send 方法寫入 MCP,receive 方法從 MCP 讀取相關消息)。或者,更簡單地,將 整個 AutoGen GroupChat 視為一個復雜的 Agent 類型,通過 MCP Service 接收任務,然后它在內部使用 AutoGen 的機制完成任務,最后將最終結果和關鍵過程總結更新到 MCP Context 中。

優勢 (與中心控制程序相比):

  • 更去中心化/自主性: Agent 更多地基于共享上下文和自身邏輯行動,理論上更靈活。
  • 潛在的更強的韌性: 某個 Agent 失敗不一定導致整個系統停滯(如果其他 Agent 能感知到并接管或尋求幫助)。
  • 協作模式的靈活性: 不局限于預設的 DAG,可以通過 Agent 在 Context 中的對話和狀態更新發展出更動態的協作。
  • 易于調試和理解 (如果 MCP 實現得好): 整個任務的執行過程和 Agent 交互記錄在共享 Context 中,方便回溯。

挑戰 (與中心控制程序相比):

  • 協調的復雜性: 確保所有 Agent 對任務目標和當前狀態有共同理解,避免沖突、重復工作或遺漏關鍵步驟,需要更精巧的 Agent 設計和 Prompt Engineering。
  • 收斂性: 沒有一個強中心的協調者來強制流程推進,如何確保 Agent 團隊最終能夠收斂到完成任務的狀態,而不是陷入僵局或無效循環?需要 Agent 內置強大的自我糾錯和尋求幫助(人類或特定管理 Agent)的能力。
  • Context 管理: 共享上下文可能變得非常龐大且包含噪音。如何讓 Agent (LLM) 有效地從大量歷史和狀態信息中提取 relevant 信息進行決策,并避免 Context Window 限制?需要先進的 Context Management 技術(如 RAG on Context, summarization)。
  • 全局優化難度: 難以進行全局最優的資源分配和調度,因為決策是分布在各個 Agent 中的。

總結:

LLM + Agent + MCP (Master Context Protocol) 模式提供了一種構建 R&D 自動化平臺的可行且更具自主性的思路。核心是將共享上下文作為 Agent 協作的中心媒介。MCP Service 負責管理這個共享上下文,而 Agent 則通過與 MCP Service 交互,感知環境、執行任務并影響環境。

實現的關鍵在于設計健壯的 MCP Service API、編寫能夠有效利用共享上下文進行推理和協作的 Agent Prompt 與內部邏輯、以及構建一套能夠監控共享狀態并適時介入的 Global State Monitor 和 Human-in-the-Loop 機制。

這個模式尤其適合需要更靈活、更接近人類團隊協作模式的 R&D 任務,但對 Agent 設計的自主性和魯棒性提出了更高的要求,并且需要解決共享上下文管理和任務收斂性等復雜問題。

本文來自互聯網用戶投稿,該文觀點僅代表作者本人,不代表本站立場。本站僅提供信息存儲空間服務,不擁有所有權,不承擔相關法律責任。
如若轉載,請注明出處:http://www.pswp.cn/web/77746.shtml
繁體地址,請注明出處:http://hk.pswp.cn/web/77746.shtml
英文地址,請注明出處:http://en.pswp.cn/web/77746.shtml

如若內容造成侵權/違法違規/事實不符,請聯系多彩編程網進行投訴反饋email:809451989@qq.com,一經查實,立即刪除!

相關文章

zephyr架構下Bluetooth advertising接口

目錄 概述 1 函數接口 2 主要函數介紹 2.1 bt_le_adv_start函數 2.1.1 函數功能介紹 2.1.2 典型使用示例 2.1.3 廣播間隔 2.1.4 注意事項 2.2 bt_le_adv_stop 函數 2.2.1 函數功能 2.2.2 使用方法介紹 2.2.3 實際應用示例 2.2.4 關鍵注意事項 2.2.5 常見問題解決 …

8、HTTPD服務--ab壓力測試

一、ab壓力測試 # ab ‐c 100 ‐n 1000 http://vedio.linux.com/index.html 2 This is ApacheBench, Version 2.3 <$Revision: 1430300 $> 3 Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/ 4 Licensed to The Apache Software Foundation,…

E2E 測試

以下是關于端到端(E2E)測試的基本知識總結: 一、E2E 測試核心認知 1. 定義與價值定位 "模擬真實用戶在完整應用環境中的操作流程"核心價值: 驗證跨系統/模塊的集成功能檢測用戶流程中的關鍵路徑保障核心業務場景的可用性測試金字塔定位:單元測試(70%) → 集…

python之數字類型的操作

Python數據類型與操作符完全指南&#xff1a;詳解各類數據操作技巧 目錄 數字類型 字符串 列表 元組 字典 集合 布爾 通用操作符 注意事項 1. 數字類型&#xff08;int, float, complex&#xff09; 數字類型是Python中最基礎的數據類型&#xff0c;支持多種數學運算…

基于Spring Boot+Vue 網上書城管理系統設計與實現(源碼+文檔+部署講解)

技術范圍&#xff1a;SpringBoot、Vue、SSM、HLMT、Jsp、PHP、Nodejs、Python、爬蟲、數據可視化、小程序、安卓app、大數據、物聯網、機器學習等設計與開發。 主要內容&#xff1a;免費功能設計、開題報告、任務書、中期檢查PPT、系統功能實現、代碼編寫、論文編寫和輔導、論文…

從拒絕采樣到強化學習,大語言模型推理極簡新路徑!

大語言模型&#xff08;LLMs&#xff09;的推理能力是當下研究熱點&#xff0c;強化學習在其復雜推理任務微調中廣泛應用。這篇論文深入剖析了相關算法&#xff0c;發現簡單的拒絕采樣基線方法表現驚人&#xff0c;還提出了新算法。快來一探究竟&#xff0c;看看這些發現如何顛…

測試——BUG篇

1. 軟件測試的生命周期 軟件測試貫穿于軟件的整個生命周期&#xff0c;針對這句話我們?起來看?下軟件測試是如何貫穿軟件的整個生命周期。 軟件測試的?命周期是指測試流程&#xff0c;這個流程是按照?定順序執?的?系列特定的步驟&#xff0c;去保證產品質量符合需求。在…

【Hive入門】Hive函數:內置函數與UDF開發

Apache Hive作為Hadoop生態系統中的重要組件&#xff0c;為大數據分析提供了強大的SQL-like查詢能力。Hive不僅支持豐富的內置函數&#xff0c;還允許用戶開發自定義函數&#xff08;UDF&#xff09;以滿足特定需求。本文將深入探討Hive的內置函數&#xff08;包括數學函數、字…

關于匯編語言與程序設計——子程序設計

學習目標&#xff1a; 編程實現兩個數&#xff1a;#8888H 和 #79H 的乘除運算。 一、實驗要求 能夠熟練掌握算術運算匯編指令的使用&#xff1b;熟練掌握子程序設計的基本方法&#xff1b;熟練掌握程序的調試方法。 二、實驗設計 1.整體思路 乘法&#xff1a;將單字節的乘數…

AWS SQS 隊列策略配置指南:常見錯誤與解決方案

在 AWS 云服務中,Simple Queue Service (SQS) 是一種完全托管的消息隊列服務,廣泛應用于分布式系統組件間的解耦。為了確保隊列的安全訪問,正確配置隊列策略至關重要。本文將詳細介紹 SQS 隊列策略的配置方法,常見錯誤及其解決方案。 SQS 隊列策略基礎 SQS 隊列策略是基于…

Webshell管理工具的流量特征

目錄 一、常見Webshell工具流量特征 1. ??中國菜刀&#xff08;Chopper&#xff09;?? 2. ??冰蝎&#xff08;Behinder&#xff09;?? 3. ??哥斯拉&#xff08;Godzilla&#xff09;?? 4. ??蟻劍&#xff08;AntSword&#xff09;?? 5. ??C99 Shell??…

【每日八股】復習 MySQL Day3:鎖

文章目錄 昨日內容復習MySQL 使用 B 樹作為索引的優勢是什么&#xff1f;索引有哪幾種&#xff1f;什么是最左匹配原則&#xff1f;索引區分度&#xff1f;聯合索引如何排序&#xff1f;使用索引有哪些缺陷&#xff1f;什么時候需要建立索引&#xff0c;什么時候不需要&#xf…

Arkts完成數據請求http以及使用axios第三方庫

import http from ohos.net.http Entry Component struct HttpPage {State message: string Hello Worldbuild() {Column({space:20}) {Row(){Button(發送http請求).onClick(()>{let httpRequest http.createHttp();httpRequest.request(https://zzgoodqc.cn/index.php/in…

SELinux 從理論到實踐:深入解析與實戰指南

文章目錄 引言&#xff1a;為什么需要 SELinux&#xff1f;第一部分&#xff1a;SELinux 核心理論1.1 SELinux 的三大核心模型1.2 安全上下文&#xff08;Security Context&#xff09;1.3 策略語言與模塊化 第二部分&#xff1a;實戰操作指南2.1 SELinux 狀態管理2.2 文件上下…

CD34.【C++ Dev】STL庫的string的使用 (上)

目錄 1.知識回顧 2.串聯類和對象的知識重新理解 構造函數 string(); string (const string& str); string (const string& str, size_t pos, size_t len npos); string (const char* s); string (size_t n, char c); append和push_back string& append …

Git常用指令速查

Git常用指令速查 基本操作類&#xff1a; git init &#xff1a;初始化倉庫git log&#xff1a;查看日志&#xff0c;這個命令很重要&#xff01;git add <文件名|.>&#xff1a;添加到暫存區git commit -m 注釋&#xff1a;提交到倉庫git merge <分支名>&#xf…

探索無人機模擬環境的多元景象及AI拓展

無人駕駛飛行器&#xff08;UAVs&#xff09;在各行各業的迅速普及&#xff0c;從農業和檢測到空中操作和人機交互等令人興奮的前沿領域&#xff0c;都引發了一個關鍵需求&#xff1a;強大而逼真的模擬環境。直接在物理硬件上測試尖端算法存在固有的風險——成本高昂的墜機、中…

AI Agent開源技術棧

構建和編排Agent的框架 如果您是從頭開始構建&#xff0c;請從這里開始。這些工具可以幫助您構建Agent的邏輯——做什么、何時做以及如何處理工具。您可以將其視為將原始語言模型轉化為更自主的模型的核心大腦。 2. 計算機和瀏覽器的使用 一旦你的Agent能夠規劃&#xff0c…

jspm老年體檢信息管理系統(源碼+lw+部署文檔+講解),源碼可白嫖!

摘要 信息化時代&#xff0c;各行各業都以網絡為基礎飛速發展&#xff0c;而醫療服務行業的發展卻進展緩慢&#xff0c;傳統的醫療服務行業已經逐漸不滿足民眾的需求&#xff0c;有些還在以線下預約的方式接待病人&#xff0c;特別是針對于老年體檢的服務&#xff0c;是少之又…

ESP32- 開發筆記- 軟件開發 4 - GPIO 口

1 背景介紹 GPIO&#xff08;General Purpose Input/Output&#xff09; ——通用輸入輸出口&#xff0c;就是能由軟件自由控制輸入&#xff08;接收外界信號&#xff09;或輸出&#xff08;發出電平信號&#xff09;的引腳。 ESP32 最核心的功能之一&#xff0c;能被用來控制…