Some high-profile cases in the last year have seen lawyers try to use artificial intelligence to write filings or case summaries and include made-up cases, known as “hallucinations.”