[DOC] Adding API guides for core cuVS types#2117
Conversation
8663294 to
c76e5fe
Compare
|
Note Reviews pausedIt looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
📝 WalkthroughWalkthroughAdds a Core Types nav and landing page; introduces Core Types guides (Memory Management, Multi-dimensional Arrays, Multi‑GPU, Resources); converts many relative doc links to absolute site routes; standardizes branding to “NVIDIA cuVS”; and adds index-extension, multi‑GPU, and Java resource-scoped examples plus API doc clarifications. ChangesDocumentation site reorganization and new guides
Estimated code review effort 🎯 3 (Moderate) | ⏱️ ~25 minutes Possibly related PRs
Suggested reviewers
✨ Finishing Touches🧪 Generate unit tests (beta)
|
There was a problem hiding this comment.
Actionable comments posted: 5
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (3)
fern/pages/neighbors/bruteforce.md (1)
343-347:⚠️ Potential issue | 🟡 Minor | ⚡ Quick winClose
loadedIndexwith try-with-resources.
loadedIndexis created but not closed in this example. Since this wrapper owns native resources, the example should model deterministic cleanup.Suggested fix
- try (FileInputStream input = new FileInputStream("/tmp/cuvs-bruteforce.bin")) { - BruteForceIndex loadedIndex = - BruteForceIndex.newBuilder(resources) - .from(input) - .build(); - } + try (FileInputStream input = new FileInputStream("/tmp/cuvs-bruteforce.bin"); + BruteForceIndex loadedIndex = + BruteForceIndex.newBuilder(resources) + .from(input) + .build()) { + // Use loadedIndex. + }🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@fern/pages/neighbors/bruteforce.md` around lines 343 - 347, BruteForceIndex loaded via BruteForceIndex.newBuilder(resources).from(input).build() is not closed; update the example to use try-with-resources to ensure deterministic cleanup of native resources by declaring loadedIndex in a try(...) block (e.g., try (BruteForceIndex loadedIndex = BruteForceIndex.newBuilder(resources).from(input).build()) { ... }) so loadedIndex.close() is invoked automatically.fern/pages/cuvs_bench/running.md (1)
152-153:⚠️ Potential issue | 🟡 Minor | ⚡ Quick winAlign algorithm argument text with the command example.
Line 152 lists
cuvs_cagra,hnswlib, but the actual Docker command above usescuvs_cagra,cuvs_ivf_pq. Keep these consistent to avoid copy/paste confusion.Proposed doc fix
-| `"--algorithms cuvs_cagra,hnswlib --batch-size 10 -k 10"` | Arguments passed to the benchmark run script. | +| `"--algorithms cuvs_cagra,cuvs_ivf_pq --batch-size 10 -k 10"` | Arguments passed to the benchmark run script. |🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@fern/pages/cuvs_bench/running.md` around lines 152 - 153, The algorithms list in the example table row (`"--algorithms cuvs_cagra,hnswlib --batch-size 10 -k 10"`) is inconsistent with the Docker command above that uses `cuvs_cagra,cuvs_ivf_pq`; update the table entry to match the command example (replace `hnswlib` with `cuvs_ivf_pq`) so the `--algorithms` argument string and the earlier Docker invocation are identical, ensuring `--algorithms cuvs_cagra,cuvs_ivf_pq --batch-size 10 -k 10` appears in the table.fern/pages/neighbors/cagra.md (1)
684-688:⚠️ Potential issue | 🟡 Minor | ⚡ Quick winFix undefined Java variable in HNSW query example.
Line 687 passes
queriesto.withQueryVectors(...), butqueriesis not declared in the snippet scope.Proposed doc fix
- HnswQuery query = - new HnswQuery.Builder(resources) - .withTopK(10) - .withSearchParams(searchParams) - .withQueryVectors(queries) - .build(); + try (CuVSMatrix queryVectors = loadQueryMatrix()) { + HnswQuery query = + new HnswQuery.Builder(resources) + .withTopK(10) + .withSearchParams(searchParams) + .withQueryVectors(queryVectors) + .build(); + }🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@fern/pages/neighbors/cagra.md` around lines 684 - 688, The snippet passes an undeclared variable queries into HnswQuery.Builder.withQueryVectors(...); fix by either declaring and initializing a queries variable of the correct type before building the query (e.g., a float[][] or List<float[]> depending on surrounding code) or by replacing queries with the existing variable name that holds the query vectors in this snippet; update the code around HnswQuery.Builder(...).withQueryVectors(...) to reference a properly defined variable so HnswQuery.Builder and withQueryVectors have a valid argument.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@fern/pages/cuvs_bench/install.md`:
- Around line 47-48: Update the link text for the CPU-only image entry in the
Markdown to use the hyphenated compound adjective "CPU-only" instead of "CPU
only"; specifically modify the second bullet string "NVIDIA cuVS bench CPU only
images" to "NVIDIA cuVS bench CPU-only images" in the install.md content so the
displayed link text is correct.
In `@fern/pages/integrations.md`:
- Around line 71-73: Replace the incorrect vendor heading and any mentions of
"Everpure" in this section with "Pure Storage": update the heading "###
Everpure" to "### Pure Storage" and change the link text "Everpure FlashBlade"
to "Pure Storage FlashBlade" (or just "FlashBlade") so the vendor name matches
the linked product/domain; verify there are no other stray "Everpure"
occurrences in this block and adjust them accordingly.
In `@fern/pages/other/pairwise_distances.md`:
- Line 120: The Markdown link to K-selection contains a typo in the path
("other-ap-is") and will 404; update the link in pairwise_distances.md (the
sentence referencing K-selection) to use the correct route segment (replace
"other-ap-is" with "other-apis") so the link becomes
/user-guide/api-guides/other-apis/k-selection.
In `@fern/pages/other/resources.md`:
- Around line 37-43: The example leaks resources when cuvsStreamSync(resources)
fails because it returns immediately without calling cuvsResourcesDestroy;
update the error path so that on any failure after cuvsResourcesCreate (e.g.,
cuvsStreamSync returning non-CUVS_SUCCESS) you call
cuvsResourcesDestroy(resources) before returning (or use a single cleanup/exit
path—e.g., a result variable and a final cleanup block/goto) and handle/report
any destroy errors while ensuring resources is always cleaned up.
In `@fern/pages/user_guide/abi_stability.md`:
- Line 34: Replace the incorrect article in the sentence that reads "A NVIDIA
cuVS version such as `26.04` means the release was made in April 2026." with "An
NVIDIA cuVS version such as `26.04` means the release was made in April 2026." —
update the text in the ABI stability paragraph (the sentence containing "NVIDIA
cuVS version such as `26.04`") to use "An" instead of "A".
---
Outside diff comments:
In `@fern/pages/cuvs_bench/running.md`:
- Around line 152-153: The algorithms list in the example table row
(`"--algorithms cuvs_cagra,hnswlib --batch-size 10 -k 10"`) is inconsistent with
the Docker command above that uses `cuvs_cagra,cuvs_ivf_pq`; update the table
entry to match the command example (replace `hnswlib` with `cuvs_ivf_pq`) so the
`--algorithms` argument string and the earlier Docker invocation are identical,
ensuring `--algorithms cuvs_cagra,cuvs_ivf_pq --batch-size 10 -k 10` appears in
the table.
In `@fern/pages/neighbors/bruteforce.md`:
- Around line 343-347: BruteForceIndex loaded via
BruteForceIndex.newBuilder(resources).from(input).build() is not closed; update
the example to use try-with-resources to ensure deterministic cleanup of native
resources by declaring loadedIndex in a try(...) block (e.g., try
(BruteForceIndex loadedIndex =
BruteForceIndex.newBuilder(resources).from(input).build()) { ... }) so
loadedIndex.close() is invoked automatically.
In `@fern/pages/neighbors/cagra.md`:
- Around line 684-688: The snippet passes an undeclared variable queries into
HnswQuery.Builder.withQueryVectors(...); fix by either declaring and
initializing a queries variable of the correct type before building the query
(e.g., a float[][] or List<float[]> depending on surrounding code) or by
replacing queries with the existing variable name that holds the query vectors
in this snippet; update the code around
HnswQuery.Builder(...).withQueryVectors(...) to reference a properly defined
variable so HnswQuery.Builder and withQueryVectors have a valid argument.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Enterprise
Run ID: 68f54759-cd96-494b-8542-a66ae871c25c
📒 Files selected for processing (67)
fern/docs.ymlfern/pages/advanced_topics.mdfern/pages/api_basics.mdfern/pages/api_guide.mdfern/pages/api_interoperability.mdfern/pages/benchmarking_guide.mdfern/pages/build.mdfern/pages/c_guidelines.mdfern/pages/cluster/index.mdfern/pages/cluster/kmeans.mdfern/pages/clustering.mdfern/pages/coding_guidelines.mdfern/pages/comparing_indexes.mdfern/pages/contributing.mdfern/pages/core_types.mdfern/pages/cpp_api/cpp-api-cluster-kmeans.mdfern/pages/cpp_guidelines.mdfern/pages/cuvs_bench/datasets.mdfern/pages/cuvs_bench/index.mdfern/pages/cuvs_bench/install.mdfern/pages/cuvs_bench/introduction.mdfern/pages/cuvs_bench/param_tuning.mdfern/pages/cuvs_bench/pluggable_backend.mdfern/pages/cuvs_bench/running.mdfern/pages/cuvs_bench/wiki_all_dataset.mdfern/pages/developer_guide.mdfern/pages/getting_started.mdfern/pages/index.mdfern/pages/installation/go.mdfern/pages/installation/java.mdfern/pages/installation/rust.mdfern/pages/integrations.mdfern/pages/introduction.mdfern/pages/java_guidelines.mdfern/pages/jit_compilation.mdfern/pages/jit_lto_guide.mdfern/pages/neighbors/all_neighbors.mdfern/pages/neighbors/bruteforce.mdfern/pages/neighbors/cagra.mdfern/pages/neighbors/ivfflat.mdfern/pages/neighbors/ivfpq.mdfern/pages/neighbors/multi_gpu.mdfern/pages/neighbors/neighbors.mdfern/pages/neighbors/nn_descent.mdfern/pages/neighbors/scann.mdfern/pages/neighbors/vamana.mdfern/pages/other/index.mdfern/pages/other/memory_management.mdfern/pages/other/multi_gpu.mdfern/pages/other/multidimensional_arrays.mdfern/pages/other/pairwise_distances.mdfern/pages/other/resources.mdfern/pages/preprocessing/index.mdfern/pages/preprocessing/product_quantization.mdfern/pages/preprocessing/scalar_quantizer.mdfern/pages/preprocessing/spectral_embedding.mdfern/pages/python_guidelines.mdfern/pages/quantization.mdfern/pages/references.mdfern/pages/tuning_guide.mdfern/pages/use_cases.mdfern/pages/user_guide.mdfern/pages/user_guide/abi_stability.mdfern/pages/user_guide/integration_patterns.mdfern/pages/vector_databases_vs_vector_search.mdfern/pages/what_is_vector_search.mdfern/pages/working_with_ann_indexes.md
| - [NVIDIA cuVS bench images](https://hub.docker.com/r/rapidsai/cuvs-bench/tags) | ||
| - [NVIDIA cuVS bench CPU only images](https://hub.docker.com/r/rapidsai/cuvs-bench-cpu/tags) |
There was a problem hiding this comment.
Use hyphenated “CPU-only” in link text.
Line 48 should use “CPU-only” for correct compound adjective style.
Proposed doc fix
-- [NVIDIA cuVS bench CPU only images](https://hub.docker.com/r/rapidsai/cuvs-bench-cpu/tags)
+- [NVIDIA cuVS bench CPU-only images](https://hub.docker.com/r/rapidsai/cuvs-bench-cpu/tags)📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| - [NVIDIA cuVS bench images](https://hub.docker.com/r/rapidsai/cuvs-bench/tags) | |
| - [NVIDIA cuVS bench CPU only images](https://hub.docker.com/r/rapidsai/cuvs-bench-cpu/tags) | |
| - [NVIDIA cuVS bench images](https://hub.docker.com/r/rapidsai/cuvs-bench/tags) | |
| - [NVIDIA cuVS bench CPU-only images](https://hub.docker.com/r/rapidsai/cuvs-bench-cpu/tags) |
🧰 Tools
🪛 LanguageTool
[grammar] ~48-~48: Use a hyphen to join words.
Context: ...uvs-bench/tags) - [NVIDIA cuVS bench CPU only images](https://hub.docker.com/r/ra...
(QB_NEW_EN_HYPHEN)
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@fern/pages/cuvs_bench/install.md` around lines 47 - 48, Update the link text
for the CPU-only image entry in the Markdown to use the hyphenated compound
adjective "CPU-only" instead of "CPU only"; specifically modify the second
bullet string "NVIDIA cuVS bench CPU only images" to "NVIDIA cuVS bench CPU-only
images" in the install.md content so the displayed link text is correct.
| ### Selecting nearest neighbors | ||
|
|
||
| Pairwise distance often feeds a selection step. Compute the full matrix when it fits in memory, then use [K-selection](select_k.md) to keep the best values from each query row. | ||
| Pairwise distance often feeds a selection step. Compute the full matrix when it fits in memory, then use [K-selection](/user-guide/api-guides/other-ap-is/k-selection) to keep the best values from each query row. |
There was a problem hiding this comment.
Fix likely broken K-selection route typo.
Line 120 links to /user-guide/api-guides/other-ap-is/k-selection, but other-ap-is appears to be a typo and will likely 404.
Proposed fix
-Pairwise distance often feeds a selection step. Compute the full matrix when it fits in memory, then use [K-selection](/user-guide/api-guides/other-ap-is/k-selection) to keep the best values from each query row.
+Pairwise distance often feeds a selection step. Compute the full matrix when it fits in memory, then use [K-selection](/user-guide/api-guides/other-apis/k-selection) to keep the best values from each query row.📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| Pairwise distance often feeds a selection step. Compute the full matrix when it fits in memory, then use [K-selection](/user-guide/api-guides/other-ap-is/k-selection) to keep the best values from each query row. | |
| Pairwise distance often feeds a selection step. Compute the full matrix when it fits in memory, then use [K-selection](/user-guide/api-guides/other-apis/k-selection) to keep the best values from each query row. |
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@fern/pages/other/pairwise_distances.md` at line 120, The Markdown link to
K-selection contains a typo in the path ("other-ap-is") and will 404; update the
link in pairwise_distances.md (the sentence referencing K-selection) to use the
correct route segment (replace "other-ap-is" with "other-apis") so the link
becomes /user-guide/api-guides/other-apis/k-selection.
| if (cuvsResourcesCreate(&resources) != CUVS_SUCCESS) { return 1; } | ||
|
|
||
| // Pass resources to cuVS C APIs, such as index build and search calls. | ||
|
|
||
| if (cuvsStreamSync(resources) != CUVS_SUCCESS) { return 1; } | ||
| if (cuvsResourcesDestroy(resources) != CUVS_SUCCESS) { return 1; } | ||
|
|
There was a problem hiding this comment.
Avoid leak on error path in the C example.
If cuvsStreamSync(resources) fails, the example returns early without destroying resources.
Suggested fix
- if (cuvsResourcesCreate(&resources) != CUVS_SUCCESS) { return 1; }
+ if (cuvsResourcesCreate(&resources) != CUVS_SUCCESS) { return 1; }
// Pass resources to cuVS C APIs, such as index build and search calls.
- if (cuvsStreamSync(resources) != CUVS_SUCCESS) { return 1; }
- if (cuvsResourcesDestroy(resources) != CUVS_SUCCESS) { return 1; }
+ if (cuvsStreamSync(resources) != CUVS_SUCCESS) {
+ cuvsResourcesDestroy(resources);
+ return 1;
+ }
+ if (cuvsResourcesDestroy(resources) != CUVS_SUCCESS) { return 1; }📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| if (cuvsResourcesCreate(&resources) != CUVS_SUCCESS) { return 1; } | |
| // Pass resources to cuVS C APIs, such as index build and search calls. | |
| if (cuvsStreamSync(resources) != CUVS_SUCCESS) { return 1; } | |
| if (cuvsResourcesDestroy(resources) != CUVS_SUCCESS) { return 1; } | |
| if (cuvsResourcesCreate(&resources) != CUVS_SUCCESS) { return 1; } | |
| // Pass resources to cuVS C APIs, such as index build and search calls. | |
| if (cuvsStreamSync(resources) != CUVS_SUCCESS) { | |
| cuvsResourcesDestroy(resources); | |
| return 1; | |
| } | |
| if (cuvsResourcesDestroy(resources) != CUVS_SUCCESS) { return 1; } |
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@fern/pages/other/resources.md` around lines 37 - 43, The example leaks
resources when cuvsStreamSync(resources) fails because it returns immediately
without calling cuvsResourcesDestroy; update the error path so that on any
failure after cuvsResourcesCreate (e.g., cuvsStreamSync returning
non-CUVS_SUCCESS) you call cuvsResourcesDestroy(resources) before returning (or
use a single cleanup/exit path—e.g., a result variable and a final cleanup
block/goto) and handle/report any destroy errors while ensuring resources is
always cleaned up.
|
/ok to test d2e5e4e |
|
|
||
| The C, Java, Rust, and Go examples change the current device resource through the NVIDIA cuVS C API. This has process-wide effect for the current device, so configure it before allocating long-lived objects and reset it only after those objects are destroyed. | ||
|
|
||
| ### Allocating device memory |
There was a problem hiding this comment.
Intentional to not have Java, Rust, and Go examples here?
|
|
||
| Most users do not allocate raw buffers directly. NVIDIA cuVS APIs typically accept matrices, tensors, or language-native array wrappers, and those objects allocate through the active RMM resource underneath. | ||
|
|
||
| ### Allocating pinned host memory |
There was a problem hiding this comment.
This one only has C and CPP. Maybe we can add a note about why other languages don't support this yet.
There was a problem hiding this comment.
I'm really trying to limit the potential for small details that don't end up getting updated as the docs evolve. The tabbed languages in the code examples should make the supported languages pretty clear (for eg. we shouldn't need to explicitly state in every code example that one or more languages is not supported because it should be assumed).
|
/ok to test ba2cd45 |
There was a problem hiding this comment.
Actionable comments posted: 11
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
fern/scripts/generate_api_reference.py (1)
3867-3871:⚠️ Potential issue | 🟠 Major | ⚡ Quick winStore full member declarations in plain struct parsing.
At Line 3870, saving only
c_typeinDoxygenEntry.signaturebreaks later type recovery when a field name matches the type basename (e.g.,search_params search_params), producing malformed rendered types downstream.Suggested fix
member = DoxygenEntry( kind="member", name=name, - signature=c_type or declaration, + signature=declaration, summary="", source=entry.source, line=entry.line, )🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@fern/scripts/generate_api_reference.py` around lines 3867 - 3871, When constructing the DoxygenEntry for plain struct members, don’t set signature to only c_type; store the full member declaration so downstream type recovery can distinguish a field named the same as its type. Update the DoxygenEntry creation where member = DoxygenEntry(...) to use the complete declaration (the existing declaration variable) for signature (or concatenate declaration and c_type if necessary) instead of just c_type, keeping name as-is so functions/methods like DoxygenEntry.signature, the declaration variable, and c_type are consistent for later type rendering.
🧹 Nitpick comments (15)
fern/pages/cpp_api/cpp-api-common-types-copy-serialization-and-utility-apis.md (1)
7-8: 💤 Low valueConsider adding an h2 section heading.
The document jumps from the h1 title directly to h3 subsections. Adding an h2 heading (e.g., "## RAFT Utilities" or "## Core Utilities") before the first h3 would improve document structure and follow markdown best practices.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@fern/pages/cpp_api/cpp-api-common-types-copy-serialization-and-utility-apis.md` around lines 7 - 8, The document currently jumps from the h1 title to h3 headings like "### raft::copy"; add a new h2 section heading (for example "## RAFT Utilities" or "## Core Utilities") immediately before the first h3 (the "### raft::copy" anchor) to improve structure and follow Markdown hierarchy; ensure the new h2 precedes other h3 subsections so headings descend H1 -> H2 -> H3.fern/pages/cpp_api/cpp-api-common-types-errors-and-logging.md (1)
9-10: 💤 Low valueConsider adding an h2 section heading.
The document jumps from the h1 title directly to h3 subsections. Adding an h2 heading (e.g., "## Error Handling" or "## Error Handling and Logging APIs") before the first h3 would improve document structure and follow markdown best practices.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@fern/pages/cpp_api/cpp-api-common-types-errors-and-logging.md` around lines 9 - 10, The document jumps from the top-level title straight to "### raft::exception"; add an H2 section heading such as "## Error Handling" or "## Error Handling and Logging APIs" immediately before the "### raft::exception" subsection so the structure follows h1 → h2 → h3 hierarchy and improves navigation; update the area around the "### raft::exception" anchor (a id="raft-exception") to insert the new H2 heading while keeping the anchor and subsequent "raft::exception" H3 unchanged.fern/pages/c_api/c-api-neighbors-tiered-index.md (1)
167-167: ⚡ Quick winConsider breaking the long description into structured bullet points.
This follows the same pattern as the brute force API documentation and would benefit from the same structured formatting for clarity.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@fern/pages/c_api/c-api-neighbors-tiered-index.md` at line 167, Split the long single-line description for TieredIndex into structured bullet points mirroring the brute force API style: add a short intro sentence referencing TieredIndex and DLManagedTensor, then a "Supported devices" bullet listing DLDeviceType values (kDLCUDA, kDLCUDAHost, kDLCUDAManaged, kDLCPU) and an "Acceptable data types" bullet with two sub-bullets for the float formats (kDLDataType.code == kDLFloat and bits == 32; kDLDataType.code == kDLFloat and bits == 16); update the text mentioning DLManagedTensor and DLDeviceType to use these bullets so the information is clearer and consistent with the brute force docs.fern/pages/c_api/c-api-neighbors-brute-force.md (2)
73-73: ⚡ Quick winConsider breaking the long description into structured bullet points.
The current description is a dense run-on sentence that lists multiple constraints without clear separation. Consider reformatting for better readability.
📝 Suggested formatting improvement
-Build a BRUTEFORCE index with a `DLManagedTensor` which has underlying `DLDeviceType` equal to `kDLCUDA`, `kDLCUDAHost`, `kDLCUDAManaged`, or `kDLCPU`. Also, acceptable underlying types are: 1. `kDLDataType.code == kDLFloat` and `kDLDataType.bits = 32` 2. `kDLDataType.code == kDLFloat` and `kDLDataType.bits = 16` +Build a BRUTEFORCE index with a `DLManagedTensor`. + +**Requirements:** +- Underlying `DLDeviceType` must be `kDLCUDA`, `kDLCUDAHost`, `kDLCUDAManaged`, or `kDLCPU` +- Acceptable data types: + 1. `kDLDataType.code == kDLFloat` and `kDLDataType.bits = 32` + 2. `kDLDataType.code == kDLFloat` and `kDLDataType.bits = 16`🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@fern/pages/c_api/c-api-neighbors-brute-force.md` at line 73, Split the long run-on sentence into a short intro plus structured bullet-like lines: state that the function builds a BRUTEFORCE index from a DLManagedTensor, then list allowed DLDeviceType values (kDLCUDA, kDLCUDAHost, kDLCUDAManaged, kDLCPU) on one line and list acceptable data-type conditions on separate lines (kDLDataType.code == kDLFloat with bits == 32, and kDLDataType.code == kDLFloat with bits == 16) so the constraints for DLManagedTensor, DLDeviceType, and kDLDataType are clearly separated and easy to scan.
102-102: ⚡ Quick winConsider breaking the long description into structured bullet points.
Similar to the build function, this description would benefit from clearer structure to separate device type constraints, type matching requirements, and input/output type specifications.
📝 Suggested formatting improvement
-Search a BRUTEFORCE index with a `DLManagedTensor` which has underlying `DLDeviceType` equal to `kDLCUDA`, `kDLCUDAHost`, `kDLCUDAManaged`. It is also important to note that the BRUTEFORCE index must have been built with the same type of `queries`, such that `index.dtype.code == queries.dl_tensor.dtype.code` Types for input are: 1. `queries`: `kDLDataType.code == kDLFloat` and `kDLDataType.bits = 32` or `kDLDataType.bits = 16` 2. `neighbors`: `kDLDataType.code == kDLUInt` and `kDLDataType.bits = 32` 3. `distances`: `kDLDataType.code == kDLFloat` and `kDLDataType.bits = 32` +Search a BRUTEFORCE index with a `DLManagedTensor`. + +**Requirements:** +- Underlying `DLDeviceType` must be `kDLCUDA`, `kDLCUDAHost`, or `kDLCUDAManaged` +- Index and queries must have matching types: `index.dtype.code == queries.dl_tensor.dtype.code` + +**Input/output types:** +1. `queries`: `kDLDataType.code == kDLFloat` and `kDLDataType.bits = 32` or `16` +2. `neighbors`: `kDLDataType.code == kDLUInt` and `kDLDataType.bits = 32` +3. `distances`: `kDLDataType.code == kDLFloat` and `kDLDataType.bits = 32`🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@fern/pages/c_api/c-api-neighbors-brute-force.md` at line 102, Split the long single-paragraph description into clear bullet points: one bullet listing allowed DLDeviceType values (DLManagedTensor with DLDeviceType == kDLCUDA, kDLCUDAHost, kDLCUDAManaged), one bullet clarifying the requirement that the BRUTEFORCE index must be built with the same query dtype (compare index.dtype.code == queries.dl_tensor.dtype.code), and a final bullet (or sub-bullets) enumerating input/output data-type constraints for queries, neighbors, and distances (queries: kDLDataType.code == kDLFloat with kDLDataType.bits == 32 or 16; neighbors: kDLDataType.code == kDLUInt and kDLDataType.bits == 32; distances: kDLDataType.code == kDLFloat and kDLDataType.bits == 32), using the symbols DLManagedTensor, queries, neighbors, distances, and the kDL* constants to keep references clear.fern/pages/cpp_api/cpp-api-distance-distance.md (1)
144-144: 💤 Low valueMinor: Awkward phrasing combining note and usage example.
Lines 144, 175, 206, 237, 268, and 299 combine "Note: Only contiguous row- or column-major layouts supported currently." with "Usage example:" on a single line, which reads awkwardly. Consider separating these or removing the trailing "Usage example:" if no example follows.
Also applies to: 175-175, 206-206, 237-237, 268-268, 299-299
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@fern/pages/cpp_api/cpp-api-distance-distance.md` at line 144, The line containing the sentence "Note: Only contiguous row- or column-major layouts supported currently. Usage example:" reads awkwardly; update each occurrence so the note and the "Usage example:" marker are separated (e.g., put the note on its own sentence/line and follow with a separate "Usage example:" heading) or remove the trailing "Usage example:" if there is no example following it; ensure you update all occurrences of that exact sentence in cpp-api-distance-distance.md so the note is clear and properly separated from the usage marker.fern/pages/cpp_api/cpp-api-common-types-owning-array-factories.md (1)
5-8: ⚡ Quick winConsider adding an h2 section heading.
The page jumps from the h1 title directly to h3 subsections, skipping the h2 level. Adding an intermediate h2 heading would improve document structure and accessibility.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@fern/pages/cpp_api/cpp-api-common-types-owning-array-factories.md` around lines 5 - 8, The document currently jumps from the H1 "Owning Array Factories" directly to H3 entries like "raft::make_device_matrix"; insert an H2 intermediary (e.g., "Overview" or "Factories") between the H1 and the existing H3s to restore proper heading hierarchy and accessibility, update the section anchor if needed (reference: raft::make_device_matrix) and ensure the new H2 appears before the existing H3 subsections.fern/pages/cpp_api/cpp-api-common-types-dense-array-views.md (1)
5-10: ⚡ Quick winConsider adding an h2 section heading.
The page jumps from the h1 title "Dense Array Views" directly to an h3 subsection "raft::mdspan", skipping the h2 level. Adding an intermediate h2 heading would improve document structure and accessibility. For example, you could add an h2 "Core View Types" or "Multi-dimensional Views" before the first h3.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@fern/pages/cpp_api/cpp-api-common-types-dense-array-views.md` around lines 5 - 10, Add an h2 heading between the H1 "Dense Array Views" and the existing H3 "raft::mdspan" to provide an intermediate section (e.g., "Core View Types" or "Multi-dimensional Views"); update the markdown so the new heading is a level-2 (##) line placed before the anchor/section for raft::mdspan, and ensure any nearby anchors or links still point correctly to the raft::mdspan subsection.fern/pages/cpp_api/cpp-api-common-types-execution-resources.md (1)
5-10: ⚡ Quick winConsider adding an h2 section heading.
The page jumps from the h1 title directly to h3 subsections, skipping the h2 level. Adding an intermediate h2 heading would improve document structure and accessibility.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@fern/pages/cpp_api/cpp-api-common-types-execution-resources.md` around lines 5 - 10, Add an intermediate h2 heading beneath the main h1 "Execution Resources" to avoid jumping straight to h3s; insert a descriptive h2 (for example "Overview" or "Execution resources overview") directly before the existing "### raft::resources" anchor so the document hierarchy is H1 -> H2 -> H3, ensuring the section about raft::resources remains unchanged.fern/pages/cpp_api/cpp-api-common-types-dense-view-factories.md (1)
5-8: ⚡ Quick winConsider adding an h2 section heading.
The page jumps from the h1 title directly to h3 subsections, skipping the h2 level. Adding an intermediate h2 heading would improve document structure and accessibility.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@fern/pages/cpp_api/cpp-api-common-types-dense-view-factories.md` around lines 5 - 8, Add an intermediate h2 heading between the h1 "Dense View Factories" and the existing h3 subsections (e.g., a descriptive h2 like "Factory Functions" or "Overview of Dense View Factories") to restore proper heading hierarchy; update the markdown near the h1 and before the "raft::make_device_matrix_view" section so the page goes H1 -> H2 -> H3 and ensure the new h2 is semantically appropriate for the group of functions such as raft::make_device_matrix_view.fern/pages/c_api/c-api-neighbors-ivf-pq.md (1)
505-505: 💤 Low valueConsider hyphenating compound modifier.
The phrase "PQ encoded vectors" uses a compound modifier that typically should be hyphenated when preceding a noun: "PQ-encoded vectors".
✏️ Proposed wording
-Unpack `n_rows` consecutive PQ encoded vectors of a single list (cluster) in the compressed index starting at given `offset`, not expanded to one code per byte. Each code in the output buffer occupies ceildiv(index.pq_dim() * index.pq_bits(), 8) bytes. +Unpack `n_rows` consecutive PQ-encoded vectors of a single list (cluster) in the compressed index starting at given `offset`, not expanded to one code per byte. Each code in the output buffer occupies ceildiv(index.pq_dim() * index.pq_bits(), 8) bytes.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@fern/pages/c_api/c-api-neighbors-ivf-pq.md` at line 505, Change the compound modifier "PQ encoded vectors" to "PQ-encoded vectors" in the documentation line that starts "Unpack `n_rows` consecutive PQ encoded vectors of a single list (cluster)..." so it reads "Unpack `n_rows` consecutive PQ-encoded vectors..."; keep the rest of the sentence intact (including references to `offset`, `index.pq_dim()` and `index.pq_bits()`).fern/pages/cpp_api/cpp-api-common-types-layouts-and-extents.md (1)
5-10: ⚡ Quick winConsider adding an h2 section heading.
The page jumps from the h1 title directly to h3 subsections, skipping the h2 level. Adding an intermediate h2 heading would improve document structure and accessibility.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@fern/pages/cpp_api/cpp-api-common-types-layouts-and-extents.md` around lines 5 - 10, The document jumps from the H1 "Layouts and Extents" straight to H3 anchors like "raft::row_major"; add an H2 heading (e.g., "Overview" or "Layouts and Extents — Overview") immediately after the H1 and before the <a id="raft-row-major"></a> anchor so the structure becomes H1 → H2 → H3 and improves accessibility and TOC generation; update surrounding text to briefly introduce raft layout and extent types under the new H2.fern/pages/cpp_api/cpp-api-common-types-owning-dense-arrays.md (1)
5-10: ⚡ Quick winConsider adding an h2 section heading.
The page jumps from the h1 title directly to h3 subsections, skipping the h2 level. Adding an intermediate h2 heading would improve document structure and accessibility.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@fern/pages/cpp_api/cpp-api-common-types-owning-dense-arrays.md` around lines 5 - 10, Add an intermediate h2 heading between the existing H1 "Owning Dense Arrays" and the H3 "raft::mdarray" to restore proper heading hierarchy; update the markdown near the top of the file (around the H1 and the "raft::mdarray" subsection) to insert a descriptive H2 such as "Overview" or "Contents" so the structure becomes H1 -> H2 -> H3 (raft::mdarray).fern/pages/cpp_api/cpp-api-common-types-sparse-array-types.md (1)
10-10: ⚡ Quick winConsider using h2 headings for top-level API entities.
The heading jumps from h1 (line 5) to h3, which may cause issues with documentation generators and table-of-contents navigation. Consider using
## raft::device_csr_matrixinstead.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@fern/pages/cpp_api/cpp-api-common-types-sparse-array-types.md` at line 10, The heading for the top-level API entity "raft::device_csr_matrix" is currently an h3 ("### raft::device_csr_matrix") and should be promoted to an h2 to maintain proper heading hierarchy; update the heading to "## raft::device_csr_matrix" (and scan other top-level API entities in this file to ensure they also use h2 instead of h3 where appropriate) so documentation generators and TOC navigation work correctly.fern/pages/cpp_api/cpp-api-neighbors-dynamic-batching.md (1)
60-60: ⚡ Quick winConsider breaking the description into paragraphs.
The description for
neighbors::dynamic_batching::indexis a single long paragraph that mixes the main description with usage examples and priority queue discussion. The bold markers__Usage example__and__Priority queues__suggest these should be separate paragraphs or subsections for better readability.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@fern/pages/cpp_api/cpp-api-neighbors-dynamic-batching.md` at line 60, Split the single long paragraph describing neighbors::dynamic_batching::index into multiple paragraphs/subsections: keep the main concept and lightweight/shared-pointer design in the first paragraph, move the priority/queue behavior and search_params::dispatch_timeout_ms aggregation into a separate "Priority queues" paragraph, and put the example about constructing one batching index per priority class into a distinct "Usage example" paragraph; ensure references to the dynamic batching index and search_params::dispatch_timeout_ms remain intact so readers can locate the details.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@fern/pages/c_api/c-api-neighbors-vamana.md`:
- Around line 175-177: The paragraph is incomplete: either finish the supported
distance metrics list and/or add the missing L2 usage example. Update the Vamana
section to (a) list supported metrics explicitly (e.g., "L2, Cosine,
InnerProduct") near the mention of distance metrics and (b) insert a short L2
usage example showing how to configure the index_params struct (e.g., setting
metric to L2 and degree/robustPrune parameters) and call the index build
function for Vamana; reference the existing symbols "index_params struct" and
the Vamana/Build (or buildIndex) operation so reviewers can find where to add
the example. If a usage example isn't desired, remove the fragment "- L2 Usage
example:" entirely and reword the sentence to complete the metrics list.
In `@fern/pages/cpp_api/cpp-api-common-types-sparse-array-types.md`:
- Line 34: The function signature uses the wrong type name: replace the
incorrect NNZType with the template parameter NZType in the initialize_sparsity
declaration and any other occurrences (e.g., the second signature on the page),
so the method signature reads initialize_sparsity(NZType nnz); and update the
parameter table entry to refer to NZType instead of NNZType; look for the
template declaration typename NZType and ensure all usages match that symbol.
- Line 153: The method signature initialize_sparsity currently uses the wrong
type name NNZType; change it to match the template parameter NZType used earlier
(e.g., void initialize_sparsity(NZType nnz)) and update any other occurrences
(including the other instance at line ~160) to use NZType; also update the
parameter table to list NZType consistently instead of NNZType so the template
parameter name is uniform across the file.
- Line 282: Update the `nnz` parameter documentation to state that it is
optional and that its default value is 0; specifically, change the `nnz` row
(the table entry `nnz | NZType`) to say something like "Optional; number of
nonzero entries when known, defaults to 0 (unknown/unspecified)". Apply the same
change for both occurrences referenced by the function signatures that use `nnz
= 0` so the docs match the signatures.
In `@fern/pages/cpp_api/cpp-api-distance-grammian.md`:
- Line 16: Fix the spelling in the documentation string that currently reads
"inner probucts": change "probucts" to "products" in the sentence describing the
Gram matrix (the line containing "A Gram matrix is the Hermitian matrix of inner
probucts G_ik = <x_i, x_k>" / symbol G_ik) so it reads "inner products".
In `@fern/pages/cpp_api/cpp-api-neighbors-composite-index.md`:
- Line 16: The line ends with a dangling "Usage example:" but no example is
provided; either remove the "Usage example:" label or add a short concrete
example that demonstrates setting a stream pool on the input raft::resource for
a composite index search. To fix, update the paragraph for the composite index
description (reference: composite index and raft::resource) by either deleting
the "Usage example:" text or appending a concise usage snippet that shows
constructing an input raft::resource with a non-null stream_pool and invoking
the composite index search API so readers see how to enable parallel search
across sub-indices.
In `@fern/pages/cpp_api/cpp-api-neighbors-dynamic-batching.md`:
- Line 60: Fix the typo in the documentation where "bach" is used instead of
"batch": update the phrase "prioritize one bach over the other" to "prioritize
one batch over the other" in the paragraph discussing Priority queues; ensure
the surrounding text mentioning the batcher, the single pool of queues, and
search_params::dispatch_timeout_ms remains unchanged so the explanation about
dispatch_timeout_ms aggregation and batching semantics is preserved.
In `@fern/pages/cpp_api/cpp-api-neighbors-ivf-pq.md`:
- Around line 1612-1613: Fix the two typos in the transform parameter docs:
change "populaterd" to "populated" in the `output_labels` description and remove
the extra closing bracket in the `output_dataset` shape expression so it reads a
device matrix view [n_rows, ceildiv(index.pq_dim() * index.pq_bits(), 8)] that
will get populated with the pq-encoded dataset; update the `output_labels` and
`output_dataset` lines accordingly (references: `output_labels`,
`output_dataset`, and `index.pq_dim()` / `index.pq_bits()`).
In `@fern/pages/cpp_api/cpp-api-neighbors-nn-descent.md`:
- Line 135: Update the compound adjective "user allocated" to "user-allocated"
in the constructor description that currently reads "user allocated host memory
knn-graph" so it becomes "user-allocated host memory knn-graph"; locate the
sentence in the nn-descent index constructor documentation (the paragraph
describing the knn-graph as "a dense raft::host_matrix and dimensions are
(n_rows, n_cols)") and apply the hyphen to the compound adjective.
In `@fern/pages/cpp_api/cpp-api-neighbors-vamana.md`:
- Line 336: Fix the spelling error "iserts" -> "inserts" wherever it appears in
the Vamana build description; specifically replace the phrase "iteratively
iserts batches of nodes" (and the same misspelling occurrences in subsequent
paragraphs) with "iteratively inserts batches of nodes" so the documentation for
the Vamana insertion-based algorithm reads correctly.
In `@fern/scripts/generate_api_reference.py`:
- Around line 3258-3263: The current if not line_text branch unconditionally
clears state and skips lines, causing blank lines inside Doxygen detail blocks
to be lost; change this so that when active_detail is True you preserve a
separator instead of dropping the line—append a blank-line marker (e.g., an
empty string or '\n') into the detail accumulation buffer used by the Doxygen
detail parser (referencing variables line_text, active_detail and the detail
buffer/collector in the same function in generate_api_reference.py) and
continue; for other states (active_param, active_summary, active_returns) keep
the existing behavior of resetting/continuing.
---
Outside diff comments:
In `@fern/scripts/generate_api_reference.py`:
- Around line 3867-3871: When constructing the DoxygenEntry for plain struct
members, don’t set signature to only c_type; store the full member declaration
so downstream type recovery can distinguish a field named the same as its type.
Update the DoxygenEntry creation where member = DoxygenEntry(...) to use the
complete declaration (the existing declaration variable) for signature (or
concatenate declaration and c_type if necessary) instead of just c_type, keeping
name as-is so functions/methods like DoxygenEntry.signature, the declaration
variable, and c_type are consistent for later type rendering.
---
Nitpick comments:
In `@fern/pages/c_api/c-api-neighbors-brute-force.md`:
- Line 73: Split the long run-on sentence into a short intro plus structured
bullet-like lines: state that the function builds a BRUTEFORCE index from a
DLManagedTensor, then list allowed DLDeviceType values (kDLCUDA, kDLCUDAHost,
kDLCUDAManaged, kDLCPU) on one line and list acceptable data-type conditions on
separate lines (kDLDataType.code == kDLFloat with bits == 32, and
kDLDataType.code == kDLFloat with bits == 16) so the constraints for
DLManagedTensor, DLDeviceType, and kDLDataType are clearly separated and easy to
scan.
- Line 102: Split the long single-paragraph description into clear bullet
points: one bullet listing allowed DLDeviceType values (DLManagedTensor with
DLDeviceType == kDLCUDA, kDLCUDAHost, kDLCUDAManaged), one bullet clarifying the
requirement that the BRUTEFORCE index must be built with the same query dtype
(compare index.dtype.code == queries.dl_tensor.dtype.code), and a final bullet
(or sub-bullets) enumerating input/output data-type constraints for queries,
neighbors, and distances (queries: kDLDataType.code == kDLFloat with
kDLDataType.bits == 32 or 16; neighbors: kDLDataType.code == kDLUInt and
kDLDataType.bits == 32; distances: kDLDataType.code == kDLFloat and
kDLDataType.bits == 32), using the symbols DLManagedTensor, queries, neighbors,
distances, and the kDL* constants to keep references clear.
In `@fern/pages/c_api/c-api-neighbors-ivf-pq.md`:
- Line 505: Change the compound modifier "PQ encoded vectors" to "PQ-encoded
vectors" in the documentation line that starts "Unpack `n_rows` consecutive PQ
encoded vectors of a single list (cluster)..." so it reads "Unpack `n_rows`
consecutive PQ-encoded vectors..."; keep the rest of the sentence intact
(including references to `offset`, `index.pq_dim()` and `index.pq_bits()`).
In `@fern/pages/c_api/c-api-neighbors-tiered-index.md`:
- Line 167: Split the long single-line description for TieredIndex into
structured bullet points mirroring the brute force API style: add a short intro
sentence referencing TieredIndex and DLManagedTensor, then a "Supported devices"
bullet listing DLDeviceType values (kDLCUDA, kDLCUDAHost, kDLCUDAManaged,
kDLCPU) and an "Acceptable data types" bullet with two sub-bullets for the float
formats (kDLDataType.code == kDLFloat and bits == 32; kDLDataType.code ==
kDLFloat and bits == 16); update the text mentioning DLManagedTensor and
DLDeviceType to use these bullets so the information is clearer and consistent
with the brute force docs.
In
`@fern/pages/cpp_api/cpp-api-common-types-copy-serialization-and-utility-apis.md`:
- Around line 7-8: The document currently jumps from the h1 title to h3 headings
like "### raft::copy"; add a new h2 section heading (for example "## RAFT
Utilities" or "## Core Utilities") immediately before the first h3 (the "###
raft::copy" anchor) to improve structure and follow Markdown hierarchy; ensure
the new h2 precedes other h3 subsections so headings descend H1 -> H2 -> H3.
In `@fern/pages/cpp_api/cpp-api-common-types-dense-array-views.md`:
- Around line 5-10: Add an h2 heading between the H1 "Dense Array Views" and the
existing H3 "raft::mdspan" to provide an intermediate section (e.g., "Core View
Types" or "Multi-dimensional Views"); update the markdown so the new heading is
a level-2 (##) line placed before the anchor/section for raft::mdspan, and
ensure any nearby anchors or links still point correctly to the raft::mdspan
subsection.
In `@fern/pages/cpp_api/cpp-api-common-types-dense-view-factories.md`:
- Around line 5-8: Add an intermediate h2 heading between the h1 "Dense View
Factories" and the existing h3 subsections (e.g., a descriptive h2 like "Factory
Functions" or "Overview of Dense View Factories") to restore proper heading
hierarchy; update the markdown near the h1 and before the
"raft::make_device_matrix_view" section so the page goes H1 -> H2 -> H3 and
ensure the new h2 is semantically appropriate for the group of functions such as
raft::make_device_matrix_view.
In `@fern/pages/cpp_api/cpp-api-common-types-errors-and-logging.md`:
- Around line 9-10: The document jumps from the top-level title straight to "###
raft::exception"; add an H2 section heading such as "## Error Handling" or "##
Error Handling and Logging APIs" immediately before the "### raft::exception"
subsection so the structure follows h1 → h2 → h3 hierarchy and improves
navigation; update the area around the "### raft::exception" anchor (a
id="raft-exception") to insert the new H2 heading while keeping the anchor and
subsequent "raft::exception" H3 unchanged.
In `@fern/pages/cpp_api/cpp-api-common-types-execution-resources.md`:
- Around line 5-10: Add an intermediate h2 heading beneath the main h1
"Execution Resources" to avoid jumping straight to h3s; insert a descriptive h2
(for example "Overview" or "Execution resources overview") directly before the
existing "### raft::resources" anchor so the document hierarchy is H1 -> H2 ->
H3, ensuring the section about raft::resources remains unchanged.
In `@fern/pages/cpp_api/cpp-api-common-types-layouts-and-extents.md`:
- Around line 5-10: The document jumps from the H1 "Layouts and Extents"
straight to H3 anchors like "raft::row_major"; add an H2 heading (e.g.,
"Overview" or "Layouts and Extents — Overview") immediately after the H1 and
before the <a id="raft-row-major"></a> anchor so the structure becomes H1 → H2 →
H3 and improves accessibility and TOC generation; update surrounding text to
briefly introduce raft layout and extent types under the new H2.
In `@fern/pages/cpp_api/cpp-api-common-types-owning-array-factories.md`:
- Around line 5-8: The document currently jumps from the H1 "Owning Array
Factories" directly to H3 entries like "raft::make_device_matrix"; insert an H2
intermediary (e.g., "Overview" or "Factories") between the H1 and the existing
H3s to restore proper heading hierarchy and accessibility, update the section
anchor if needed (reference: raft::make_device_matrix) and ensure the new H2
appears before the existing H3 subsections.
In `@fern/pages/cpp_api/cpp-api-common-types-owning-dense-arrays.md`:
- Around line 5-10: Add an intermediate h2 heading between the existing H1
"Owning Dense Arrays" and the H3 "raft::mdarray" to restore proper heading
hierarchy; update the markdown near the top of the file (around the H1 and the
"raft::mdarray" subsection) to insert a descriptive H2 such as "Overview" or
"Contents" so the structure becomes H1 -> H2 -> H3 (raft::mdarray).
In `@fern/pages/cpp_api/cpp-api-common-types-sparse-array-types.md`:
- Line 10: The heading for the top-level API entity "raft::device_csr_matrix" is
currently an h3 ("### raft::device_csr_matrix") and should be promoted to an h2
to maintain proper heading hierarchy; update the heading to "##
raft::device_csr_matrix" (and scan other top-level API entities in this file to
ensure they also use h2 instead of h3 where appropriate) so documentation
generators and TOC navigation work correctly.
In `@fern/pages/cpp_api/cpp-api-distance-distance.md`:
- Line 144: The line containing the sentence "Note: Only contiguous row- or
column-major layouts supported currently. Usage example:" reads awkwardly;
update each occurrence so the note and the "Usage example:" marker are separated
(e.g., put the note on its own sentence/line and follow with a separate "Usage
example:" heading) or remove the trailing "Usage example:" if there is no
example following it; ensure you update all occurrences of that exact sentence
in cpp-api-distance-distance.md so the note is clear and properly separated from
the usage marker.
In `@fern/pages/cpp_api/cpp-api-neighbors-dynamic-batching.md`:
- Line 60: Split the single long paragraph describing
neighbors::dynamic_batching::index into multiple paragraphs/subsections: keep
the main concept and lightweight/shared-pointer design in the first paragraph,
move the priority/queue behavior and search_params::dispatch_timeout_ms
aggregation into a separate "Priority queues" paragraph, and put the example
about constructing one batching index per priority class into a distinct "Usage
example" paragraph; ensure references to the dynamic batching index and
search_params::dispatch_timeout_ms remain intact so readers can locate the
details.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Enterprise
Run ID: b722d2de-48ef-411c-9d9f-06e6cddfd180
📒 Files selected for processing (100)
fern/docs.ymlfern/pages/api_guide.mdfern/pages/c_api/c-api-cluster-kmeans.mdfern/pages/c_api/c-api-core-c-api.mdfern/pages/c_api/c-api-distance-distance.mdfern/pages/c_api/c-api-neighbors-all-neighbors.mdfern/pages/c_api/c-api-neighbors-brute-force.mdfern/pages/c_api/c-api-neighbors-cagra.mdfern/pages/c_api/c-api-neighbors-common.mdfern/pages/c_api/c-api-neighbors-hnsw.mdfern/pages/c_api/c-api-neighbors-ivf-flat.mdfern/pages/c_api/c-api-neighbors-ivf-pq.mdfern/pages/c_api/c-api-neighbors-mg-cagra.mdfern/pages/c_api/c-api-neighbors-mg-common.mdfern/pages/c_api/c-api-neighbors-mg-ivf-flat.mdfern/pages/c_api/c-api-neighbors-mg-ivf-pq.mdfern/pages/c_api/c-api-neighbors-nn-descent.mdfern/pages/c_api/c-api-neighbors-tiered-index.mdfern/pages/c_api/c-api-neighbors-vamana.mdfern/pages/c_api/c-api-preprocessing-pca.mdfern/pages/c_api/c-api-preprocessing-quantize-binary.mdfern/pages/c_api/c-api-preprocessing-quantize-pq.mdfern/pages/c_api/c-api-preprocessing-quantize-scalar.mdfern/pages/c_api/index.mdfern/pages/core_types.mdfern/pages/cpp_api/cpp-api-cluster-agglomerative.mdfern/pages/cpp_api/cpp-api-cluster-kmeans.mdfern/pages/cpp_api/cpp-api-cluster-spectral.mdfern/pages/cpp_api/cpp-api-common-types-copy-serialization-and-utility-apis.mdfern/pages/cpp_api/cpp-api-common-types-dense-array-views.mdfern/pages/cpp_api/cpp-api-common-types-dense-view-factories.mdfern/pages/cpp_api/cpp-api-common-types-errors-and-logging.mdfern/pages/cpp_api/cpp-api-common-types-execution-resources.mdfern/pages/cpp_api/cpp-api-common-types-layouts-and-extents.mdfern/pages/cpp_api/cpp-api-common-types-owning-array-factories.mdfern/pages/cpp_api/cpp-api-common-types-owning-dense-arrays.mdfern/pages/cpp_api/cpp-api-common-types-sparse-array-types.mdfern/pages/cpp_api/cpp-api-common-types.mdfern/pages/cpp_api/cpp-api-distance-distance.mdfern/pages/cpp_api/cpp-api-distance-grammian.mdfern/pages/cpp_api/cpp-api-neighbors-all-neighbors.mdfern/pages/cpp_api/cpp-api-neighbors-ball-cover.mdfern/pages/cpp_api/cpp-api-neighbors-brute-force.mdfern/pages/cpp_api/cpp-api-neighbors-cagra.mdfern/pages/cpp_api/cpp-api-neighbors-common.mdfern/pages/cpp_api/cpp-api-neighbors-composite-index.mdfern/pages/cpp_api/cpp-api-neighbors-dynamic-batching.mdfern/pages/cpp_api/cpp-api-neighbors-epsilon-neighborhood.mdfern/pages/cpp_api/cpp-api-neighbors-hnsw.mdfern/pages/cpp_api/cpp-api-neighbors-ivf-flat.mdfern/pages/cpp_api/cpp-api-neighbors-ivf-pq.mdfern/pages/cpp_api/cpp-api-neighbors-nn-descent.mdfern/pages/cpp_api/cpp-api-neighbors-refine.mdfern/pages/cpp_api/cpp-api-neighbors-scann.mdfern/pages/cpp_api/cpp-api-neighbors-tiered-index.mdfern/pages/cpp_api/cpp-api-neighbors-vamana.mdfern/pages/cpp_api/cpp-api-preprocessing-pca.mdfern/pages/cpp_api/cpp-api-preprocessing-quantize-binary.mdfern/pages/cpp_api/cpp-api-preprocessing-quantize-pq.mdfern/pages/cpp_api/cpp-api-preprocessing-quantize-scalar.mdfern/pages/cpp_api/cpp-api-preprocessing-spectral-embedding.mdfern/pages/cpp_api/cpp-api-selection-select-k.mdfern/pages/cpp_api/cpp-api-stats-silhouette-score.mdfern/pages/cpp_api/cpp-api-stats-trustworthiness-score.mdfern/pages/cpp_api/cpp-api-util-cutlass-utils.mdfern/pages/cpp_api/cpp-api-util-file-io.mdfern/pages/cpp_api/index.mdfern/pages/go_api/go-api-brute-force.mdfern/pages/go_api/go-api-cagra.mdfern/pages/go_api/go-api-cuvs.mdfern/pages/go_api/go-api-ivf-flat.mdfern/pages/go_api/go-api-ivf-pq.mdfern/pages/go_api/index.mdfern/pages/index.mdfern/pages/java_api/index.mdfern/pages/other/multidimensional_arrays.mdfern/pages/other/sparse_arrays.mdfern/pages/rust_api/index.mdfern/pages/rust_api/rust-api-cuvs-brute-force.mdfern/pages/rust_api/rust-api-cuvs-cagra-index-params.mdfern/pages/rust_api/rust-api-cuvs-cagra-index.mdfern/pages/rust_api/rust-api-cuvs-cagra-search-params.mdfern/pages/rust_api/rust-api-cuvs-cagra.mdfern/pages/rust_api/rust-api-cuvs-cluster-kmeans-params.mdfern/pages/rust_api/rust-api-cuvs-cluster-kmeans.mdfern/pages/rust_api/rust-api-cuvs-distance.mdfern/pages/rust_api/rust-api-cuvs-dlpack.mdfern/pages/rust_api/rust-api-cuvs-error.mdfern/pages/rust_api/rust-api-cuvs-ivf-flat-index-params.mdfern/pages/rust_api/rust-api-cuvs-ivf-flat-index.mdfern/pages/rust_api/rust-api-cuvs-ivf-flat-search-params.mdfern/pages/rust_api/rust-api-cuvs-ivf-pq-index-params.mdfern/pages/rust_api/rust-api-cuvs-ivf-pq-index.mdfern/pages/rust_api/rust-api-cuvs-ivf-pq-search-params.mdfern/pages/rust_api/rust-api-cuvs-resources.mdfern/pages/rust_api/rust-api-cuvs-vamana-index-params.mdfern/pages/rust_api/rust-api-cuvs-vamana-index.mdfern/pages/rust_api/rust-api-cuvs.mdfern/pages/user_guide.mdfern/scripts/generate_api_reference.py
💤 Files with no reviewable changes (1)
- fern/pages/other/sparse_arrays.md
✅ Files skipped from review due to trivial changes (48)
- fern/pages/cpp_api/cpp-api-neighbors-epsilon-neighborhood.md
- fern/pages/c_api/c-api-distance-distance.md
- fern/pages/cpp_api/cpp-api-neighbors-tiered-index.md
- fern/pages/cpp_api/cpp-api-common-types.md
- fern/pages/go_api/go-api-brute-force.md
- fern/pages/c_api/c-api-neighbors-common.md
- fern/pages/cpp_api/cpp-api-util-cutlass-utils.md
- fern/pages/rust_api/index.md
- fern/pages/cpp_api/cpp-api-stats-trustworthiness-score.md
- fern/pages/c_api/c-api-neighbors-mg-common.md
- fern/pages/cpp_api/cpp-api-selection-select-k.md
- fern/pages/go_api/go-api-ivf-pq.md
- fern/pages/cpp_api/cpp-api-util-file-io.md
- fern/pages/rust_api/rust-api-cuvs-error.md
- fern/pages/c_api/c-api-neighbors-mg-ivf-pq.md
- fern/pages/go_api/go-api-ivf-flat.md
- fern/pages/java_api/index.md
- fern/pages/cpp_api/index.md
- fern/pages/rust_api/rust-api-cuvs-cluster-kmeans.md
- fern/pages/c_api/c-api-neighbors-all-neighbors.md
- fern/pages/c_api/c-api-preprocessing-quantize-binary.md
- fern/pages/go_api/go-api-cuvs.md
- fern/pages/rust_api/rust-api-cuvs-brute-force.md
- fern/pages/go_api/index.md
- fern/pages/rust_api/rust-api-cuvs-ivf-flat-index.md
- fern/pages/c_api/c-api-neighbors-ivf-flat.md
- fern/pages/cpp_api/cpp-api-preprocessing-quantize-scalar.md
- fern/pages/index.md
- fern/pages/rust_api/rust-api-cuvs-ivf-flat-index-params.md
- fern/pages/rust_api/rust-api-cuvs-distance.md
- fern/pages/rust_api/rust-api-cuvs-vamana-index-params.md
- fern/pages/rust_api/rust-api-cuvs-ivf-pq-index.md
- fern/pages/cpp_api/cpp-api-stats-silhouette-score.md
- fern/pages/api_guide.md
- fern/pages/rust_api/rust-api-cuvs-resources.md
- fern/pages/rust_api/rust-api-cuvs-ivf-pq-search-params.md
- fern/pages/rust_api/rust-api-cuvs-dlpack.md
- fern/pages/c_api/c-api-neighbors-nn-descent.md
- fern/pages/cpp_api/cpp-api-neighbors-refine.md
- fern/pages/go_api/go-api-cagra.md
- fern/pages/cpp_api/cpp-api-neighbors-brute-force.md
- fern/pages/cpp_api/cpp-api-neighbors-all-neighbors.md
- fern/pages/rust_api/rust-api-cuvs-ivf-flat-search-params.md
- fern/pages/c_api/index.md
- fern/pages/rust_api/rust-api-cuvs-cluster-kmeans-params.md
- fern/pages/rust_api/rust-api-cuvs-cagra-index.md
- fern/pages/cpp_api/cpp-api-cluster-agglomerative.md
- fern/pages/rust_api/rust-api-cuvs-cagra-index-params.md
🚧 Files skipped from review as they are similar to previous changes (3)
- fern/pages/core_types.md
- fern/pages/user_guide.md
- fern/pages/other/multidimensional_arrays.md
|
/ok to test d26722c |
|
/ok to test 0983050 |
|
/merge |
Adding several new pages to the API guides for core cuvs types-