Skip to content

Improve filtering documentation#568

Merged
rapids-bot[bot] merged 8 commits intorapidsai:branch-25.02from
lowener:25.02-filtering-doc
Jan 31, 2025
Merged

Improve filtering documentation#568
rapids-bot[bot] merged 8 commits intorapidsai:branch-25.02from
lowener:25.02-filtering-doc

Conversation

@lowener
Copy link
Copy Markdown
Contributor

@lowener lowener commented Jan 13, 2025

This PR add a dedicated documentation page for filtering in the Getting started tab, and add the cuvs::neighbors::filtering namespace to the C++ documentation

@lowener lowener requested review from a team as code owners January 13, 2025 20:36
@github-actions github-actions Bot added the cpp label Jan 13, 2025
Comment thread docs/source/filtering.rst Outdated
Comment thread docs/source/filtering.rst Outdated
Comment thread docs/source/filtering.rst Outdated
Comment thread docs/source/filtering.rst Outdated
Using filters in cuVS
=====================

Example
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Rust doc makes different sized heading for each different type of heading symbol used. Please follow other docs and use different symbols for these. based on the order it traverses the heading tree, it'll figure out which ones whould be H1, H2, H3, and so on, so long as you are consistent about where they are used.

Comment thread docs/source/filtering.rst Outdated
Comment thread docs/source/filtering.rst Outdated
Comment thread docs/source/filtering.rst
Comment thread docs/source/filtering.rst

.. code-block:: c++

#include <cuvs/neighbors/cagra.hpp>
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you add an example cu file in examples/cpp as well (assuming it doesn't exist already). That would also be a great thing to link to from these docs.

Comment thread docs/source/filtering.rst

CuVS supports different type of filtering depending on the vector index being used. The main method used in all of the vector indexes
is pre-filtering, which is a technique that will into account the filtering of the vectors before computing it's closest neighbors, saving
some computation from calculating distances.
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Given that this is a supposed to be included in the getting started guide, I think we should provide a little more info to beginner users who might not be familiar with the "when" and "why". Adding some use-cases here could be helpful for users.

Comment thread docs/source/indexes/cagra.rst
----------------

Each cluster is padded to at least 32 vectors (but potentially up to 1024). Assuming uniform random distribution of vectors/list, we would have
:math:`cluster\_overhead = (conservative\_memory\_allocation ? 16 : 512 ) * dim * sizeof_{float})`
Copy link
Copy Markdown
Member

@cjnolet cjnolet Jan 16, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was intentional here- we want the float to be a subscript for ease of readership (it aligns better swith the reast of the formulas since we are using latex all over the place already).

@lowener lowener requested a review from a team as a code owner January 30, 2025 12:29
@github-actions github-actions Bot added the CMake label Jan 30, 2025
@cjnolet cjnolet added improvement Improves an existing functionality non-breaking Introduces a non-breaking change labels Jan 30, 2025
@cjnolet
Copy link
Copy Markdown
Member

cjnolet commented Jan 31, 2025

/merge

@rapids-bot rapids-bot Bot merged commit 8eca524 into rapidsai:branch-25.02 Jan 31, 2025
@lowener lowener deleted the 25.02-filtering-doc branch January 26, 2026 11:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CMake cpp improvement Improves an existing functionality non-breaking Introduces a non-breaking change

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants