Three companies of similar size decided in the same year that they needed to process incoming documents automatically. Each received thousands of invoices, delivery notes and contracts a month, in dozens of layouts, and employed people to type the contents into a system.

The first hired two data scientists and set out to build its own model. Eighteen months later it had a system that worked well on the layouts it had been trained on. One of the two had left. A fortnight after that, a major supplier changed its invoice template.

The second bought a specialised product for document processing, configured it in six weeks and was satisfied. Two years on, the vendor was acquired and the price trebled at renewal.

The third connected a general-purpose language model, rented by the request, to its existing workflow software. It was running within a month at very low cost. Volumes grew, the bill grew with them, and the company realised it had been sending its suppliers' contract terms to a third party without having checked what its own contracts allowed.

None of these was foolish. Each chose a reasonable route and met that route's characteristic problem. The decision is worth making deliberately, since the three options fail in different ways.

The options

There are really four, with gradations between.

Buy a finished product. Software that performs the task, sold by subscription. You configure it and do not see inside.

Borrow: assemble from rented components. Use a general model supplied by another company through a programming interface, and build your own application round it: the instructions given to the model, the connection to your documents and systems, the checks on its output. The intelligence is rented and the application is yours.

Adapt. Take an existing model, commercial or open-source, and train it further on your own examples, a process called fine-tuning. Or run an open-source model on your own equipment.

Build. Train a model from your own data for your own task. For classical machine learning on tables of business data, such as forecasting, scoring and classification, this is ordinary and inexpensive. For large language or vision models it is beyond nearly every organisation.

The balance among these has shifted. Five years ago, extracting fields from documents or classifying text meant collecting thousands of labelled examples and training a model. Today a general model will do a passable job from a written instruction and a few examples. For many language tasks the starting point is now to borrow, and to build only if that proves inadequate.

First: is it worth doing?

Before comparing routes, establish that the destination is worth reaching.

What decision or process changes? What is that worth in a year? What does an error cost, in each direction? What happens at present?

If these have no clear answers, no method of procurement will rescue the project.

Second: is it specific to you?

This is the question on which the choice chiefly turns.

Is the task generic? Transcribing meetings, translating, reading invoices, answering common questions from a manual. Thousands of organisations have the same need. A vendor serving all of them has more data, more engineers and more incentive to do it well than you have. Buy, or borrow.

Does your advantage lie in the data? If you have data that nobody else has, and it bears directly on the task, a model built on it may do what no product can. Twenty years of maintenance records for your own equipment, or the outcomes of your own lending. That is the case for building or adapting.

Is the capability how you compete? A company whose product is its pricing engine should own its pricing model. A company that needs its expense claims categorised should not write software to do it.

A sensible default: buy what is common, and build only what is both distinctive and important.

Third: what does it really cost?

Compare on total cost over three years. The purchase price is the smallest and most visible part.

Cost Buy Borrow Build
Licence or usage fees High, predictable Low at first, scales with volume Low
People to create it Few Some Many, and scarce
People to run it Few Some Ongoing, permanent
Integration with your systems Significant Significant Significant
Time until it is useful Weeks Weeks Months to years
Preparing your data Some Some A great deal
Evaluation and monitoring Yours regardless Yours Yours
Change management and training Yours regardless Yours Yours

Several lines are the same in every column. Integration, evaluation and getting people to use the thing are the customer's work whichever route is taken, and together they usually exceed the cost of the model.

Three costs are regularly underestimated.

Maintenance of what you build. A model needs monitoring, retraining and repair for as long as it is in use. Researchers at a large technology company described machine-learning systems, in a much-cited paper, as carrying unusually heavy maintenance debt. If the people who built it leave, the knowledge goes with them.

Usage fees at scale. Paying by the request is very cheap for a pilot. Multiply by real volume, and by the several calls each task may require, before committing.

The cost of a mistake. A system that is wrong 3 per cent of the time needs a process for finding and correcting the 3 per cent. That process is part of the price.

Fourth: what are you depending on?

Each route creates a dependency.

Buying ties you to a vendor's survival, pricing and direction. Ask what happens to your data and configuration if you leave. Can they be exported in a usable form? What notice of price changes does the contract give?

Borrowing ties you to the provider of the underlying model. Models are revised and retired on the provider's timetable, and behaviour changes between versions. An application tuned carefully to one version may need rework for the next. Keeping your own test set, so that a new version can be checked in an afternoon, is the main defence. Designing so that the model can be swapped for another provider's is the second.

Building ties you to your own staff.

No route is free of dependence. The useful question is which kind you are best placed to manage.

Fifth: what happens to the data?

Before any information is sent to an outside service, establish:

  • Where is it processed and stored, and under which country's law?
  • Is it kept, and for how long?
  • Is it used to train the provider's models? Business terms usually say not, and consumer versions of the same tools often differ. Read the terms that apply to you.
  • Who at the provider can see it?
  • Do your own contracts with customers and suppliers permit you to pass their information on?
  • Does data protection law apply, and have its requirements been met?
  • For regulated sectors, what does the regulator expect?

Where the answers are unsatisfactory, the alternatives are a provider offering stronger contractual and technical guarantees, or running an open-source model on infrastructure you control. The second gives the most control and brings back much of the cost of building.

The third company in the opening example had no bad intent. It had not asked.

A way of deciding

  1. Write the task and its value in two sentences.
  2. Try the cheapest thing first. For a language task, spend a week testing a general model on fifty real examples, with a plain instruction. For a prediction task, try a simple rule or a basic model. This costs almost nothing and tells you how hard the problem really is.
  3. If that is good enough, borrow or buy. Choose between them on whether a product exists that fits your process, and on the total cost.
  4. If it falls short, find out why. Is it missing knowledge of your business? Supply it, by giving the model access to your documents. Is it inconsistent in format or tone? More examples, or fine-tuning. Is it wrong on a specialised judgement that your data could teach? That is the argument for adapting or building.
  5. Build only what steps one to four have shown to be distinctive, valuable and not obtainable otherwise.
  6. Whatever you choose, own the evaluation. Keep a set of real cases with known correct answers. It is what lets you compare vendors, check new versions and know whether the thing works. It is the one asset that has value on every route.

What became of the three companies

The first retired its own model and moved to a general one, using the labelled documents it had collected as a test set. That test set turned out to be the most valuable thing the eighteen months had produced.

The second negotiated, and began for the first time to keep its own measurements of accuracy, so that it could assess an alternative.

The third put a data processing agreement in place, removed certain document types from the flow and set a monthly budget alert.

All three now have a working system. Looking back, each would say the same thing: the model was the easy part and the cheapest. The effort went into the documents, the exceptions and the people, and into knowing, with numbers, whether it worked.