Bing Chat is doing something like that, although it was far from perfect. Langchain can also do this to some extent. Then Steve Hsu claims to have been able to get a model working very well that can answer questions from college textbooks (https://twitter.com/hsu_steve/status/1636337165775908864). So it seems like someone will figure it out in a few years.