How to make an artificial intelligence program: the steps, from problem to production
How to make an artificial intelligence program comes down to eight steps: choose one task, collect examples of the right answer, try simple rules first, pick an approach, build the smallest working version, test it on cases it has never seen, wrap it in software people can use, and watch it once it runs. How to create an artificial intelligence program follows the same steps whatever the tool. This guide walks through each step for a business program rather than a research project, with the tools, the tests and the EU rules that apply.
What counts as an artificial intelligence program
An ordinary program follows rules a person wrote: if the invoice total is over a limit, send it for approval. An artificial intelligence program works out its answer from patterns rather than written rules. The EU AI Act, Regulation (EU) 2024/1689, Article 3(1), defines an AI system as a machine-based system that infers, from the input it receives, how to generate outputs such as predictions, content, recommendations or decisions. In practice a business AI program is one of three kinds:
| Kind | How it gets its answers | Good for |
|---|---|---|
| Machine learning model trained on your data | Learns from past examples with known outcomes | Forecasts, risk scores, sorting records into categories, spotting unusual cases |
| Language model used through an API | A large pre-trained model follows instructions and examples | Reading and writing text: extracting fields, classifying messages, drafting replies, answering from documents |
| Pre-trained model for images or speech | A ready model, sometimes fine-tuned on your examples | Reading documents and photos, transcribing speech, checking products on a line |
Text is where most companies start. Eurostat reported on 11 December 2025 (read 11 November 2026) that 20.0% of EU enterprises with 10 or more employees used AI technologies in 2025, up from 13.5% in 2024, and that the most common use was analysing written language, at 11.8% of enterprises.
Step 1: choose one task and decide how to measure it
The most common reason an AI project fails is a vague goal. "Use AI in customer service" is not a task; "sort incoming emails into eight categories and route them to the right queue" is. Write down the input, the output, who uses the output and what a wrong answer costs. Then decide the measure: share of emails sorted correctly, minutes saved per day, forecast error in units. Without a number agreed before building, nobody can tell later whether the program works.
Step 2: collect examples of the right answer
An AI program learns from, or is tested against, examples where the right answer is known: past emails with the category a person chose, past orders with the actual demand, invoices with the fields typed in. Gather a few hundred real examples at least, from the systems where they already live. Check them: are the labels consistent, are rare but important cases present, is anything personal that should be removed or pseudonymised? Set a part aside as a test set and do not look at it while building. This step usually takes longer than any other, and it decides most of the result.
Step 3: try simple rules first
Before any model, write the simplest program that could work: keyword rules for the email sorter, last year's sales for the forecast. Measure it on the test set. Sometimes it is good enough, and the project ends cheaply with a maintainable rule. When it is not, you now have a baseline, and an AI program has to beat it clearly to be worth running.
Step 4: choose the approach
- Language model with instructions. For text tasks, start here: describe the task, give a handful of examples, ask for a fixed output format, and measure it on the test set. Quick to try, and nothing to train.
- Language model with your documents. When answers must come from your own content, the program first searches your documents and passes the relevant passages to the model with the question. Our chatbot development page explains this pattern.
- Classic machine learning. For numbers and records, such as forecasts, scores and categories from structured data, a model trained on your examples is usually more accurate, cheaper to run and easier to explain than a language model.
- Training a large model yourself. Rarely needed for a business program. It takes far more data, time and computing than the tasks above.
Step 5: build the smallest working version
Python is the usual language: the libraries for data handling and machine learning, and the official software kits of language model providers, are written for it. The first version should be small enough to finish in days: load the examples, produce an answer for each, save the answers next to the right ones. Keep the code in version control from the start, with the data preparation written as code rather than done by hand in a spreadsheet, so the result can be repeated. A notebook is fine for exploring; the version people will rely on belongs in tested code. See our Python software development page for how we structure that code.
Step 6: test it on cases it has never seen
Run the program on the test set from step 2 and compare with the baseline. Accuracy alone can mislead: if 95% of invoices are routine, a program that calls everything routine is 95% accurate and useless. Look at the errors one by one, measure separately how often it misses the cases that matter (recall) and how often its alarms are right (precision), and check whether it performs worse for some groups of customers or documents than others. For language models, also test the awkward inputs: empty messages, other languages, text that tries to give the model new instructions. Change one thing at a time and re-run the same test set, so you know what helped.
Step 7: put it inside software people use
A model on its own does nothing. It needs an API that other systems can reach, screens where people see its answers, a way for them to correct a wrong answer, logging, sign-in and permissions, and hosting. For personal data we keep all of it in an EU region. Decide where a person stays in the loop: the program suggests and a person approves is the safest start, and automation of the clear cases can follow once the error rate is known. This surrounding software is usually most of the work, and it is the same work as any custom software development project.
Step 8: watch it once it runs
Real data drifts away from the examples a program was built on: new products, new customers, a changed form. Track the measure from step 1 every week, sample answers for a person to check, collect the corrections people make and use them as new test cases. Set a threshold that triggers a review. For language models, pin the model version and re-run the test set before moving to a new one, because a provider's update can change the answers.
The rules that apply
Personal data in the training or test examples falls under the GDPR: you need a legal basis, a clear purpose, data minimisation and, for large-scale or sensitive uses, a data protection impact assessment. The AI Act adds duties by use. Article 50(1) requires that people be told they are interacting with an AI system unless it is obvious, which covers customer-facing chatbots. Certain practices are prohibited outright, such as emotion recognition in the workplace. Uses listed in Annex III, such as screening job applicants, credit scoring and access to essential services, are high-risk, with the main obligations applying from 2 December 2027; AI in products covered by the EU safety laws in Annex I follows from 2 August 2028. Most of the Act applies from 2 August 2026. Many internal business programs, such as sorting documents or forecasting stock, fall outside the high-risk list, but it is worth checking before building, not after.
Common mistakes
- Starting with a model before the task and the measure are written down.
- Testing on the same examples used to build, which makes every program look good.
- No baseline, so nobody knows whether the AI beats a simple rule.
- A demo that works on ten hand-picked cases and fails on the eleventh.
- No owner after launch, so drift goes unnoticed until users stop trusting it.
- Sending personal or confidential data to a provider whose terms allow it to be kept or used for training.
Build it yourself or with a team
A capable programmer can follow these steps for a prototype. A team is worth it when the program has to run every day inside your systems, handle personal data and keep working as data changes. We help with both ends: choosing and scoping the first use case through AI consulting, and building the program, the screens and the integrations around it, with the code in your company's repository. For specific uses, see our guides to NLP applications and artificial intelligence in hospitality. For what each step costs to build and to run, see our guide to artificial intelligence cost.
Questions people ask
What do I need to make an artificial intelligence program?
A clearly defined task, examples of the right answer for that task, a way to measure how often the program is right, and a place to run it. The programming language is usually Python, because most machine learning libraries and the official kits of language model providers are written for it. For many business tasks today the model itself is rented through an API rather than trained from scratch.
Can I make an AI program without training a model?
Yes, and for many tasks that is the right start. A language model reached through an API can classify, extract and draft text from instructions and a few examples. The work then moves to writing the instructions, supplying the right context, checking the output against a test set and handling the cases it gets wrong.
How long does it take to make an AI program?
A narrow prototype on existing data can work in days. A program that people depend on takes longer, because most of the work is data preparation, testing against real cases, the screens and integrations around the model, and monitoring once it runs. The size of that surrounding work, not the model, usually sets the timeline.
Which programming language is best for AI?
Python, for most projects. The main libraries for numerical computing, data handling and machine learning are written for it. Other languages are used to serve a finished model inside an existing system, and a model can also be called over an API from any language.
Does the EU AI Act apply to my AI program?
It applies to AI systems placed on the market or used in the EU, but most of its duties fall on prohibited practices, high-risk uses listed in the Act and transparency cases. A chatbot must tell people they are talking to an AI unless that is obvious. High-risk uses, such as screening job applicants, have their main duties from 2 December 2027. Many business programs, such as internal document sorting, carry few duties beyond the general ones.
Sources
- Regulation (EU) 2024/1689, AI Act, Articles 3(1), 5, 50 and 113, Annex III (read 11 November 2026)
- Eurostat, 20% of EU enterprises use AI technologies, 11 December 2025 (read 11 November 2026)
- Regulation (EU) 2016/679, GDPR (read 11 November 2026)