Skip to content
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 --pinecone-recall option to report Recall #50

Merged
merged 1 commit into from
Feb 29, 2024
Merged

Add --pinecone-recall option to report Recall #50

merged 1 commit into from
Feb 29, 2024

Conversation

daverigby
Copy link
Collaborator

Problem

For Vector Search using approximate nearest neighbour, how close the
returned query result(s) are to the exact nearest neighbour is an important
metric to measure.

Solution

Add support for calculating Recall@N for queries, by making use of the
exact top_k present in the 'queries' set. Locust doesn't currently
have way to add additional metrics to the statistics reported, so this
patch reports them instead of latencies; expressing the Recall as a
value between 0 and 100 (locust doens't support fractional latency
values).

Example output:

Response time percentiles (approximated)
Type     Name                             50%    66%    75%    80%    90%    95%    98%    99%  99.9% 99.99%   100% # reqs
--------|---------------------------|--------|------|------|------|------|------|------|------|------|------|------|------
PC gRPC  Vector (Query only)               98     99     99     99     99    100    100    100    100    100    100  10855
--------|---------------------------|--------|------|------|------|------|------|------|------|------|------|------|------
     Aggregated                        99    100    100    100    100    100    100    100    100    100    100  21827

(Yes, the title is misleading, but it is not possible to customise
this in Locust).

Type of Change

  • New feature (non-breaking change which adds functionality)

Test Plan

New integration test to cover new option.

For Vector Search using approximate nearest neighbour, how close the
returned query result(s) are to the exact nearest neighbour is an important
metric to measure.

Add support for calculating Recall@N for queries, by making use of the
exact top_k present in the 'queries' set. Locust doesn't currently
have way to add additional metrics to the statistics reported, so this
patch reports them instead of latencies; expressing the Recall as a
value between 0 and 100 (locust doens't support fractional latency
values).

Example output:

    Response time percentiles (approximated)
    Type     Name                             50%    66%    75%    80%    90%    95%    98%    99%  99.9% 99.99%   100% # reqs
    --------|---------------------------|--------|------|------|------|------|------|------|------|------|------|------|------
    PC gRPC  Vector (Query only)               98     99     99     99     99    100    100    100    100    100    100  10855
    --------|---------------------------|--------|------|------|------|------|------|------|------|------|------|------|------
	     Aggregated                        99    100    100    100    100    100    100    100    100    100    100  21827

(Yes, the title is misleading, but it is not possible to customise
this in Locust).
@daverigby daverigby merged commit 79a4bbe into main Feb 29, 2024
7 checks passed
@daverigby daverigby deleted the recall branch February 29, 2024 16:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant