跳到主内容
@wquguru
精选88The Pragmatic Engineer(RSS)产品与增长

Ramp自建AI基础设施的7个关键决策与落地细节

Inside Ramp's AI Transformation

原文
发到 X
推荐理由

为技术驱动型公司提供了一套完整的AI基础设施落地框架,从“自建vs购买”的战略抉择到具体的工程实践(如质量门禁、自动修复、多人协作),参数清晰,可直接参考其取舍逻辑。

Why would a fintech business from before this age of AI build its own coding harness, model router, agentic runtime, and more AI infrastructure software, in-house, on top of LLMs? Not only has the finance platform Ramp done all this, but it’s now starting to sell some of its AI infra as standalone products, such as Ramp Router (at router.com, model routing), Inspect (coding agent), and Glass (AI workspace).

为什么一家在 AI 时代之前就存在的金融科技公司要在 LLM 之上自行构建代码辅助工具、模型路由、智能体运行时以及更多 AI 基础设施软件?Ramp 这家金融平台不仅完成了所有这些工作,而且现在正开始将其部分 AI 基础设施作为独立产品出售,例如 Ramp Router(位于 router.com,用于模型路由)、Inspect(编码智能体)和 Glass(AI 工作区)。

To find out how – and why – Ramp did it, I traveled to New York and stopped by its headquarters to meet the engineering team and leadership. In today’s issue, we dig into seven decisions that were key to Ramp going all-in on AI successfully in a relatively short period of time.

为了了解 Ramp 是如何做到这一点的——以及为什么要这样做,我前往纽约,参观了其总部,会见了工程团队和领导层。在本期内容中,我们深入探讨了七个关键决策,正是这些决策使 Ramp 在相对较短的时间内成功全面投入 AI。

Inside Ramp’s HQ in New York, with a cardboard cutout of Brian Baumgartner from The Office in the background. Brian played Ramp’s CFO for a day

在纽约的 Ramp 总部内部,背景中有一个来自《办公室》的 Brian Baumgartner 纸板立牌。Brian 当天扮演了 Ramp 的首席财务官(CFO)。

Readers may recall that back in August we also covered Ramp – a company of ~2,000 people with an engineering team of around 300 – building its own coding agent, Inspect, and what other teams could take away as inspiration. This especially applies after adoption of Inspect across engineering hit 99% (up from 75%, since the August article), and the number of coding sessions started with Inspect increased sixfold since June:

读者可能还记得,早在八月我们就报道过 Ramp——一家拥有约 2,000 名员工、工程团队约 300 人的公司——正在构建自己的编码智能体 Inspect,以及其他团队可以从中汲取的灵感。特别是在 Inspect 在工程团队的采用率达到 99%(自八月文章发布以来从 75% 上升),且自六月以来使用 Inspect 启动的编码会话数量增加了六倍之后,这一点尤为适用:

Inspect is used by 99% of devs at Ramp, and the number of coding sessions has increased sixfold – mostly thanks to automations triggering Inspect

Ramp 99% 的开发人员都在使用 Inspect,编码会话数量增加了六倍——这主要归功于触发 Inspect 的自动化流程。

For this new article, I was intrigued to understand more about the AI infrastructure project, particularly as we’re talking about a company operating in a regulated sector like finance.

对于这篇新文章,我很好奇想要更深入地了解这个 AI 基础设施项目,特别是当我们谈论的是一家在像金融这样受监管领域运营的公司时。

Those seven decisions for the transformation:

转型的这七个决策:

  • Decision #1: Build AI infra in-house. For the “build vs. buy” question, Ramp chose to build all its AI infra, and has no regrets. The team did enjoy a year-and-a-half head start on this, thanks to the earlier acquisition of an AI startup.
  • Decision #2: Invest in quality gates before going all-in on agents. Ramp has several AI agents in its “software factory”, but they all run on top of a validation system built pre-AI that includes static analysis, unit tests, and a massive end-to-end test suite.
  • Decision #3: Understand & embrace the “new” characteristics of building software. How software is built has changed in the last year. For example, engineers own systems of which they have not read the code, while rewrites are cheaper than ever.
  • Decision #4: Do NOT mandate tool usage. Counterintuitively, Ramp didn’t set up a “central” AI team at first, and does not mandate which AI tools its engineers use. It has recently started to consolidate some duplicate efforts, though.
  • Decision #5: Automate fixing of broken stuff. Ramp is using AI heavily to automate bugfixing: CI issues are resolved on the spot, production errors trigger PRs, and even the oncall agent produces code fixes during incidents.
  • Decision #6: Make development “multiplayer” by default. Every Inspect coding session inside Ramp is public, as in that any colleague can join in someone’s work and “take it over.” This is a different way of working than without AI, where every engineer works on their own machine, in their own branch, and collaboration only happens during code review, and only between engineers.
  • Decision #7: Turn non-engineers into builders. Ramp built Ramplify (its internal apps platform) Glass (an internal AI workspace) and Dojos (a skill repository). Using Ramplify as a non-engineer is part of the onboarding process, and there’s an expectation to think in systems and automations.
  • Things that did not work. Local agents, every team building their own harness, and tying AI spend to business outcomes. Also, the number of product releases stayed flat while Ramp spent more on AI, even as engineers commit 6x as much code versus before.
  • 决策 #1:在内部构建 AI 基础设施。关于“自建还是外购”的问题,Ramp 选择自建其所有 AI 基础设施,并且毫不后悔。得益于此前收购了一家 AI 初创公司,该团队在此方面获得了长达一年半的先发优势。
  • 决策 #2:在全面投入智能体之前投资质量门禁。Ramp 在其“软件工厂”中有多个 AI 智能体,但它们都运行在一个在 AI 之前构建的验证系统之上,该系统包括静态分析、单元测试和一个庞大的端到端测试套件。
  • 决策 #3:理解并拥抱构建软件的“新”特性。在过去一年里,构建软件的方式发生了变化。例如,工程师负责的系统他们并未阅读过代码,而重写代码的成本比以往任何时候都低。
  • 决策 #4:不要强制使用工具。反直觉的是,Ramp 最初没有设立“中央”AI 团队,也不强制工程师使用特定的 AI 工具。不过,它最近开始整合一些重复的工作。
  • 决策 #5:自动化修复故障。Ramp 大量使用 AI 来自动化 bug 修复:CI 问题即时解决,生产错误触发 PR,甚至 oncall 代理在事故期间也能生成代码修复方案。
  • 决策 #6:默认让开发成为“多人游戏”。Ramp 内部所有的 Inspect 编码会话都是公开的,意味着任何同事都可以加入某人的工作并“接管”它。这与不使用 AI 时的工作方式不同,在没有 AI 的情况下,每位工程师都在自己的机器上、在自己的分支中工作,协作仅发生在代码审查期间,且仅限于工程师之间。
  • 决策 #7:将非工程师转变为构建者。Ramp 构建了 Ramplify(其内部应用平台)、Glass(一个内部 AI 工作区)和 Dojos(技能库)。作为非工程师使用 Ramplify 是入职流程的一部分,并且期望大家具备系统和自动化的思维。
  • 未奏效的做法。本地代理、每个团队自行构建测试框架,以及将 AI 支出与业务成果挂钩。此外,尽管 Ramp 在 AI 上的投入增加,工程师提交的代码量也比之前多了 6 倍,但产品发布数量却保持不变。

Before we begin, I know companies may be considering something similar to what Ramp has done. My advice would be to get inspired by what the team has achieved, but resist the urge to blindly copy practices! The constraints on your own project or team are likely different from those covered here.

在我们开始之前,我知道公司可能正在考虑类似 Ramp 所做的举措。我的建议是,从团队取得的成就中汲取灵感,但要抵制盲目复制做法的冲动!您自身项目或团队面临的约束可能与本文所述的不同。

I’d also like to thank a few folks at Ramp for contributing to this deepdive: CTO Rahul Sengottuvelu, Veeral Patel (Head of Applied AI), Olivier Beaulieu (Director of Engineering), Dylan Garcia (Senior Staff engineer on Inspect), Brian Schroeder and Pranjal Vachaspati (platform engineers), Ben Levick (Head of Product and Customer Operations), Jennifer John (AI Operations Lead) and Matt Shalhoub (Chief of Staff).

我还要感谢 Ramp 的几位同仁对本深度分析做出的贡献:CTO Rahul Sengottuvelu、应用 AI 负责人 Veeral Patel、工程总监 Olivier Beaulieu、Inspect 高级 Staff 工程师 Dylan Garcia、平台工程师 Brian Schroeder 和 Pranjal Vachaspati、产品与客户运营负责人 Ben Levick、AI 运营主管 Jennifer John 以及首席幕僚长 Matt Shalhoub。

With that, let’s get into it.

好了,让我们进入正题。

Decision #1: Build AI infra in-house

决策 #1:自建 AI 基础设施

We start with the familiar question: should you “build” or “buy” the systems powering the business? Conventional wisdom says the best move is to just buy any systems that are not in your “core” business. And infrastructure typically isn’t considered core for businesses which aren’t infra companies. And yet, this fintech has decided to build all its AI infra.

我们从那个老生常谈的问题开始:你应该“自建”还是“外购”支撑业务的系统?传统观点认为,最好的策略是购买那些不属于你“核心”业务的系统。而基础设施通常不被视为非基础设施公司的核心业务。然而,这家金融科技公司却决定自建其所有 AI 基础设施。

Ramp may be on the right track with this bold move, considering what Microsoft CEO Satya Nadella said on the Pragmatic Engineer podcast very recently. The tech leader said companies should own their own “intelligence layer”, which includes the harness, private evals, and AI infra that is not tied to a single provider.

考虑到微软 CEO 萨提亚·纳德拉(Satya Nadella)在《Pragmatic Engineer》播客中最近发表的观点,Ramp 的这一大胆举措可能走在正确的轨道上。这位科技领袖表示,公司应该拥有自己的“智能层”,其中包括Harness、私有评估以及不绑定于单一供应商的 AI 基础设施。

Two-year headstart

两年的先发优势

Ramp was early to building internal AI infra, after starting to experiment with AI a year before ChatGPT was released in 2021. Back then, their team built relatively simple AI automation for sales emails on top of GPT-3. The “ChatGPT moment” came in November 2022, when OpenAI released its conversational “Chat” model that was built on top of the GPT-3 LLM.

Ramp 较早开始构建内部 AI 基础设施,早在 2021 年 ChatGPT 发布前一年,他们就开始进行 AI 实验。当时,他们的团队基于 GPT-3 构建了相对简单的销售邮件 AI 自动化功能。“ChatGPT 时刻”出现在 2022 年 11 月,当时 OpenAI 发布了基于 GPT-3 大型语言模型(LLM)构建的对话式“Chat”模型。

An early AI startup acquisition seeded Ramp’s Applied AI team. In 2023, Ramp acqui-hired startup Cohere.io, which built customer support automation on top of GPT-3. Ramp’s CTO Rahul Sengottuvelu, was cofounder of Cohere.io, and Ramp’s Applied AI team was spun out of the deal.

对一家早期 AI 初创公司的收购为 Ramp 的应用 AI 团队奠定了基础。2023 年,Ramp 通过收购初创公司 Cohere.io 获得了人才(acqui-hire),该公司基于 GPT-3 构建了客户支持自动化系统。Ramp 的首席技术官 Rahul Sengottuvelu 是 Cohere.io 的联合创始人,Ramp 的应用 AI 团队也是从这笔交易中衍生出来的。

The Cohere.io acquisition injected “AI-pilled” engineers into Ramp, who had spent a year and a half building and integrating models from the ground up, 18 months before other companies, where engineers were just starting to learn how LLMs worked. With its Applied AI team in place, Ramp was far more confident about building its own infra and not relying on third-party vendors.

Cohere.io 的收购为 Ramp 注入了“深度沉浸于 AI”的工程师,他们在其他公司的工程师刚刚开始学习 LLM 工作原理之前的 18 个月,就已经花费了一年半的时间从零开始构建和集成模型。随着应用 AI 团队的到位,Ramp 对于构建自己的基础设施而不依赖第三方供应商变得更加自信。

Ramp Router

One of the first things Ramp’s Applied AI team worked on was a “waterfall fallback router” for LLMs. In 2023, AI providers were pretty unreliable, so routing to another one during an outage was a sensible way to keep things running. The initial router was simple: when a model provider failed, the router routed a request to a different provider, waterfall-style.

Ramp 应用 AI 团队着手做的第一件事是为 LLM 开发一个“瀑布式回退路由器”。2023 年,AI 提供商的服务相当不可靠,因此在服务中断时路由到另一个提供商是保持系统运行的明智之举。最初的路由器很简单:当某个模型提供商发生故障时,路由器会以瀑布式的方式将请求路由到另一个提供商。

Observability was a nice side effect of this. Ramp’s coding agent, Inspect, made all calls through the internal router, so that per-request usage tracking was trivial. Usage tracking then gave Ramp observability of LLM calls on model, provider, cost, and which teams are making calls. This in turn allows Ramp to make cost optimizations at the router layer, like switching to cheaper models for some tasks.

可观测性是这个过程的意外收获。Ramp 的代码代理 Inspect 的所有调用都通过内部路由器进行,因此按请求跟踪使用情况变得轻而易举。使用跟踪随后使 Ramp 能够观察 LLM 调用的模型、提供商、成本以及哪些团队正在发起调用。这反过来允许 Ramp 在路由器层面进行成本优化,例如为某些任务切换到更便宜的模型。

With observability and tracking in place, a few neat things became possible:

随着可观测性和追踪功能的部署,一些精巧的功能得以实现:

  • Cost control: send requests to the lowest-priced model that fits the job
  • Smart routing: pick the best model for a request depending on recent route-level performance stats. In practice, Ramp configured it to prefer the cheapest combination of provider, model, and the tier expected to hit a request’s deadline.
  • Ongoing benchmarking: the router updates per-route performance stats with the latest call, and maintains for each route its recent failure rate, and a statistical model of its latency.
  • 成本控制:将请求发送至符合任务要求的最低价格模型
  • 智能路由:根据近期路由级别的性能统计数据,为请求选择最佳模型。在实际操作中,Ramp 将其配置为优先选择提供商、模型和预计能满足请求截止期限的层级的最便宜组合。
  • 持续基准测试:路由器使用最新调用更新各路由的性能统计数据,并为每个路由维护近期的失败率及其延迟的统计模型。

更进一步:量化金融体系

看懂新闻只是起点——沿量化金融路径,把它变成能交付的工程能力

进入量化体系 →

相似阅读

关联信息,但可能不是同一事件