WASHINGTON — Janet L. Yellen, the Federal Reserve chairwoman, delivered an upbeat message on the state of the American economy to Congress on Wednesday, highlighting the strength of job growth and indicating that the Fed remained on course to begin reducing its bond holdings in the fall.

Ms. Yellen added, however, that the Fed was paying close attention to the recent weakness of inflation. While emphasizing that she expected prices to start rising more quickly, she said persistent weakness could lead the Fed to raise interest rates more slowly.

“It’s premature to reach the judgment that we’re not on the path to 2 percent inflation over the next couple of years,” she said. “We’re watching this very closely and stand ready to adjust our policy if it appears the inflation undershoot will be persistent.”

Ms. Yellen’s testimony before the House Financial Services Committee lifted stock prices and lowered bond yields on Wednesday. Investors tend to celebrate any sign that the Fed might slow the pace of its interest-rate increases.

Representative Jeb Hensarling, the Texas Republican who heads the committee, gave Ms. Yellen an unusually warm reception for the opposite reason, applauding the Fed for moving ahead with rate increases and describing the Fed’s plans to start reducing bond holdings later this year as “more good news.”

These biannual hearings can be combative, but steady economic growth and the Fed’s commitment to a retreat from its stimulus campaign have drained some of the tension from recent sessions. The sharpest exchanges on Wednesday were about regulatory issues, with Republicans complaining that the Fed was unfairly constraining the banking industry to the detriment of economic growth.

Ms. Yellen gave little ground. “Congress has passed laws that place obligations on us to supervise these financial institutions,” she said.

The divide over regulation helps explain why Republicans hope President Trump will replace Ms. Yellen when her terms ends in February. The Trump administration has not ruled out her reappointment, although the choice of a new Fed chief is regarded as more likely.

Asked whether her appearance before the House committee on Wednesday might be her last, Ms. Yellen responded, “It may well be.”

The hearing also gave members of both parties a chance to talk about Mr. Trump.

Representative Maxine Waters of California, the committee’s ranking Democrat, began her opening remarks by criticizing the president. “Since Day 1, the story of the Trump administration has been one of chaos and turmoil,” she said.

Representative Sean Duffy, Republican of Wisconsin, responded that Democrats liked to congratulate the Fed for economic growth, but that Mr. Trump deserved the credit. “The real change has been that we have a new president in the White House,” he said.

The economy is now in the ninth year of one of the longest economic expansions in American history. The economy added 180,000 jobs a month on average in the first half of the year, about the same pace as the first half of 2016, even as the unemployment rate dropped to pre-crisis levels.

Ms. Yellen, in her opening remarks on Wednesday, said growth had picked up after a slow start to the year on stronger consumer spending and business investment. “A strengthening in economic growth abroad has provided important support for U.S. manufacturing production and exports,” she added.

House Democrats remain strongly supportive of Ms. Yellen, but several asked her whether the Fed was heading for the exits a little too quickly. Inflation remains below the Fed’s 2 percent annual target, and lately it has slowed.

Lael Brainard, a Fed governor, said on Tuesday at a conference in New York that she shared those concerns.

“I will want to assess the inflation process closely before making a determination on further adjustments to the federal funds rate in light of the recent softness,” she said.

Ms. Yellen said the Fed was keeping a close eye on the latest inflation data, but she reiterated the Fed’s position that it expected prices to start rising more quickly. She has time to decide whether to hit the brakes: Analysts do not expect the Fed to raise rates sooner than its final meeting of the year, in December.

Ms. Yellen declined to specify when the Fed intended to start reducing its bond holdings.

“The exact timing of this I don’t think matters a great deal,” she said.

She also noted that broader measures of the labor market were improving. The unemployment rate, which was 4.4 percent in June, counts people actively seeking work. Another measure also includes people who are not job-hunting but say they would like to work and part-time workers who want full-time work. This group made up 8.6 percent of the work force in June; a decade ago, in June 2007, it was 8.4 percent.

The unemployment rate among African-Americans was 7.1 percent in June, the lowest since April 2000, although well above the national rate.

Wage growth remains surprisingly weak. Average hourly compensation including benefits rose 2.25 percent during the 12 months ending in March, the Fed said in a biannual policy report to Congress that coincided with Ms. Yellen’s testimony.

Another concern is that only 62.8 percent of adults were either working or looking for work in June, compared with the 66 percent participation rate of a decade ago.

Representative Andy Barr, Republican of Kentucky, told Ms. Yellen that in his view some people were not working because of the generosity of government benefits.

“Many employers say to me that they simply can’t compete with the government for labor,” he said.

Ms. Yellen responded that demographic changes were the primary reason for the decline. “To my mind, the major factor here is an aging population,” she said.

She appeared to find common ground with House Republicans on another issue.

Mr. Hensarling praised the Fed for including in its report to Congress an analysis of several formulas for determining the proper level of its benchmark rate.

Republicans want the Fed to pick a single formula. Ms. Yellen on Wednesday reiterated that there were many rules and that there was “no clear way to decide which ones are better than others.” Such rules, she said, were best consulted for guidance.

But Mr. Hensarling’s comments hinted at a potential compromise. He asked Ms. Yellen to explain in the Fed’s next report why its course differed from the recommendations of the formulas, and she expressed a willingness to do so.

Ms. Yellen will appear before the Senate Banking Committee on Thursday.