By Karen Brettell

NEW YORK (Reuters) - The U.S. dollar was mildly weaker on Tuesday for the second straight day as investors took some profits from the greenback's recent strength and evaluated whether the Federal Reserve would to raise interest rates this year.

The greenback had rallied around 3 percent since the end of September, mirroring a climb in benchmark U.S. Treasury <US10YT=RR> yields to a four-month high above 1.8 percent on expectations that the Fed would raise rates by December.

"The dollar's gotten stronger as more people think the Fed will hike rates in December," said Marc Chandler, global head of currency strategy at Brown Brothers Harriman in New York.

Weaker U.S. economic data in the past few days, including disappointing retail sales on Friday, has led investors to book some profits.

"We've had some disappointing U.S. economic data. I think that it's spurring a little bit of a correction. It's mostly a technical correction after the run-up," said Chandler.

Data on Tuesday showed that U.S. consumer prices recorded their biggest gain in five months in September.

The dollar index, which tracks the greenback against a basket of six major currencies <.DXY>, was last unchanged on the day at 97.890.

The dollar has largely tracked U.S. Treasury yields in recent weeks, which have increased as investors anticipate a rate hike is more likely.

"It's tracking the bond market. ... Most market participants are looking at the Fed for a potential hike in December and as the odds of that increase or decrease, there's some correlation with how the dollar's moving," said Richard Scalone, co-head of foreign exchange at TJM Brokerage in Chicago.

The British pound was one of the best performers against the dollar on Tuesday after a government lawyer said parliament would "very likely" have to ratify any deal to take Britain out of the European Union, and following stronger-than-expected inflation numbers.

"That took a market that was overly short and put in a little bit of uncertainty to whether Brexit would be enacted sooner rather than later. That has squeezed some of the shorts," said Scalone.

The pound <GBP=> was last up 0.92 percent against the dollar at $1.2294.

The market is also focused on the European Central Bank meeting on Thursday. The bank is expected to keep policy unchanged, according to a majority of traders polled by Reuters.

(Editing by Meredith Mazzilli and Richard Chang)