ON THE ground floor of a primary school in Jaipur in the state of Rajasthan, five dozen pupils wait for the lunch break. The school has three teachers, but two of them are absent. One is “off sick” and the other, the head teacher, left at noon, explaining that she has “work to do”. No child is learning much. Thick poetry textbooks sit open before pupils who struggle to read simple sentences.

Upstairs is different. Rekha Gurjar, an instructor from Pratham, a charity, asks children to come to the blackboard and read a line of text. She asks questions, and hands shoot up. By adjusting the curriculum to a level pupils understand, Pratham’s high-intensity “learning camps” help teach basic Hindi and maths in 40 days. “You have to start where children are,” says Rishi Rajvanshi, head of the charity’s office in Rajasthan, “not where you wish they were.”

About 260m children attend school in India, more than in any other country. Enrolment has risen steadily over the past two decades, helped by legislation such as the Right to Education (RTE) Act of 2009, which makes school compulsory up to the age of 14. Attendance at secondary school (69% of eligible children) lags behind that, say, of China (96%). But primary-school enrolment is nearly universal.

Learning is not. Half of fifth-grade pupils (ten-year-olds) cannot read a story designed for second-graders, according to Pratham. Just a quarter can do simple division. “Where we have failed miserably is translating schooling into learning,” says Yamini Aiyar of the Centre for Policy Research, a think-tank in Delhi.

The consequences of failure are profound, if hard to measure. How well pupils do in school is associated with higher wages and faster economic growth. India will not fully take part in the Programme for International Assessment (PISA), an influential global test, until 2021. But 15-year-olds in the states of Himachal Pradesh and Tamil Nadu did do the test in 2009. A rough analysis of those results puts them five years of schooling behind pupils in Shanghai and other high-performers in East Asia. The Indian children are a lot poorer yet poverty explains only part of the gap. More teachers showing up would help. About a quarter are absent when they should be at work. Pay is not the problem: a public schoolteacher’s salary is often more than ten times the local median. Indeed, many Indian applicants bribe school boards to get a job, which they treat as a sinecure rather than a career. Then there are generous allowances for “sick leave”, often taken as holiday. Political work is one cause of absenteeism. Teachers can spend several weeks a year urging voters to support their political patron. Their unions are, in effect, guaranteed representation in the upper houses of some state legislatures. And yet more teachers turning up might not make much difference. India’s 17,000 teacher-training institutes are low-grade degree shops. Few trainees are taught how to manage a class. Learning from other teachers is hard, in part because schools are so small. Under RTE, every village must have a primary school within one kilometre. This helps explain why a third of Indian schools have fewer than 50 pupils—and why, as country people migrate to the city, more than 5,000 schools have no pupils at all. With 35% more pupils than China, India has four times more schools. By law, pupils are automatically shoved up to the next grade each year. So teachers have little incentive to help them grasp the curriculum. A study in 2016 suggests that the knowledge of sixth-grade pupils in a poor area of Delhi is 2½ grades below what the maths syllabus expects of them. By ninth grade the gap is 4½ grades.

For some, money is the answer. India spends 2.7% of GDP on schools, less than other developing countries, such as Brazil. Two-fifths of schools lack even electricity. But much of the budget is not spent, or is spent badly. School funding increased by 80% from 2011 to 2015, according to analysis of eight states’ budgets by Geeta Kingdon of University College London, yet test scores have fallen. Education in India is a “concurrent” responsibility, shared between federal and state governments. But officials at neither central nor state level are accountable for academic outcomes. Data on student achievement are collected manually, if at all.

Some reformers are trying to improve the public system. A programme in Haryana, established in 2014, has reversed declining literacy in the state through regular assessment and more relevant curricula. In Delhi, the city government has doubled spending on schools and recruited “mentor teachers” to help others teach at the right level. Pratham is running learning camps in 5,000 schools in 19 out of India’s 36 states and union territories. Yet although these changes are welcome, their ambitions are limited to helping children grasp just the basics.

Richer parents are opting out of public education: nearly half of urban children and a fifth of rural ones attend private primary schools. From 2010-11 to 2015-16, enrolment in public schools fell by 13m while the number in private establishments rose by more than 17m.

A study published in 2013 found that pupils at low-cost private schools in the south-eastern state of Andhra Pradesh achieved the same scores in maths and Telugu (the local language) as pupils at government-run schools. Yet because private teachers are paid a lot less than public ones, they produced these results for a third of the cost. Privately educated pupils also did slightly better than their peers at public schools in tests in English, Hindi, science and social studies.

Encouraged by such results, reformers are trying to expand and improve private schools. Punjab and Rajasthan, for example, are trying “public-private partnerships” where, like charter schools in America, schools are run by private outfits but are funded by the government. Voucher schemes, meanwhile, have been piloted in Delhi, Uttar Pradesh and Madhya Pradesh, among other places.

Yet there are limits to what such reforms can achieve. Teachers’ unions fiercely oppose vouchers. Public-private partnerships are hamstrung by a lack of big operators able to ensure consistency and scale. And even if private schools are better, many are still horrendous.

So some people are looking to technology to transform education. To date, much of India’s “ed tech” sector has been in the business of selling software to help rich children pass exams. But schemes such as EkStep, funded by an IT tycoon turned philanthropist, Nandan Nilekani, are trying to improve education for all. EkStep is building a platform that connects pupils with third parties, including newer software providers aiming squarely at a mass market. It hopes to provide better learning materials, at school or at home. EkStep wants to reach 200m pupils within five years.

Ambition on that scale is needed. But in the end even technological fixes will have to be part of a broader change among Indian policymakers. The government of Narendra Modi, the prime minister, has said it will undertake some reforms. It has suggested amending the law to add commitments about the quality of education. Prakash Javadekar, the minister for human resources, has pledged to increase accountability for outcomes in both public and private schools.

Still, the central government has promised much more than it has delivered. A new strategy for education, due in the next few months, has been subject to delays. Though it should have some sensible ideas, it is unlikely to upset the unions much. That is a shame. And with more than 20m Indians reaching school age every year, such caution amounts to a huge waste of talent.