Skip to content

Python: Feature python vector stores preb #12271

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

Open
wants to merge 15 commits into
base: main
Choose a base branch
from

Conversation

eavanvalkenburg
Copy link
Member

Motivation and Context

Overhaul of the VectorStores to get it matching with dotnet and the latest development there.

Closes:

Description

Many changes, some highlights:

  • Moved from different vector fields types, to a single with a enum first VectorStoreField()
  • Renamed several items
  • Made embeddinggenerrator a part of the vector field spec and do automatic vectorization from there or from the same param on a collection
  • Adds hybrid search using the same setup
  • Removed the intermediate TextSeachVectorSearch object need, by allowing create_search_function directly on a collection

Will write out full changes in a migration guide in the docs.

Contribution Checklist

@eavanvalkenburg eavanvalkenburg requested a review from a team as a code owner May 26, 2025 14:34
@eavanvalkenburg eavanvalkenburg marked this pull request as draft May 26, 2025 14:34
@markwallace-microsoft markwallace-microsoft added python Pull requests for the Python Semantic Kernel documentation memory labels May 26, 2025
@github-actions github-actions bot changed the title Feature python vector stores preb Python: Feature python vector stores preb May 26, 2025
@markwallace-microsoft markwallace-microsoft added .NET Issue or Pull requests regarding .NET code kernel Issues or pull requests impacting the core kernel kernel.core labels May 26, 2025
@github-actions github-actions bot changed the title Python: Feature python vector stores preb .Net: Python: Feature python vector stores preb May 26, 2025
<!-- Thank you for your contribution to the semantic-kernel repo!
Please help reviewers and future users, providing the following
information:
  1. Why is this change required?
  2. What problem does it solve?
  3. What scenario does it contribute to?
  4. If it fixes an open issue, please link to the issue here.
-->
Updates to the core vector store setup, including renaming of params,
and conceptual change in VectorStoreVectorField
And the accompanying implementation for AZS

<!-- Describe your changes, the overall approach, the underlying design.
These notes will help understanding how your code works. Thanks! -->

<!-- Before submitting this PR, please make sure: -->

- [x] The code builds clean without any errors or warnings
- [x] The PR follows the [SK Contribution
Guidelines](https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md)
and the [pre-submission formatting
script](https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md#development-scripts)
raises no violations
- [x] All unit tests pass, and I have added new tests where possible
- [ ] I didn't break anyone 😄
### Motivation and Context

<!-- Thank you for your contribution to the semantic-kernel repo!
Please help reviewers and future users, providing the following
information:
  1. Why is this change required?
  2. What problem does it solve?
  3. What scenario does it contribute to?
  4. If it fixes an open issue, please link to the issue here.
-->
Updating the cosmos and mongodb integrations

### Description

<!-- Describe your changes, the overall approach, the underlying design.
These notes will help understanding how your code works. Thanks! -->

### Contribution Checklist

<!-- Before submitting this PR, please make sure: -->

- [x] The code builds clean without any errors or warnings
- [x] The PR follows the [SK Contribution
Guidelines](https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md)
and the [pre-submission formatting
script](https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md#development-scripts)
raises no violations
- [x] All unit tests pass, and I have added new tests where possible
- [ ] I didn't break anyone 😄
### Motivation and Context

<!-- Thank you for your contribution to the semantic-kernel repo!
Please help reviewers and future users, providing the following
information:
  1. Why is this change required?
  2. What problem does it solve?
  3. What scenario does it contribute to?
  4. If it fixes an open issue, please link to the issue here.
-->
Updates for Chroma, Pinecone and Postgres

### Description

<!-- Describe your changes, the overall approach, the underlying design.
These notes will help understanding how your code works. Thanks! -->

### Contribution Checklist

<!-- Before submitting this PR, please make sure: -->

- [ ] The code builds clean without any errors or warnings
- [ ] The PR follows the [SK Contribution
Guidelines](https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md)
and the [pre-submission formatting
script](https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md#development-scripts)
raises no violations
- [ ] All unit tests pass, and I have added new tests where possible
- [ ] I didn't break anyone 😄
### Motivation and Context

<!-- Thank you for your contribution to the semantic-kernel repo!
Please help reviewers and future users, providing the following
information:
  1. Why is this change required?
  2. What problem does it solve?
  3. What scenario does it contribute to?
  4. If it fixes an open issue, please link to the issue here.
-->
Updates for in-memory and faiss connectors

### Description

<!-- Describe your changes, the overall approach, the underlying design.
These notes will help understanding how your code works. Thanks! -->

### Contribution Checklist

<!-- Before submitting this PR, please make sure: -->

- [ ] The code builds clean without any errors or warnings
- [ ] The PR follows the [SK Contribution
Guidelines](https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md)
and the [pre-submission formatting
script](https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md#development-scripts)
raises no violations
- [ ] All unit tests pass, and I have added new tests where possible
- [ ] I didn't break anyone 😄
### Motivation and Context

<!-- Thank you for your contribution to the semantic-kernel repo!
Please help reviewers and future users, providing the following
information:
  1. Why is this change required?
  2. What problem does it solve?
  3. What scenario does it contribute to?
  4. If it fixes an open issue, please link to the issue here.
-->
Update for Qdrant, Redis, Weaviate

### Description

<!-- Describe your changes, the overall approach, the underlying design.
These notes will help understanding how your code works. Thanks! -->

### Contribution Checklist

<!-- Before submitting this PR, please make sure: -->

- [ ] The code builds clean without any errors or warnings
- [ ] The PR follows the [SK Contribution
Guidelines](https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md)
and the [pre-submission formatting
script](https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md#development-scripts)
raises no violations
- [ ] All unit tests pass, and I have added new tests where possible
- [ ] I didn't break anyone 😄
### Motivation and Context

<!-- Thank you for your contribution to the semantic-kernel repo!
Please help reviewers and future users, providing the following
information:
  1. Why is this change required?
  2. What problem does it solve?
  3. What scenario does it contribute to?
  4. If it fixes an open issue, please link to the issue here.
-->
Updates for SQL

### Description

<!-- Describe your changes, the overall approach, the underlying design.
These notes will help understanding how your code works. Thanks! -->

### Contribution Checklist

<!-- Before submitting this PR, please make sure: -->

- [ ] The code builds clean without any errors or warnings
- [ ] The PR follows the [SK Contribution
Guidelines](https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md)
and the [pre-submission formatting
script](https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md#development-scripts)
raises no violations
- [ ] All unit tests pass, and I have added new tests where possible
- [ ] I didn't break anyone 😄
### Motivation and Context

<!-- Thank you for your contribution to the semantic-kernel repo!
Please help reviewers and future users, providing the following
information:
  1. Why is this change required?
  2. What problem does it solve?
  3. What scenario does it contribute to?
  4. If it fixes an open issue, please link to the issue here.
-->
Move all the old connectors to memory_store and deprecated old memory
classes

### Description

<!-- Describe your changes, the overall approach, the underlying design.
These notes will help understanding how your code works. Thanks! -->

### Contribution Checklist

<!-- Before submitting this PR, please make sure: -->

- [ ] The code builds clean without any errors or warnings
- [ ] The PR follows the [SK Contribution
Guidelines](https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md)
and the [pre-submission formatting
script](https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md#development-scripts)
raises no violations
- [ ] All unit tests pass, and I have added new tests where possible
- [ ] I didn't break anyone 😄
### Motivation and Context

<!-- Thank you for your contribution to the semantic-kernel repo!
Please help reviewers and future users, providing the following
information:
  1. Why is this change required?
  2. What problem does it solve?
  3. What scenario does it contribute to?
  4. If it fixes an open issue, please link to the issue here.
-->
Updates to the TextSearch interface, and the implementation for Google
and Brave, removing Bing

### Description

<!-- Describe your changes, the overall approach, the underlying design.
These notes will help understanding how your code works. Thanks! -->

### Contribution Checklist

<!-- Before submitting this PR, please make sure: -->

- [ ] The code builds clean without any errors or warnings
- [ ] The PR follows the [SK Contribution
Guidelines](https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md)
and the [pre-submission formatting
script](https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md#development-scripts)
raises no violations
- [ ] All unit tests pass, and I have added new tests where possible
- [ ] I didn't break anyone 😄
### Motivation and Context

<!-- Thank you for your contribution to the semantic-kernel repo!
Please help reviewers and future users, providing the following
information:
  1. Why is this change required?
  2. What problem does it solve?
  3. What scenario does it contribute to?
  4. If it fixes an open issue, please link to the issue here.
-->
Final update with last pieces and the samples

### Description

<!-- Describe your changes, the overall approach, the underlying design.
These notes will help understanding how your code works. Thanks! -->

### Contribution Checklist

<!-- Before submitting this PR, please make sure: -->

- [ ] The code builds clean without any errors or warnings
- [ ] The PR follows the [SK Contribution
Guidelines](https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md)
and the [pre-submission formatting
script](https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md#development-scripts)
raises no violations
- [ ] All unit tests pass, and I have added new tests where possible
- [ ] I didn't break anyone 😄
<!-- Thank you for your contribution to the semantic-kernel repo!
Please help reviewers and future users, providing the following
information:
  1. Why is this change required?
  2. What problem does it solve?
  3. What scenario does it contribute to?
  4. If it fixes an open issue, please link to the issue here.
-->
This pull request introduces several updates across multiple files to
standardize naming conventions, improve consistency in method calls, and
modernize data model definitions. The primary changes include renaming
key classes and methods, replacing deprecated fields with updated ones,
and ensuring uniformity in collection management operations.

* Replaced `VectorStoreRecordDataField`, `VectorStoreRecordKeyField`,
and `VectorStoreRecordVectorField` with `VectorStoreDataField`,
`VectorStoreKeyField`, and `VectorStoreVectorField` respectively across
all relevant files.
[[1]](diffhunk://#diff-df5224582cd487ed94306045bd09dcd32ccbd9b3f82a63184d037ebe02d34b17R16-R19)
[[2]](diffhunk://#diff-bff31c838fdfdb680d4dbdd3a24764dfd8a316b89b7d2ea466234edb98b68e9dL10-L18)
[[3]](diffhunk://#diff-af84e00363a79d8bd2f3b72976ecc95c0744fcdf89930ac9b058bfd27b27b83eL18-R18)
[[4]](diffhunk://#diff-c7a1b7cdeb95d9cdf398adc0cead91e30fcee1c6abff046f2933f0ac361d3982L30-R36)
[[5]](diffhunk://#diff-4c45e261749985abb60b9bd147b2bd2cb91fdfda869190da1f56c89032667eefL11-R14)
* Updated data models in `semantic_caching.py`,
`store_chat_history_in_cosmosdb.py`, and other files to use the new
field types for consistency.
[[1]](diffhunk://#diff-df5224582cd487ed94306045bd09dcd32ccbd9b3f82a63184d037ebe02d34b17L35-R37)
[[2]](diffhunk://#diff-bff31c838fdfdb680d4dbdd3a24764dfd8a316b89b7d2ea466234edb98b68e9dL42-R44)
[[3]](diffhunk://#diff-af84e00363a79d8bd2f3b72976ecc95c0744fcdf89930ac9b058bfd27b27b83eL63-R80)

* Renamed `create_collection_if_not_exists` to
`ensure_collection_exists` and `delete_collection` to
`ensure_collection_deleted` for clarity and consistency.
[[1]](diffhunk://#diff-df5224582cd487ed94306045bd09dcd32ccbd9b3f82a63184d037ebe02d34b17L68-R68)
[[2]](diffhunk://#diff-bff31c838fdfdb680d4dbdd3a24764dfd8a316b89b7d2ea466234edb98b68e9dL194-R194)
[[3]](diffhunk://#diff-3ad17b6faefe0a6ac2fff5b863169e5aac7ab99c49d4f376ba46f2d0d181b642L67-R67)
* Updated method calls in various files to reflect these changes.
[[1]](diffhunk://#diff-df5224582cd487ed94306045bd09dcd32ccbd9b3f82a63184d037ebe02d34b17L89-R89)
[[2]](diffhunk://#diff-c7a1b7cdeb95d9cdf398adc0cead91e30fcee1c6abff046f2933f0ac361d3982L150-R149)

* Renamed `AzureCosmosDBNoSQLStore` to `CosmosNoSqlStore` and
`AzureCosmosDBNoSQLCollection` to `CosmosNoSqlCollection`. Similar
updates were made to MongoDB-related classes.
[[1]](diffhunk://#diff-bff31c838fdfdb680d4dbdd3a24764dfd8a316b89b7d2ea466234edb98b68e9dL178-R178)
[[2]](diffhunk://#diff-c7a1b7cdeb95d9cdf398adc0cead91e30fcee1c6abff046f2933f0ac361d3982L16-R18)

* Replaced `data_model_type` with `record_type` in collection
initialization across multiple files for uniformity.
[[1]](diffhunk://#diff-df5224582cd487ed94306045bd09dcd32ccbd9b3f82a63184d037ebe02d34b17L53-R53)
[[2]](diffhunk://#diff-bff31c838fdfdb680d4dbdd3a24764dfd8a316b89b7d2ea466234edb98b68e9dL67-R69)
[[3]](diffhunk://#diff-c7a1b7cdeb95d9cdf398adc0cead91e30fcee1c6abff046f2933f0ac361d3982L99-R123)

* Consolidated imports for improved readability and maintainability.
[[1]](diffhunk://#diff-df5224582cd487ed94306045bd09dcd32ccbd9b3f82a63184d037ebe02d34b17R16-R19)
[[2]](diffhunk://#diff-af84e00363a79d8bd2f3b72976ecc95c0744fcdf89930ac9b058bfd27b27b83eL18-R18)
* Adjusted default values and annotations in data models to align with
the updated field types.
[[1]](diffhunk://#diff-4c45e261749985abb60b9bd147b2bd2cb91fdfda869190da1f56c89032667eefL47-R58)
[[2]](diffhunk://#diff-4c45e261749985abb60b9bd147b2bd2cb91fdfda869190da1f56c89032667eefL72-R71)

These changes collectively enhance the maintainability and readability
of the codebase while ensuring alignment with modern conventions.

<!-- Describe your changes, the overall approach, the underlying design.
These notes will help understanding how your code works. Thanks! -->

Closes: #11938

<!-- Before submitting this PR, please make sure: -->

- [x] The code builds clean without any errors or warnings
- [x] The PR follows the [SK Contribution
Guidelines](https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md)
and the [pre-submission formatting
script](https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md#development-scripts)
raises no violations
- [x] All unit tests pass, and I have added new tests where possible
- [x] I didn't break anyone 😄
### Motivation and Context

<!-- Thank you for your contribution to the semantic-kernel repo!
Please help reviewers and future users, providing the following
information:
  1. Why is this change required?
  2. What problem does it solve?
  3. What scenario does it contribute to?
  4. If it fixes an open issue, please link to the issue here.
-->
Removed VectorStore...Fields in favor of a single VectorStoreField
Redid the logic that adds vectors
Improved samples

### Description

<!-- Describe your changes, the overall approach, the underlying design.
These notes will help understanding how your code works. Thanks! -->

### Contribution Checklist

<!-- Before submitting this PR, please make sure: -->

- [x] The code builds clean without any errors or warnings
- [x] The PR follows the [SK Contribution
Guidelines](https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md)
and the [pre-submission formatting
script](https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md#development-scripts)
raises no violations
- [x] All unit tests pass, and I have added new tests where possible
- [x] I didn't break anyone 😄
<!-- Thank you for your contribution to the semantic-kernel repo!
Please help reviewers and future users, providing the following
information:
  1. Why is this change required?
  2. What problem does it solve?
  3. What scenario does it contribute to?
  4. If it fixes an open issue, please link to the issue here.
-->
This pull request introduces several updates across multiple files to
standardize naming conventions, improve consistency in method calls, and
modernize data model definitions. The primary changes include renaming
key classes and methods, replacing deprecated fields with updated ones,
and ensuring uniformity in collection management operations.

* Replaced `VectorStoreRecordDataField`, `VectorStoreRecordKeyField`,
and `VectorStoreRecordVectorField` with `VectorStoreDataField`,
`VectorStoreKeyField`, and `VectorStoreVectorField` respectively across
all relevant files.
[[1]](diffhunk://#diff-df5224582cd487ed94306045bd09dcd32ccbd9b3f82a63184d037ebe02d34b17R16-R19)
[[2]](diffhunk://#diff-bff31c838fdfdb680d4dbdd3a24764dfd8a316b89b7d2ea466234edb98b68e9dL10-L18)
[[3]](diffhunk://#diff-af84e00363a79d8bd2f3b72976ecc95c0744fcdf89930ac9b058bfd27b27b83eL18-R18)
[[4]](diffhunk://#diff-c7a1b7cdeb95d9cdf398adc0cead91e30fcee1c6abff046f2933f0ac361d3982L30-R36)
[[5]](diffhunk://#diff-4c45e261749985abb60b9bd147b2bd2cb91fdfda869190da1f56c89032667eefL11-R14)
* Updated data models in `semantic_caching.py`,
`store_chat_history_in_cosmosdb.py`, and other files to use the new
field types for consistency.
[[1]](diffhunk://#diff-df5224582cd487ed94306045bd09dcd32ccbd9b3f82a63184d037ebe02d34b17L35-R37)
[[2]](diffhunk://#diff-bff31c838fdfdb680d4dbdd3a24764dfd8a316b89b7d2ea466234edb98b68e9dL42-R44)
[[3]](diffhunk://#diff-af84e00363a79d8bd2f3b72976ecc95c0744fcdf89930ac9b058bfd27b27b83eL63-R80)

* Renamed `create_collection_if_not_exists` to
`ensure_collection_exists` and `delete_collection` to
`ensure_collection_deleted` for clarity and consistency.
[[1]](diffhunk://#diff-df5224582cd487ed94306045bd09dcd32ccbd9b3f82a63184d037ebe02d34b17L68-R68)
[[2]](diffhunk://#diff-bff31c838fdfdb680d4dbdd3a24764dfd8a316b89b7d2ea466234edb98b68e9dL194-R194)
[[3]](diffhunk://#diff-3ad17b6faefe0a6ac2fff5b863169e5aac7ab99c49d4f376ba46f2d0d181b642L67-R67)
* Updated method calls in various files to reflect these changes.
[[1]](diffhunk://#diff-df5224582cd487ed94306045bd09dcd32ccbd9b3f82a63184d037ebe02d34b17L89-R89)
[[2]](diffhunk://#diff-c7a1b7cdeb95d9cdf398adc0cead91e30fcee1c6abff046f2933f0ac361d3982L150-R149)

* Renamed `AzureCosmosDBNoSQLStore` to `CosmosNoSqlStore` and
`AzureCosmosDBNoSQLCollection` to `CosmosNoSqlCollection`. Similar
updates were made to MongoDB-related classes.
[[1]](diffhunk://#diff-bff31c838fdfdb680d4dbdd3a24764dfd8a316b89b7d2ea466234edb98b68e9dL178-R178)
[[2]](diffhunk://#diff-c7a1b7cdeb95d9cdf398adc0cead91e30fcee1c6abff046f2933f0ac361d3982L16-R18)

* Replaced `data_model_type` with `record_type` in collection
initialization across multiple files for uniformity.
[[1]](diffhunk://#diff-df5224582cd487ed94306045bd09dcd32ccbd9b3f82a63184d037ebe02d34b17L53-R53)
[[2]](diffhunk://#diff-bff31c838fdfdb680d4dbdd3a24764dfd8a316b89b7d2ea466234edb98b68e9dL67-R69)
[[3]](diffhunk://#diff-c7a1b7cdeb95d9cdf398adc0cead91e30fcee1c6abff046f2933f0ac361d3982L99-R123)

* Consolidated imports for improved readability and maintainability.
[[1]](diffhunk://#diff-df5224582cd487ed94306045bd09dcd32ccbd9b3f82a63184d037ebe02d34b17R16-R19)
[[2]](diffhunk://#diff-af84e00363a79d8bd2f3b72976ecc95c0744fcdf89930ac9b058bfd27b27b83eL18-R18)
* Adjusted default values and annotations in data models to align with
the updated field types.
[[1]](diffhunk://#diff-4c45e261749985abb60b9bd147b2bd2cb91fdfda869190da1f56c89032667eefL47-R58)
[[2]](diffhunk://#diff-4c45e261749985abb60b9bd147b2bd2cb91fdfda869190da1f56c89032667eefL72-R71)

These changes collectively enhance the maintainability and readability
of the codebase while ensuring alignment with modern conventions.

<!-- Describe your changes, the overall approach, the underlying design.
These notes will help understanding how your code works. Thanks! -->

Closes: #11938

<!-- Before submitting this PR, please make sure: -->

- [x] The code builds clean without any errors or warnings
- [x] The PR follows the [SK Contribution
Guidelines](https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md)
and the [pre-submission formatting
script](https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md#development-scripts)
raises no violations
- [x] All unit tests pass, and I have added new tests where possible
- [x] I didn't break anyone 😄
@eavanvalkenburg eavanvalkenburg force-pushed the feature-python-vector-stores-preb branch from 6b6770a to 44164e6 Compare May 26, 2025 18:10
@markwallace-microsoft markwallace-microsoft removed .NET Issue or Pull requests regarding .NET code kernel Issues or pull requests impacting the core kernel kernel.core labels May 26, 2025
@eavanvalkenburg eavanvalkenburg changed the title .Net: Python: Feature python vector stores preb Python: Feature python vector stores preb May 26, 2025
@markwallace-microsoft
Copy link
Member

markwallace-microsoft commented May 26, 2025

Python Test Coverage

Python Test Coverage Report •
FileStmtsMissCoverMissing
__init__.py40100% 
const.py70100% 
kernel_types.py100100% 
connectors
   _search_shared.py280100% 
   azure_ai_search.py3032791%159–160, 208, 210–213, 215, 244, 246, 248, 339, 361–362, 423, 425, 439–440, 451, 522, 544, 554, 566, 586–587, 781–782
   azure_cosmos_db.py40116658%184, 201, 207–209, 319, 321, 396, 400, 416–419, 421–424, 426–427, 440–443, 446–448, 454–455, 457, 464–466, 470–472, 495–497, 503–505, 511–512, 514, 519, 536, 624, 627–628, 636, 646–650, 705, 708–709, 745, 747, 760–761, 765–767, 778–781, 784–785, 787–788, 793–797, 800–803, 805–810, 812–813, 820–825, 844–846, 848–851, 859, 866–871, 873–887, 889–900, 903, 905–906, 909–910, 913, 915–920, 926, 930, 954, 982–983, 987–992, 1081–1086
   brave.py1422383%28, 171, 177, 187, 206–209, 245, 250, 252, 270–281
   chroma.py2558965%104, 107–111, 126–127, 135–136, 165, 167, 175, 187–190, 197, 216, 220, 241, 249, 253, 266, 270, 275–276, 285–288, 304–305, 313, 332, 343, 345, 349, 367–369, 371–386, 388–398, 400–406, 408, 410, 412–413, 416–417, 419–420, 423–425, 447–448, 450
   faiss.py1191289%48, 58–59, 63–64, 121, 129, 133, 170, 217, 220, 240
   google_search.py1452185%29, 217, 227, 249–254, 269–270, 303–312
   in_memory.py1692386%69–70, 74, 78–81, 116, 128, 130, 171, 175, 179, 194, 211, 226, 266–267, 269, 276–277, 282, 317
   memory.py10100%3, 5, 48–53, 56–57
   mongodb.py25812850%100–101, 105, 117–120, 125–126, 133–134, 139–140, 149, 200, 254, 282, 284, 294–296, 302–304, 311, 315, 327–328, 336, 347–351, 360–363, 366–368, 374–375, 377, 384–386, 390–392, 404–407, 410–412, 418–419, 421, 428–430, 434–436, 444–446, 448–463, 465–475, 477–483, 485–490, 492, 494–495, 498–499, 501–502, 505–507, 512, 516, 577–578, 580, 622–623, 627–628
   pinecone.py3337976%130, 144–147, 152, 157, 183, 216, 220–221, 228, 250, 254, 282, 310–313, 329, 375, 377, 382, 389, 400, 402, 404, 406, 409, 418, 420, 424, 439, 441, 443, 448, 455, 467, 474, 476, 501–507, 513, 515, 519–528, 531–536, 539–541, 543, 549–551, 556, 561, 567–568, 571, 595, 664
   postgres.py37110172%139, 157, 184, 297–298, 383, 389–391, 396–397, 399–400, 407, 429, 485, 487, 489, 506, 518, 568, 577, 627, 647, 667, 672, 678, 690, 720, 724, 726, 748, 775, 780, 797, 854–856, 858–884, 886–892, 894–899, 901, 903–904, 907–908, 910–911, 914–923, 925, 930, 934, 961–963
   qdrant.py2515777%249, 251, 287, 306–310, 316–317, 320–321, 327–330, 332, 334, 351, 375–381, 388, 391, 394–403, 406–411, 414–418, 423, 429–430, 433, 436–437, 495, 509
   redis.py41417058%102, 107, 120, 123, 127–129, 133–134, 137, 147–151, 164–165, 299, 304–305, 316–321, 324–325, 333–335, 337, 344–348, 350, 352–354, 363, 369, 371, 375–385, 387–389, 391–401, 403–423, 425, 427–446, 449–461, 463–468, 470, 472–473, 476–477, 479–480, 483–485, 501–506, 510, 566, 568, 631–638, 694, 696, 747–754, 837, 844–845
   search.py10100%3, 5, 19–24, 27–28
   sql_server.py5018882%152, 349–351, 371, 390, 401, 403, 426, 472–475, 491, 503–506, 528, 530, 574–580, 586–587, 589–590, 594–608, 611–616, 619–623, 628, 634–635, 638, 643, 645–648, 787, 806–808, 814, 820, 825, 830–833, 839, 873, 915, 922–924, 1090–1091, 1093, 1095, 1116
   weaviate.py33514257%110, 315–318, 327–328, 330–332, 337, 341–342, 353–355, 364–372, 375–376, 380–381, 384–386, 389–390, 395–396, 399–400, 402, 411–413, 415–424, 426, 428–443, 447–453, 455, 457, 459–460, 463–464, 466–467, 470–472, 482–483, 486–487, 493–494, 497–498, 502, 505–509, 524, 539, 548–549, 563, 567–570, 573–574, 580–581, 585, 588–589, 592, 595, 615, 634, 650, 659–660, 665–666, 671, 765, 776–781, 786–791, 796–797
connectors/ai/embeddings
   embedding_generator_base.py10190%9
connectors/ai/hugging_face
   hf_prompt_execution_settings.py24195%33
connectors/ai/hugging_face/services
   hf_text_embedding.py32584%84–88
connectors/ai/open_ai/prompt_execution_settings
   azure_chat_prompt_execution_settings.py730100% 
core_plugins
   text_memory_plugin.py33875%14, 43, 72, 78–80, 82, 103
data
   __init__.py00100% 
   _shared.py62985%136, 142, 168, 172–173, 175, 178–179, 181
   text_search.py69494%229, 240, 277, 279
   vector.py66711882%83, 413, 579, 698, 896–899, 905, 907–908, 1026, 1064–1065, 1068, 1075, 1095–1102, 1104, 1106–1107, 1109, 1111, 1114–1119, 1121–1126, 1148, 1171, 1251–1253, 1333, 1484, 1499, 1505–1506, 1508, 1535, 1609–1610, 1622–1623, 1652, 1737, 1742–1745, 1859, 1886–1887, 1926, 1946, 1954–1955, 1967, 1974, 2019, 2022, 2076–2078, 2081, 2090, 2113, 2115–2120, 2122–2127, 2131–2137, 2141–2146, 2149–2151, 2153, 2181, 2192, 2206, 2214, 2253, 2277, 2291, 2337, 2377
exceptions
   vector_store_exceptions.py240100% 
functions
   kernel_plugin.py174398%395, 398, 411
TOTAL26293444583% 

Python Unit Test Overview

Tests Skipped Failures Errors Time
3600 18 💤 0 ❌ 0 🔥 1m 52s ⏱️

### Motivation and Context

<!-- Thank you for your contribution to the semantic-kernel repo!
Please help reviewers and future users, providing the following
information:
  1. Why is this change required?
  2. What problem does it solve?
  3. What scenario does it contribute to?
  4. If it fixes an open issue, please link to the issue here.
-->
Simplified the orderby clause for key-less get
renamed some files and removed const

Moved some things around again :)

now we have data.text_search for all things related to text_search
and data.vectors for all things vector collections and vector search
No dependencies on each other, although they both use _search assets,
but they reexport what they use, so that developers can always count on
getting all related stuff from data.vectors or data.text_search


### Description

<!-- Describe your changes, the overall approach, the underlying design.
These notes will help understanding how your code works. Thanks! -->

### Contribution Checklist

<!-- Before submitting this PR, please make sure: -->

- [x] The code builds clean without any errors or warnings
- [x] The PR follows the [SK Contribution
Guidelines](https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md)
and the [pre-submission formatting
script](https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md#development-scripts)
raises no violations
- [x] All unit tests pass, and I have added new tests where possible
- [x] I didn't break anyone 😄
@eavanvalkenburg eavanvalkenburg marked this pull request as ready for review May 28, 2025 06:30
### Motivation and Context

<!-- Thank you for your contribution to the semantic-kernel repo!
Please help reviewers and future users, providing the following
information:
  1. Why is this change required?
  2. What problem does it solve?
  3. What scenario does it contribute to?
  4. If it fixes an open issue, please link to the issue here.
-->
Integration test fixes for the vector stores

### Description

<!-- Describe your changes, the overall approach, the underlying design.
These notes will help understanding how your code works. Thanks! -->

### Contribution Checklist

<!-- Before submitting this PR, please make sure: -->

- [ ] The code builds clean without any errors or warnings
- [ ] The PR follows the [SK Contribution
Guidelines](https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md)
and the [pre-submission formatting
script](https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md#development-scripts)
raises no violations
- [ ] All unit tests pass, and I have added new tests where possible
- [ ] I didn't break anyone 😄
return True

@abstractmethod
async def create_collection(self, **kwargs: Any) -> None:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We actually removed this method, and only have ensure_collection_exists now.

"""
... # pragma: no cover

async def delete_create_collection(self, **kwargs: Any) -> None:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

FYI, we don't have something like this on the c# side.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Really? I got it from there... It's it not in mevd?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

... # pragma: no cover

@abstractmethod
async def does_collection_exist(self, **kwargs: Any) -> bool:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

FYI, we are just calling this collection_exists on the c# side.

"""Get the names of all collections."""
... # pragma: no cover

async def does_collection_exist(self, collection_name: str) -> bool:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

FYI, we have this as collection_exists on the c# side.



@release_candidate
class VectorSearch(VectorStoreRecordHandler[TKey, TModel], Generic[TKey, TModel]):
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

FYI, we are calling this VectorSearchable on the c# side.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation memory python Pull requests for the Python Semantic Kernel
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants