

4·
1 month agoIn a similar vein, this is the second time today I had a chance to reference this quote on the nature of language from the late, great Sir Terry Pratchett.
Elves are wonderful. They provoke wonder. Elves are marvellous. They cause marvels. Elves are fantastic. They create fantasies. Elves are glamorous. They project glamour. Elves are enchanting. They weave enchantment. Elves are terrific. They beget terror. The thing about words is that meanings can twist just like a snake, and if you want to find snakes look for them behind words that have changed their meaning. No one ever said elves are nice. Elves are bad.
Terry Pratchett, Lords and Ladies (Discworld, #14; Witches, #4)
You’re thinking of retrieval augmented generation (RAG) with a vector database. Its something that’s being actively developed. I haven’t had time to dig much into it, especially currently. But the terms themselves should give you a starting point.
Edit: a quick google gives what could be a promising starting point https://huggingface.co/learn/cookbook/rag_llamaindex_librarian