Many Americans are turning to artificial intelligence for financial advice.

But getting good or bad advice depends a lot on how well users write their instructions — or prompts — to AI platforms.

“I think that there’s a real art and science to prompt engineering,” Andrew Lo, director of MIT’s Laboratory for Financial Engineering and principal investigator at its Computer Science and Artificial Intelligence Lab, said in a recent web presentation for Harvard University’s Griffin Graduate School of Arts and Sciences.

Firstly, it’s important to note that AI has limitations when it comes to financial planning, experts said.

AI is generally good at providing high-level overviews of financial topics: For example, why it’s important to diversify investments, or why exchange-traded funds may be better than mutual funds in some cases but not others, Lo told CNBC in an interview.