Skip to content

Commit

Permalink
Removed db.vector.model and moved db.vector.search.similarity_metric …
Browse files Browse the repository at this point in the history
…in db.search.similarity_metric
  • Loading branch information
ezimuel committed Sep 25, 2024
1 parent 81dca47 commit ff03da1
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 19 deletions.
27 changes: 17 additions & 10 deletions docs/attributes-registry/db.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
- [Cassandra Attributes](#cassandra-attributes)
- [Azure Cosmos DB Attributes](#azure-cosmos-db-attributes)
- [Elasticsearch Attributes](#elasticsearch-attributes)
- [Search attributes](#search-attributes)
- [Db Vector Attributes](#db-vector-attributes)
- [Deprecated Database Attributes](#deprecated-database-attributes)
- [Deprecated Database Metrics](#deprecated-database-metrics)
Expand Down Expand Up @@ -204,19 +205,15 @@ This group defines attributes for Elasticsearch.

**[9]:** Many Elasticsearch url paths allow dynamic values. These SHOULD be recorded in span attributes in the format `db.elasticsearch.path_parts.<key>`, where `<key>` is the url path part name. The implementation SHOULD reference the [elasticsearch schema](https://raw.githubusercontent.com/elastic/elasticsearch-specification/main/output/schema/schema.json) in order to map the path part values to their names.

## Db Vector Attributes
## Search attributes

This group defines attributes for vector databases.
This group defines attributes for Search.

| Attribute | Type | Description | Examples | Stability |
| ----------------------------- | ------ | ---------------------------------------------------- | ------------------------ | ---------------------------------------------------------------- |
| `db.vector.dimension_count` | int | The dimension of the vector. | `3` | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
| `db.vector.field_name` | string | The name field as of the vector (e.g. a field name). | `vector` | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
| `db.vector.model` | string | The model used for the embedding. | `text-embedding-3-small` | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
| `db.vector.query.top_k` | int | The top-k most similar vectors returned by a query. | `5` | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
| `db.vector.similarity_metric` | string | The metric used in similarity search. | `cosine` | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
| Attribute | Type | Description | Examples | Stability |
| ----------------------------- | ------ | ------------------------------------- | -------- | ---------------------------------------------------------------- |
| `db.search.similarity_metric` | string | The metric used in similarity search. | `cosine` | ![Experimental](https://img.shields.io/badge/-experimental-blue) |

`db.vector.similarity_metric` has the following list of well-known values. If one of them applies, then the respective value MUST be used; otherwise, a custom value MAY be used.
`db.search.similarity_metric` has the following list of well-known values. If one of them applies, then the respective value MUST be used; otherwise, a custom value MAY be used.

| Value | Description | Stability |
| ----------- | ------------------------------ | ---------------------------------------------------------------- |
Expand All @@ -225,6 +222,16 @@ This group defines attributes for vector databases.
| `euclidean` | The euclidean distance metric. | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
| `manhattan` | The Manhattan distance metric. | ![Experimental](https://img.shields.io/badge/-experimental-blue) |

## Db Vector Attributes

This group defines attributes for vector databases.

| Attribute | Type | Description | Examples | Stability |
| --------------------------- | ------ | ---------------------------------------------------- | -------- | ---------------------------------------------------------------- |
| `db.vector.dimension_count` | int | The dimension of the vector. | `3` | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
| `db.vector.field_name` | string | The name field as of the vector (e.g. a field name). | `vector` | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
| `db.vector.query.top_k` | int | The top-k most similar vectors returned by a query. | `5` | ![Experimental](https://img.shields.io/badge/-experimental-blue) |

## Deprecated Database Attributes

"Describes deprecated db attributes."
Expand Down
19 changes: 10 additions & 9 deletions model/database/registry.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -541,11 +541,12 @@ groups:
reference the [elasticsearch schema](https://raw.githubusercontent.com/elastic/elasticsearch-specification/main/output/schema/schema.json)
in order to map the path part values to their names.
examples: ['db.elasticsearch.path_parts.index=test-index', 'db.elasticsearch.path_parts.doc_id=123']
- id: registry.db.vector
prefix: db.vector
- id: registry.db.search
prefix: db.search
type: attribute_group
display_name: Search attributes
brief: >
This group defines attributes for vector databases.
This group defines attributes for Search.
attributes:
- id: similarity_metric
type:
Expand Down Expand Up @@ -574,6 +575,12 @@ groups:
brief: >
The metric used in similarity search.
examples: 'cosine'
- id: registry.db.vector
prefix: db.vector
type: attribute_group
brief: >
This group defines attributes for vector databases.
attributes:
- id: field_name
type: string
stability: experimental
Expand All @@ -586,12 +593,6 @@ groups:
brief: >
The dimension of the vector.
examples: [3]
- id: model
type: string
stability: experimental
brief: >
The model used for the embedding.
examples: 'text-embedding-3-small'
- id: query.top_k
type: int
stability: experimental
Expand Down

0 comments on commit ff03da1

Please sign in to comment.