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

Leverage Semantic Kernel memory for embeddings #282

Open
aaronpowell opened this issue Apr 5, 2024 · 0 comments
Open

Leverage Semantic Kernel memory for embeddings #282

aaronpowell opened this issue Apr 5, 2024 · 0 comments
Labels
enhancement New feature or request

Comments

@aaronpowell
Copy link

Semantic Kernel has memories which allows you to store data in a vector database (such as Postgres) and then retrieve it using semantic functions that SK understands.

I think it would be better to show off the workflow of using memory rather than the custom approach to managing embeddings and vector queries that is in eShop.

Note: Memory in SK is currently marked as Experimental, so it does pose a risk on adoption.

aaronpowell added a commit to aaronpowell/eShop that referenced this issue Apr 8, 2024
This moves from the custom solution for vector searching on Postgres, instead using the SK memory feature to do it. Added some new SK dependencies for the memory (and PG memory store), then removed the Embedding column from the current data model, as there is a new table with all that in it.

Refactored the seed logic to load the memory store using the previously generated embeddings.

Changed the CatalogAPI route to use the ISemanticTextMemory search feature to search memory, rather than the custom SQL query. This does mean we don't get distance surfaced, also, pagination is currently lost and SK memory doesn't support that (we could roll that ourselves if we want).

Included a fix so that AOAI can be deployed (issue dotnet#280), and pgadmin for easier debugging of the data in the database.
@jamesmontemagno jamesmontemagno added the enhancement New feature or request label May 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants