mirror of
https://github.com/lancedb/lancedb.git
synced 2026-11-13 14:16:54 +00:00
## Summary Fixes the problems a page-by-page review of the docs found before launch, after checking each one against the current source and, where noted, the code. The matching fixes for the dataset and Geneva pages, which live in `lancedb/docs`, are in lancedb/docs#402. **Tables** - `integrations/embedding/cohere`: each input-type description was split across two table rows and wrapped in literal quotes (`"`search_document`"`). Now one row per type. - `integrations/embedding/gemini`: removes the same stray quotes from the task-type table. - `integrations/ai/langchain`: the MMR search table's `kwargs` row was missing a cell, so its description sat under Type. - Six reranker pages (answerdotai, cohere, colbert, jina, openai, voyageai): closes the backtick before `_relevance_score`. - `indexing/vector-index`: finishes a cell cut off at "with scalar". - `sql/dql/dedupe`: labels the empty header cell in the resolution table. **Corrections** - `curation/sampling`: sampling works in LanceDB Embedded through the Python SDK, so the page is available in both, with the SQL sections marked Enterprise. - `feature-engineering/index`, `add-computed-column`: automatic refresh is on by default for each computed column and takes effect once a deployment enables its scheduler. `refresh-column` already said so; these two implied it was off. - `indexing/scalar-index`, `indexing/index`: `LABEL_LIST` accelerates `array_has_all`/`array_has_any`; `array_contains_*` doesn't exist. Also merges scalar-index's two "nested fields" sections into one. - `integrations/embedding/ibm`: lists the four current models from `CURRENT_MODELS` (it listed a deprecated one) and explains that the default stays a legacy ID so existing tables reload with their model. - `integrations/reranking/openai`: the class is `OpenaiReranker`, not `OpenAI()`. - `integrations/ai/synthetic-data-kit`: the CLI is `synthetic-data-kit` throughout, each step runs one command, each step passes the file it writes to the next, and `save-as` uses `-f`/`-o`. - `integrations/data/dlt`: `secrets.toml` defines `api_token`, which the pipeline reads, and the run command runs the file the page creates. - `search/vector-search`: the multivector walkthrough connected to Enterprise in step 1 and a local path in step 2. It now runs locally throughout, with a note on connecting to Enterprise, and is renamed so it doesn't read as a duplicate of the short section above. **Structure and wording** - `integrations/embedding/nvidia`: adds headings, and drops test-suite details aimed at contributors. - `integrations/ai/genkit`: makes the retrieval test a real heading and describes the query step. - `integrations/data/voxel51`: replaces a raw MkDocs `!!! note` with a `<Note>`. - `sql/ddl/table`, `sql/ddl/job`: "Errors and limits" is a real heading, not bold text. - `curation/windowing`: sidebar title matches the curation overview ("Rank and Deduplicate"). - `deployment/storage`, `basics/agentic-skills`: fixes a garbled sentence and a stale reference to the quickstart. **Checked:** no new Vale alerts on the changed pages. Assembled together with lancedb/docs#402, the site passes `mint validate` and `mint broken-links --check-anchors --check-redirects`. Every changed page was reviewed in a local preview. 🤖 Generated with [Claude Code](https://claude.com/claude-code) --------- Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
68 lines
3.5 KiB
Plaintext
68 lines
3.5 KiB
Plaintext
---
|
|
title: IBM watsonx
|
|
sidebarTitle: IBM WatsonX
|
|
---
|
|
|
|
import { PyEmbeddingIbmUsage } from '/snippets/provider_examples.mdx';
|
|
|
|
Generate text embeddings using IBM's watsonx.ai platform.
|
|
|
|
## Supported Models {#supported-models}
|
|
|
|
You can find a list of supported models at [IBM watsonx.ai Documentation](https://dataplatform.cloud.ibm.com/docs/content/wsj/analyze-data/fm-models-embed.html?context=wx). The currently supported model names are:
|
|
|
|
| Model ID | Dimensions |
|
|
|----------------------------------------------|------------|
|
|
| `ibm/granite-embedding-278m-multilingual` | 768 |
|
|
| `ibm/slate-125m-english-rtrvr-v2` | 768 |
|
|
| `ibm/slate-30m-english-rtrvr-v2` | 384 |
|
|
| `intfloat/multilingual-e5-large` | 1024 |
|
|
|
|
<Info>
|
|
For new tables, pass `name="ibm/granite-embedding-278m-multilingual"`. The default `name` is still the legacy `ibm/slate-125m-english-rtrvr`, so tables created with it reload with the same model. Legacy and deprecated IDs (such as `ibm/slate-125m-english-rtrvr`, `sentence-transformers/all-minilm-l6-v2` and `sentence-transformers/all-minilm-l12-v2`) still work for tables whose stored metadata references them, but they aren't listed above for new use.
|
|
</Info>
|
|
|
|
## Parameters {#parameters}
|
|
|
|
The following parameters can be passed to the `create` method:
|
|
|
|
| Parameter | Type | Default Value | Description |
|
|
|------------|----------|----------------------------------|-----------------------------------------------------------|
|
|
| name | str | `"ibm/slate-125m-english-rtrvr"` | The model ID of the watsonx.ai model to use. Pass one of the current supported IDs above (e.g. `"ibm/granite-embedding-278m-multilingual"`) when creating new tables. |
|
|
| api_key | str | None | Optional IBM Cloud API key (or set `WATSONX_API_KEY`) |
|
|
| project_id | str | None | Optional watsonx project ID (or set `WATSONX_PROJECT_ID`). Mutually exclusive with `space_id`. |
|
|
| space_id | str | None | Optional watsonx deployment space ID (or set `WATSONX_SPACE_ID`). Mutually exclusive with `project_id`. |
|
|
| url | str | None | Optional custom URL for the watsonx.ai instance |
|
|
| params | dict | None | Optional additional parameters for the embedding model (e.g. `{"truncate_input_tokens": 512}`) |
|
|
|
|
<Info>
|
|
You must supply exactly one of `project_id` or `space_id` (either as an argument or via its environment variable). Setting both, or neither, raises a `ValueError`.
|
|
</Info>
|
|
|
|
## Usage Example {#usage-example}
|
|
|
|
First, the watsonx.ai library is an optional dependency, so must be installed separately:
|
|
|
|
```
|
|
pip install ibm-watsonx-ai
|
|
```
|
|
|
|
Optionally set environment variables (if not passing credentials to `create` directly):
|
|
|
|
```sh
|
|
export WATSONX_API_KEY="YOUR_WATSONX_API_KEY"
|
|
# Provide exactly one of the following:
|
|
export WATSONX_PROJECT_ID="YOUR_WATSONX_PROJECT_ID"
|
|
# export WATSONX_SPACE_ID="YOUR_WATSONX_SPACE_ID"
|
|
```
|
|
|
|
Replace the credential placeholders with your provider credentials. The registry
|
|
variable keeps the API key out of stored embedding configuration. In application
|
|
code, load its value from environment variables or a secrets manager.
|
|
|
|
<CodeGroup>
|
|
<CodeBlock filename="Python" language="Python" icon="python">
|
|
{PyEmbeddingIbmUsage}
|
|
</CodeBlock>
|
|
</CodeGroup>
|