The government must seek out the "less productive research areas" in science and sharply cut their funds, President Reagan's science adviser said yesterday before the country's largest annual meeting of scientists.

In addressing the American Association for the Advancement of Science last night, George Keyworth, defended the Reagan budget, saying abundant funding may not produce good science and "it can even promote mediocrity rather than stimulate excellence."

The 1982 budget cut sharply into basic research programs, paring some to near zero and leaving others with only small cuts.

When science funding was more plentiful, Keyworth said there had been a tendency "to add resources to the best research areas, but not to take money away from less productive research areas, even if they have passed the days of their most important and exciting work. We can no longer afford that luxury."

Keyworth, a former weapons physicist at Los Alamos nuclear laboratory, did not offer any examples of less productive areas.

But in previous talks he has singled out science education programs at the National Science Foundation as unproductive, and said that planetary exploration programs produce less "hard science" than other parts of the federal space science budget.

He said that some areas will be cut disproportionately so that other areas may be maintained at high levels of funding, including basic research in the physical and biological sciences.

Keyworth said the United States can no longer expect to "be preeminent in all fields, nor is it necessarily desirable. The idea that we can't be first across the spectrum of science and technology is not simply a function of our current economic situation.

"The fact is . . . the rest of the world is catching up."

He said this is a result of our efforts to help other countries since World War II and should be regarded not as our failure but as "a major success of our social values."

In a related event, a report by association staffers outlined the effects on science of the Reagan budget and the congressional action following it.

In general, said Willis Shapley of the AAAS, Congress went along with Reagan's first round of budget cuts in March, but rejected those in September, when the president asked for an additional 12 percent across-the-board cut.

The Reagan cuts represent a sharp turn downward in science funding, a decline of 5 percent after adjustments for inflation. This reverses the trend of slight increases during the Carter presidency.

The only area of increase is defense research and development spending.