Modern distributed systems integrate heterogeneous services, REST APIs with different schema versions, GraphQL endpoints, and IoT devices with proprietary payloads that suffer from persistent schema mismatches. Traditional static adapters require manual coding for every schema pair and cannot handle novel combinations at runtime. We present SAGAI-MID, a FastAPI-based middleware that uses large language models (LLMs) to dynamically detect and resolve schema mismatches at runtime. The system employs a five-layer pipeline: hybrid detection (structural diff plus LLM semantic analysis), dual resolution strategies (per-request LLM transformation and LLM-generated reusable adapter code), and a three-tier safeguard stack (validation, ensemble voting, rule-based fallback). We frame the architecture through Bass et al.'s interoperability tactics, transforming them from design-time artifacts into runtime capabilities. We evaluate SAGAI-MID on 10 interoperability scenarios spanning REST version migration, IoT-to-analytics bridging, and GraphQL protocol conversion across six LLMs from two providers. The best-performing configuration achieves 0.90 pass@1 accuracy. The CODEGEN strategy consistently outperforms DIRECT (0.83 vs 0.77 mean pass@1), while cost varies by over 30x across models with no proportional accuracy gain; the most accurate model is also the cheapest. We discuss implications for software architects adopting LLMs as runtime architectural components.


翻译:现代分布式系统集成了异构服务、不同模式版本的REST API、GraphQL端点以及采用专有有效载荷的物联网设备,这些组件普遍遭遇持续的模式不匹配问题。传统的静态适配器要求为每对模式组合手动编码,且无法在运行时处理新型组合。我们提出SAGAI-MID,一个基于FastAPI的中间件,利用大型语言模型在运行时动态检测和解决模式不匹配。该系统采用五层流水线架构:混合检测(结构差异分析加上LLM语义分析)、双分辨率策略(按需LLM转换和LLM生成的可复用适配器代码)以及三层安全防护栈(验证、集成投票、基于规则的降级)。我们通过Bass等人的互操作性策略对该架构进行理论框架构建,将这些策略从设计时制品转化为运行时能力。我们在涵盖REST版本迁移、物联网到分析平台的桥接以及GraphQL协议转换的10个互操作性场景中,对来自两个提供商的六种LLM进行了评估。性能最佳配置达到0.90的pass@1准确率。CODEGEN策略始终优于DIRECT策略(平均pass@1为0.83对比0.77),而成本在不同模型间差异超过30倍且与准确率提升不成比例——最准确的模型同时也是成本最低的。我们讨论了软件架构师将LLM作为运行时架构组件所带来的启示。

0
下载
关闭预览

相关内容

智能体工程(Agent Engineering)
专知会员服务
36+阅读 · 2025年12月31日
【数据中台】什么是数据中台?
产业智能官
18+阅读 · 2019年7月30日
TensorFlow 2.0新特性之Ragged Tensor
深度学习每日摘要
18+阅读 · 2019年4月5日
【边缘智能】边缘计算驱动的深度学习加速技术
产业智能官
20+阅读 · 2019年2月8日
并行算法演进,从MapReduce到MPI
凡人机器学习
10+阅读 · 2017年11月5日
国家自然科学基金
2+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
7+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
2+阅读 · 2015年12月31日
VIP会员
最新内容
综述 | 3D场景图:开放挑战与未来方向
专知会员服务
4+阅读 · 6月22日
21世纪的无人机战争
专知会员服务
4+阅读 · 6月22日
《量子技术的军事任务技术适配与利用》
专知会员服务
5+阅读 · 6月22日
美国从乌克兰无人机战争中学习经验
专知会员服务
7+阅读 · 6月21日
ICML 2026 | 面向视觉语言模型的语义鲁棒性认证
专知会员服务
5+阅读 · 6月21日
相关基金
国家自然科学基金
2+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
7+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
2+阅读 · 2015年12月31日
Top
微信扫码咨询专知VIP会员