---
title: "Build vs. Buy Is Not One Decision: A Layer-by-Layer Flow"
description: "Build vs. buy is a per-layer decision, not a single platform choice. This flow splits a system into layers, tests each for differentiation, then sets the buy criteria and the exit path."
---

# Build vs. Buy Is Not One Decision: A Layer-by-Layer Flow

**Type:** [How it works](https://yomu.fyi/visual-explainers/category/how-it-works.md)

![A five-stage top-to-bottom flow diagram: split the stack into layers, test each layer for differentiation, branch to build or buy, score the buy on operations and portability, and keep an exit route.](https://yomufyi.s3.us-east-1.amazonaws.com/visual-explainers/949e35cb-d7e9-4944-b07d-f65473e0e6d7/image-ff23037e-f237-48a8-9573-c0c37c9592eb.webp)

> Build vs. buy is a per-layer decision, not a single platform choice. This flow splits a system into layers, tests each for differentiation, then sets the buy criteria and the exit path.

## Explanation

Build vs. buy rarely resolves at the platform level. In an orchestration stack, the decision engine that encodes eligibility rules and risk thresholds is worth owning, while the channel layer that maintains carrier relationships and per-market compliance is almost always better bought. The same split applies to the context layer and agent runtime: buy the infrastructure, own the definitions, prompts, and guardrails. This explainer walks a five-stage flow for making that call layer by layer, scoring a purchase on operational scope, failover, and portability, and keeping an exit route so a bought component does not become a one-way dependency.

## FAQ

### How do I decide which layer to build instead of buy?

Split the system into layers and ask which one encodes your business logic. In an orchestration stack, the decision engine holding eligibility rules and risk thresholds is the differentiating part and should be owned, while the channel layer handling carrier relationships, number provisioning, and per-market compliance changes frequently and is almost always better bought.

### When does building a small specialized model beat an API?

When the task is bounded and volume is high. A 2B-parameter field extractor fine-tuned on 43,384 annotations reached 0.834 field-level F1, above Claude Opus 5 at 0.816, while self-hosted cost on one L40S was 6 to 147 times less per extraction. The trade is that you now run serving and evaluation yourself.

**Tags:** [Architecture](https://yomu.fyi/topic/architecture.md), [Build vs. Buy](https://yomu.fyi/topic/build-vs-buy.md), [Data Portability](https://yomu.fyi/topic/data-portability.md), [Decision Models](https://yomu.fyi/topic/decision-models.md), [Managed Postgres](https://yomu.fyi/topic/managed-postgres.md), [Run Less Software](https://yomu.fyi/topic/run-less-software.md)

## Related reading

### [What to Look for in a Postgres Managed Service: A Technical Buyer's Checklist](https://yomu.fyi/post/what-to-look-for-in-a-postgres-managed-service-a-technical-buyer-s-che.md)
- Company: [Databricks](https://yomu.fyi/company/databricks.md)
- Author: Databricks Staff
- Published: Nov 4, 2026
- Type: Explainer

Evaluating a managed Postgres service requires checking operational control, high availability, disaster recovery, scaling, security, compatibility, migration, pricing, operations, and portability rather than relying on feature page claims. Operational scope includes who handles patching, whether minor updates are automatic with a maintenance window, and which PostgreSQL roles and parameters are restricted. High availability should use synchronous replication across availability zones with automatic failover and committed transaction guarantees, and backups must support point-in-time recovery via continuous WAL archiving with published RPO and RTO. Scaling requires separating compute from storage, supporting autoscaling, and ensuring connection pools handle reconnects, while security demands private networking and customer-managed keys. Migration should offer logical replication and change data capture rather than only dump and restore, and providers must demonstrate claims through a pilot covering failover, recovery, and data integrity tests.


### [The Enterprise Case for Open-Weight Models on Databricks](https://yomu.fyi/post/the-enterprise-case-for-open-weight-models-on-databricks.md)
- Company: [Databricks](https://yomu.fyi/company/databricks.md)
- Author: Jay Palaniappan, Elise Gonzales, Tanner Waggoner, Toby Messinger, Will Middlebrook
- Published: Nov 4, 2026
- Type: Explainer

Enterprises face seven pressures driving reevaluation of single-provider AI strategies: poor returns on spend, rapidly shifting model rankings, frontier guardrails blocking legitimate work, data retention policy changes, demand for centralized governance, harness influence on model performance, and open-weight models matching frontier benchmarks. Open-weight models now offer intelligence parity with frontier models at lower cost, with benefits including data sovereignty and operational autonomy. Databricks Unity Gateway serves open-weight and frontier models through a unified API with governance controls, smart routing, fallback chains, and budgets. After GLM 5.2 launched, it accounted for ~40% of open-weight tokens on Unity Gateway within a month, showing customer migration. Databricks raised $3 billion partly to secure GPU capacity for hosting open models, and the post concludes enterprises should adopt a portfolio approach to adapt as model quality and policies evolve.


### [Dharma Field Extractor: Any Document In, Structured Fields in JSON Out](https://yomu.fyi/post/dharma-field-extractor-any-document-in-structured-fields-in-json-out.md)
- Company: [Hugging Face](https://yomu.fyi/company/hugging-face.md)
- Author: Gabriel Pimenta de Freitas Cardoso, Paulo Henrique de Medeiros Araujo, Bruno Duarte, Francisco de Almeida Rocha Alves
- Published: Nov 4, 2026
- Type: Announcement

The Dharma Field Extractor is a 2-billion-parameter model that takes a document image and returns structured JSON by open extraction or by following an exact schema. In open mode it recognizes labels, values, and tables from layout; in schema-directed mode it uses the caller’s key names and types, returning null for absent fields and filling table rows. It was fine-tuned from DharmaOCR-LITE v1.1 via a LoRA adapter on 43,384 field-level annotations drawn from public, Brazilian, and multilingual sources. On a 546-document benchmark covering three extraction scenarios, the Field Extractor scored a field-level F1 of 0.834, beating Claude Opus 5’s 0.816 and GPT-5.6 Luna’s 0.741, while its self-hosted cost ($2.24/hour on one L40S) was 6 to 147 times less per extraction than each API. This supports Dharma-AI’s thesis that a small model specialized on a bounded task outperforms general-purpose frontier models.


### [Build vs. buy: How to decide for your orchestration layer](https://yomu.fyi/post/build-vs-buy-how-to-decide-for-your-orchestration-layer.md)
- Company: [Twilio](https://yomu.fyi/company/twilio.md)
- Author: Jesse Sumrak
- Published: Nov 4, 2026
- Type: Explainer

The orchestration layer comprises four distinct components—decision engine, context layer, channel layer, and agent runtime—each requiring a separate build-versus-buy decision rather than a single platform choice. The decision engine, which encodes core business logic such as eligibility rules and risk thresholds, should be built and owned in-house to avoid outsourcing the part that differentiates the business. The context layer, responsible for identity resolution and customer profile freshness, should be bought as infrastructure while the business owns the definition of customer attributes; 48% of companies cite cross-channel data connection as their top obstacle. The channel layer, handling carrier relationships, number provisioning, and per-market compliance, is almost always better bought because it requires specialist maintenance that changes frequently. The agent runtime, including speech pipelines and interruption handling, should be bought as infrastructure while the business retains control over models, prompts, and guardrails, grounding responses in audited knowledge repositories.


### [Does your application need local data or faster Postgres?](https://yomu.fyi/post/does-your-application-need-local-data-or-faster-postgres.md)
- Company: [Clickhouse](https://yomu.fyi/company/clickhouse.md)
- Published: Nov 3, 2026
- Type: Explainer

Managed Postgres services that keep data on network-attached storage can become I/O-bound, so adding compute does not necessarily improve reads, writes, WAL activity, or maintenance. A local synchronization layer can make reads local by subscribing to logical replication and materializing a declared subset, but it creates a second copy of data with its own lifecycle. Writes still go to central Postgres, and applications must reconcile optimistic local state with committed changes arriving asynchronously. AI agents make declared subsets harder to define because their query paths and working sets can change with each task, reducing reuse across local copies. ClickHouse Managed Postgres places Postgres on NVMe storage attached to the database compute; the recommended path is to measure the central database first, add read replicas where freshness allows, then offload analytical workloads to ClickHouse through pg\_clickhouse when usage outgrows Postgres.
