Hi, This is rohith, will be here and happy to answer your questions!
You can send to the API metadata as long as it's JSON. The results will give you back the original text, the highlight closest to your query and the metadata. You can then pipe some or all of this information to your LLM.
Quick disclaimer though, our code as-is today would not support 3M documents, we optimised for speed on our first launch, and everything is in RAM (wait until our next update).