The House approved legislation last night that would outlaw the use of polygraph tests by most private employers in the country.

Following a spirited debate, the bill was adopted by a vote of 236 to 173 after the House defeated a weaker substitute measure that would have set standards for the voluntary use of polygraph tests for private employes and job applicants.

Under an exemption in the legislation, which now goes to the Senate, federal, state and local government employes would still be subject to polygraph tests, as would employes of private firms engaged in intelligence or counterintelligence work for the FBI, CIA and similar federal agencies.

In a series of amendments adopted on the House floor, the ban was diluted to allow polygraph tests of employes or prospective employes with direct access to government-controlled drugs. The House also exempted private security agencies, day-care centers, nursing homes and electric power generating companies from the polygraph test ban, but it rejected attempts to exempt financial institutions and gambling casinos from the ban.

The bill was strongly backed by organized labor and House liberals, who charged that the polygraph, popularly known as a lie detector, is a highly unreliable device, "a voodoo craft," said Rep. Matthew G. Martinez (D-Calif).

Rep. Patrick Williams (D-Mont.) said there has been "explosive growth" in the use of polygraph tests by private employers, who account for 98 percent of the more than 2 million such tests administered each year.

"Tens of thousands of workers are denied employment every year because of errors" in the use of polygraph tests, Williams said.

Describing a polygraph test as "degrading and humiliating," Rep. James M. Jeffords (R-Vt.) said, "If you wouldn't risk your career on a 10 to 40 percent chance of error, don't ask 2 million other Americans to."

Critics of the legislation conceded that polygraph tests are not always reliable but said a ban on their use would deprive private employers of an important tool in combatting an estimated annual loss of $40 billion from theft. They also said it was inconsistent to ban polygraphs as unreliable for private employes while continuing to allow their use for government workers.

Citing banks, child-care centers and nuclear power plants, Rep. Robert L. Livingston (R-La.) said, "These businesses need the polygraph to help them hire honest people. A vote for this bill is a vote for higher retail prices."

The substitute measure, offered by Reps. C.W. Bill Young (R-Fla.) and George (Buddy) Darden (D-Ga.), would have set minimum standards for polygraph test examiners, required employers to post notices that polygraph tests are voluntary and prohibited any action against a employe based solely on the results of a test. It was defeated by a vote of 241 to 173.