How do I save the indexing to a folder, so that I can use it later for retrieval.
Does the RAG have any function like RAG.save??? or RAG.indes{ index_path;}
If you're using a vector store like FAISS or Chroma under the hood, you usually need to call their specific save method, e.g. faiss.write_index or Chroma.persist().
RAG frameworks don’t always expose a RAG.save() by default — you typically have to access the index object directly and save it manually to a folder path.
Let me know which stack you’re using (e.g. LangChain, Haystack, custom), I might be able to point you to the right method.
Hi @diya-xfactr ,
I am working a lot with the package and as far as I know, the index is saved automatically. For indexing, you are using the function:
RAG.index(
self,
input_path: Union[str, Path],
index_name: Optional[str] = None,
doc_ids: Optional[int] = None,
store_collection_with_index: bool = False,
overwrite: bool = False, ... )
Here, the string "index_name" will be the name of the folder.
E.g. for index_name = "Index", you could find the index data under .byaldi/Index/
Then you could load the index again using the index_name (e.g using the RAG.from_index() function). I hope this could help!
Best regards, Lea