"Not a military victory, the victory will be a political reconciliation with the Taliban, which has achieved a stalemate in recent years and shown little interest in conceding to the Kabul government", Mattis added.
The United States is picking up signs of interest from Taliban elements in exploring the possibility of talks to end the more than 16-year-old war, US Defence Secretary Jim Mattis says.
The Taliban urged Washington last month to begin talks to end nearly 17 years of war in Afghanistan, which suggests they want to explore dialogue.
Afghan President Ashraf Ghani offered talks without preconditions with the Taliban insurgents last month, in what was seen by USA officials as a major overture from Kabul.
"We've had some groups of Taliban - small groups - who have either started to come over or expressed an interest in talking".
Ghani's peace plan includes eventually recognising the Taliban as a political party.
The Taliban last week described the Afghan government as "illegitimate" and its peace process efforts as "deceptive", in a statement calling for a boycott of an Islamic scholars' conference in Jakarta.
"We want the Afghans to lead and provide the substance to the reconciliation effort", Mattis said.
Biggest Tech Deal Ever Failed: Trump Blocks Broadcom's $117 Billion Merger Bid
Trump has done it before, blocking a Chinese state-owned company from buying an American semiconductor firm back in September. Last week, the government laid out a series of concerns about the potential merger in a letter to the two companies.
According to an October report by the Special Inspector General for Afghanistan Reconstruction of the US Congress, 13 of the total 407 districts in Afghanistan were under Taliban control, while the rebels had a widespread presence in another 41 districts.
U.S. President Donald Trump in August announced an increase in the number of U.S. troops in the country to push back the resurgent Taliban.
He will also meet U.S. commanders and allied troops posted in the country, TOLO news reported.
The Taliban has previously offered to hold talks on a possible peace agreement, but only directly with the United States, which Mattis rejects.
Mattis said the jump in attacks on civilians was an indication that a pressured Taliban is unable to conduct broader, ground-taking operations.
His visit Tuesday was unannounced due to security concerns.
Mattis also said he had seen some changes in Pakistan's behaviour since Trump blasted the country a year ago for harbouring the Taliban.