-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Add observability support for the existing Vector Stores #1244
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 observability support for the existing Vector Stores #1244
Conversation
Add observability support to: - Cassandra - Chroma - Elasticsearch - Milvus - Neo4j - OpenSearch - Qdrant - Redis - Typesense - Weaviate - Pinecone - Oracle - Gemifire - MongoDB - HanaDB Add autoconfiguration obsrvability for the above vector stores. Add integration tests for all vector stores.
a9e1036
to
057e26b
Compare
|
||
return VectorStoreObservationContext.builder(VectorStoreProvider.AZURE_VECTOR_STORE.value(), operationName) | ||
.withDimensions(this.embeddingModel.dimensions()) | ||
.withSimilarityMetric(this.initializeSchema ? VectorStoreSimilarityMetric.COSINE.value() : "Unknown") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should it be null
instead of "Unknown"
, so that the observation value will end up being KeyValue.NONE
? For other attributes, when we can't infer the value, we fall back to "none".
return VectorStoreObservationContext.builder(VectorStoreProvider.CHROMA_VECTOR_STORE.value(), operationName) | ||
.withDimensions(this.embeddingModel.dimensions()) | ||
.withCollectionName(this.collectionName + ":" + this.collectionId) | ||
.withFieldName(this.initializeSchema ? DISTANCE_FIELD_NAME : KeyValue.NONE_VALUE); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would suggest keeping KeyValue
concepts outside the vector store implementation and instead set it to null
, so that we let the conventions handle "null" values (users might provide their implementation of the Conventions and decide to handle "null" values differently than KeyValue.NONE_VALUE
).
@@ -23,6 +23,22 @@ public enum VectorStoreProvider { | |||
|
|||
// @formatter:off | |||
PG_VECTOR("pg_vector"), | |||
AZURE_VECTOR_STORE("azure_vector_store"), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would keep these names framework-agnostic for better interoperability with LLM observability backends. For example, I would use chroma
and elasticsearch
instead of chroma_vector_store
and elasticsearch_vector_store
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agree. It also improves the readability.
Thanks for the suggestions @ThomasVitale |
@tzolov super! It's so great to get observability instrumentation for all vector stores! |
merged in 93fa2bf |
Related to #1243