When you think of investing in artificial intelligence (AI), technology stocks might come to mind. And plenty of opportunities for AI investing exist there. But there's another area that's also set to stand out in this exciting field. I'm talking about healthcare.

The AI in healthcare market is expected to top $100 billion by the end of the decade, and some companies are already leveraging this technology to advance their work. Two great examples are Moderna (MRNA 3.28%) and Doximity (DOCS -0.85%).

If you buy shares today, you may benefit from their game-changing advances down the road. But if you could only buy one right now, which should you go for? 

The case for Moderna

Moderna isn't a novice when it comes to AI. The company already was using AI as it developed its blockbuster coronavirus vaccine. For example, Moderna used AI to generate better messenger RNA sequences -- a basic element needed to develop potential mRNA vaccines or treatments.

Now, though, Moderna is going all in on AI. The company recently inked a deal with International Business Machines (IBM 0.16%) to harness its AI and quantum-computing technologies to help discover new mRNA therapies. Chief executive officer Stéphane Bancel says he expects "breakthrough advances" thanks to quantum computing -- so he wants to invest and prepare now.

Specifically, Moderna will use IBM's MoLFormer to predict the properties of molecules. This will help scientists better understand the potential of certain molecules to prevent or treat disease -- and speed up the development process. Moderna aims to use MoLFormer to help it perfect the lipid nanoparticles that help deliver its mRNA candidates.

Meanwhile, Moderna also is expanding its offices and hiring -- and a lot of this should support its AI ambitions. The new Seattle office will "scale the implementation" of AI, the company said earlier this year.

Drug development generally takes years, and screening molecules can be laborious and costly. If IBM's technology eliminates those problems, this deal -- and AI, in general -- might be a game changer for Moderna.

The case for Doximity

Doximity doesn't discover drugs, but AI could help the company -- and in turn, doctors and patients -- in another way. First, a bit about the company.

Doximity is an online professional network for doctors. It allows them to easily connect with peers, transfer patient files, immediately access research relevant to their specialties, and conduct telemedicine visits. It's basically an online extension of their medical practices.

Doctors don't pay for access to Doximity, but hospital systems and pharmaceutical companies -- those who aim to advertise their products to doctors -- do. It's a worthwhile investment for them since more than 80% of U.S. doctors use the system.

How is Doximity using AI? You've probably heard of the ChatGPT chatbot that's gained a lot of attention in recent times. Well, Doximity is testing its own version, known as DocsGPT.

It's designed to reduce the paperwork that often takes up hours of doctors' days. For example, a doctor can use DocsGPT to write to an insurer for approval to switch a patient's medicine.

Doximity is in the process of getting feedback from doctors to see how DocsGPT can best be used in the medical community. For now, though, it's clear the chatbot can help doctors save valuable time. That may keep them interested in using Doximity -- and that should keep Doximity's advertisers coming back, too.

Moderna or Doximity?

Both companies make good buys today. Doximity has delivered strong earnings growth, and top pharmaceutical customers are spending more and more on the platform. Moderna's generated billions of dollars from its coronavirus vaccine and is on the way to building a blockbuster respiratory vaccine portfolio.

But if I had to choose one company to buy for its involvement in AI, I would go for Moderna. The company is aggressively investing in the area -- and AI could eliminate the biggest challenges drugmakers face today. If AI fulfills its promises, major rewards could lie ahead for Moderna and its investors.