A data scientist answers questions with data. A machine learning (ML) engineer trains models and makes them run reliably in production. An AI engineer builds product features on top of models that someone else has already trained, most often large language models (LLMs). The three overlap, and companies use the titles loosely, so the duties in a job description matter more than the title.
This article is part of our guide to AI careers, roles and official job data.
Key takeaways
- Ask what the person produces: an answer (data scientist), a trained model (ML engineer) or a product feature built on a model (AI engineer).
- Data science leans on statistics, ML engineering on statistics plus software engineering, and AI engineering on software engineering plus evaluation of varying output.
- Official statistics recognise "data scientist" as an occupation. They do not recognise "AI engineer" or "ML engineer".
- All three roles share one skill: measuring whether a model-based system is good enough, using a fixed test set.
- Choose by the work you enjoy and the background you already have, not by the title that sounds newest.
What does each role actually do?
| Question | Data scientist | ML engineer | AI engineer |
|---|---|---|---|
| Main output | An analysis, a forecast or a recommendation | A trained model served to other software | A product feature that calls a model |
| Starts from | A business question and raw data | A dataset and a target to predict | An existing model and a user need |
| Typical tasks | Clean data, test hypotheses, build models, present findings | Prepare training data, train and tune, package and serve, monitor accuracy | Write prompts, connect data and tools, build the application, evaluate answers |
| Trains models? | Sometimes, usually small ones | Yes, this is the core of the job | Rarely |
| Main risk to manage | Drawing the wrong conclusion from data | A model that degrades as real data changes | Confident wrong answers, cost and slow responses |
| Works most with | Business teams and analysts | Data engineers and platform teams | Product managers and application developers |
The US Bureau of Labor Statistics describes data scientists' duties in similar terms: deciding which data is useful, collecting and analysing it, creating and testing models, and making recommendations to stakeholders.
"AI engineer" here means the LLM application sense. Some companies use the title for what this table calls an ML engineer, so check the duties.
How would each one tackle the same problem?
Take one problem: a company receives 40,000 customer support tickets a month and wants each one sent to the right team.
The data scientist asks whether routing is really the problem. They pull six months of tickets, measure how many were sent to the wrong team, how long those took to resolve, and which categories are confused most often. The output is a finding: for example, that most wrong routing happens between two categories, and that fixing the form would remove much of it. That may end the project without any model.
The ML engineer takes the labelled history of tickets and trains a text classifier, a model that assigns each ticket to one of a fixed set of categories. They split the data into a training set and a test set, measure accuracy on the test set, deploy the model behind an API, and set up monitoring so that someone is alerted when accuracy falls because the products or the customers have changed.
The AI engineer writes a prompt that asks an LLM to choose a category and give a one-line reason, wraps it in application code, and measures it against the same labelled tickets. No training is needed, so a first version exists in a day. The trade-off is a cost for every request and an output that can vary between runs.
None of these is the "right" answer in general. With a large labelled history and fixed categories, a trained classifier is usually cheaper per ticket and more consistent. With little labelled data, or categories that change every month, the LLM route is faster to start and easier to change. A good team compares both on the same test set.
What does the AI engineer's evaluation code look like?
The one skill all three roles share is evaluation. Here is a minimal version in plain Python. call_model stands for whatever function sends a prompt to your model and returns its text; it is a placeholder, not a real library call.
CATEGORIES = ["billing", "refund", "delivery", "account"]
PROMPT = (
"Classify this support ticket into exactly one of: "
+ ", ".join(CATEGORIES)
+ ". Reply with the category word only.\n\nTicket: {ticket}"
)
# A fixed test set: real tickets with the label a person agreed on.
TEST_SET = [
("I was charged twice for order 9917.", "billing"),
("The parcel arrived broken, I want my money back.", "refund"),
("Where is my order? It was due on Monday.", "delivery"),
]
def evaluate(call_model):
correct = 0
failures = []
for ticket, expected in TEST_SET:
answer = call_model(PROMPT.format(ticket=ticket)).strip().lower()
if answer == expected:
correct += 1
else:
failures.append((ticket, expected, answer))
return correct / len(TEST_SET), failures
Three things make this real engineering rather than a demo. The test set is fixed, so two versions of the prompt can be compared fairly. The function returns the failures, because reading the wrong answers teaches more than the score. And an answer outside the list counts as wrong, which catches the model inventing a category. A real test set needs far more than three tickets; a few hundred across all categories is a sensible start.
Our article on how AI is changing software testing takes it further with repeated runs.
Which skills does each role need?
| Skill | Data scientist | ML engineer | AI engineer |
|---|---|---|---|
| Statistics and experiment design | Deep | Solid | Basic |
| SQL and data handling | Deep | Solid | Basic to solid |
| Python | Solid | Deep | Deep |
| Training and tuning models | Solid | Deep | Basic |
| Software engineering: testing, APIs, version control | Basic to solid | Deep | Deep |
| Prompts, retrieval and tool calling | Basic | Solid | Deep |
| Deployment and monitoring | Basic | Deep | Solid |
| Explaining results to non-technical people | Deep | Solid | Solid |
What does the official data say about each?
Only one of the three titles is an official occupation in the United States. The Standard Occupational Classification lists data scientists, and the Bureau of Labor Statistics reports a median annual pay of $120,230 in May 2025, projected employment growth of 35% from 2025 to 2035, and about 24,800 openings a year for that occupation.
There is no occupation called ML engineer or AI engineer. People with those titles are most likely counted as software developers (median pay $135,980 in May 2025; the group of software developers, quality assurance analysts and testers is projected to grow 10%), as data scientists, or, for research-heavy work, as computer and information research scientists (median pay $140,300; 22% projected growth; a small occupation with 38,600 jobs in 2025 and a master's degree as the typical entry requirement). That mapping is our reading of the published duties; the bureau does not publish one.
These are US figures for whole occupations. They are not salaries for AI or ML engineers, they do not apply to India or any other country, and they say nothing about what one person will earn. Any "average AI engineer salary" you read elsewhere comes from job adverts or self-reported surveys.
Which one should you choose?
Use your starting point and what you like doing.
- You enjoy finding out why something happens, and you like explaining it to people. Data science. Expect a lot of data cleaning and a lot of meetings. Strong statistics matter more here than anywhere else.
- You enjoy making systems fast, correct and repeatable, and you are comfortable with mathematics. ML engineering. Expect long experiment cycles and a lot of infrastructure work. This is the hardest of the three to enter without either a quantitative degree or strong software experience.
- You are a software developer who likes shipping features to users. AI engineering. It reuses the most from ordinary software work. The new parts are prompt and retrieval design, evaluation, and cost control.
- You work with data in spreadsheets and SQL today. Data science or analytics is the nearest step. Learn Python and statistics before anything about LLMs.
One trade-off to state plainly: AI engineering has the lowest barrier to entry, so more people can do the basic version of it. Depth in evaluation and production operations is what separates candidates.
The roles also merge in small teams. In a ten-person company one person may analyse the data, try a trained model, build the LLM feature and run it in production. If you want to see what the production side involves, read our guide to running LLM applications in production. If you like the customer-facing side of engineering, read about the forward deployed engineer role.
Common questions
Is an AI engineer the same as an ML engineer?
Not usually, though some companies use the titles for the same job. In current usage an AI engineer builds applications on existing models, and an ML engineer trains and serves models. Read the list of duties.
Can a data scientist move into AI engineering?
Yes. Data scientists already know evaluation, which is the hardest part to teach. The gap is usually software engineering practice: testing, APIs, deployment and monitoring.
Which role pays most?
Official statistics cannot answer that, because two of the three titles are not official occupations. The US median pay figures above are for broad occupations in one country and do not rank these job titles.
Free: Your AI career roadmap
Answer four questions about your role, goal, Python skills and experience, and get a personal PDF: which courses to take in which order, what each one teaches, and what official job data says.
Answer the four questions to see your suggested course order.



