microsoft / kernel-memory

RAG architecture: index and query any data using LLM and natural language, track sources, show citations, asynchronous memory patterns.
https://microsoft.github.io/kernel-memory
MIT License
1.35k stars 252 forks source link

Elasticsearch latest #494

Closed afederici75 closed 1 month ago

afederici75 commented 1 month ago

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

-Ported additional tests from FML's original repo -Added Elasticsearch support for TestMemoryFilters and TestCosineSimilarity

High level description (Approach, Design)

Changes in Elasticsearch:

-Removed all Free Mind Labs, Inc. copyright in both extension and test project.
-Refactored IndexNameHelper and turned it into a static class.
-Adjusted ElasticsearchMemoryDb to the changes in IndexNameHelper.  

Elasticsearch.UnitTests

-Removed Usings.cs
-Created MemoryDbFunctionalTest which descends from KM's BaseFunctionalTestCase, thus providing access to configuration and other common things.
-Refactored all tests to inherit from MemoryDbFunctionalTest and be consitent with KM's.    
-I had to remove my additional SearchTests. The changes I made to 

All Elasticsearch tests pass: -DefaultTests (11) -Additional (35)

Microsoft.KM.Core.Functional.... tests pass: -TestMemoryFilters -TestCosineSimilarity

dluc commented 1 month ago

Sorry I'm still unable to make changes to the PR for some reason, I don't know why. I just tried to push fixes to indentation and removing unused imports, but instead of updating the PR github created a new branch. This is the same approach I used with other PRs, I don't know what's different with this one.

You can see my commit on your repo at https://github.com/freemindlabsinc/kernel-memory/compare/elasticsearch_latest...microsoft%3Akernel-memory%3Aelasticsearch_latest, but the commit is not propagating to the PR

image

dluc commented 1 month ago

I'll reuse the workaround of having a temporary dev branch, merging this PR into dev, and then fixing dev, and merging dev into main.

dluc commented 1 month ago

image