Combining diplomacy and elections can be a tricky process, unless you bring a little understanding to it.

Take the dinner Vice President Bush threw for Israeli Prime Minister Shimon Peres last night. After the recent Israeli elections, Peres could only form a government by aligning himself with his opponent. Bush was only two days away from his debate with Democratic vice presidential candidate Geraldine Ferraro, and it hadn't even been three days since the first presidential debate, which for Republicans is something of a sore subject.

So last night, empathy was almost as sweet as the Chocolate Chestnut Charlotte the guests ate for dessert.

"Our two countries do share common values," Bush said in his toast. "Israel has just completed its national elections, and, as I guess we're all aware of, we're on the eve of ours."

Being "aware of it" is putting it mildly.

Over the smoked trout and chicken piccata in an Agriculture Department ballroom, the conversation was debate-obsessed. Had President Reagan "blown it," as one guest asked? Should one aim for grace or fury when debating the Democrats?

There were other touchy topics as well. The day after describing Ferraro as "that $4 million -- I can't say it, but it rhymes with rich," Barbara Bush, with a stern eye, vehemently shaking head and waving hands, backed off from even the beginning of a question from a reporter.

Even the guest of honor strayed from the habitual honeyed phrases of official toasts to remark on the vagaries of democratic politics.

"I never dreamed I would come to Washington between two debates and be so nicely received," said Peres after thanking Bush for his hospitality. The crowd appreciated that, and liked it even more when Peres described his own nation's unity government.

"It is sensational," he said, "but God knows how long it is going to last."

It was a powerful crowd that laughed with Peres, including Secretary of State George Shultz, presidential counselor Edwin Meese, CIA director William Casey, national security adviser Robert McFarlane, Sen. John Warner (R-Va.), a host of leaders of the Jewish community and familiar bylines and familiar faces from television, like ABC's Barbara Walters and NBC's Bernard Kalb.

"Usually at the end of meetings, you hear that the meetings were fruitful and very constructive," said Meir Rosenne, the Israeli ambassador here. "But in this particular case, they were really fruitful, and very constructive."

The constructive results included an agreement that the United States will help Israel tame its wayward economy. A joint economic study group was announced after Israeli leaders met with Shultz and President Reagan, and although the exact forms of assistance remained undefined, last night everyone was only too happy to express their happiness, to remind everyone that they were friends.

"The United States has been committed to the security of Israel for nearly 40 years," said Bush. ". . . That is irrespective of who is elected president in November."

"I really feel reassured in this great city, among you, dear friends," Peres told them.

When the guests arrived they were ushered through a receiving line, past a huddle of photographers and into a hall draped with greens and filled with flowered tablecloths and centerpieces that looked like unusually well-behaved rosebushes. Shultz, who wandered through the crowd while the Bushes and Peres received the guests, was assaulted by smiling faces. Persistent hands, eager to shake the secretary's, stretched over and around interfering shoulders.

It was a night of such good feeling that there seemed to be only one troublesome concern: whether there was any symbolism in Shultz's decision to wear a bow tie to the dinner.

After observing the secretary's neckwear for some time, Kalb had sensed that there was a pattern in the switch from a necktie to a bow tie but was unable to decipher it.

"I was wondering if there is some diplomatic signaling involved," he asked Helena Shultz. "Is he signaling 'Jordan' now, or 'Egypt'? Is there a signal?"

After a confused second, Helena Shultz's perplexed smile turned into a triumphant one.

"Of course," she said. "He's trying to make points with me. I like bow ties."

Kalb then suggested that this flip admission might be more important than Helena Shultz realized, that perhaps she had revealed the inner workings of the State Department. Was she, Helena Shultz, in fact, the mind behind the policy?

"Of course," she smiled, and with a pat on Kalb's shoulder said she was sorry he would not be accompanying the secretary on today's trip to Central America.