camel-ai Agent模块- DeductiveReasonerAgent

「文智助手」全场景办公AI助理AI+OPC全流程实践方案(大赛作品) 阅读详情

DeductiveReasonerAgent 简介

DeductiveReasonerAgent(演绎推理智能体)设定初始状态,目标状态,使用大模型完成推理过程。专注于逻辑推理和演绎。将复杂问题分解为更小、可管理的步骤。
在这里插入图片描述

DeductiveReasonerAgent 主要方法

deduce_conditions_and_quality
输入 :起始状态、目标状态、角色字典(可选)

逻辑:给定提示词,设定初始状态、目标状态,角色,进行逻辑推理和演绎,提取结构化数据

输出:结构化的数据,输出样例

{'conditions': {'condition 1': '提供教育与技能培训,以增强个人的就业能力。', 'condition 2': '提供融资渠道,如小额信贷,以支持创业和投资。', 'condition 3': '政府政策应促进公平的经济机会和社会保障。'}, 'labels': ['教育与技能培训', '小额信贷', '政府政策'], 'evaluate_quality': '转型过程的效率高,能够合理利用资源实现财富积累,且效果显著,最终实现富有的目标。'}

提示词

        deduce_prompt = """You are a deductive reasoner. You are tasked to 
        complete the TASK based on the THOUGHT OF DEDUCTIVE REASONING, the 
        STARTING STATE A and the TARGET STATE B. You are given the CONTEXT 
        CONTENT to help you complete the TASK.
Your answer MUST strictly adhere to the structure of ANSWER TEMPLATE, ONLY 
fill in the BLANKs, and DO NOT alter or modify any other part of the template

===== MODELING OF DEDUCTIVE REASONING =====
You are tasked with understanding a mathematical model based on the components 
${A, B, C, Q, L}$. In this model: ``L: A ⊕ C -> q * B``.
- $A$ represents the known starting state.
- $B$ represents the known target state.
- $C$ represents the conditions required to transition from $A$ to $B$.
- $Q$ represents the quality or effectiveness of the transition from $A$ to 
$B$.
- $L$ represents the path or process from $A$ to $B$.

===== THOUGHT OF DEDUCTIVE REASONING =====
1. Define the Parameters of A and B:
    - Characterization: Before delving into transitions, thoroughly understand 
    the nature and boundaries of both $A$ and $B$. This includes the type, 
    properties, constraints, and possible interactions between the two.
    - Contrast and Compare: Highlight the similarities and differences between 
    $A$ and $B$. This comparative analysis will give an insight into what 
    needs changing and what remains constant.
2. Historical & Empirical Analysis:
    - Previous Transitions according to the Knowledge Base of GPT: (if 
    applicable) Extract conditions and patterns from the historical instances 
    where a similar transition from a state comparable to $A$ moved towards 
    $B$.
    - Scientific Principles: (if applicable) Consider the underlying 
    scientific principles governing or related to the states and their 
    transition. For example, if $A$ and $B$ are physical states, laws of 
    physics might apply.
3. Logical Deduction of Conditions ($C$):
    - Direct Path Analysis: What are the immediate and direct conditions 
    required to move from $A$ to $B$?
    - Intermediate States: Are there states between $A$ and $B$ that must be 
    traversed or can be used to make the transition smoother or more 
    efficient? If yes, what is the content?
    - Constraints & Limitations: Identify potential barriers or restrictions 
    in moving from $A$ to $B$. These can be external (e.g., environmental 
    factors) or internal (properties of $A$ or $B$).
    - Resource and Information Analysis: What resources and information are 
    required for the transition? This could be time, entity, factor, code 
    language, software platform, unknowns, etc.
    - External Influences: Consider socio-economic, political, or 
    environmental factors (if applicable) that could influence the transition 
    conditions.
    - Creative/Heuristic Reasoning: Open your mind to multiple possible $C$'s, 
    no matter how unconventional they might seem. Utilize analogies, 
    metaphors, or brainstorming techniques to envision possible conditions or 
    paths from $A$ to $B$.
    - The conditions $C$ should be multiple but in one sentence. And each 
    condition should be concerned with one aspect/entity.
4. Entity/Label Recognition of Conditions ($C$):
    - Identify and categorize entities of Conditions ($C$) such as the names, 
    locations, dates, specific technical terms or contextual parameters that 
    might be associated with events, innovations post-2022.
    - The output of the entities/labels will be used as tags or labels for 
    semantic similarity searches. The entities/labels may be the words, or 
    phrases, each of them should contain valuable, high information entropy 
    information, and should be independent.
    - Ensure that the identified entities are formatted in a manner suitable 
    for database indexing and retrieval. Organize the entities into 
    categories, and combine the category with its instance into a continuous 
    phrase, without using colons or other separators.
    - Format these entities for database indexing: output the category rather 
    than its instance/content into a continuous phrase. For example, instead 
    of "Jan. 02", identify it as "Event time".
5. Quality Assessment ($Q$):
    - Efficiency: How efficient is the transition from $A$ to $B$, which 
    measures the resources used versus the desired outcome?
    - Effectiveness: Did the transition achieve the desired outcome or was the 
    target state achieved as intended?
    - Safety & Risks: Assess any risks associated with the transition and the 
    measures to mitigate them.
    - Feedback Mechanisms: Incorporate feedback loops to continuously monitor 
    and adjust the quality of transition, making it more adaptive.
6. Iterative Evaluation:
    - Test & Refine: Based on the initially deduced conditions and assessed 
    quality, iterate the process to refine and optimize the transition. This 
    might involve tweaking conditions, employing different paths, or changing 
    resources.
    - Feedback Integration: Use feedback to make improvements and increase the 
    quality of the transition.
7. Real-world scenarios often present challenges that may not be captured by 
models and frameworks. While using the model, maintain an adaptive mindset:
    - Scenario Exploration: Continuously imagine various possible scenarios, 
    both positive and negative, to prepare for unexpected events.
    - Flexibility: Be prepared to modify conditions ($C$) or alter the path/
    process ($L$) if unforeseen challenges arise.
    - Feedback Integration: Rapidly integrate feedback from actual 
    implementations to adjust the model's application, ensuring relevancy and 
    effectiveness.

===== TASK =====
Given the starting state $A$ and the target state $B$, assuming that a path 
$L$ always exists between $A$ and $B$, how can one deduce or identify the 
necessary conditions $C$ and the quality $Q$ of the transition?

===== STARTING STATE $A$ =====
{starting_state}

===== TARGET STATE $B$ =====
{target_state}

{role_with_description_prompt}
===== ANSWER TEMPLATE =====
- Characterization and comparison of $A$ and $B$:\n<BLANK>
- Historical & Empirical Analysis:\n<BLANK>/None
- Logical Deduction of Conditions ($C$) (multiple conditions can be deduced):
    condition <NUM>:
        <BLANK>.
- Entity/Label Recognition of Conditions:\n[<BLANK>, <BLANK>, ...] (include 
square brackets)
- Quality Assessment ($Q$) (do not use symbols):
    <BLANK>.
- Iterative Evaluation:\n<BLANK>/None"""

提示词翻译成中文的意思

你是一个演绎推理者。您的任务是基于演绎推理的思想完成任务起始状态A和目标状态B。您将获得上下文内容帮助您完成任务。您的答案必须严格遵守答案模板的结构,仅限填写空白处,不得更改或修改模板的任何其他部分
=====演绎推理的建模=====
您的任务是理解基于组件的数学模型
${A,B,C,Q,L}$。在此模型中:``L:A?C->q*B``。
-$A$表示已知的启动状态。
-$B$表示已知的目标状态。
-$C$表示从$A$过渡到$B$所需的条件。
-$Q$表示从$A$过渡到
亿美元。
-$L$表示从$A$到$B$的路径或过程。
=====演绎推理的思想=====
1.定义A和B的参数:
-特征描述:在深入研究转换之前,请彻底理解$A$和$B$的性质和界限。这包括类型,属性、约束和两者之间可能的交互。
-对比和比较:强调$A$和$B$。这种比较分析将深入了解需要改变,什么保持不变。
2.历史与实证分析:
-根据GPT知识库的先前转换:(如果适用)从历史实例中提取条件和模式从相当于$a$的州向亿美元。
-科学原则:(如果适用)考虑潜在的管理国家及其相关的科学原则过渡。例如,如果$A$和$B$是物理状态,则物理学可能适用。
3.条件的逻辑演绎($C$):
-直接路径分析:直接和直接条件是什么需要从$A$移动到$B$?
-中间状态:在$A$和$B$之间是否存在必须为遍历或可用于使过渡更平滑或更平滑高效?如果是,内容是什么?
-约束和限制:确定潜在的障碍或限制从$A$移动到$B$。这些可以是外部的(例如,环境因子)或内部($A$或$B$的属性)。
-资源和信息分析:什么是资源和信息过渡所需的?这可以是时间、实体、因素、代码语言、软件平台、未知数等。
-外部影响:考虑社会经济、政治或可能影响过渡的环境因素(如适用)
条件。
-创造性/启发式推理:敞开心扉接受多个可能的$C$,不管它们看起来多么不落俗套。利用类比,隐喻或头脑风暴技术来设想可能的条件或从$A$到$B$的路径。
-条件$C$应该是多个,但在一个句子中。以及每个条件应该与一个方面/实体有关。
4.实体/标签条件识别($C$):
-识别和分类条件($C$)的实体,如名称,地点、日期、特定技术术语或上下文参数可能与2022年后的事件和创新有关。
-实体/标签的输出将用作语义相似性搜索。实体/标签可以是单词,或短语,每个短语都应该包含有价值的高信息熵信息,并且应该是独立的。
-确保以适当的方式格式化标识的实体用于数据库索引和检索。将实体组织为类别,并将类别及其实例组合为连续的短语,不使用冒号或其他分隔符。
-格式化这些实体以进行数据库索引:输出类别,而不是将其实例/内容转换为连续短语。例如,相反将其标识为“事件时间”。
5.质量评估($Q$):
-效率:从$A$到$B$的转换效率如何衡量使用的资源与期望的结果?
-有效性:过渡是否达到了预期的结果,或者目标状态是否按预期实现?
-安全和风险:评估与过渡和缓解措施。
-反馈机制:整合反馈回路以持续监控并调整过渡质量,使其更具适应性。
6.迭代评估:
-测试和改进:基于最初推导的条件并评估质量,迭代该过程以细化和优化转换。这个可能涉及调整条件、采用不同的路径或更改资源。
-反馈整合:使用反馈进行改进,并增加转换的质量。
7.现实世界场景通常会提出一些挑战,这些挑战可能无法被捕获模型和框架。在使用模型时,保持适应性思维:
-场景探索:不断想象各种可能的场景,积极和消极,为意外事件做好准备。
-灵活性:准备修改条件($C$)或更改路径/过程($L$),如果出现不可预见的挑战。
-反馈集成:快速集成来自实际的反馈实现来调整模型的应用程序,确保相关性和有效性。
=====任务=====
给定起始状态$A$和目标状态$B$,假设路径$L$总是存在于$A$和$B$之间,如何推断或识别必要条件$C$和过渡的质量$Q$?
=====起始状态$A$=====
{starting_state}
=====目标状态$B$=====
{target_state}
{role_with_description_prompt}
===== ANSWER TEMPLATE =====
- Characterization and comparison of $A$ and $B$:\n<BLANK>
- Historical & Empirical Analysis:\n<BLANK>/None
- Logical Deduction of Conditions ($C$) (multiple conditions can be deduced):
    condition <NUM>:
        <BLANK>.
- Entity/Label Recognition of Conditions:\n[<BLANK>, <BLANK>, ...] (include 
square brackets)
- Quality Assessment ($Q$) (do not use symbols):
    <BLANK>.
- Iterative Evaluation:\n<BLANK>/None

代码示例:贫穷到富有的逻辑演绎推理

from camel.agents.deductive_reasoner_agent import DeductiveReasonerAgent
from camel.logger import set_log_level
from model.gpt_4o_model import model
import logging

set_log_level('DEBUG')

starting_state = "贫穷"
target_state = "富有"


deductive_reasoner_agent = DeductiveReasonerAgent(model=model)
deductive_reasoner_agent.output_language = '中文'

for i in range(3):
    try:
        conditions_and_quality = deductive_reasoner_agent.deduce_conditions_and_quality(
                starting_state=starting_state, target_state=target_state
        )
        print(conditions_and_quality)
        break
    except Exception as e:
        logging.exception('run error', )

这段代码实现了一个基于演绎推理的智能代理系统,主要功能是通过逻辑推理分析从"贫穷"到"富有"状态转变所需的条件和路径。具体作用如下:

‌核心功能‌:
使用DeductiveReasonerAgent进行演绎推理,分析状态转变的条件
设置输出语言为中文,便于本地化使用。通过循环尝试机制(最多3次)确保推理过程的可靠性

‌技术实现‌:
初始化推理代理时加载了GPT-4O模型作为推理引擎。设置DEBUG级别的日志记录,便于调试和错误追踪使用异常处理机制捕获并记录推理过程中的错误

‌业务逻辑‌:
定义了明确的起始状态(“贫穷”)和目标状态(“富有”),通过deduce_conditions_and_quality方法生成状态转变的条件评估。输出结果包含达成目标所需的条件及其质量评估。该代码典型应用于决策支持系统,通过人工智能模型帮助分析复杂问题的解决路径。当主推理过程失败时,异常处理机制会记录详细错误信息供后续分析

运行结果如下:

2025-06-20 23:21:29,195 - camel - DEBUG - Logging level set to: 10
2025-06-20 23:21:34,993 - camel.agents.chat_agent - INFO - Model gpt-4o-mini, index 0, processed these messages: [{'role': 'system', 'content': 'You assign roles based on tasks.\nRegardless of the input language, you must output text in 中文.'}, {'role': 'user', 'content': 'You are a deductive reasoner. You are tasked to \n        complete the TASK based on the THOUGHT OF DEDUCTIVE REASONING, the \n        STARTING STATE A and the TARGET STATE B. You are given the CONTEXT \n        CONTENT to help you complete the TASK.\nYour answer MUST strictly adhere to the structure of ANSWER TEMPLATE, ONLY \nfill in the BLANKs, and DO NOT alter or modify any other part of the template\n\n===== MODELING OF DEDUCTIVE REASONING =====\nYou are tasked with understanding a mathematical model based on the components \n${A, B, C, Q, L}$. In this model: ``L: A ⊕ C -> q * B``.\n- $A$ represents the known starting state.\n- $B$ represents the known target state.\n- $C$ represents the conditions required to transition from $A$ to $B$.\n- $Q$ represents the quality or effectiveness of the transition from $A$ to \n$B$.\n- $L$ represents the path or process from $A$ to $B$.\n\n===== THOUGHT OF DEDUCTIVE REASONING =====\n1. Define the Parameters of A and B:\n    - Characterization: Before delving into transitions, thoroughly understand \n    the nature and boundaries of both $A$ and $B$. This includes the type, \n    properties, constraints, and possible interactions between the two.\n    - Contrast and Compare: Highlight the similarities and differences between \n    $A$ and $B$. This comparative analysis will give an insight into what \n    needs changing and what remains constant.\n2. Historical & Empirical Analysis:\n    - Previous Transitions according to the Knowledge Base of GPT: (if \n    applicable) Extract conditions and patterns from the historical instances \n    where a similar transition from a state comparable to $A$ moved towards \n    $B$.\n    - Scientific Principles: (if applicable) Consider the underlying \n    scientific principles governing or related to the states and their \n    transition. For example, if $A$ and $B$ are physical states, laws of \n    physics might apply.\n3. Logical Deduction of Conditions ($C$):\n    - Direct Path Analysis: What are the immediate and direct conditions \n    required to move from $A$ to $B$?\n    - Intermediate States: Are there states between $A$ and $B$ that must be \n    traversed or can be used to make the transition smoother or more \n    efficient? If yes, what is the content?\n    - Constraints & Limitations: Identify potential barriers or restrictions \n    in moving from $A$ to $B$. These can be external (e.g., environmental \n    factors) or internal (properties of $A$ or $B$).\n    - Resource and Information Analysis: What resources and information are \n    required for the transition? This could be time, entity, factor, code \n    language, software platform, unknowns, etc.\n    - External Influences: Consider socio-economic, political, or \n    environmental factors (if applicable) that could influence the transition \n    conditions.\n    - Creative/Heuristic Reasoning: Open your mind to multiple possible $C$\'s, \n    no matter how unconventional they might seem. Utilize analogies, \n    metaphors, or brainstorming techniques to envision possible conditions or \n    paths from $A$ to $B$.\n    - The conditions $C$ should be multiple but in one sentence. And each \n    condition should be concerned with one aspect/entity.\n4. Entity/Label Recognition of Conditions ($C$):\n    - Identify and categorize entities of Conditions ($C$) such as the names, \n    locations, dates, specific technical terms or contextual parameters that \n    might be associated with events, innovations post-2022.\n    - The output of the entities/labels will be used as tags or labels for \n    semantic similarity searches. The entities/labels may be the words, or \n    phrases, each of them should contain valuable, high information entropy \n    information, and should be independent.\n    - Ensure that the identified entities are formatted in a manner suitable \n    for database indexing and retrieval. Organize the entities into \n    categories, and combine the category with its instance into a continuous \n    phrase, without using colons or other separators.\n    - Format these entities for database indexing: output the category rather \n    than its instance/content into a continuous phrase. For example, instead \n    of "Jan. 02", identify it as "Event time".\n5. Quality Assessment ($Q$):\n    - Efficiency: How efficient is the transition from $A$ to $B$, which \n    measures the resources used versus the desired outcome?\n    - Effectiveness: Did the transition achieve the desired outcome or was the \n    target state achieved as intended?\n    - Safety & Risks: Assess any risks associated with the transition and the \n    measures to mitigate them.\n    - Feedback Mechanisms: Incorporate feedback loops to continuously monitor \n    and adjust the quality of transition, making it more adaptive.\n6. Iterative Evaluation:\n    - Test & Refine: Based on the initially deduced conditions and assessed \n    quality, iterate the process to refine and optimize the transition. This \n    might involve tweaking conditions, employing different paths, or changing \n    resources.\n    - Feedback Integration: Use feedback to make improvements and increase the \n    quality of the transition.\n7. Real-world scenarios often present challenges that may not be captured by \nmodels and frameworks. While using the model, maintain an adaptive mindset:\n    - Scenario Exploration: Continuously imagine various possible scenarios, \n    both positive and negative, to prepare for unexpected events.\n    - Flexibility: Be prepared to modify conditions ($C$) or alter the path/\n    process ($L$) if unforeseen challenges arise.\n    - Feedback Integration: Rapidly integrate feedback from actual \n    implementations to adjust the model\'s application, ensuring relevancy and \n    effectiveness.\n\n===== TASK =====\nGiven the starting state $A$ and the target state $B$, assuming that a path \n$L$ always exists between $A$ and $B$, how can one deduce or identify the \nnecessary conditions $C$ and the quality $Q$ of the transition?\n\n===== STARTING STATE $A$ =====\n贫穷\n\n===== TARGET STATE $B$ =====\n富有\n\n\n===== ANSWER TEMPLATE =====\n- Characterization and comparison of $A$ and $B$:\n<BLANK>\n- Historical & Empirical Analysis:\n<BLANK>/None\n- Logical Deduction of Conditions ($C$) (multiple conditions can be deduced):\n    condition <NUM>:\n        <BLANK>.\n- Entity/Label Recognition of Conditions:\n[<BLANK>, <BLANK>, ...] (include \nsquare brackets)\n- Quality Assessment ($Q$) (do not use symbols):\n    <BLANK>.\n- Iterative Evaluation:\n<BLANK>/None'}]
2025-06-20 23:21:34,998 - camel.camel.agents.deductive_reasoner_agent - INFO - Message content:
- Characterization and comparison of $A$ and $B$:
贫穷是一种经济状况,通常表现为缺乏足够的物质财富和资源,而富有则指拥有大量的财富和财务自由,二者在经济能力、生活质量和社会地位上都有显著差异。
- Historical & Empirical Analysis:
历史上,改善贫困的案例显示出教育、职业培训和小额贷款等因素对财富积累的重要性。
- Logical Deduction of Conditions ($C$) (multiple conditions can be deduced):
    condition 1:
        提供教育与技能培训,以增强个人的就业能力。
    condition 2:
        提供融资渠道,如小额信贷,以支持创业和投资。
    condition 3:
        政府政策应促进公平的经济机会和社会保障。
- Entity/Label Recognition of Conditions:
[教育与技能培训, 小额信贷, 政府政策]
- Quality Assessment ($Q$) (do not use symbols):
    转型过程的效率高,能够合理利用资源实现财富积累,且效果显著,最终实现富有的目标。
- Iterative Evaluation:
通过不断评估所实施的策略和得到的反馈来修正条件和路径,以适应变化和优化财富增长的过程。
{'conditions': {'condition 1': '提供教育与技能培训,以增强个人的就业能力。', 'condition 2': '提供融资渠道,如小额信贷,以支持创业和投资。', 'condition 3': '政府政策应促进公平的经济机会和社会保障。'}, 'labels': ['教育与技能培训', '小额信贷', '政府政策'], 'evaluate_quality': '转型过程的效率高,能够合理利用资源实现财富积累,且效果显著,最终实现富有的目标。'}

船载 OpenHarmony AIS 航海工作台:告警与防碰撞预警系统 船载OpenHarmony AIS航海工作台的告警与防碰撞系统,集成十余类告警(超速、偏航、会遇、SOS等),通过网格空间索引实现高效邻近判定,保障实时性。告警管理器统一调度规则、去重、通知与日志,支持悬浮球、语音、跑马灯、弹窗多渠道触达,确保航行安全。SOS紧急通道独立运行,避免干扰。系统设计强调性能优化与多场景适配,为航海安全提供核心支撑。 阅读详情

相关推荐

[0352]基于JAVA的停车场收费智慧管理系统的设计与实现

其次,从经营管理层面考虑,本系统涵盖了丰富的月卡管理和财务结算功能,如月卡用户管理、缴费、注销、挂失、解挂、补办等全流程服务,以及临保和月保的结算汇总与欠费查询等功能,这不仅有助于规范停车场的日常运营管理,更能有效提高财务管理效率,降低运营成本,实现精细化、数字化的财务管控。综上所述,本课题计划研发的基于Java的停车场收费智慧管理系统将在现有研究成果的基础上,重点优化月卡用户全生命周期管理和财务统计分析功能,以满足现代停车场高效、精准、安全的管理需求,紧跟行业发展趋势,为推动智慧城市的建设贡献一份力量。

muyu2980的专栏 589

6 款电商 AI 图片生成软件实测|国内 + 跨境卖家工具清单

电商 AI 作图工具已经从 "能不能用" 进入了 "好不好用" 的阶段。对于绝大多数卖家而言,现在的 AI 工具已经可以覆盖 60%-80% 的基础商品图需求,显著降低拍摄和设计成本。选择工具的核心逻辑不是 "哪款最强",而是 "哪款最适配你的品类、平台规模和团队能力"。垂直电商工具胜在工作流效率,通用生图工具强在创意上限,模板类工具赢在上手速度。建议根据自身业务阶段,搭配 1-2 款主力工具 + 1 款辅助工具,形成适合自己的视觉生产流程。

Mardi_Ladin的博客 377

VMware vSphere运维管理手册

ESXi 7.0 引入了一种系统存储布局,可对大型模块和第三方组件进行灵活的分区管理和支持,同时简化了调试操作。ESXi 7.0 系统存储更改在 ESXi 7.0 之前,分区大小固定不变,除 /scratch 分区和可选 VMFS 数据存储之外,且分区号是静态的,这些限制了分区管理。在 ESXi 7.0 中,分区整合为更少且更大的可扩展分区,具体取决于所使用的引导介质及其容量。ESXi 7.0 系统存储布局包含四个分区:分区适用情况类型系统引导存储引导加载程序和 EFI 模块。FAT16。

Avenjan优快云博客 3624

视频隐私脱敏工程化:CSRT/KCF追踪算法在本地推理中的实现与边界

在短视频内容合规审查中,动态遮挡(Dynamic Masking)是高频且高耗时的环节。传统手动关键帧打码不仅效率低下,且在目标快速移动或遮挡时极易出现遮罩漂移。本文从计算机视觉工程角度,解析基于CSRT与KCF算法的目标追踪方案在视频隐私处理中的技术路径、性能权衡及落地实践。

Mysssone的博客 212

powerdesigner导出sql将name放到comment注释上

【代码】powerdesigner导出sql将name放到comment注释上。

weixin_45947759的博客 1352

计算机视觉(相机标定;内参;外参;畸变系数)

目录 一、预备知识 1、坐标系变换过程(相机成像过程) (1)相机坐标系转换为图像坐标系(透视投影变换遵循的是针孔成像原理) (2)齐次坐标的引入原因:(为什么引入齐次坐标???) 2、内参与外参矩阵的构成 3、畸变参数 二、相机标定 1、张正友标定法(光学标定)及其求解思路 2、求解内参矩阵与外参矩阵的思路: (1)计算内参与外参矩阵的乘积M (2)求解内参矩阵A (3)求解外参矩阵(R1 R2 T) 三、参数优化 1、L-M算法 2、相机标定步骤 四、相关代码及其实验结.

QYJ_WORKHARDING的博客 6万+

我用 GPUWorks 在 M1 Pro 上搭了个发票识别原型

公司里经常要看电子发票。我想先做个小原型:把 PDF 发给一个自己部署的图文模型,让它提取发票类型、日期、交易双方和金额,再把结果交给同事核对。这个原型不用先接财务系统,先看看从部署到调用要走多少步,模型返回的内容能不能帮上忙。

鸽芷咕的博客 2万+

单智能体篇:Prompt工程艺术

模型在接收到 Prompt 时会自动扮演“角色”,角色定义的好坏直接影响智能体输出的风格和专业性。角色定义的重要性让智能体具备明确身份,例如“你是一位专业理财顾问”或“你是一个幽默的文案创作助手”。角色限定了模型知识输出的范围,使回答更专业、更贴合预期。实战示例模糊Prompt给我一些投资建议。你可以投资股票或者基金。优化Prompt你是一位具有10年经验的专业理财顾问,请给我针对30岁男性,年收入20万,风险偏中等的投资组合建议。

公众号:AI前沿侦探 1304

您您这可以把问小白的多个会话比如说。左侧的多个会话一次性导出吗?不是单条会话里面的多次会对话。AI导出鸭

第三层是格式编译层。这个决策背后的判断很清晰:一个批量导出工具的价值,不在于“试三次”,而在于你真正用它处理了几十份技术文档、访谈记录或课程讲义之后,它是否值得留在你的工作流里。问小白的会话列表通过分页接口加载,AI导出鸭 在页面运行时建立旁路监听,捕获每一次分页请求返回的完整对话清单,包括会话 ID、标题、时间戳和隐藏的元数据字段。让AI导出回归优雅——这句话说的是:导出不该是体力活,而应该是一次完整的、可预期的文件交付。注意:这里的“批量”指的是左侧列表里的多个独立会话,不是一条会话内的多轮对话。

laoyunsi的博客 244

从4A架构的角度出来 帮我分析一下:数字化转型深水区:企业架构如何成为价值重构的核心引擎?

4A 架构的本质是构建企业的数字神经系统,通过业务感知、数据传输、决策执行、技术支撑的闭环,实现从效率提升到生态重构的质变。正如华为通过该架构实现全球研发资源统一调度,某零售集团借此打造线上线下融合的新零售体系,当业务、数据、应用、技术四个维度形成共振时,企业将获得持续进化的数字免疫力,在不确定的市场环境中保持韧性生长。这一过程不仅需要技术工具的升级,更依赖组织文化的变革 —— 从 “部门墙” 到 “能力网” 的转型,才是数字化转型深水区的终极挑战。

金牌架构师 1046

【NLP】第十章:位置编码Positional Encoding

前面讲RNN时一般都会有一个ht的输出,这个输出就是样本与样本之间的信息,而且RNN是时序循环的,所以RNN本身的结构,在物理上,就自带词的前后顺序信息的。比如词never,不管never本身的词向量是什么,只要你在序列中排第一个位置,你的位置向量就是[0,1,01],你排第三个位置,你的位置向量就是[0.9,-0,4,0.2,1.0]。也所以,你可以理解为:embedding后的词嵌入,PE按照每个样本在sequence中的位置,把embedding后的词嵌入给扭转后,才送入attention的。

因为热爱所以坚持 1918

【从零理解 Spring AI · 12】MCP 的两种角色:做客户端还是做服务端

上一篇讲了 MCP 的概念:标准协议、三大角色、M+N 替代 M×N。

nice_lcj520的博客 497

threadX的USBX的初始化和解初始化的分析。

tx_application_define的最后会使用tx_byte_pool_create创建usb线程的内存空间“ux_device_app_byte_pool”,再创建usb线程,也就是执行。主要就是创建了线程,也就是第3个参数app_ux_device_thread_entry,这个参数内是MX_USB_Device_Init,也就是USB底层初始化。进来的参数只有1个,是memory_ptr,这个就是创建的usb线程空间“ux_device_app_byte_pool”

qq_31885403的博客 647

河道漂浮物目标检测数据集

目标检测,yolo,河道漂浮物目标检测数据集

DL_data_set的博客 197

win10 跳过U8环境检测的IE WebControls.rar

win10 安装u8的时候 提示IE WebControls 不通过,这个工具可以欺骗u8的检查。 跳过U8环境检测的IE WebControls。提示导入失败后,重新检测通过。

精雕软件(JDpaint) 5.5 绿色版

精雕软件(JDpaint) 5.5 绿色版精雕软件(JDpaint) 5.5 绿色版精雕软件(JDpaint) 5.5 绿色版

AI Agent之核心框架

A: 显式 Thought 有三类价值:可解释性(便于人类审计)、可调试性(定位哪一步选错工具)、学习信号(可做监督微调或评估中间步骤质量)。ReAct 把推理与 可执行行动 绑定,每一步行动后都有 真实 Observation 反馈,从而用工具结果约束生成,降低闭卷幻觉。做完不等于结束——还要 评估做得好不好,把 教训 记下来,下次 带着教训重试,反思作为 记忆,影响后续尝试的策略。工作流程:Action → Evaluation → Reflection → Retry。A: 普通 CoT 只在。

剑雨巍巍的博客 196

数学建模模型总结

这是本人在两年内准备参加数学建模竞赛搜集到的模型资料,已经经过了本人的筛选和整理,希望能够对准备参加数学建模竞赛的学弟学妹们提供一些帮助!

AI 应用开发工程师技术实践:大模型接入、通用组件封装与性能优化

本文提出AI应用从PoC到生产的核心挑战:模型调用的持续可用、可控与可优化。通过构建统一LLM网关实现多供应商路由与故障转移,封装对话、工具调用与RAG组件以解耦业务逻辑,结合前缀缓存、批处理与流式背压治理等性能优化手段,形成“接通→接稳→接快”的工程路径,最终以工程化能力决定AI应用的生产可用性。

2301_79189962的博客 551

SAP B1中文培訓教材_SDK

公司内部培训资料,对开发工具 ,DIAPI, UIAPI,Add-ON有详细解说

AI前沿日报 · 2026-11-04 | 祛魅时刻:Astra“纯读权重“神话的崩塌

①Astra"裸权重通吃"被spaCy创始人Honnibal精准祛魅——仅1/3实验真裸读,数学能力提升依赖Python+50次迭代;②Simon Willison用Qwen 3.8-27B端侧复现权重空间编程;③Nvidia开源Auto-Ontology自动知识图谱;④$800开源全域抓取机器人Stringman;⑤OpenAI悄然重开Codex训练开关引信任危机;⑥DeepMind发布Gemini 4 Argon机器人基础模型;⑦美国科技巨头隐性AI债务达3.2万亿美元,6个月增90%。

johnsong2009的博客 566

大模型 Embedding 与向量相似度详解

Embedding 解决的问题:计算机不懂文字,但懂数字│▼文本 → 向量(1024维浮点数数组)│▼相似度解决的问题:怎么判断两个向量(文本)有多接近│▼余弦相似度:看向量方向的夹角,越接近0°越相似│▼最终效果:语义搜索——理解意思,而非字面匹配一句话总结:Embedding 把文字变成数字,余弦相似度比较数字的方向,两者结合实现了"理解语义"的搜索。

T3165919332的博客 85

GPT-1 架构和计算细节

下面配合框图,对 GPT-1 的每个组件做公式展开 + 数值实例(配置:12 层 × 768,12 头,FFN 3072,词表 40478,共 117M 参数)。GPT-1 把翻译模型的编码器-解码器砍掉一半,只留解码器,然后以"预测下一个词"为目标在 BooksCorpus 上预训练。与 2017 原版的四个架构差异(框图中标 ★):h0=E[token]+Epos[position],E∈R40478×768, Epos∈R512×768h^0 = E[\text{token}] + E_{pos}[\

eloudy的专栏 278

终端 AI 审计与 “龙虾” 类智能体风险治理:从可见性到闭环溯源

生成式 AI 办公普及之后,数据泄露风险逐步下沉到终端。员工将合同、源代码、客户资料粘贴至公有大模型,以及龙虾(OpenClaw)这类本地开源 AI 智能体的滥用,成为企业安全新挑战。传统网络边界防护存在审计盲区,本文从风险链路拆解、核心能力模型、分级治理策略、落地踩坑点以及技术局限性多角度,分享终端侧 AI 安全治理的实践思路。

2401_86491085的博客 636

2.53 基于极稀疏指纹的室内定位注意力图元学习

该论文发表于IEEE Transactions on Mobile Computing(TMC)2026年6月,面向极稀疏指纹条件下的WiFi室内定位,针对指纹采集人力成本高、标记指纹稀缺时定位精度大幅下降的痛点,提出注意力图元学习模型AGML(Attentional Graph Meta‑Learning),结合图神经网络、元学习、两种指纹数据增强与分布对齐技术,在标记指纹极少的场景实现高精度室内定位,同时公开了多套真实+仿真定位数据集用于基准测试。场景:二维室内空间,障碍物造成信号遮挡,

weixin_42963026的博客 334

语音识别与语音合成的技术原理及应用

语音识别 #语音合成 #人工智能 #大模型。语音识别与语音合成的技术原理及应用。一、语音识别的核心原理。二、语音合成的核心原理。三、工程落地的主要难点。五、需要关注的现实问题。

weixin_62919816的博客 207

设计师工作室 GEO 实操:如何提升 AI 实体推荐概率

设计工作室 GEO 的本质,是把创意服务转化为 AI 可理解的结构化信息。核心动作可归纳为:区分事实与审美、建立实体图谱、预判用户提问、输出脱敏内容、搭建多信源、持续测试验证。梳理工作室的 6 个实体属性:品类、城市、流程、边界、团队、渠道。在官网或作品集平台发布至少 3 篇结构化项目复盘,只陈述事实。输出 1 篇「设计报价影响因素」科普内容,覆盖甲方高频提问。争取 1 次行业媒体或本地媒体专访,形成第三方信源。每周用「XX 城市 + 品类 + 设计工作室推荐」指令测试,记录出现频率。

goujunwe的博客 335

AI作图软件技术选型:从4个技术维度出发的实测对比

AI作图软件技术选型:从4个技术维度出发的实测对比

Vbaoke的博客 202

WorkBuddy 实战:一句话需求 → 七屏可交互原型,户外徒步 App 的 AI 设计全流程

WorkBuddy 实战:一句话需求 → 七屏可交互原型,户外徒步 App 的 AI 设计全流程,跟着博主一起来还原整个过程。

夜郎King的博客 4578

影视场景怎么用AI生成3D镜头预演?从概念图、场景白模到网页审片

概念图有氛围,不代表能直接用于镜头预演。本文围绕剧本拆镜、资料与尺度假设、场景白模、机位走位、动作节拍和网页审片,介绍 AI 生成 3D 场景的预演流程。通过稳定对象与相机编号、统一镜头表、意见关联版本和三轮审核,让讨论落到具体镜头,同时明确白模与网页预演不能替代真实场地勘景及现场安全判断。

Solange__的博客 534
上一篇: camel-ai Agent模块- CriticAgent
下一篇: mysql not in 查询引发的bug问题记录
Chengdu.S
博客等级 码龄9年 283粉丝 86原创
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

当前余额3.43元 前往充值 >
需支付:10.00元
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

Chengdu.S

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付元
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值