I am creating embeddings for my PDF files and storing them in a vector store. I then save these embeddings to a local folder. However, when I load the embeddings back from the local folder, the output quality is affected, resulting in distorted results.
Code. (For INDEXING part.) Storage = StorageContext.from_defaults()
Index=VectorStoreIndex.from_documents(docs)
Index.storage_context.persist(persist_dir=PERSIST_DIR)
(For LOADING part.) Storage = StorageContext.from_defaults(PERSIST_DIR) Index_new = load_index_from_storage(storage_context)
After this I'm just calling the chain and prompt to perform Rag.
Ps. The results are better when am directly quering over the Index without storing it in persist directory.
Tried with chromaDb as well as the basic one offered by llamaindex.