Skip to content

Python: .Net: MEVD Preview 2 APR 2025 - #11028

Merged
westey (westey-m) merged 87 commits into
mainfrom
feature-vector-data-preb2
Apr 29, 2025
Merged

westey (westey-m) merged 87 commits into
mainfrom
feature-vector-data-preb2

Conversation

@westey-m

Copy link
Copy Markdown
Contributor

Motivation and Context

Description

Contribution Checklist

Shay Rojansky (roji) and others added 19 commits January 24, 2025 20:29
Implement LINQ-based vector search filtering
    
Closes #10156
Does most of #10194
And the obsoleted Filter to OldFilter. Continues #10273.
### Description

Merging changes from main and resolving merge conflicts

### 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 😄

---------

Signed-off-by: dependabot[bot] <support@github.com>
Signed-off-by: Vincent Biret <vibiret@microsoft.com>
Co-authored-by: Evan Mattson <35585003+moonbox3@users.noreply.github.com>
Co-authored-by: Dmytro Struk <13853051+dmytrostruk@users.noreply.github.com>
Co-authored-by: Chris <66376200+crickman@users.noreply.github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Tao Chen <taochen@microsoft.com>
Co-authored-by: Roger Barreto <19890735+RogerBarreto@users.noreply.github.com>
Co-authored-by: Mark Wallace <127216156+markwallace-microsoft@users.noreply.github.com>
Co-authored-by: Estefanía Tenorio <8483207+esttenorio@users.noreply.github.com>
Co-authored-by: davidpene <d.c.pene@gmail.com>
Co-authored-by: ThDuquennoy <tduquennoy@chapsvision.com>
Co-authored-by: Thomas DUQUENNOY <Thomas.DUQUENNOY@sinequa.com>
Co-authored-by: Eduard van Valkenburg <eavanvalkenburg@users.noreply.github.com>
Co-authored-by: Evan Mattson <evan.mattson@microsoft.com>
Co-authored-by: Rob Emanuele <rdemanuele@gmail.com>
Co-authored-by: K. Andrew Parker <andrew+github@rationarium.org>
Co-authored-by: SergeyMenshykh <68852919+SergeyMenshykh@users.noreply.github.com>
Co-authored-by: jenfoxbot <jen.fox@microsoft.com>
Co-authored-by: Ben Thomas <ben.thomas@microsoft.com>
Co-authored-by: Ben Thomas <bentho@microsoft.com>
Co-authored-by: Adit Sheth <shethaadit@gmail.com>
Co-authored-by: Adit Sheth <adsheth@microsoft.com>
Co-authored-by: ふぁー <47295014+ymuichiro@users.noreply.github.com>
Co-authored-by: Vincent Biret <vibiret@microsoft.com>
Co-authored-by: David A. Torres <10944960+davidatorres@users.noreply.github.com>
Co-authored-by: Genevieve Warren <24882762+gewarren@users.noreply.github.com>
Co-authored-by: Atiqur Rahman Foyshal <113086917+atiq-bs23@users.noreply.github.com>
Co-authored-by: Md. Atiqur Rahman Foyshal <atiqur.foyshal@brainstation-23.com>
Co-authored-by: Fabian Williams <92543063+fabianwilliams@users.noreply.github.com>
Co-authored-by: fabian.williams@microsoft.com <fabianwilliams@users.noreply.github.com>
Co-authored-by: Ram.Type-0 <39725073+RamType0@users.noreply.github.com>
Co-authored-by: Tommy Falgout <tommy@lastcoolnameleft.com>
Co-authored-by: Gary Tang <113477176+gtang31-te@users.noreply.github.com>
Co-authored-by: Eirik Tsarpalis <eirik.tsarpalis@gmail.com>
Co-authored-by: Tommaso Stocchi <tstocchi@microsoft.com>
Co-authored-by: Chris Rickman <crickman@microsoft.com>
Co-authored-by: Devis Lucato <dluc@users.noreply.github.com>
Co-authored-by: K. Andrew Parker <kparker@citytech.cuny.edu>
Co-authored-by: Jose Luis Latorre Millas <joslat@gmail.com>
Co-authored-by: Carsten Lemm <clemm@microsoft.com>
Co-authored-by: Stephen Toub <stoub@microsoft.com>
Co-authored-by: Musale Martin <martinmshale@gmail.com>
Co-authored-by: Ross Smith <ross-p-smith@users.noreply.github.com>
### Motivation and Context

Adding hybrid search to March release branch

### Description

Adding hybrid search to March release branch

### 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 😄
fixes #10416

---------

Co-authored-by: westey <164392973+westey-m@users.noreply.github.com>
Co-authored-by: Shay Rojansky <roji@roji.org>
fixes #10420

---------

Co-authored-by: westey <164392973+westey-m@users.noreply.github.com>
### 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.
-->

Related: #10596

This PR enhances the vector store functionality by adding builder
pattern implementations and logging decorators for key vector data
interfaces, along with supporting utilities and DI integration.

Interfaces handled:
- `IKeywordHybridSearch<TRecord>`
- `IVectorizableTextSearch<TRecord>`
- `IVectorizedSearch<TRecord>`
- `IVectorStore`
- `IVectorStoreRecordCollection<TKey, TRecord>`

Class types added:
- Builders: implement a pipeline pattern with `Use` and `Build` methods.
- Logging Extensions: provide reusable logging methods for tasks and
enumerables, handling success, failure and cancellation.
- Logging Decorators: wrap the interfaces to add logging by using
`LoggingExtensions` reusable logging methods.
- Builder Extensions: Add `AsBuilder` methods to convert service
instances into builders.
- Logging Builder Extensions: Add `UseLogging` methods to integrate
logging into builder pipelines.
- Service Collection Extensions: Add `Add{T}` and `AddKeyed{T}` methods
for DI registration with configurable lifetimes.

Other changes:
- Split `Verify` class into `Verify` and `KernelVerify` in order to be
able to use `Verify` methods in `Microsoft.Extensions.VectorData`
package without a reference to Semantic Kernel specific logic, like
`ValidPluginName`, `ValidFunctionName` etc.
- Added unit tests for new classes and methods.
- Added usage example in `Concepts/Memory` folder.

### Usage example
Logging with manual registration:
```csharp
var vectorStore = new InMemoryVectorStore()
    .AsBuilder()
    .UseLogging(this.LoggerFactory)
    .Build();
```

Logging with DI:
```csharp
serviceCollection.AddInMemoryVectorStore();

serviceCollection
    .AddVectorStore(s => s.GetRequiredService<InMemoryVectorStore>())
    .UseLogging(this.LoggerFactory);
```

### 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 😄
@markwallace-microsoft Mark Wallace (markwallace-microsoft) added .NET Issue or Pull requests regarding .NET code kernel Issues or pull requests impacting the core kernel memory labels Mar 18, 2025
@github-actions github-actions Bot changed the title MEVD Preview VNext (DRAFT) .Net: MEVD Preview VNext (DRAFT) Mar 18, 2025
This is a refactor-only change, with no functional changes. It extracts
out all logic for identifying and processing captured variables
("parameters") out to a new FilterTranslationProcessor connectos support
type in MEVD.

* Most databases don't support parameterization; for these we simply
inline the captured variables. Connector translators see these as
constants without ever having to know about captured variables etc.
* SQL databases do support parameterization. For these, the preprocessor
transforms the captured variable (which is a complex tree construct)
into a simple QueryParameterExpression, which can easily be
pattern-matched in connector translator code.

This is preparatory work for #11673 (we need a centralized place to do
this kind of thing).
Adds support for using IEmbeddingGenerator to generate embeddings from
arbitrary user property types.

Closes #10492
Closes #11527
…p publishing DuckDB and Kusto connectors. (#11743)

### Motivation and Context

- We are suppressing the SKEXP0020 experimental flag everywhere, but it
is mostly not being used anymore, so removing unnecessary suppressions.
- Also removing / replacing any MemoryStore samples, to stop advertising
them, since it will be obsoleted in future.
- Stopping publishing the DuckDB and Kusto connectors, since we won't be
building VectorStore implementations for them.

#10918
#8540

### 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 😄
westey (westey-m) and others added 7 commits April 28, 2025 16:50
### Motivation and Context

#11480

### Description

- remove any samples doing any kind of mapping.

### 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

Fix AzureAISearch tests and two small bugs.
Improve MongoDB tests with a small fix too.
Fix CosmosNoSQL integration tests
Fixes for postgres and mongodb
Fixes for redis

### 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

We changed the storage type of the InMemory store to contain a wrapper
with both
the original record and generated vectors, and this code was returning
the wrapper
instead of the original record on get.

### 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

We have some broken links in the readme's and they are still referring
to memory store which is being replaced.

### Description

- Updated readme files to not advertise memory store anymore.
- Updated readme files to point to learn site docs.

### 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

The docker container for mongo db is often not accessible when running
the tests

### Description

- Switching to the mongo db test container to try and reduce the
flakiness of the tests
- Adding retries

### 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 😄

This branch was previously deployed

1 inactive deployment
integration — 81f8151f Deployed Apr 29, 2025 by westey-m
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation kernel.core kernel Issues or pull requests impacting the core kernel memory .NET Issue or Pull requests regarding .NET code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants