semantic-kernel icon indicating copy to clipboard operation
semantic-kernel copied to clipboard

.Net: Qdrant memory connector http call optimization

Open atiq-bs23 opened this issue 1 year ago • 3 comments

Motivation and Context

To improve performance by reducing the number of HTTP requests needed to delete keys in RemoveAsync and RemoveBatchAsync.

Description

The updated RemoveAsync and RemoveBatchAsync methods in QdrantMemoryStore now send a single HTTP request to remove a single key or a list of keys, instead of executing two separate HTTP calls for each key deletion. This change minimizes network overhead and improves performance.

Reference API documentation: Qdrant - Delete payload

Contribution Checklist

  • [ ] The code builds clean without any errors or warnings
  • [ ] The PR follows the SK Contribution Guidelines and the pre-submission formatting script raises no violations
  • [ ] All unit tests pass, and I have updated the existing tests for RemoveAsync and RemoveBatchAsync
  • [ ] I didn't break anyone :smile:

atiq-bs23 avatar Jul 17 '24 08:07 atiq-bs23

@westey-m @RogerBarreto Can you please review this pull request?

atiq-bs23 avatar Jul 17 '24 08:07 atiq-bs23

@westey-m @RogerBarreto Can you please review this pull request?

@atiq-bs23, I realise you have a sent a few PRs, and we have been a bit slow reviewing some of these recently. We will hopefully get more time to help review and test soon. Also for your awareness, we are working on some new memory abstractions that will allow more flexibility in how the data is stored, and also allow reading existing stores with any schema, instead of just the fixed schema that the memory connectors have today. This will replace the existing memory connectors over time and we are aiming to release a preview soon. That said, improvements to the existing connectors are still welcome, as far as they are cheap and easy to implement.

westey-m avatar Jul 26 '24 15:07 westey-m

@westey-m @RogerBarreto Can you please review this pull request?

@atiq-bs23, I realise you have a sent a few PRs, and we have been a bit slow reviewing some of these recently. We will hopefully get more time to help review and test soon. Also for your awareness, we are working on some new memory abstractions that will allow more flexibility in how the data is stored, and also allow reading existing stores with any schema, instead of just the fixed schema that the memory connectors have today. This will replace the existing memory connectors over time and we are aiming to release a preview soon. That said, improvements to the existing connectors are still welcome, as far as they are cheap and easy to implement.

@westey-m Thank you for the update. I have seen some of your recent changes regarding memory connector redesign. I'm looking forward to the upcoming preview and the flexibility it will bring. I appreciate your support.

atiq-bs23 avatar Jul 26 '24 16:07 atiq-bs23

@atiq-bs23 we have recently announced a new Microsoft.Extensions.VectorData.Abstractions package which we have developed in partnership with the .NET team. We have also started migrating our memory connectors to use these new abstractions and plan to obsolete the old implementations. So we are not taking any new changes to the older memory connectors. Thanks for your interest in the Semantic Kernel and your contributions.

markwallace-microsoft avatar Nov 19 '24 10:11 markwallace-microsoft