Every RAG tutorial I found looked like this:

const chain = RetrievalQAChain.fromLLM(model, vectorStore.asRetriever());

const res = await chain.call({ query: "what is this document about?" });

Enter fullscreen mode

Exit fullscreen mode