{"id":16683497,"url":"https://github.com/marcominerva/openaiembeddingsample","last_synced_at":"2025-03-17T00:32:45.752Z","repository":{"id":203991173,"uuid":"710868278","full_name":"marcominerva/OpenAIEmbeddingSample","owner":"marcominerva","description":"An example that shows how to use Semantic Kernel and Kernel Memory to work with embeddings in a .NET application using SQL Server as Vector Database.","archived":false,"fork":false,"pushed_at":"2025-02-12T10:41:15.000Z","size":9995,"stargazers_count":30,"open_issues_count":0,"forks_count":3,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-02-27T15:29:14.761Z","etag":null,"topics":["azure-openai","c-sharp","chatgpt","dotnet","embeddings","kernel-memory","openai","semantic-kernel","sql-server","vector-database","visual-studio"],"latest_commit_sha":null,"homepage":"","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/marcominerva.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-10-27T15:55:10.000Z","updated_at":"2025-02-12T10:41:19.000Z","dependencies_parsed_at":"2024-04-30T09:57:41.625Z","dependency_job_id":"7258106c-bd06-4992-b1d3-17f87e8cc5cf","html_url":"https://github.com/marcominerva/OpenAIEmbeddingSample","commit_stats":null,"previous_names":["marcominerva/openaiembeddingsample"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/marcominerva%2FOpenAIEmbeddingSample","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/marcominerva%2FOpenAIEmbeddingSample/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/marcominerva%2FOpenAIEmbeddingSample/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/marcominerva%2FOpenAIEmbeddingSample/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/marcominerva","download_url":"https://codeload.github.com/marcominerva/OpenAIEmbeddingSample/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243835942,"owners_count":20355611,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["azure-openai","c-sharp","chatgpt","dotnet","embeddings","kernel-memory","openai","semantic-kernel","sql-server","vector-database","visual-studio"],"created_at":"2024-10-12T14:24:58.388Z","updated_at":"2025-03-17T00:32:45.522Z","avatar_url":"https://github.com/marcominerva.png","language":"C#","readme":"# OpenAI Embeddings Sample\n\nAn example that shows how to use [Semantic Kernel](https://github.com/microsoft/semantic-kernel) and [Kernel Memory](https://github.com/microsoft/kernel-memory) to work with embeddings in a .NET application using [SQL Server as Vector Database](https://github.com/kbeaugrand/SemanticKernel.Connectors.Memory.SqlServer).\n\nThe embeddings are stored in a SQL Server database and the Vector Search is efficiently performed thanks to COLUMNSTORE indexes.\n\nTo execute the application:\n- Create a database in SQL Server\n- Open the [AppCostants.cs](https://github.com/marcominerva/OpenAIEmbeddingSample/blob/master/EmbeddingSample/AppConstants.cs) file and set the connection string to the database and the other required parameters. This example assumes you're using Azure OpenAI, but you can easily update it to use OpenAI or whatever LLM you want. Take a look to **Kernel** and **KernelMemoryBuilder** configurations in the [Program.cs](https://github.com/marcominerva/OpenAIEmbeddingSample/blob/master/EmbeddingSample/Program.cs) file\n- Import some documents into the memory (search for `await kernelMemory.ImportDocumentAsync` in the [Program.cs](https://github.com/marcominerva/OpenAIEmbeddingSample/blob/master/EmbeddingSample/Program.cs) file\n\nRefer to [Program.cs](https://github.com/marcominerva/OpenAIEmbeddingSample/blob/master/EmbeddingSample/Program.cs) to see how document chunking is performed and how embeddings are calculated, stored and retrieved from the database using Kernel Memory.\n\nIf you want to see a manual (explicit) approach to embedding and Vector Search using SQL Server, refer to the [manual-approach branch](https://github.com/marcominerva/OpenAIEmbeddingSample/tree/manual-approach).\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmarcominerva%2Fopenaiembeddingsample","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmarcominerva%2Fopenaiembeddingsample","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmarcominerva%2Fopenaiembeddingsample/lists"}