Governments have spent trillions of dollars on aid to the poor, without finding a strategy that works. What if they learned to invest more nimbly?