-
Notifications
You must be signed in to change notification settings - Fork 435
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Discussion: REST API routes for different corpus/model combinations - how do we name? #2502
Comments
I initially named the route to match the PrebuiltIndexHandler since all the indexes were from there so in that case option (2) changed to "index" would be an improvement (I'm not sure why I named |
Using the first option, you can maintain clarity and separation between the corpus and the model, making it easier to add or change models in the future. It also simplifies API usage, as users will understand that the primary resource is the collection, and the model is a configurable parameter. So I side with it, but agreed too that it is a bit of work. |
Yea, you'll need another layer of indirection. I'll make an executive decision of going with (2) for now, with perhaps moving to (1) further down the road... it's probably too much work right now. @16BitNarwhal can you rename |
https://restfulapi.net/resource-naming/
|
Adding I'm okay with all the other aspects of your proposal. Let's do it! |
Sounds good, will draft and work on #2525 |
BTW, I don't think we need to preserve the old API, so a breaking change here is fine. |
We have different corpus/model combinations. For example, we have
msmarco-v1-passage
,msmarco-v1-passage.splade-pp-ed
, andmsmarco-v1-passage.cos-dpr-distil
. They are all on MS MARCO V1 Passage, but different models - the first for BM25, SPLADE, and cosDPR.For querying different corpus/model combinations, how do we want to configure the REST API route?
Options I see are:
(1) corpus in route, model as query parameter, e.g.,
/api/collection/msmarco-v1-passage/search?query={query}&model=bm25
/api/collection/msmarco-v1-passage/search?query={query}&model=splade-pp-ed
/api/collection/msmarco-v1-passage/search?query={query}&model=cos-dpr-distil
(2) corpus/model (=index) combination directly in route, e.g.,
/api/collection/msmarco-v1-passage/search?query={query}&model=bm25
/api/collection/msmarco-v1-passage.splade-pp-ed/search?query={query}
/api/collection/msmarco-v1-passage.cos-dpr-distil/search?query={query}
The first feels conceptually cleaner, but requires an extra layer of indirection to map into our final indexes.
If we go with option (2), then "collection" is misnamed, but we can change to "index"?
The text was updated successfully, but these errors were encountered: