Skip to content

How do I save the indexing to a folder, so that I can use it later for retrieval. #93

Open

Description

@diya-xfactr

Does the RAG have any function like RAG.save??? or RAG.indes{ index_path;}

Activity

  1. onestardao commented on Aug 8, 2025

    @onestardao

    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.

  2. lea-33 commented on Aug 20, 2025

    @lea-33

    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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions