Mrs. Clinton is also well aware of the inherent tensions between a vice president and a powerful first lady (or first gentleman). She and Mr. Gore became rivals in the White House as she led the health care overhaul effort and he pursued his “reinventing government” initiative, and both wanted their portfolios to be Mr. Clinton’s top priority. Advisers said that in the current search, Mrs. Clinton wants a running mate who would accept and appreciate that Mr. Clinton, as a former president, would offer expertise and guidance — and perhaps play a formal role on specific issues — if she were president.

“Hillary understands how the vice presidency can work well, and not work well, far better than anyone running or anyone on her staff,” said Richard W. Riley, a friend of the Clintons who was the education secretary under Mr. Clinton and advises the campaign on education issues. “And she and Bill Clinton know he’d have to be very careful about how he relates to the vice president. Hillary is the decision maker now.”

Other Democrats argue that the running mate should be African-American or Hispanic because those two demographic groups have been such strong supporters of Mrs. Clinton — and their votes, as well as those from women, are the key blocs she would need in a general election. In addition to Mr. Patrick and Mr. Perez, Democrats close to the campaign said her advisers were also discussing Senator Cory Booker of New Jersey, who is black, and Mr. Castro, who is Hispanic. (Mr. Kaine is also fluent in Spanish.)

For all the vetting and strategizing, however, running-mate selections do not always work out as well as intended, especially with so many unconventional variables: the first female nominee; the Republican upheaval; and the angry, anxious political crosscurrents in the electorate.

“It’s so easy to make a mistake in this,” said Robert Shrum, a Democratic strategist on several past campaigns, including John Kerry’s bid in 2004, when John Edwards and Richard A. Gephardt were finalists for vice president.

“Choosing Edwards was a mistake because Dick could have helped us in Ohio in a way that Edwards could not, and Dick would have done better in the vice-presidential debate,” Mr. Shrum said, referring to Mr. Kerry’s narrow loss in that state. “But a lot of us wanted Edwards at the time. Kerry was doubtful about him, but was persuaded,” he added. “The most important thing for Hillary, in the end, is to follow her own instincts on this one.”