Skip to content

Commit eed4b78

Browse files
authored
Fix Postgres records ordering + Docs update (#224)
* Fix Postgres search by similarity SQL to sort records by similarity (descending) * Update docs, add links to nuget packages
1 parent 164f1f6 commit eed4b78

File tree

16 files changed

+167
-47
lines changed

16 files changed

+167
-47
lines changed

COMMUNITY.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,5 +25,4 @@ We have a growing and active channel on Discord where you can get help, engage
2525
in lively discussion, and share what you've built with Kernel Memory and
2626
Semantic Kernel!
2727

28-
Join our Discord:
29-
[https://aka.ms/SKDiscord](https://aka.ms/SKDiscord)
28+
[Join our Discord](https://aka.ms/KMdiscord)

README.md

Lines changed: 77 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,16 @@
11
# Kernel Memory
22

33
[![License: MIT](https://img.shields.io/github/license/microsoft/kernel-memory)](https://github.com/microsoft/kernel-memory/blob/main/LICENSE)
4-
[![Discord](https://img.shields.io/discord/1063152441819942922?label=Discord&logo=discord&logoColor=white&color=d82679)](https://aka.ms/SKDiscord)
4+
[![Discord](https://img.shields.io/discord/1063152441819942922?label=Discord&logo=discord&logoColor=white&color=d82679)](https://aka.ms/KMdiscord)
55

6-
**Kernel Memory** (KM) is an open-source [service](service/Service/README.md) and
7-
[plugin](https://www.microsoft.com/en-us/microsoft-365/blog/2023/05/23/empowering-every-developer-with-plugins-for-microsoft-365-copilot/)
6+
**Kernel Memory** (KM) is a **multi-modal [AI Service](service/Service/README.md)**
87
specialized in the efficient indexing of datasets through custom continuous data
9-
hybrid pipelines. For some scenarios KM is also available as a library, and soon
10-
as a Docker container.
8+
hybrid pipelines, with support for
9+
**[Retrieval Augmented Generation](https://en.wikipedia.org/wiki/Prompt_engineering#Retrieval-augmented_generation)** (RAG),
10+
synthetic memory, prompt engineering, and custom semantic memory processing.
11+
12+
KM includes a GPT **[Plugin](https://www.microsoft.com/en-us/microsoft-365/blog/2023/05/23/empowering-every-developer-with-plugins-for-microsoft-365-copilot/)**,
13+
**web clients**, a .NET library for embedded applications, and soon as a Docker container.
1114

1215
![image](https://github.com/microsoft/kernel-memory/assets/371009/31894afa-d19e-4e9b-8d0f-cb889bf5c77f)
1316

@@ -22,23 +25,6 @@ Designed for seamless integration as a Plugin with
2225
Copilot and ChatGPT, Kernel Memory enhances data-driven features in applications
2326
built for most popular AI platforms.
2427

25-
## Repository Guidance
26-
27-
This repository is a public resource designed to showcase best practices and efficient architecture
28-
for specific programming scenarios. Although bug fixes and secure, scalable enhancements are part
29-
of our focus, rigorous reviews and strategic considerations of the code are recommended before
30-
production use. Similar to the nature of AI development, the project will rapidly evolve. We warmly
31-
welcome you to participate in the development of Kernel Memory. Feel free to contribute opening
32-
GitHub Issues, sending us PRs, and joining our Discord community. Thank you and happy coding!
33-
34-
### Packages for Python, Java and other languages
35-
36-
A python package with a Web Client and Semantic Kernel plugin will soon be available.
37-
We also welcome PR contributions to support more languages.
38-
39-
In the meantime you can easily connect to Kernel Memory web service following the
40-
existing **OpenAPI** swagger at http://127.0.0.1:9001/swagger/index.html.
41-
4228
### .NET packages
4329

4430
* **Microsoft.KernelMemory.WebClient:** The web client library, can be used to call
@@ -53,17 +39,74 @@ existing **OpenAPI** swagger at http://127.0.0.1:9001/swagger/index.html.
5339
[![Nuget package](https://img.shields.io/nuget/vpre/Microsoft.KernelMemory.SemanticKernelPlugin)](https://www.nuget.org/packages/Microsoft.KernelMemory.SemanticKernelPlugin/)
5440
[![Example code](https://img.shields.io/badge/example-code-blue)](examples/011-dotnet-using-MemoryPlugin)
5541

42+
* **Microsoft.KernelMemory.Abstractions:** The internal interfaces and models
43+
shared by all packages, used to extend KM to support third party services.
44+
.NET Standard 2.0 compatible.
45+
46+
[![Nuget package](https://img.shields.io/nuget/v/Microsoft.KernelMemory.Abstractions)](https://www.nuget.org/packages/Microsoft.KernelMemory.Abstractions/)
47+
48+
* **Microsoft.KernelMemory.MemoryDb.AzureAISearch:** Memory storage using
49+
**[Azure AI Search](extensions/AzureAISearch)**.
50+
51+
[![Nuget package](https://img.shields.io/nuget/v/Microsoft.KernelMemory.MemoryDb.AzureAISearch)](https://www.nuget.org/packages/Microsoft.KernelMemory.MemoryDb.AzureAISearch/)
52+
53+
* **Microsoft.KernelMemory.MemoryDb.Postgres:** Memory storage using
54+
**[PostgreSQL](extensions/Postgres)**.
55+
56+
[![Nuget package](https://img.shields.io/nuget/v/Microsoft.KernelMemory.MemoryDb.Postgres)](https://www.nuget.org/packages/Microsoft.KernelMemory.MemoryDb.Postgres/)
57+
58+
* **Microsoft.KernelMemory.MemoryDb.Qdrant:** Memory storage using
59+
**[Qdrant](extensions/Qdrant)**.
60+
61+
[![Nuget package](https://img.shields.io/nuget/v/Microsoft.KernelMemory.MemoryDb.Qdrant)](https://www.nuget.org/packages/Microsoft.KernelMemory.MemoryDb.Qdrant/)
62+
63+
* **Microsoft.KernelMemory.AI.AzureOpenAI:** Integration with **[Azure OpenAI](extensions/OpenAI)** LLMs.
64+
65+
[![Nuget package](https://img.shields.io/nuget/v/Microsoft.KernelMemory.AI.AzureOpenAI)](https://www.nuget.org/packages/Microsoft.KernelMemory.AI.AzureOpenAI/)
66+
67+
* **Microsoft.KernelMemory.AI.LlamaSharp:** Integration with **[LLama](extensions/LlamaSharp)** LLMs.
68+
69+
[![Nuget package](https://img.shields.io/nuget/v/Microsoft.KernelMemory.AI.LlamaSharp)](https://www.nuget.org/packages/Microsoft.KernelMemory.AI.LlamaSharp/)
70+
71+
* **Microsoft.KernelMemory.AI.OpenAI:** Integration with **[OpenAI](extensions/OpenAI)** LLMs.
72+
73+
[![Nuget package](https://img.shields.io/nuget/v/Microsoft.KernelMemory.AI.OpenAI)](https://www.nuget.org/packages/Microsoft.KernelMemory.AI.OpenAI/)
74+
75+
* **Microsoft.KernelMemory.DataFormats.AzureAIDocIntel:** Integration with
76+
[Azure AI Document Intelligence](extensions/AzureAIDocIntel).
77+
78+
[![Nuget package](https://img.shields.io/nuget/v/Microsoft.KernelMemory.DataFormats.AzureAIDocIntel)](https://www.nuget.org/packages/Microsoft.KernelMemory.DataFormats.AzureAIDocIntel/)
79+
80+
* **Microsoft.KernelMemory.Orchestration.AzureQueues:** Ingestion and synthetic memory
81+
pipelines via [Azure Queue Storage](extensions/AzureQueues).
82+
83+
[![Nuget package](https://img.shields.io/nuget/v/Microsoft.KernelMemory.Orchestration.AzureQueues)](https://www.nuget.org/packages/Microsoft.KernelMemory.Orchestration.AzureQueues/)
84+
85+
* **Microsoft.KernelMemory.Orchestration.RabbitMQ:** Ingestion and synthetic memory
86+
pipelines via [RabbitMQ](extensions/RabbitMQ).
87+
88+
[![Nuget package](https://img.shields.io/nuget/v/Microsoft.KernelMemory.Orchestration.RabbitMQ)](https://www.nuget.org/packages/Microsoft.KernelMemory.Orchestration.RabbitMQ/)
89+
90+
* **Microsoft.KernelMemory.ContentStorage.AzureBlobs:** Used to store content on
91+
[Azure Storage Blobs](extensions/AzureBlobs).
92+
93+
[![Nuget package](https://img.shields.io/nuget/v/Microsoft.KernelMemory.ContentStorage.AzureBlobs)](https://www.nuget.org/packages/Microsoft.KernelMemory.ContentStorage.AzureBlobs/)
94+
5695
* **Microsoft.KernelMemory.Core:** The core library, can be used to build custom
5796
pipelines and handlers, and contains a serverless client to use memory in a
5897
synchronous way, without the web service. .NET 6+.
5998

6099
[![Nuget package](https://img.shields.io/nuget/vpre/Microsoft.KernelMemory.Core)](https://www.nuget.org/packages/Microsoft.KernelMemory.Core/)
61100
[![Example code](https://img.shields.io/badge/example-code-blue)](examples/001-dotnet-Serverless)
62101

63-
* **Microsoft.KernelMemory.Abstractions:** The internal interfaces and models
64-
shared by all packages. .NET Standard 2.0 compatible.
102+
### Packages for Python, Java and other languages
103+
104+
Kernel Memory service offers a **Web API** out of the box, including the **OpenAPI
105+
swagger** documentation that you can leverage to test the API and create custom
106+
web clients. For instance, after starting the service locally, see http://127.0.0.1:9001/swagger/index.html.
65107

66-
[![Nuget package](https://img.shields.io/nuget/vpre/Microsoft.KernelMemory.Abstractions)](https://www.nuget.org/packages/Microsoft.KernelMemory.Abstractions/)
108+
A python package with a Web Client and Semantic Kernel plugin will soon be available.
109+
We also welcome PR contributions to support more languages.
67110

68111
### Data formats
69112

@@ -355,3 +398,12 @@ running the service locally with OpenAPI enabled.
355398
5. [Script to start RabbitMQ for development tasks](tools/run-rabbitmq.sh)
356399
6. [.NET appsettings.json generator](tools/InteractiveSetup)
357400
401+
## Repository Guidance
402+
403+
This repository is a public resource designed to showcase best practices and efficient architecture
404+
for specific programming scenarios. Although bug fixes and secure, scalable enhancements are part
405+
of our focus, rigorous reviews and strategic considerations of the code are recommended before
406+
production use. Similar to the nature of AI development, the project will rapidly evolve. We warmly
407+
welcome you to participate in the development of Kernel Memory. Feel free to contribute opening
408+
GitHub Issues, sending us PRs, and joining our Discord community. Thank you and happy coding!
409+

extensions/AzureAIDocIntel/README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
# Kernel Memory with Azure AI Document Intelligence
22

3-
[![Discord](https://img.shields.io/discord/1063152441819942922?label=Discord&logo=discord&logoColor=white&color=d82679)](https://aka.ms/SKDiscord)
3+
[![Nuget package](https://img.shields.io/nuget/v/Microsoft.KernelMemory.DataFormats.AzureAIDocIntel)](https://www.nuget.org/packages/Microsoft.KernelMemory.DataFormats.AzureAIDocIntel/)
4+
[![Discord](https://img.shields.io/discord/1063152441819942922?label=Discord&logo=discord&logoColor=white&color=d82679)](https://aka.ms/KMdiscord)
45

56
This project contains the [Azure AI Document Intelligence](https://azure.microsoft.com/products/ai-services/ai-document-intelligence)
67
adapter allowing to use the Azure service in Kernel Memory to extract content

extensions/AzureAISearch/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Kernel Memory with Azure AI Search
22

3-
[//]: # ([![Nuget package](https://img.shields.io/nuget/Microsoft.KernelMemory.MemoryDb.AzureAISearch)](https://www.nuget.org/packages/Microsoft.KernelMemory.MemoryDb.AzureAISearch/))
4-
[![Discord](https://img.shields.io/discord/1063152441819942922?label=Discord&logo=discord&logoColor=white&color=d82679)](https://aka.ms/SKDiscord)
3+
[![Nuget package](https://img.shields.io/nuget/v/Microsoft.KernelMemory.MemoryDb.AzureAISearch)](https://www.nuget.org/packages/Microsoft.KernelMemory.MemoryDb.AzureAISearch/)
4+
[![Discord](https://img.shields.io/discord/1063152441819942922?label=Discord&logo=discord&logoColor=white&color=d82679)](https://aka.ms/KMdiscord)
55

66
This project contains the [Azure AI Search](https://azure.microsoft.com/products/ai-services/ai-search)
77
adapter allowing to use Kernel Memory with Azure AI Search.

extensions/AzureBlobs/README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
# Kernel Memory with Azure Blob Storage
22

3-
[![Discord](https://img.shields.io/discord/1063152441819942922?label=Discord&logo=discord&logoColor=white&color=d82679)](https://aka.ms/SKDiscord)
3+
[![Nuget package](https://img.shields.io/nuget/v/Microsoft.KernelMemory.ContentStorage.AzureBlobs)](https://www.nuget.org/packages/Microsoft.KernelMemory.ContentStorage.AzureBlobs/)
4+
[![Discord](https://img.shields.io/discord/1063152441819942922?label=Discord&logo=discord&logoColor=white&color=d82679)](https://aka.ms/KMdiscord)
45

56
This project contains the [Azure Blob Storage](https://learn.microsoft.com/azure/storage/blobs)
67
adapter allowing Kernel Memory to upload documents and maintain their state in Azure Blobs.

extensions/AzureOpenAI/README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
# Kernel Memory with Azure OpenAI
22

3-
[![Discord](https://img.shields.io/discord/1063152441819942922?label=Discord&logo=discord&logoColor=white&color=d82679)](https://aka.ms/SKDiscord)
3+
[![Nuget package](https://img.shields.io/nuget/v/Microsoft.KernelMemory.AI.AzureOpenAI)](https://www.nuget.org/packages/Microsoft.KernelMemory.AI.AzureOpenAI/)
4+
[![Discord](https://img.shields.io/discord/1063152441819942922?label=Discord&logo=discord&logoColor=white&color=d82679)](https://aka.ms/KMdiscord)
45

56
This project contains the [Azure OpenAI](https://azure.microsoft.com/products/ai-services/openai-service)
67
LLM connector to access to Azure OpenAI LLM models and generate embeddings and text.

extensions/AzureQueues/README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
# Kernel Memory with Azure Queue Storage
22

3-
[![Discord](https://img.shields.io/discord/1063152441819942922?label=Discord&logo=discord&logoColor=white&color=d82679)](https://aka.ms/SKDiscord)
3+
[![Nuget package](https://img.shields.io/nuget/v/Microsoft.KernelMemory.Orchestration.AzureQueues)](https://www.nuget.org/packages/Microsoft.KernelMemory.Orchestration.AzureQueues/)
4+
[![Discord](https://img.shields.io/discord/1063152441819942922?label=Discord&logo=discord&logoColor=white&color=d82679)](https://aka.ms/KMdiscord)
45

56
This project contains the [Azure Queue Storage](https://learn.microsoft.com/azure/storage/queues)
67
adapter allowing to orchestrate Kernel Memory pipelines with Azure Queues.

extensions/LlamaSharp/README.md

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,12 @@
11
# Kernel Memory with LLama
22

3-
[![Discord](https://img.shields.io/discord/1063152441819942922?label=Discord&logo=discord&logoColor=white&color=d82679)](https://aka.ms/SKDiscord)
3+
[![Nuget package](https://img.shields.io/nuget/v/Microsoft.KernelMemory.AI.LlamaSharp)](https://www.nuget.org/packages/Microsoft.KernelMemory.AI.LlamaSharp/)
4+
[![Discord](https://img.shields.io/discord/1063152441819942922?label=Discord&logo=discord&logoColor=white&color=d82679)](https://aka.ms/KMdiscord)
5+
6+
This project contains the
7+
[LLama](https://ai.meta.com/blog/large-language-model-llama-meta-ai/)
8+
LLM connector to access to LLama LLM models and generate text,
9+
leveraging the
10+
[LLamaSharp]((https://scisharp.github.io/LLamaSharp)) project.
11+
412

5-
This project contains the [LLama](https://scisharp.github.io/LLamaSharp)
6-
LLM connector to access to LLama LLM models and generate text.

extensions/OpenAI/README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
# Kernel Memory with OpenAI
22

3-
[![Discord](https://img.shields.io/discord/1063152441819942922?label=Discord&logo=discord&logoColor=white&color=d82679)](https://aka.ms/SKDiscord)
3+
[![Nuget package](https://img.shields.io/nuget/v/Microsoft.KernelMemory.AI.OpenAI)](https://www.nuget.org/packages/Microsoft.KernelMemory.AI.OpenAI/)
4+
[![Discord](https://img.shields.io/discord/1063152441819942922?label=Discord&logo=discord&logoColor=white&color=d82679)](https://aka.ms/KMdiscord)
45

56
This project contains the [OpenAI](https://openai.com)
67
LLM connector to access to OpenAI LLM models and generate embeddings and text.

extensions/Postgres/Postgres/Db/PostgresDbClient.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -397,6 +397,7 @@ DO UPDATE SET
397397
SELECT {columns}, 1 - ({this._colEmbedding} <=> @embedding) AS {similarityActualValue}
398398
FROM {tableName}
399399
WHERE {filterSql}
400+
ORDER BY {similarityActualValue} DESC
400401
LIMIT @limit
401402
OFFSET @offset
402403
";

extensions/Postgres/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Kernel Memory with Postgres + pgvector
22

3-
[![Nuget package](https://img.shields.io/nuget/vpre/Microsoft.KernelMemory.Postgres)](https://www.nuget.org/packages/Microsoft.KernelMemory.Postgres/)
4-
[![Discord](https://img.shields.io/discord/1063152441819942922?label=Discord&logo=discord&logoColor=white&color=d82679)](https://aka.ms/SKDiscord)
3+
[![Nuget package](https://img.shields.io/nuget/v/Microsoft.KernelMemory.MemoryDb.Postgres)](https://www.nuget.org/packages/Microsoft.KernelMemory.MemoryDb.Postgres/)
4+
[![Discord](https://img.shields.io/discord/1063152441819942922?label=Discord&logo=discord&logoColor=white&color=d82679)](https://aka.ms/KMdiscord)
55

66
This project contains the [Postgres](https://www.postgresql.org) adapter allowing
77
to use Kernel Memory with [Postgres+pgvector](https://github.com/pgvector/pgvector).

extensions/Qdrant/README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
# Kernel Memory with Qdrant
22

3-
[![Discord](https://img.shields.io/discord/1063152441819942922?label=Discord&logo=discord&logoColor=white&color=d82679)](https://aka.ms/SKDiscord)
3+
[![Nuget package](https://img.shields.io/nuget/v/Microsoft.KernelMemory.MemoryDb.Qdrant)](https://www.nuget.org/packages/Microsoft.KernelMemory.MemoryDb.Qdrant/)
4+
[![Discord](https://img.shields.io/discord/1063152441819942922?label=Discord&logo=discord&logoColor=white&color=d82679)](https://aka.ms/KMdiscord)
45

56
This project contains the [Qdrant](https://qdrant.tech) adapter allowing to use Kernel Memory with Qdrant.
67

extensions/RabbitMQ/README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
# Kernel Memory with RabbitMQ
22

3-
[![Discord](https://img.shields.io/discord/1063152441819942922?label=Discord&logo=discord&logoColor=white&color=d82679)](https://aka.ms/SKDiscord)
3+
[![Nuget package](https://img.shields.io/nuget/v/Microsoft.KernelMemory.Orchestration.RabbitMQ)](https://www.nuget.org/packages/Microsoft.KernelMemory.Orchestration.RabbitMQ/)
4+
[![Discord](https://img.shields.io/discord/1063152441819942922?label=Discord&logo=discord&logoColor=white&color=d82679)](https://aka.ms/KMdiscord)
45

56
This project contains the [RabbitMQ](https://www.rabbitmq.com/) adapter allowing to orchestrate
67
Kernel Memory pipelines with RabbitMQ queues.

service/tests/FunctionalTests/FunctionalTests.csproj

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
</PropertyGroup>
1313

1414
<ItemGroup>
15+
<ProjectReference Include="..\..\..\extensions\Postgres\Postgres\Postgres.csproj" />
1516
<ProjectReference Include="..\..\Abstractions\Abstractions.csproj"/>
1617
<ProjectReference Include="..\..\Core\Core.csproj"/>
1718
<ProjectReference Include="..\..\..\clients\dotnet\SemanticKernelPlugin\SemanticKernelPlugin.csproj"/>

0 commit comments

Comments
 (0)