RAGatouille icon indicating copy to clipboard operation
RAGatouille copied to clipboard

how to define the path to an index when creating it?

Open fpservant opened this issue 1 year ago • 2 comments

index() has an index_name param, but not a path. The index is created in "./.ragatouille/colbert/indexes/index_name/" - how to choose this path? It's at least not clear in the doc. (Having a name starting with "." can be annoying, as you often do not see it)

fpservant avatar Jan 29 '24 23:01 fpservant

When initializing RAGPretrainedModel using .from_pretrained(), you can pass the optional index_root param and set it to whatever you'd like! So for example, using index_root="my_root_dir" would yield my_root_dir/colbert/indexes/index_name/ after creating the index. It's on my todo's to better document that.

adharm avatar Jan 29 '24 23:01 adharm

thx! I had missed it

fpservant avatar Jan 29 '24 23:01 fpservant

Will try to have this better documented in the (long overdue) doc update!

bclavie avatar Jan 30 '24 19:01 bclavie