The two previous lessons have given NovaMarket a secure platform and a compliant way of processing personal data. It might seem that this is enough. It is not: the law sets a minimum, always arrives after the technology and leaves unanswered many of the questions a data team comes across every week. Can each customer be charged a different price? Is it acceptable to deduce from a shopping basket something the customer has not told you? How far can personalisation go before it becomes manipulation?
This lesson is different from the others: it has almost no code. Its aim is to give you judgement: a set of principles, a catalogue of recognisable dilemmas and a practical method for analysing a proposal before building it. You will apply it to three ideas that NovaMarket's sales department has just put on Irene's desk.
Warning. This lesson is for training purposes. It is not legal advice and does not replace a compliance assessment. The regulatory references, especially those to the EU AI Act, are introductory; applying them to a real case must be reviewed with legal counsel, the data protection officer (DPO) and the compliance department, against the current text.
Why what is legal does not exhaust what is ethical
There are four reasons why complying with the law does not end the conversation:
- The law lags behind. Techniques appear before the rules that regulate them. For years, detailed profiles of people were built without any specific framework.
- The law is general. It says that processing must be "fair" and "proportionate", but it does not decide whether your particular proposal is. That judgement rests with whoever designs it.
- What is permitted can cause harm. A customer may have accepted some terms and still feel betrayed by what is done with their data.
- Trust cannot be regulated. A customer who stops trusting the shop does not need anyone to fine it before going elsewhere.
| Situation | Legal? | Ethical? |
|---|---|---|
| Informing clearly and using the data for what was stated | Yes | Yes |
| A consent buried in a forty-page document nobody reads | Debatable | No |
| Deducing a sensitive personal situation from everyday purchases and using it in campaigns | Depends on the case | Highly doubtful |
| Selling customers' data without telling them | No | No |
Data ethics is concerned, above all, with the second and third rows: what can be done and perhaps should not be.
Principles for the ethical use of data
There is no single code, but the most widely cited frameworks agree on a common core:
| Principle | Idea | Control question |
|---|---|---|
| Transparency | People know what data is used and for what | Could I explain it to a customer in two sentences without them being surprised? |
| Informed consent and autonomy | The person genuinely decides, with information and without pressure | Is it as easy to say no as to say yes? |
| Justice and non-discrimination | The system does not treat some groups worse than others without a legitimate justification | Who loses out, and is it always the same group? |
| Beneficence and non-maleficence | The use brings value to people and avoids foreseeable harm | Who benefits? What is the worst that could happen? |
| Proportionality | The intrusion is the minimum needed for the purpose | Could I achieve the same with less data or less detail? |
| Responsibility and accountability | Someone answers for every decision the system makes | If this goes wrong, who faces the music? |
| Explainability | It is possible to explain why the system did what it did | Could I tell a customer why they got that result? |
The principles clash with one another and with business objectives. They are not a formula: they are the list of things that must be put on the table before deciding.
Typical Big Data dilemmas
Personalisation versus manipulation
Recommending to a customer a product they are interested in is a service. Exploiting what you know about them to push them into deciding against their own interest is something else. The line lies in who benefits from the influence and in whether the person, if they knew what was happening, would accept it. Two areas of conflict:
- Dark patterns: interface designs intended to make users do what they did not want to do. A huge "accept all" button next to a hidden "reject"; an "only 2 left!" counter that is not true; a subscription that takes one click to sign up for and seven steps to cancel. Data makes them more effective: the A/B tests of lesson 04-05 can optimise a better experience just as well as a more profitable deception. The metric does not tell the difference; the team does.
- Dynamic pricing and personalised pricing. They are not the same thing. A dynamic price changes for everyone according to demand or stock (a flight, a hotel). A personalised price changes according to who you are: your device, your history, what the system calculates you are willing to pay. The first is generally accepted; the second is perceived as unfair when it is discovered, and it does get discovered.
Surveillance and profiling
Forty million events a day make it possible to reconstruct in great detail what each customer looks at, when, from where and for how long. Profiling turns that trail into predictions about the person. The ethical question is not whether it can be done, but how much knowledge about someone is proportionate to selling them a television.
Secondary use of data
Data is collected for one purpose and, once in the lake, becomes tempting for others. The delivery address is there to get the parcel to the door; should it also be used to estimate the income level of the neighbourhood? The purpose limitation principle (lesson 07-02) is the legal version; the ethical version is reasonable expectation: would the customer expect it?
Sensitive inferences from innocuous data
This is the dilemma most specific to Big Data. Nobody has told the shop that they are pregnant, going through financial difficulties or suffering from an illness; but the combination of certain purchases, searches and times of day can make it possible to deduce it with considerable accuracy. The sensitive data has not been collected: it has been manufactured. And an inference can do harm in two ways: when it is right, because it reveals what the person did not want to reveal (sometimes to whoever shares their letterbox or computer); and when it is wrong, because it treats them as something they are not.
Power asymmetry
The company knows a great deal about the customer; the customer knows almost nothing about what the company knows or how it uses it. That asymmetry is what turns into a responsibility what, in a relationship between equals, would be a simple negotiation.
Social and environmental impact
- Aggregate effects. A recommender system that only shows things similar to what has already been seen narrows what each person discovers; multiplied by millions, it shapes markets and opinions.
- Environmental footprint. Data centres consume electricity and, often, water for cooling; storing everything "just in case" and reprocessing it needlessly also has an environmental cost. The savings levers of lesson 05-03 (retain only what is needed, ephemeral clusters, incremental processing, choosing the region well) are, at the same time, the sustainability levers.
Archetypal cases: from responsible use to abuse
The following cases are archetypes, built from situations that are common in the industry, not facts attributed to specific companies:
| Archetypal case | What happens | Assessment |
|---|---|---|
| The helpful heads-up | An electricity company uses hourly consumption to tell customers that another tariff would be cheaper for them | Ethical: the data returns to its owner in the form of a benefit, transparently |
| Early detection | A bank uses spending patterns to detect fraud and alerts the customer instantly | Ethical, if there is human review and a route for complaints (lesson 03-05) |
| The low battery | A ride-hailing app detects that the user's battery is low and shows them higher prices because they will accept any | Unethical: it exploits a situation of need |
| The indiscreet deduction | A retailer infers a pregnancy from purchases and sends advertising for baby products to the family home | Unethical: it reveals a sensitive inference nobody asked for |
| The insurer that watches social media | An insurer adjusts premiums according to public activity on social networks | Highly problematic: secondary use, opacity and a risk of discrimination |
| The impossible cancellation | A subscription service uses A/B tests to optimise the cancellation journey so that as few users as possible complete it | Unethical: dark pattern |
| The model that inherits the past | A recruitment system learns from past hires and penalises a group | Unethical even though nobody intended it; analysed in lesson 07-04 |
Some very well-known public episodes fit these patterns: the story, told for years, of a large retail chain that supposedly deduced pregnancies from purchases; or the use of social network profile data for political propaganda, which came to light in 2018 and sparked a worldwide debate. Their details have been disputed, but the general lesson stands: the harm did not come from an intrusion, but from a use that the people affected did not expect.
A practical decision framework
So that ethics does not depend on the mood of the day, a procedure helps. This one applies to any new proposal to use data, before anything is built:
flowchart TD
P[Proposal to use data] --> L{Is it legal?<br/>DPO and legal counsel}
L -- No --> X[Discarded]
L -- Yes --> E{Would the customer<br/>expect it?}
E -- No --> R[Redesign: inform,<br/>ask permission, use less data]
E -- Yes --> D{Could it harm or discriminate<br/>against anyone?}
D -- Yes --> M{Can it be mitigated<br/>to an acceptable level?}
M -- No --> X
M -- Yes --> R
D -- No --> T{Does it pass the<br/>newspaper headline test?}
T -- No --> R
T -- Yes --> A[Go ahead: document,<br/>measure and review]
R --> E
1. The list of questions.
- Purpose: what do we want to achieve, and who is the benefit for?
- Expectation: would the customer expect it? Would they accept it if we explained it to them?
- Necessity: is there a less intrusive way of achieving it?
- Harm: what is the worst that can happen, to whom and how likely is it?
- Fairness: does it affect different groups differently?
- Control: can the person find out, object and complain?
- Reversibility: if we get it wrong, can it be undone?
- Owner: who signs off the decision, who will review it, and when?
2. The stakeholder analysis. List everyone affected, not just the "average" customer, and what each one gains and risks. Harm tends to concentrate on those who are not in the meeting.
| Stakeholder | What they gain | What they risk |
|---|---|---|
| Regular customer | ||
| Vulnerable customer (little digital experience, financial difficulties) | ||
| People around the customer (sharing a device or home) | ||
| The company | ||
| Society / the market |
3. The newspaper headline test. Imagine that tomorrow a newspaper publishes on its front page, accurately, what your team is doing. If the foreseeable reaction is outrage, it makes no difference that it is legal. A variant: would you calmly explain it to a relative who was a customer?
The result of the analysis is written up on one page, in the same spirit as the ADRs of lesson 06-05: what was decided, why, with what safeguards and when it will be reviewed.
Ethical data governance
Principles do not hold up on their own: they need a structure, proportionate to the size of the organisation.
| Piece | Function | At NovaMarket |
|---|---|---|
| Data ethics committee | Reviews new or sensitive uses; can say no | Irene (who chairs it), the DPO, a business lead, someone from customer service and Laura or Marc depending on the topic; it meets whenever there is a proposal to review |
| Code of conduct | Concrete, public commitments on the use of data | Extract at the end of the lesson |
| Concerns channel | A route for any employee to raise a concern without reprisals | A mailbox handled by Irene, with a committed response within a week |
| Training | Everyone who handles data recognises a dilemma when they see one | Annual session with the company's own cases |
| Built-in review | The ethical question is part of the process, not a separate formality | A "people impact" section in every project proposal, alongside the DPIA (lesson 07-02) |
Irene's role, as head of data, is twofold: making sure these questions are asked before building, and backing whoever in the team raises their hand. An analyst who spots a problem and keeps quiet because "it's not their job" is the most expensive governance failure. And the ultimate responsibility is individual: the person who writes the pipeline is often the only one who truly understands what it does.
The regulatory framework for AI
In 2024 the European Union adopted the Artificial Intelligence Act (Regulation (EU) 2024/1689, known as the EU AI Act), the first general law on AI systems. It turns several of the principles above into obligations, with a risk-based approach: the greater the potential harm of a use, the stricter the requirements.
| Level | What it includes (indicative examples) | Consequence |
|---|---|---|
| Unacceptable risk | Practices such as manipulation that exploits people's vulnerabilities, social scoring or certain uses of biometric identification | Prohibited |
| High risk | Systems used in areas such as employment and recruitment, education, access to essential services (including assessing individuals' creditworthiness) or certain law enforcement and judicial uses | Demanding obligations: risk management, data quality and governance, technical documentation, activity logging, human oversight, accuracy and robustness |
| Limited risk | Systems that interact with people (chatbots) or generate synthetic content | Transparency obligations: disclose that people are dealing with an AI or that the content is artificial |
| Minimal risk | Most uses: spam filters, many product recommendations | No specific obligations; voluntary codes of conduct |
The Act also lays down specific obligations for general-purpose AI models, high financial penalties (the highest for prohibited practices) and phased application over several years, on a timetable that has been subject to adjustments. It coexists with the GDPR, which continues to apply to personal data, and with other European rules, such as the Digital Services Act, which addresses, among other issues, dark patterns and the transparency of online platforms' recommender systems, or consumer law, which requires disclosure when a price has been personalised through automated decision-making.
Three practical ideas, with due caution: classifying each of your own AI systems by risk level is the first step, and it is a job for the lawyers; NovaMarket's recommendations and segmentation would, in principle, be far from high risk, but a system that decided who to grant financing to would come very close to it; and the high-risk requirements (quality data, documentation, human oversight, bias control) are good practice even where they are not mandatory. Always check the current text and timetable.
Application to NovaMarket
The sales department presents three proposals. The committee analyses them with the framework.
Proposal 1: personalised prices based on device or history
"Anyone browsing from a high-end phone, or who never compares prices, pays 5% more."
| Question | Analysis |
|---|---|
| Purpose and beneficiary | More margin. The benefit goes entirely to the company |
| Expectation | No customer expects the same product, at the same time, to cost a different amount depending on who is looking |
| Necessity | There are accepted alternatives: visible discounts, loyalty schemes, dynamic prices that are the same for everyone |
| Harm and fairness | The device acts as a proxy for income level or age; the history penalises loyal customers or those who are not good at comparing |
| Control | The customer cannot find out or object, unless they are told, in which case the measure loses its point |
| Newspaper headline | "NovaMarket charges its most loyal customers more" |
Decision: discarded. Transparent discounts for returning customers are approved instead: personalising downwards, and openly, does not raise the same problem.
Proposal 2: recommendations based on sensitive inferences
"If someone buys a blood pressure monitor and a set of scales, we show them health products on the home page and in the newsletter."
Recommending related products is the classic use case, and it adds value. The problem arises when the system infers a condition (an illness, a pregnancy, financial hardship) and acts on it in channels visible to third parties. Decision: redesigned. Product-based recommendations ("bought together", lesson 06-02) are kept; a list of sensitive categories is defined that do not feed long-term profiles and do not appear in emails or on the home page; no segments describing personal conditions are created; and the customer has a visible control to turn off personalisation and see why something is being recommended to them.
Proposal 3: sharing data with third parties
"A market research company will pay us for pseudonymised purchase histories."
This is a clear secondary use and, as you saw in lesson 07-02, a pseudonymised purchase history is still personal data and can be re-identified by cross-referencing it with other sources; once it has been handed over, NovaMarket loses control. Decision: sharing at customer level is rejected. At most, an aggregated report by category and region is offered, with minimum group sizes and a contract that prohibits cross-referencing with other sources, subject to the DPO's review.
Extract from NovaMarket's data ethics code
Irene gathers the conclusions in docs/data_ethics_code.md:
- We use our customers' data to serve them better, not to take advantage of them. Every proposal must be able to explain what the customer gains.
- No surprises. We do not put data to a use the customer would not expect without first telling them clearly.
- One price for everyone at the same moment. We do not personalise prices upwards. Discounts are visible and their conditions public.
- We do not deduce what we have not been told. We do not infer or store health conditions, family or financial circumstances or other sensitive traits.
- We do not sell customer data. We only share aggregates that do not allow anyone to be identified, and under contract.
- Saying no is as easy as saying yes. We do not use dark patterns. Personalisation can be turned off in one click.
- No important decision about a person is purely automated. There is always a person who reviews it and a route for complaints.
- We measure the fairness of our models before deploying them and while they are running.
- Any employee can raise a concern through the ethics channel, and will receive an answer.
- We review this code every year and whenever a case puts it to the test.
Point 8 is a promise you do not yet know how to keep. That is what the next lesson is about.
Common Mistakes and Tips
- "If it's legal, go ahead." The law is the floor, not the ceiling.
- Leaving ethics until the end. Once the system has been built and the revenue promised, hardly anyone dares to stop it. The review comes first.
- Believing that data is neutral. It records past human decisions, with their biases.
- Confusing consent with a ticked box. A permission nobody understands legitimises nothing ethically.
- Optimising a single metric. A system that maximises clicks or conversion with no counterweights will end up finding the dark pattern on its own. Pair the main KPI with guardrail metrics: cancellations, complaints, returns.
- Thinking responsibility lies with someone else. The lawyer, the boss, the algorithm. Whoever builds it answers for it.
- Tip: practise the simplest question in the framework, "would the customer expect it?", until it comes naturally. It settles most cases.
Exercises
Exercise 1: personalisation or manipulation?
Classify each practice as acceptable, doubtful or unacceptable, and state the principle at stake: a) showing "other customers also bought"; b) a randomly generated "3 people are looking at this product!" notice; c) sending an abandoned cart reminder after 24 hours; d) raising the price of a product for someone who has visited it three times; e) ordering search results with the highest-margin products first without saying so.
Exercise 2: apply the framework
The fraud team proposes automatically blocking the account of any customer who meets the rule from lesson 03-05 (three or more purchases in ten minutes), with no review, to reduce losses. Analyse the proposal with the eight questions and the headline test, and propose a redesign.
Exercise 3: stakeholders
Fill in the stakeholder table for a project that estimates the probability of each customer leaving the shop (churn) and offers a discount only to those with a high probability of leaving.
Solutions
Exercise 1
a) Acceptable: it adds value and is understood at a glance (transparency). b) Unacceptable: it is false information designed to create urgency, a dark pattern (autonomy; it may also be an unfair commercial practice). c) Acceptable, if the customer consented to communications and can unsubscribe; it becomes doubtful if it is pushed repeatedly or scarcity is faked. d) Unacceptable: an upward personalised price that exploits demonstrated interest (justice). e) Doubtful, leaning towards unacceptable: the customer believes they are seeing the most relevant results (transparency); it is fixed by stating the sorting criterion or separating sponsored items.
Exercise 2
Purpose: reducing losses; legitimate. Expectation: a customer expects protection against fraud, not an unexplained block. Necessity: there is a less drastic alternative, holding the order and verifying it. Harm: the 32 customers who met the rule in June are not necessarily fraudsters; a company buying for several offices, or someone splitting an order, would be blocked. Fairness: it would need checking whether the rule fires more often for certain groups. Control: with no notice and no route for complaints, there is none. Reversibility: the block is reversible; the lost sale and the trust, less so. Owner: nobody, if it is automatic. Headline: "Shop blocks its customers for buying too quickly".
Redesign: the rule holds the order (it does not block the account), notifies the customer, a person reviews it within a short time, there is a complaints channel and false positives are measured. This also matches what the law expects of automated decisions with significant effects (lesson 07-02).
Exercise 3
| Stakeholder | What they gain | What they risk |
|---|---|---|
| Customer with a high probability of leaving | A discount | Little; perhaps learning that threatening to leave pays off |
| Loyal customer | Nothing | Pays more than the one threatening to leave: loyalty is penalised; if they find out, they lose trust |
| Vulnerable customer | Depends on how the model classifies them | If the model regards them as "captive", they never get a discount |
| The company | Short-term retention | Reputation; teaching customers to feign leaving |
| The market | — | Normalises opaque, individual prices |
Conclusion: this is a form of personalised pricing. It sits badly with point 3 of NovaMarket's code; a consistent alternative would be a loyalty scheme with public conditions.
Conclusion
Complying with the law is essential and it is not enough: it arrives late, it is general and it does not protect trust. You have seen the principles that guide the ethical use of data (transparency, autonomy, justice, beneficence, proportionality, accountability and explainability) and the dilemmas where they clash: personalisation that turns into manipulation, made-to-measure prices, profiling, secondary uses and, above all, sensitive inferences that manufacture data nobody handed over. You have a decision framework with eight questions, a stakeholder analysis and the newspaper headline test; you know what pieces ethical governance needs and you are familiar with the risk-tier approach of the EU AI Act. With all this, NovaMarket has discarded personalised prices, redesigned its recommendations, refused to share customer-level data and written a ten-point ethics code.
One of those points says "we measure the fairness of our models", and two warnings about the same thing have been left pending throughout the course: models learn from historical data and can inherit its biases (lesson 04-03), and they can perform worse for certain groups (lesson 05-04). So far fairness has been a principle; it still has to be turned into something that can be calculated. The next lesson, Algorithmic Bias and Fairness: Detection and Mitigation, goes back to code: you will measure with PySpark whether an automated decision at NovaMarket treats all its customers equally, and you will see what can be done when the answer is no.
