Consumer prices rose 0.2 percent in May, the second month in a row that food, apparel and energy costs climbed only modestly after soaring early this year, the Labor Department reported yesterday.

Most analysts believe the recent small increases in the consumer price index paint a misleading picture of the nation's prospects for future inflation, though not as misleading as the 8 percent annual rate at which the CPI was rising earlier this year.

Over the past 12 months, inflation has averaged 4.4 percent, a figure in line with what many analysts think is really happening in the economy.

Moreover, with the U.S. economy growing only modestly and consumer buying relatively soft, economists doubt there will be another surge in inflation any time soon.

Many forecasters expect the mix of inflationary pressures to remain about the same, with the prices of services rising at more than 5 percent and the prices of goods increasing at less than a 3.5 percent rate.

The cost of medical care, for instance, is impervious to a slowdown in economic growth and last month it rose 0.8 percent, the fourth consecutive increase of that magnitude. Over the past year, the cost of medical care has gone up 9 percent, well over twice as much as the other items in the CPI.

Personal and educational services, such as tuition, are up 7.9 percent in the past year.

Meanwhile, new car prices are up only 1 percent and gasoline prices last month were 4.4 percent lower than they were a year earlier.

Economists at Salomon Brothers Inc., an investment banking firm, predicted that motorists would get another break soon on gasoline prices. Gasoline inventories are so high that pump prices are expected to rise only modestly or even fall as the nation moves into the peak driving season.

The Salomon analysts said the absence of the normal seasonal increases could be large enough to trim 0.5 percentage points off the inflation rate in the third quarter.

Food prices also are sure to be less of a problem the remainder of the year than they were last winter. The same cold winter weather that caused oil prices to skyrocket also hit fruits and vegetables.

After rising at a 16.8 percent annual rate in the three months ended in February, grocery store prices have since declined at a 3 percent rate. Last month grocery store prices fell 0.2 percent after dropping 0.7 percent in April, the Labor Department said.

Nevertheless, food prices last month were 5.1 percent higher than they were a year earlier and some forecasters, such as economists L. Douglas Lee and Marlene Fricke at the Washington Analysis Corp., expect food prices to keep rising at close to that pace for the rest of the year.

During the past 12 months, the increase in food prices was more than half a percentage point higher than the rise in the overall CPI. Energy prices, on the other hand, fell 0.7 percent over the period and helped substantially to hold the increase in the CPI to only 4.4 percent.

If the volatile food and energy portions of the index are excluded from the calculation, the prices of the remaining three-fourths of the items rose 4.8 percent.

Economic growth now has been slowing for several quarters, and as a result there is little inflationary push in the industrial sector. Virtually no industrial materials are in short supply, and U.S. factories are operating with enough unused capacity that no shortages appear likely to develop.

"This slow growth is what is needed to bring down inflation," Lee and Fricke told their firm's clients recently. "It has been the {Federal Reserve's} policy from the time that Chairman {Alan} Greenspan took office to cool the economy below its long-term growth potential of 2.5 percent to 3 percent and to hold it there long enough to bring inflation down," they said.

"Although it has taken longer than the Fed had hoped, it appears that the first part of the plan has finally worked," they said. "The economy is operating below potential and is expected to stay there through 1990. What remains to be seen is whether the economy can stay below potential long enough to bring down inflation without falling into a recession."