How do I modify this script to create a weaviate vectorstore for multiple documents instead of one?

I found this script that takes a single PDF, vector-embeds it, saves it in a Chroma DB vectorstore, and then the user can query on it about that single PDF, upon which it replies with the answer and also the source.

I have similar requirements, except I want to do this on multiple PDFs, and on a weaviate vectorstore. I have already created the weaviate vectorstore here; please let me know if this is correct/sufficient for what I want to do. If not, please let me know how to modify my schema appropriately.

Assuming the schema I created for my weaviate vectorstore is correct, how do I modify the script above (in the first link) so that I can make it query on my weaviate vectorstore of multiple PDFs?


I have been working on a recipe for Langchain on how to properly use it with Weaviate.

I should publish the initial version sometime this week and come back here :slight_smile: