-
Notifications
You must be signed in to change notification settings - Fork 4
Change recommend endpoint to return X-Y coordinates for each input sentence and recommendations #21
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
Comments
@cassiasamp and @tiago-git-area, |
Now, we have encoders for parametric UMAP models. Here's the docs I used as reference:
Now, to retrieve XY coords for the input prompt using the same model we used to populate the JSON sentences files, we need to do the following:
This output would be in This will be returned to the client, together with the XY coords for the recommended sentences. Next step is to connect these encoders with the recommend endpoint. |
Current behavior of the /recommend endpoint:
|
Description (Actual Behavior)
Change the recommend endpoint to return X-Y coordinates for each sentence, allowing the UI to plot input prompt and recommendations as explainability feature.
Expected Behavior
Response JSON with recommendations should also have the X-Y coordinates. allowing any UI to plot the sentences of the input prompt and the recommendations provided.
A possible way to represent these coordinates in the response JSON could be as follows.
Note: X-Y coordinates in the JSON presented next are just dummy values to exemplify a possible JSON structure.
These X-Y coordinates could then be used to create the following plots.
Note: The issue regarding the plotting feature will be created after this one is closed.
Explainability plot while recommending inclusions:

Explainability plot after an inclusion recommendation is selected:

Explainability plot while recommending a removal:

Possible Fix
A possible approach is to use UMAP to process input prompt sentences' embeddings plus recommendations' embeddings. Then, use these to add X-Y coordinates to the response JSON.
This way, the UI can display an explainability element to users about why these recommendations are being provided.
Steps to Reproduce
NA.
The text was updated successfully, but these errors were encountered: