qnli question: What legislation was passed to discourage the country from getting involved in a foreign war? sentence: After the costly U.S. involvement in World War I, isolationism grew within the nation.