多代理软件开发是一个分布式系统问题。
Multi-Agentic Software Development Is a Distributed Systems Problem

原始链接: https://kirancodes.me/posts/log-distributed-llms.html

从自然语言提示构建软件,例如请求一个“菜谱跟踪应用程序”,本质上是一个*解读*的挑战。一个提示有许多可能的软件解决方案。大型语言模型(LLM)基本上*选择*一种解读来构建。 多智能体系统通过分配任务来解决这个问题。多个智能体并行工作,每个智能体创建组件,旨在完善对提示的*共同*理解。这个过程是一个复杂的“分布式共识问题”——智能体必须协调并就设计选择达成一致。 例如,一个智能体选择特定的网络库会影响其他智能体如何集成该功能。成功的综合依赖于智能体之间的沟通和协调工作,以便最终组合的软件满足原始请求。这是一个联合问题,其中单个选择会约束和影响其他人的可能性,最终目标是创建一个连贯且功能完善的应用程序。

对不起。
相关文章

原文

Claude. Make me an app to track recipes. Make no mistakes.

We can model the problem of multi-agent synthesis formally as follows:

Given a prompt \(P :=\) "\(\textit{An app to track recipes}\)", we can define the formula \(\Phi(P)\) as the set of software consistent with the prompt:

\[ \Phi(P) := \{ \phi ~|~ \phi ~ \text{program} ∧ \phi ~\text{is consistent with the prompt}~P \} \]

The key point here is that a natural language prompt, by its very nature, is underspecified — i.e there may be multiple programs that are consistent with the prompt. When we use LLMs to build and write software systems, we're effectively asking the LLMs to select one element amongst many from this set.

Conversely, when we do multi-agentic software development, i.e we spin up several agents, \(A_1, ⋯, A_n\), and ask them to build a piece of software, we're essentially asking them each to produce software components \(\phi_1, ⋯, \phi_n\) such that they all refine one single consistent interpretation of the prompt:

\[ C(\phi_1, \cdots, \phi_n) := \exists \phi \in \Phi(P), \forall i, \phi_i ~\text{refines}~ \phi \]

This in other words, is nothing other than one big distributed consensus problem.

agentic-coordination.svg

In other words, the user's prompt \(P\) first gets sent split, via a plan, into tasks for several agents \(a_1, \cdots, a_n\). Then, these agents work in parallel to implement their respective coding tasks \(\phi_1, \cdots, \phi_n\), and by the end, if the synthesis was successful, we're hoping that the final generated software system \(\phi\) composed of each of the individual constructions \(\phi := \phi_1 || \cdots || \phi_n\), satisfies the user's request.

This is inherently a consensus problem as the agents \(a_1,\cdots,a_n\) must work concurrently to produce their software artefacts \(\phi_1,\cdots,\phi_n\), but communicate and agree enough that the final piece of software \(\phi_1 || \cdots || \phi_n\) is well formed and satisfies the request. Design decisions or choices in one \(\phi_i\) will result in constraints that affect and influence the possible choices of \(\phi_j\) for other agents. For example, if the agent in charge of implementing network connections \(a_{\text{network}}\) chooses a library with a callback-style async API for requests, then whichever agent is responsible for the overall integration \(a_{\text{integration}}\) must organise the infrastructure around that choice and so on and so forth. Similar choices in other modules will influence the design spaces of other agents and overall the process proceeds as a joint synthesis problem.

联系我们 contact @ memedata.com