How to modify QdrantClient for custom indexing and queries in Kernel Memory? #810
Unanswered
michelschep
asked this question in
1. Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello everyone,
I'm looking for a way to put an index on a Qdrant collection while continuing to use
QdrantClient
. To achieve this, I need to add a custom property XYZ to theDefaultQdrantPayload
.Currently, the code base is somewhat generic, as in
QdrantClient<T>
. However, I can only useDefaultQdrantPayload
as the type for T. My question is: is there a way to use a derived class ofDefaultQdrantPayload
where I can add the additional XYZ property?The goal is to create an index on the XYZ property in Qdrant.
That's the first part of my issue.
In addition, I need to modify the Qdrant query generated by
QdrantClient
inGetSimilarListAsync
. The query is built using theSearchVectorsRequest
query builder, but I'd like to specify the XYZ property and its value. Currently, the builder only supports the use of tags, which are part of the inner payload of the Qdrant payload. Unfortunately, it's not possible to create an index on specific tags.To work around this, I copied the Qdrant folder from the Kernel Memory, added the XYZ property to
DefaultQdrantPayload
, and introduced aHavingXYZ
builder method inSearchVectorsRequest
. This solution works, but it's not ideal. I'd prefer a cleaner approach, such as configuring Kernel Memory or overriding specific components, rather than maintaining my own version of the Qdrant classes.Has anyone here encountered a similar issue or found a clean way to add index fields and use them in queries with
QdrantClient
? Am I missing some capability in the Kernel Memory that would allow me to achieve this?Thanks in advance for any advice!
Beta Was this translation helpful? Give feedback.
All reactions