最新资讯
stackoverflow.blog 欢迎来到芯片时代:半导体制造、AI 数据中心与芯片设计的未来 www.youtube.com AI Agent 总犯同样的错:CentralAgent AI 将记忆重构为经验系统 pub.towardsai.net Netflix 科学家建议重采样 LLM 评判:5 次仅将误差棒缩小 13% pub.towardsai.net Jev 作为 LLM 前的静默层:构建提示感知的模型路由器 reddit.com OpenAI 称 Astra 仅满足 10% 安全任务标准 dev.to FreeToken:在自有 GPU 上运行前沿 MoE 模型及其内存需求 dev.to 当 AI Agent 说“完成”时,究竟完成了什么? dev.to 部署 Underdog Bark 3.0 Pro:逐字转写、自定义后端与分块设置 dev.to 为艰难对话构建 AI:五个 Agent、一条安全正则与一位盲评监督者 techcrunch.com Palo Alto Networks 洽谈以 5 亿美元收购 AI Agent 安全初创公司 Clutch theinformation.com 黄仁勋被要求就涉华间谍指控向国会作简报 www.infoq.com Edera 推出 Object Capability Bounded Authority,试图将凭证与 AI Agent 工作负载隔离
多元动态
登录 注册
智能体 dev.to · @Renato Marinho

用确定性 MCP 工具解决按比例分摊的财务逻辑

原文 我的收藏

文章指出 LLM 是概率引擎,直接让 Agent 做除法等确定性运算容易产生看似合理但缺乏数学严谨性的结果。作者以 Couples Shared Account Engine 这一 MCP server 为例,将按收入加权的比例分摊逻辑封装为专用工具,用于处理多人共同账户的公平分摊问题,并讨论公平与均分之间的差异。

AI推荐理由 以按收入比例分摊家庭账单为例,说明用 MCP 工具封装确定性计算逻辑、避免让概率模型直接做算术的思路,属于可复用的 Agent 工具设计模式;但为个人项目经验分享,无基准数据或对比验证。

62

正文

Most LLM-driven automation fails at arithmetic because language models are probabilistic engines being asked to perform deterministic tasks. If you ask an agent to 'fairly split a bill,' it will hallucinate a division strategy that looks reasonable but lacks mathematical rigor. To build useful autonomous agents in finance, we cannot rely on the model's internal weights; we must provide specialized Model Context Protocol (MCP) tools that encapsulate the calculation logic. I recently worked on refining the Couples Shared Account Engine, an MCP server designed specifically to handle proportional expense splitting for households. This isn't just a calculator wrapped in a tool definition; it is a structured approach to reconciling multi-person finances using income-weighted variables. The Math Behind Proportionate Contributions The core challenge in shared accounts is determining equity versus equality. Equality—splitting everything 50/50—is often mathematically unfair in dual-income households with significant earning disparities. Equity requires calculating contributions based on income ratios. The engine exposes four specific primitives that allow an AI agent to navigate this: calculate_income_proportions: Determines the weight of each partner's contribution relative to total household income. calculate_individual_obligations: Maps those percentages onto concrete shared expense totals. calculate_reconciliation_transfer: Solves the most common practical friction point—identifying exactly how much one party needs to move to another when one person pays the full amount upfront. calculate_partner_surplus: Provides a sanity check by evaluating remaining liquidity after all obligations are settled. A typical execution flow involves more than a single call. An agent doesn't just run one function; it performs a sequence of reasoning steps: establishing proportions, applying them to recent transactions, and finally generating a reconciliation instruction. Moving Beyond Tool Definitions to Production Standards You might look at these functions and think, "This is simple math; I can write this myself in five minutes." While true, if you are building an agentic workflow meant to interact with real bank APIs or sensitive financial data via Claude or Cursor, the difficulty shifts from the math to the infrastructure. When I began developing Vinkius, I focused on this gap. Most developers spend disproportionate time managing OAuth flows, handling webhook callbacks from various providers, or worrying about credential sprawl. In standard implementations, connecting an agent to a service usually means exposing long-lived credentials or setting up complex redirect URIs every time you switch clients. Vinkius bypasses this through a unified gateway architecture. Instead of configuring unique authentication layers for every individual tool within your IDE or agent environment, you utilize a single connection token. This effectively abstracts the complexity of multiple third-party integrations into a consistent interface managed under our MCPFusion framework. For tools involving money—like the Shared Account Engine—the risk profile changes significantly compared to querying a weather API or reading a documentation file. You aren't just dealing with data retrieval; you are dealing with decision support that affects real-world assets. Engineering Governance and Security Sandboxing A recurring theme in modern AI safety research is controlled agency: giving an LLM enough power to be useful without allowing it to execute unintended side effects (such as accidental large transfers or unauthorized data exfiltration). The Couples Shared Account Engine operates within Vinkius's hardened environment. Because we built our servers using MCPFusion (an open-source TypeScript framework under Apache 2.0), we ensure behavioral consistency across all deployments. Specifically, every execution occurs within an isolated V8 sandbox. We implement eight distinct governance policies at the runtime level, including: DLP (Data Loss Prevention): Ensuring sensitive financial parameters don't leak beyond intended scopes.(Note: Even though this particular engine currently calculates values rather than performing direct ledger writes, maintaining these boundaries prevents future scope creep from introducing vulnerabilities.)** SSRF Prevention: Blocking attempts by agents to use provided tools as proxies for network scanning.* HMAC Audit Chains: Providing verifiable proof of which tool was called and what inputs were processed during automated workflows.* Kill Switches: Allowing immediate termination of active sessions if anomalous behavior patterns emerge.* Please note that while some general purpose MCP directories offer similar functionality, they lack this integrated layer of institutionalized protection required for production environments where financial accuracy and data integrity are non-negotiable requirements. The goal is clear: minimize developer friction regarding connectivity while maximizing control over execution autonomy. MCPs are the music of AI Agents. We built the catalog. Discover Vinkius MCP Catalog.

来源报道 · 1 篇 · 以下链接均前往原始媒体

← 返回精选动态 原文

更多内容