-
Notifications
You must be signed in to change notification settings - Fork 14
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
Add search cutoffs, null handing, and refresh API reference #331
Conversation
✅ Deploy Preview for luxury-shortbread-acee05 ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
@@ -55,12 +68,120 @@ this simplified example intentionally omits several parameter values. | |||
"enable_factual_consistency_score": true | |||
} | |||
``` | |||
|
|||
:::tip |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Small nit: when I read something like "you can also enable reranking in the Vectara console..." it may be confusing in the sense that I ask myself: "if I enable it in console, does that affect my application?". Of course the answer is not, but I wonder if we can rephrase it to reiterate the message that console is for exploration, experimentation, etc with the API. but it ultimately of course the API call itself is what makes it happen.
|
||
1. Applies score cutoff, if specified. | ||
2. Reranks all input results based on the selected reranker. | ||
3. Eliminates results that return null scores. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What are the cases where this might be happening? How would a developer know if any results return NULL scores?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think I should have explained this better, null scores are only returned deliberately by user functions. So if you want to eliminate some search results, have a udf return null (say apply a metadata filter)
"rerankers": [ | ||
{ | ||
"type": "userfn", | ||
"user_function": "get('$.document_metadata.category') === 'blog' ? get('$.score') : null", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So maybe this is related to my question about NULL above - is this the only use-case, where my UDF decided to return NULL?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes this is the only case where scores will be eliminated (aside from cutoffs and limits)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@husseinVectara are these ? and : operators implemented now?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please correct this to:
"if (get('$.document_metadata.category') == 'blog') get('$.score') else null"
Added information about the cutoffs parameter and improved verbiage around the multilingual reranker
b975248
to
cc87738
Compare
There were several conflicts so trying to sort it out. May take more commits. |
Regenerated the API docs again
I noticed some duplicate headings and sentences
Added information about search cutoffs, handling null values, and regenerated the API reference.