-
Notifications
You must be signed in to change notification settings - Fork 265
feat(ai): add how to query rerank models #5873
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
base: main
Are you sure you want to change the base?
Conversation
Co-authored-by: Benedikt Rollik <brollik@scaleway.com>
|
|
||
| For example: a query to a fast (but imprecise) model may return a list of 100 documents. A specialized reranking model can then evaluate these documents more deeply, score each on how well it matches the query, and return only the 10 most relevant documents to the first model to be used in answering the query. | ||
|
|
||
| This approach takes advantage of the strengths of each model: one that is fast but not specialized, which can generate candidates quickly, and another than is slow but specialized, to refine these candidates. It can result in reduced context windows with therefore improved relevance, and faster overall query processing time. |
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.
| This approach takes advantage of the strengths of each model: one that is fast but not specialized, which can generate candidates quickly, and another than is slow but specialized, to refine these candidates. It can result in reduced context windows with therefore improved relevance, and faster overall query processing time. | |
| This approach takes advantage of the strengths of each model: one that is fast but not specialized, which can generate candidates quickly, and another that is slow but specialized, to refine these candidates. It can result in reduced context windows with therefore improved relevance, and faster overall query processing time. |
| - Query vector: `qv = embedding(query`) | ||
| - Document vector: `dv = embedding(document content)` |
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.
| - Query vector: `qv = embedding(query`) | |
| - Document vector: `dv = embedding(document content)` | |
| - Query vector: `qv = embedding` (query) | |
| - Document vector: `dv = embedding` (document content) |
| - Document vector: `dv = embedding(document content)` | ||
| - Relevance score: `score = (qv, dv)` (dot product) | ||
|
|
||
| Therefore, if you're performing repeated relevance scoring, you can streamline your workflow as follows: |
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.
| Therefore, if you're performing repeated relevance scoring, you can streamline your workflow as follows: | |
| Therefore, if you are performing repeated relevance scoring, you can streamline your workflow as follows: |
|
Ok for me 👍 |
Add doc for querying rerank models