Input: Modern history
However, the crisis did not exist in a void; it came after a long series of diplomatic clashes between the Great Powers over European and colonial issues in the decade prior to 1914 which had left tensions high. The diplomatic clashes can be traced to changes in the balance of power in Europe since 1870. An example is the Baghdad Railway which was planned to connect the Ottoman Empire cities of Konya and Baghdad with a line through modern-day Turkey, Syria and Iraq. The railway became a source of international disputes during the years immediately preceding World War I. Although it has been argued that they were resolved in 1914 before the war began, it has also been argued that the railroad was a cause of the First World War. Fundamentally the war was sparked by tensions over territory in the Balkans. Austria-Hungary competed with Serbia and Russia for territory and influence in the region and they pulled the rest of the great powers into the conflict through their various alliances and treaties. The Balkan Wars were two wars in South-eastern Europe in 19121913 in the course of which the Balkan League (Bulgaria, Montenegro, Greece, and Serbia) first captured Ottoman-held remaining part of Thessaly, Macedonia, Epirus, Albania and most of Thrace and then fell out over the division of the spoils, with incorporation of Romania this time.

What fundamental cause started the war in 1914?
Output: tensions over territory in the Balkans.

Input: Muammar Gaddafi
Gaddafi sought to develop closer links in the Maghreb; in January 1974 Libya and Tunisia announced a political union, the Arab Islamic Republic. Although advocated by Gaddafi and Tunisian President Habib Bourguiba, the move was deeply unpopular in Tunisia and soon abandoned. Retaliating, Gaddafi sponsored anti-government militants in Tunisia into the 1980s. Turning his attention to Algeria, in 1975 Libya signed the Hassi Messaoud defence agreement allegedly to counter "Moroccan expansionism", also funding the Polisario Front of Western Sahara in their independence struggle against Morocco. Seeking to diversify Libya's economy, Gaddafi's government began purchasing shares in major European corporations like Fiat as well as buying real estate in Malta and Italy, which would become a valuable source of income during the 1980s oil slump.

What was the name of the abortive political union between Tunisia and Libya in 1974?
Output: Arab Islamic Republic

Input: Modern history
The Dutch East India Company (1800) and British East India Company (1858) were dissolved by their respective governments, who took over the direct administration of the colonies. Only Thailand was spared the experience of foreign rule, although, Thailand itself was also greatly affected by the power politics of the Western powers. Colonial rule had a profound effect on Southeast Asia. While the colonial powers profited much from the region's vast resources and large market, colonial rule did develop the region to a varying extent.

Who also profited from Southeast Asia resources?
Output: colonial powers

Input: Canadian Armed Forces
Prior to Confederation in 1867, residents of the colonies in what is now Canada served as regular members of French and British forces and in local militia groups. The latter aided in the defence of their respective territories against attacks by other European powers, Aboriginal peoples, and later American forces during the American Revolutionary War and War of 1812, as well as in the Fenian raids, Red River Rebellion, and North-West Rebellion. Consequently, the lineages of some Canadian army units stretch back to the early 19th century, when militia units were formed to assist in the defence of British North America against invasion by the United States.

What American war threatened Canada?
Output:
the American Revolutionary War