Support Questions

Find answers, ask questions, and share your expertise

How to use advanced functions for the /recommend/ end point ?

avatar
Explorer

Hi Sean,

 

In the RecommendServlet page, we noticed it stated

Responds to a GET request to /recommend/[userID](?howMany=n)(&offset=o)(&considerKnownItems=true|false)(&rescorerParams=...)...

 

We are designing the re-score classes to plugin. For example, pass a list of item-ID to rescorerParams, so that the recommendation only considers the passed item-IDs as recommendation result.

 

The problem is that the item-IDs list could be very long, and it could easily hit maximum length of HTTP GET request.

Are there any suggestions? Is there any Http-Post servlet to do the /recommend/ ?

 

Thanks.

1 ACCEPTED SOLUTION

avatar
Master Collaborator

Yeah, this is bumping up against practical limit of this simplistic API. The max URL length is set to be pretty big, like 8K IIRC. Is it possible that whatever item IDs you need can be looked up from an external source? There's always filtering on the caller side too although that has its own problems.

View solution in original post

5 REPLIES 5

avatar
Master Collaborator

Yeah, this is bumping up against practical limit of this simplistic API. The max URL length is set to be pretty big, like 8K IIRC. Is it possible that whatever item IDs you need can be looked up from an external source? There's always filtering on the caller side too although that has its own problems.

avatar
Explorer

Sean,

 

Thanks for your reply.

Additional (and related) question to the scoring....

I tried to understand the score after giving user id (that is /recommend/ end point) withour re-scoring.

Then, I get a list of "item-id", "predict-score/value".

I think the score is computed by XY(t) .... And the range is about 0-1.  My question is how can we interpret these values (in addition to the ranking)? Assuming a good training (tuned training parameters). Is the score lower than 0.5 implying low possibility that this is user's preference and maybe "random" recommendation is then can be used in the lower 0.5 score case ?

 

avatar
Master Collaborator

Yes they will usually be in [0,1] but not always. They aren't probabilities. They are entries in X*Y', yes. I think it's safe to take values >=1 as a very strong positive. What's a good cutoff? it really depends on your semantics and use case. They are comparable across models so you can probably determine a value empirically with some testing.

avatar
Explorer
Sean,
The GET Max limit is implementation dependent. So my question more specific is that from "server side" of Oryx, is there such limitation? I guess so, but want to confirm. Thanks.

avatar
Master Collaborator

Yes, I meant the server side. Actually, looking at the source, it should allow up to 65536 bytes of header data.