Skip to content
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

Fix embeddings not being returned in Azure AI Search memory #867

Merged
merged 3 commits into from
Oct 30, 2024

Conversation

alexmg
Copy link
Contributor

@alexmg alexmg commented Oct 30, 2024

Motivation and Context (Why the change? What's the scenario?)

The withEmbeddings parameter for the GetSimilarListAsync and GetListAsync methods on the AzureAISearchMemory class are not being applied because the vector field in the search index is not retrievable.

High level description (Approach, Design)

Ensure that the index is created with the vector field as retrievable so the option can be applied.

  • Add a VectorSearchField to the schema with the IsHidden and IsStored property values set
  • Create a private method that sets the Select fields on the SearchOptions to ensure only needed fields are returned

@alexmg alexmg requested a review from dluc as a code owner October 30, 2024 00:34
@dluc
Copy link
Collaborator

dluc commented Oct 30, 2024

Comparing old and new schema.

Before:

image

After:

image

Diff shows only 1 change 👍

image

@dluc dluc merged commit b00d1a0 into microsoft:main Oct 30, 2024
6 checks passed
@alexmg alexmg deleted the AISearchWithEmbeddings branch October 30, 2024 09:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants