{"id":915,"date":"2025-01-02T21:55:09","date_gmt":"2025-01-03T05:55:09","guid":{"rendered":"https:\/\/devblogs.microsoft.com\/dotnet-ch\/?p=915"},"modified":"2025-01-02T21:55:09","modified_gmt":"2025-01-03T05:55:09","slug":"%e6%8e%a2%e7%b4%a2microsoft-extensions-vectordata%e4%b8%8eqdrant%e5%92%8cazure-ai%e6%90%9c%e7%b4%a2%e7%9a%84%e4%bd%bf%e7%94%a8","status":"publish","type":"post","link":"https:\/\/devblogs.microsoft.com\/dotnet-ch\/%e6%8e%a2%e7%b4%a2microsoft-extensions-vectordata%e4%b8%8eqdrant%e5%92%8cazure-ai%e6%90%9c%e7%b4%a2%e7%9a%84%e4%bd%bf%e7%94%a8\/","title":{"rendered":"\u63a2\u7d22Microsoft.Extensions.VectorData\u4e0eQdrant\u548cAzure AI\u641c\u7d22\u7684\u4f7f\u7528"},"content":{"rendered":"<p style=\"text-align: center;\"><em><span style=\"font-family: tahoma, arial, helvetica, sans-serif; font-size: 12pt;\">\u672c\u6587\u7ffb\u8bd1\u81eaBruno Capuano\u7684<\/span><a href=\"https:\/\/devblogs.microsoft.com\/dotnet\/vector-data-qdrant-ai-search-dotnet\/\"><span style=\"font-family: tahoma, arial, helvetica, sans-serif; font-size: 12pt;\">Exploring Microsoft.Extensions.VectorData with Qdrant and Azure AI Search<\/span><\/a><\/em><\/p>\n<p><span style=\"font-family: tahoma, arial, helvetica, sans-serif; font-size: 12pt;\">\u4e86\u89e3\u5982\u4f55\u4f7f\u7528 Microsoft.Extensions.VectorData\u5e76\u901a\u8fc7 Qdrant \u548c Azure AI \u641c\u7d22\u5b9e\u73b0\u8bed\u4e49\u641c\u7d22\u3002<\/span><\/p>\n<h2><span style=\"font-family: tahoma, arial, helvetica, sans-serif; font-size: 18pt;\"><strong>\u4f7f\u7528 Microsoft.Extensions.VectorData <\/strong><strong>\u6df1\u5165\u4e86\u89e3\u8bed\u4e49\u641c\u7d22\uff1aQdrant <\/strong><strong>\u548c Azure AI <\/strong><strong>\u641c\u7d22<\/strong><\/span><\/h2>\n<p><span style=\"font-family: tahoma, arial, helvetica, sans-serif; font-size: 12pt;\">\u8bed\u4e49\u641c\u7d22\u6b63\u5728\u6539\u53d8\u5e94\u7528\u7a0b\u5e8f\u67e5\u627e\u548c\u89e3\u91ca\u6570\u636e\u7684\u65b9\u5f0f\uff0c\u5b83\u4e13\u6ce8\u4e8e\u542b\u4e49\uff0c\u800c\u4e0d\u4ec5\u4ec5\u662f\u5173\u952e\u5b57\u5339\u914d\u3002\u968f\u7740\u00a0<strong>Microsoft.Extensions.VectorData<\/strong>\u00a0\u7684\u53d1\u5e03\uff0c.NET \u5f00\u53d1\u4eba\u5458\u62e5\u6709\u4e86\u4e00\u7ec4\u65b0\u7684\u6784\u5efa\u6a21\u5757\uff0c\u7528\u4e8e\u5c06\u57fa\u4e8e\u5411\u91cf\u7684\u641c\u7d22\u529f\u80fd\u96c6\u6210\u5230\u5176\u5e94\u7528\u7a0b\u5e8f\u4e2d\u3002\u5728\u672c\u6587\u4e2d\uff0c\u6211\u4eec\u5c06\u63a2\u8ba8\u4f7f\u7528\u672c\u5730<strong>Qdrant<\/strong>\u548c<strong>Azure AI\u641c\u7d22<\/strong>\u8fd9\u4e24\u79cd\u5b9e\u73b0\u65b9\u5f0f\u6765\u8fdb\u884c\u8bed\u4e49\u641c\u7d22\u3002<\/span><\/p>\n<h2><span style=\"font-family: tahoma, arial, helvetica, sans-serif; font-size: 18pt;\"><strong>Microsoft.Extensions.VectorData <\/strong><strong>\u5feb\u901f\u4ecb\u7ecd<\/strong><\/span><\/h2>\n<p><span style=\"font-family: tahoma, arial, helvetica, sans-serif; font-size: 12pt;\"><strong>Microsoft.Extensions.VectorData<\/strong> \u662f\u4e00\u7ec4 .NET\u4ee3\u7801\u5e93\uff0c\u65e8\u5728\u7ba1\u7406 .NET \u5e94\u7528\u7a0b\u5e8f\u4e2d\u57fa\u4e8e\u5411\u91cf\u7684\u6570\u636e\u3002\u8fd9\u4e9b\u5e93\u4e3a\u4e0e\u5411\u91cf\u5b58\u50a8\u4ea4\u4e92\u63d0\u4f9b\u4e86\u4e00\u4e2a\u7edf\u4e00\u7684 C# \u62bd\u8c61\u5c42\uff0c\u4f7f\u5f00\u53d1\u4eba\u5458\u80fd\u591f\u6709\u6548\u5730\u5904\u7406\u5d4c\u5165\u5e76\u6267\u884c\u5411\u91cf\u76f8\u4f3c\u6027\u67e5\u8be2\u3002<\/span><\/p>\n<p><span style=\"font-family: tahoma, arial, helvetica, sans-serif; font-size: 12pt;\">\u8981\u8be6\u7ec6\u4e86\u89e3\u8be5\u5e93\u7684\u67b6\u6784\u548c\u529f\u80fd\uff0c\u63a8\u8350\u9605\u8bfb\u00a0<a href=\"https:\/\/devblogs.microsoft.com\/dotnet\/introducing-microsoft-extensions-vector-data\/\">Luis \u7684\u7cbe\u5f69\u535a\u5ba2\u6587\u7ae0<\/a>\u3002<\/span><\/p>\n<p><span style=\"font-family: tahoma, arial, helvetica, sans-serif; font-size: 12pt;\">\u5728\u8fd9\u7bc7\u535a\u5ba2\u6587\u7ae0\u4e2d\uff0c\u6211\u4eec\u5c06\u5c55\u793a\u4e24\u4e2a\u5b9e\u9645\u7528\u4f8b\uff1a<\/span><\/p>\n<ol>\n<li><span style=\"font-family: tahoma, arial, helvetica, sans-serif; font-size: 12pt;\">\u5728\u672c\u5730\u4f7f\u7528\u00a0<strong>Qdrant<\/strong>\u00a0\u8fdb\u884c\u8bed\u4e49\u641c\u7d22\u3002<\/span><\/li>\n<li><span style=\"font-family: tahoma, arial, helvetica, sans-serif; font-size: 12pt;\">\u5229\u7528\u00a0<strong>Azure AI <\/strong><strong>\u641c\u7d22<\/strong>\u8fdb\u884c\u4f01\u4e1a\u7ea7\u5411\u91cf\u641c\u7d22\u3002<\/span><\/li>\n<\/ol>\n<p><span style=\"font-family: tahoma, arial, helvetica, sans-serif; font-size: 12pt;\">\u8981\u8fd0\u884c\u8fd9\u4e9b\u6f14\u793a\uff0c\u60a8\u9700\u8981\u4f7f\u7528 Ollama \u4e3a\u751f\u6210\u5d4c\u5165\u63d0\u4f9b\u7684\u6a21\u578b\u4e4b\u4e00\u3002\u5728\u672c\u793a\u4f8b\u4e2d\uff0c\u4f7f\u7528\u7684\u6a21\u578b\u662f all-minilm\u3002<\/span><\/p>\n<ul>\n<li><span style=\"font-family: tahoma, arial, helvetica, sans-serif; font-size: 12pt;\">\u5b89\u88c5\u00a0<a href=\"https:\/\/ollama.com\/download\">Ollama<\/a>\u3002<\/span><\/li>\n<li><span style=\"font-family: tahoma, arial, helvetica, sans-serif; font-size: 12pt;\">\u4e0b\u8f7d\u00a0<a href=\"https:\/\/ollama.com\/library\/all-minilm\">all-minilm \u6a21\u578b<\/a>\u3002<\/span><\/li>\n<li><span style=\"font-family: tahoma, arial, helvetica, sans-serif; font-size: 12pt;\">\u51c6\u5907\u4e00\u4e2a\u7b26\u5408 OCI \u6807\u51c6\u7684\u5bb9\u5668\u8fd0\u884c\u65f6\uff0c\u4f8b\u5982\uff1a<\/span>\n<ul>\n<li><span style=\"font-family: tahoma, arial, helvetica, sans-serif; font-size: 12pt;\"><a href=\"https:\/\/www.docker.com\/products\/docker-desktop\/\">Docker Desktop<\/a>\u00a0\u6216\u00a0<a href=\"https:\/\/podman.io\/\">Podman<\/a>\u3002<\/span><\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<h2><span style=\"font-family: tahoma, arial, helvetica, sans-serif; font-size: 18pt;\"><strong>\u4f7f\u7528 Qdrant <\/strong><strong>\u8fdb\u884c\u8bed\u4e49\u641c\u7d22<\/strong><\/span><\/h2>\n<h3><span style=\"font-family: tahoma, arial, helvetica, sans-serif; font-size: 14pt;\"><strong>\u4ec0\u4e48\u662f Qdrant<\/strong><strong>\uff1f<\/strong><\/span><\/h3>\n<p><span style=\"font-family: tahoma, arial, helvetica, sans-serif; font-size: 12pt;\"><strong>Qdrant<\/strong> \u662f\u4e00\u4e2a\u5411\u91cf\u76f8\u4f3c\u6027\u641c\u7d22\u5f15\u64ce\uff0c\u5b83\u63d0\u4f9b\u4e86\u4e00\u4e2a\u751f\u4ea7\u5c31\u7eea\u7684\u670d\u52a1\uff0c\u62e5\u6709\u4fbf\u6377\u7684 API\u6765\u5b58\u50a8\u3001\u641c\u7d22\u548c\u7ba1\u7406\u5e26\u6709\u989d\u5916\u8d1f\u8f7d\u7684\u70b9\uff08\u5373\u5411\u91cf\uff09\u3002\u5b83\u975e\u5e38\u9002\u5408\u9700\u8981\u9ad8\u6548\u76f8\u4f3c\u6027\u641c\u7d22\u7684\u5e94\u7528\u7a0b\u5e8f\u3002\u60a8\u53ef\u4ee5\u8f7b\u677e\u5730\u5728 Docker \u5bb9\u5668\u4e2d\u672c\u5730\u8fd0\u884c Qdrant\uff0c\u8fd9\u4f7f\u5176\u6210\u4e3a\u5bf9\u5f00\u53d1\u4eba\u5458\u53cb\u597d\u7684\u9009\u62e9\u3002<\/span><\/p>\n<p><span style=\"font-family: tahoma, arial, helvetica, sans-serif; font-size: 12pt;\">\u6709\u5173\u8bbe\u7f6e\u8bf4\u660e\uff0c\u8bf7\u53c2\u9605\u00a0<a href=\"https:\/\/qdrant.tech\/documentation\/quickstart\/\">Qdrant \u5feb\u901f\u5165\u95e8\u6307\u5357<\/a>\u3002\u4f5c\u4e3a\u53c2\u8003\uff0c\u4ee5\u4e0b\u662f\u8fd0\u884c\u672c\u5730\u5bb9\u5668\u5b9e\u4f8b\u7684\u793a\u4f8b\u547d\u4ee4\uff1a<\/span><\/p>\n<pre class=\"prettyprint language-default\"><code class=\"language-default\">docker run -p 6333:6333 -p 6334:6334 -v $(pwd)\/qdrant_storage:\/qdrant\/storage:z qdrant\/qdrant<\/code><\/pre>\n<p><span style=\"font-family: tahoma, arial, helvetica, sans-serif; font-size: 12pt;\">\u5bb9\u5668\u521b\u5efa\u540e\uff0c\u60a8\u53ef\u4ee5\u5728 Docker \u4e2d\u5bf9\u5176\u8fdb\u884c\u68c0\u67e5\u3002<\/span><\/p>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/dotnet-ch\/wp-content\/uploads\/sites\/75\/2025\/01\/05Qdrantrunningindocker.png\"><img decoding=\"async\" class=\"alignnone wp-image-921\" src=\"https:\/\/devblogs.microsoft.com\/dotnet-ch\/wp-content\/uploads\/sites\/75\/2025\/01\/05Qdrantrunningindocker-300x186.png\" alt=\"Image 05Qdrantrunningindocker\" width=\"715\" height=\"443\" srcset=\"https:\/\/devblogs.microsoft.com\/dotnet-ch\/wp-content\/uploads\/sites\/75\/2025\/01\/05Qdrantrunningindocker-300x186.png 300w, https:\/\/devblogs.microsoft.com\/dotnet-ch\/wp-content\/uploads\/sites\/75\/2025\/01\/05Qdrantrunningindocker-1024x635.png 1024w, https:\/\/devblogs.microsoft.com\/dotnet-ch\/wp-content\/uploads\/sites\/75\/2025\/01\/05Qdrantrunningindocker-768x476.png 768w, https:\/\/devblogs.microsoft.com\/dotnet-ch\/wp-content\/uploads\/sites\/75\/2025\/01\/05Qdrantrunningindocker.png 1132w\" sizes=\"(max-width: 715px) 100vw, 715px\" \/><\/a><\/p>\n<h3><span style=\"font-family: tahoma, arial, helvetica, sans-serif; font-size: 14pt;\"><strong>Qdrant <\/strong><strong>\u548c Semantic Kernel<\/strong><\/span><\/h3>\n<p><span style=\"font-family: tahoma, arial, helvetica, sans-serif; font-size: 12pt;\"><strong>Semantic Kernel<\/strong>\u00a0\u4e3a Qdrant \u63d0\u4f9b\u4e86\u4e00\u4e2a\u5185\u7f6e\u8fde\u63a5\u5668\uff0c\u4f7f .NET \u5f00\u53d1\u4eba\u5458\u80fd\u591f\u65e0\u7f1d\u5730\u5b58\u50a8\u5d4c\u5165\u5e76\u6267\u884c\u57fa\u4e8e\u5411\u91cf\u7684\u67e5\u8be2\u3002\u8be5\u8fde\u63a5\u5668\u57fa\u4e8eMicrosoft.Extensions.VectorData\u548c\u5b98\u65b9\u7684\u00a0<a href=\"https:\/\/github.com\/qdrant\/qdrant-dotnet\">.NET Qdrant \u5ba2\u6237\u7aef<\/a>\u6784\u5efa\u3002<\/span><\/p>\n<p><span style=\"font-family: tahoma, arial, helvetica, sans-serif; font-size: 12pt;\">\u8fd9\u79cd\u96c6\u6210\u7ed3\u5408\u4e86 Qdrant \u7684\u9ad8\u6027\u80fd\u548cSemantic Kernel \u7684\u6613\u7528\u6027\u3002<\/span><\/p>\n<p><span style=\"font-family: tahoma, arial, helvetica, sans-serif; font-size: 12pt;\">\u8981\u4e86\u89e3\u6709\u5173\u8fde\u63a5\u5668\u7684\u66f4\u591a\u4fe1\u606f\uff0c\u8bf7\u8bbf\u95ee<a href=\"https:\/\/learn.microsoft.com\/semantic-kernel\/concepts\/vector-store-connectors\/out-of-the-box-connectors\/qdrant-connector?pivots=programming-language-csharp\">\u8bed\u4e49\u5185\u6838\u5411\u91cf\u5b58\u50a8 Qdrant \u8fde\u63a5\u5668\u7684\u5b98\u65b9\u6587\u6863<\/a>\u3002<\/span><\/p>\n<h3><span style=\"font-family: tahoma, arial, helvetica, sans-serif; font-size: 14pt;\"><strong>\u573a\u666f\u6982\u8ff0 \u2013 Qdrant<\/strong><\/span><\/h3>\n<ul>\n<li><span style=\"font-family: tahoma, arial, helvetica, sans-serif; font-size: 12pt;\"><strong>\u8bbe\u7f6e<\/strong>\uff1a\u5728Docker \u5bb9\u5668\u4e2d\u672c\u5730\u8fd0\u884cQdrant\u5b9e\u4f8b\u3002<\/span><\/li>\n<li><span style=\"font-family: tahoma, arial, helvetica, sans-serif; font-size: 12pt;\"><strong>\u529f\u80fd<\/strong>\uff1a\u4e00\u4e2a\u4f7f\u7528\u8bed\u4e49\u5185\u6838 Qdrant \u8fde\u63a5\u5668\u7684.NET\u63a7\u5236\u53f0\u5e94\u7528\u7a0b\u5e8f\u4ee5\u7528\u4e8e\uff1a<\/span>\n<ul>\n<li><span style=\"font-family: tahoma, arial, helvetica, sans-serif; font-size: 12pt;\">\u5b58\u50a8\u5f71\u7247\u5d4c\u5165\u3002<\/span><\/li>\n<li><span style=\"font-family: tahoma, arial, helvetica, sans-serif; font-size: 12pt;\">\u6267\u884c\u8bed\u4e49\u641c\u7d22\u67e5\u8be2\u3002<\/span><\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<p><span style=\"font-family: tahoma, arial, helvetica, sans-serif; font-size: 12pt;\">\u8ba9\u6211\u4eec\u770b\u4e00\u4e2a\u5b9e\u73b0\u5e76\u8fd0\u884c\u6b64\u6f14\u793a\u7684\u793a\u4f8b\u7c7b\u3002<\/span><\/p>\n<pre class=\"prettyprint language-default\"><code class=\"language-default\">using Microsoft.Extensions.AI;\r\nusing Microsoft.Extensions.VectorData;\r\nusing Microsoft.SemanticKernel.Connectors.Qdrant;\r\nusing Qdrant.Client;\r\n\r\nvar vectorStore = new QdrantVectorStore(new QdrantClient(\"localhost\"));\r\n\r\n\/\/ get movie list\r\nvar movies = vectorStore.GetCollection&lt;ulong, MovieVector&lt;ulong&gt;&gt;(\"movies\");\r\nawait movies.CreateCollectionIfNotExistsAsync();\r\nvar movieData = MovieFactory&lt;ulong&gt;.GetMovieVectorList();\r\n\r\n\/\/ get embeddings generator and generate embeddings for movies\r\nIEmbeddingGenerator&lt;string, Embedding&lt;float&gt;&gt; generator =\r\n    new OllamaEmbeddingGenerator(new Uri(\"http:\/\/localhost:11434\/\"), \"all-minilm\");\r\nforeach (var movie in movieData)\r\n{\r\n    movie.Vector = await generator.GenerateEmbeddingVectorAsync(movie.Description);\r\n    await movies.UpsertAsync(movie);\r\n}\r\n\r\n\/\/ perform the search\r\nvar query = \"A family friendly movie that includes ogres and dragons\";\r\nvar queryEmbedding = await generator.GenerateEmbeddingVectorAsync(query);\r\n\r\nvar searchOptions = new VectorSearchOptions()\r\n{\r\n    Top = 2,\r\n    VectorPropertyName = \"Vector\"\r\n};\r\n\r\nvar results = await movies.VectorizedSearchAsync(queryEmbedding, searchOptions);\r\nawait foreach (var result in results.Results)\r\n{\r\n    Console.WriteLine($\"Title: {result.Record.Title}\");\r\n    Console.WriteLine($\"Description: {result.Record.Description}\");\r\n    Console.WriteLine($\"Score: {result.Score}\");\r\n    Console.WriteLine();\r\n}<\/code><\/pre>\n<p><span style=\"font-family: tahoma, arial, helvetica, sans-serif; font-size: 12pt;\">\u6f14\u793a\u8fd0\u884c\u540e\uff0c\u793a\u4f8b\u8f93\u51fa\u5982\u4e0b\uff1a<\/span><\/p>\n<pre class=\"prettyprint language-default\"><code class=\"language-default\">Title: Shrek\r\nDescription: Shrek is an animated film that tells the story of an ogre named Shrek who embarks on a quest to rescue Princess Fiona from a dragon and bring her back to the kingdom of Duloc.\r\nScore: 0.5013245344161987\r\n\r\nTitle: Lion King\r\nDescription: The Lion King is a classic Disney animated film that tells the story of a young lion named Simba who embarks on a journey to reclaim his throne as the king of the Pride Lands after the tragic death of his father.\r\nScore: 0.3225690722465515<\/code><\/pre>\n<h3><span style=\"font-family: tahoma, arial, helvetica, sans-serif; font-size: 14pt;\"><strong>\u4e3a\u4ec0\u4e48\u9009\u62e9 Qdrant<\/strong><strong>\uff1f<\/strong><\/span><\/h3>\n<p><span style=\"font-family: tahoma, arial, helvetica, sans-serif; font-size: 12pt;\">\u4f7f\u7528 Qdrant \u8fdb\u884c\u8bed\u4e49\u641c\u7d22\u5177\u6709<strong>\u53ef\u6269\u5c55\u3001\u9ad8\u901f\u76f8\u4f3c\u6027\u641c\u7d22<\/strong>\u7684\u4f18\u52bf\uff0c\u4f7f\u5176\u6210\u4e3a\u9700\u8981\u5927\u89c4\u6a21\u5411\u91cf\u6570\u636e\u7ba1\u7406\u7684\u5e94\u7528\u7a0b\u5e8f\u7684\u7edd\u4f73\u9009\u62e9\u3002\u6b64\u5916\uff0c\u60a8\u8fd8\u53ef\u4ee5\u9009\u62e9<a href=\"https:\/\/qdrant.tech\/blog\/qdrant-cloud-on-microsoft-azure\/\">\u5728 Microsoft Azure \u4e0a\u8fd0\u884c Qdrant Cloud<\/a>\u3002<\/span><\/p>\n<h2><span style=\"font-family: tahoma, arial, helvetica, sans-serif; font-size: 18pt;\"><strong>\u4f7f\u7528 Azure AI <\/strong><strong>\u641c\u7d22\u8fdb\u884c\u8bed\u4e49\u641c\u7d22<\/strong><\/span><\/h2>\n<h3><span style=\"font-family: tahoma, arial, helvetica, sans-serif; font-size: 14pt;\"><strong>\u4ec0\u4e48\u662f Azure AI <\/strong><strong>\u641c\u7d22\uff1f<\/strong><\/span><\/h3>\n<p><span style=\"font-family: tahoma, arial, helvetica, sans-serif; font-size: 12pt;\"><strong>Azure AI <\/strong><strong>\u641c\u7d22<\/strong>\u662f Microsoft \u7684\u641c\u7d22\u5373\u670d\u52a1\u4ea7\u54c1\u3002\u5b83\u5c06\u4f20\u7edf\u7684\u641c\u7d22\u529f\u80fd\u4e0e AI \u9a71\u52a8\u7684\u529f\u80fd\uff08\u5982\u8bed\u4e49\u548c\u5411\u91cf\u641c\u7d22\uff09\u96c6\u6210\u5728\u4e00\u8d77\u3002\u5b83\u4e13\u4e3a\u53ef\u6269\u5c55\u6027\u548c\u53ef\u9760\u6027\u800c\u6784\u5efa\uff0c\u662f<strong>\u9700\u8981\u9ad8\u7ea7\u641c\u7d22\u529f\u80fd\u7684\u4f01\u4e1a\u5e94\u7528\u7a0b\u5e8f\u7684\u7406\u60f3\u89e3\u51b3\u65b9\u6848<\/strong>\u3002\u60a8\u53ef\u4ee5<a href=\"https:\/\/learn.microsoft.com\/azure\/search\/search-what-is-azure-search\">\u4e86\u89e3\u6709\u5173 Azure AI \u641c\u7d22\u7684\u8be6\u7ec6\u4fe1\u606f<\/a>\u3002<\/span><\/p>\n<p><span style=\"font-family: tahoma, arial, helvetica, sans-serif; font-size: 12pt;\">\u5728\u672c\u793a\u4f8b\u4e2d\uff0c\u6211\u4eec\u5c06\u4f7f\u7528\u00a0<a href=\"https:\/\/learn.microsoft.com\/azure\/search\/vector-search-integrated-vectorization\">Azure AI \u641c\u7d22\u4e2d\u7684\u96c6\u6210\u5411\u91cf\u5316<\/a>\uff0c\u5b83\u901a\u8fc7\u5c06\u6587\u6863\u548c\u67e5\u8be2\u8f6c\u6362\u4e3a\u5411\u91cf\u6765\u6539\u8fdb\u7d22\u5f15\u548c\u67e5\u8be2\u3002<\/span><\/p>\n<h3><span style=\"font-family: tahoma, arial, helvetica, sans-serif; font-size: 14pt;\"><strong>Azure AI <\/strong><strong>\u641c\u7d22\u548c\u8bed\u4e49\u5185\u6838<\/strong><\/span><\/h3>\n<p><span style=\"font-family: tahoma, arial, helvetica, sans-serif; font-size: 12pt;\">\u6b64\u8fde\u63a5\u5668\u57fa\u4e8eMicrosoft.Extensions.VectorData \u548c<a href=\"https:\/\/learn.microsoft.com\/dotnet\/api\/overview\/azure\/search?view=azure-dotnet\">\u9002\u7528\u4e8e .NET \u7684Azure AI \u641c\u7d22\u5e93<\/a>\u6784\u5efa\u3002<\/span><\/p>\n<p><span style=\"font-family: tahoma, arial, helvetica, sans-serif; font-size: 12pt;\">\u6709\u5173\u66f4\u591a\u4fe1\u606f\uff0c\u8bf7\u53c2\u9605\u00a0<a href=\"https:\/\/learn.microsoft.com\/semantic-kernel\/concepts\/vector-store-connectors\/out-of-the-box-connectors\/azure-ai-search-connector?pivots=programming-language-csharp\">Azure AI \u641c\u7d22\u8fde\u63a5\u5668\u6587\u6863<\/a>\u3002<\/span><\/p>\n<h3><span style=\"font-family: tahoma, arial, helvetica, sans-serif; font-size: 14pt;\"><strong>\u573a\u666f\u6982\u8ff0 \u2013 Azure AI <\/strong><strong>\u641c\u7d22<\/strong><\/span><\/h3>\n<ul>\n<li><span style=\"font-family: tahoma, arial, helvetica, sans-serif; font-size: 12pt;\"><strong>\u8bbe\u7f6e<\/strong>\uff1a\u5728\u60a8\u7684 Azure \u8ba2\u9605\u4e2d\u521b\u5efa Azure AI \u641c\u7d22\u670d\u52a1\u3002<\/span><\/li>\n<li><span style=\"font-family: tahoma, arial, helvetica, sans-serif; font-size: 12pt;\"><strong>\u529f\u80fd<\/strong>\uff1a\u63a7\u5236\u53f0\u5e94\u7528\u7a0b\u5e8f\uff1a<\/span>\n<ul>\n<li><span style=\"font-family: tahoma, arial, helvetica, sans-serif; font-size: 12pt;\">\u5b58\u50a8\u5f71\u7247\u7684\u5411\u91cf\u5d4c\u5165\u3002<\/span><\/li>\n<li><span style=\"font-family: tahoma, arial, helvetica, sans-serif; font-size: 12pt;\">\u6267\u884c\u57fa\u4e8e\u5411\u91cf\u7684\u8bed\u4e49\u641c\u7d22\u67e5\u8be2\u3002<\/span><\/li>\n<\/ul>\n<\/li>\n<li><span style=\"font-family: tahoma, arial, helvetica, sans-serif; font-size: 12pt;\"><strong>\u8981\u6c42<\/strong>\uff1a<span class=\"TextRun SCXW242778719 BCX8\" lang=\"ZH-CN\" xml:lang=\"ZH-CN\" data-contrast=\"auto\"><span class=\"NormalTextRun SCXW242778719 BCX8\">\u5fc5\u987b\u5c06<\/span><\/span><span class=\"TextRun SCXW242778719 BCX8\" lang=\"EN-US\" xml:lang=\"EN-US\" data-contrast=\"auto\"><span class=\"NormalTextRun SCXW242778719 BCX8\"> Azure AI <\/span><\/span><span class=\"TextRun SCXW242778719 BCX8\" lang=\"ZH-CN\" xml:lang=\"ZH-CN\" data-contrast=\"auto\"><span class=\"NormalTextRun SCXW242778719 BCX8\">\u641c\u7d22\u7aef\u70b9\u4f5c\u4e3a\u7528\u6237\u5bc6\u94a5\u6dfb\u52a0\u5230\u5e94\u7528\u7a0b\u5e8f\u4e2d<\/span><\/span>\u3002\u5982\u679c\u4ec5\u4f7f\u7528\u7aef\u70b9\uff0c\u5e94\u7528\u7a0b\u5e8f\u5c06\u521b\u5efa\u4e00\u4e2a Azure \u9ed8\u8ba4\u51ed\u636e\u4ee5\u8fde\u63a5\u5230\u670d\u52a1\u3002\u5982\u679c\u60a8\u9700\u8981\u4f7f\u7528\u5bc6\u94a5\u8bbf\u95ee Azure AI \u641c\u7d22\uff0c\u5219\u8fd8\u9700\u8981\u5c06\u8be5\u503c\u4e5f\u6dfb\u52a0\u4e3a\u7528\u6237\u5bc6\u94a5\u3002<\/span><\/li>\n<\/ul>\n<p><span style=\"font-family: tahoma, arial, helvetica, sans-serif; font-size: 12pt;\">\u4ee5\u4e0b\u662f\u6709\u5173\u5982\u4f55\u6dfb\u52a0\u7528\u6237\u5bc6\u94a5\u7684\u63a7\u5236\u53f0\u547d\u4ee4\u793a\u4f8b\uff1a<\/span><\/p>\n<pre class=\"prettyprint language-default\"><code class=\"language-default\">dotnet user-secrets init\r\ndotnet user-secrets set \"AZURE_AISEARCH_URI\" \"https:\/\/&lt;AI Search Name&gt;.search.windows.net\"\r\ndotnet user-secrets set \"AZURE_AISEARCH_SECRET\" \"AI Search Secret\"<\/code><\/pre>\n<p><span style=\"font-family: tahoma, arial, helvetica, sans-serif; font-size: 12pt;\">\u8ba9\u6211\u4eec\u770b\u4e00\u4e2a\u5b9e\u73b0\u5e76\u8fd0\u884c\u6b64\u6f14\u793a\u7684\u793a\u4f8b\u7c7b\u3002<\/span><\/p>\n<pre class=\"prettyprint language-default\"><code class=\"language-default\">using Microsoft.Extensions.AI;\r\nusing Microsoft.Extensions.VectorData;\r\nusing Azure;\r\nusing Azure.Search.Documents.Indexes;\r\nusing Microsoft.SemanticKernel.Connectors.AzureAISearch;\r\nusing Microsoft.Extensions.Configuration;\r\nusing Azure.Identity;\r\nusing Azure.Core;\r\n\r\n\/\/ get the search index client using Azure Default Credentials or Azure Key Credential with the service secret\r\nvar client = GetSearchIndexClient();\r\nvar vectorStore = new AzureAISearchVectorStore(searchIndexClient: client);\r\n\r\n\/\/ get movie list\r\nvar movies = vectorStore.GetCollection&lt;string, MovieVector&lt;string&gt;&gt;(\"movies\");\r\nawait movies.CreateCollectionIfNotExistsAsync();\r\nvar movieData = MovieFactory&lt;string&gt;.GetMovieVectorList();\r\n\r\n\/\/ get embeddings generator and generate embeddings for movies\r\nIEmbeddingGenerator&lt;string, Embedding&lt;float&gt;&gt; generator =\r\n    new OllamaEmbeddingGenerator(new Uri(\"http:\/\/localhost:11434\/\"), \"all-minilm\");\r\nforeach (var movie in movieData)\r\n{\r\n    movie.Vector = await generator.GenerateEmbeddingVectorAsync(movie.Description);\r\n    await movies.UpsertAsync(movie);\r\n}\r\n\r\n\/\/ perform the search\r\nvar query = \"A family friendly movie that includes ogres and dragons\";\r\nvar queryEmbedding = await generator.GenerateEmbeddingVectorAsync(query);\r\n\r\n\/\/ show the results...<\/code><\/pre>\n<p><span style=\"font-family: tahoma, arial, helvetica, sans-serif; font-size: 12pt;\">\u6f14\u793a\u8fd0\u884c\u540e\uff0c\u793a\u4f8b\u8f93\u51fa\u5982\u4e0b\uff1a<\/span><\/p>\n<pre class=\"prettyprint language-default\"><code class=\"language-default\">Title: Shrek\r\nDescription: Shrek is an animated film that tells the story of an ogre named Shrek who embarks on a quest to rescue Princess Fiona from a dragon and bring her back to the kingdom of Duloc.\r\nScore: 0.6672559<\/code><\/pre>\n<p><span style=\"font-family: tahoma, arial, helvetica, sans-serif; font-size: 12pt;\">\u6211\u4eec\u53ef\u4ee5\u5728Azure \u95e8\u6237\u4e2d\u7684Azure\u00a0 AI \u641c\u7d22\u670d\u52a1\u91cc\u770b\u5230\u5305\u542b movies \u5b57\u6bb5\u7684\u65b0\u7d22\u5f15\u3002<\/span><\/p>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/dotnet-ch\/wp-content\/uploads\/sites\/75\/2025\/01\/10AzureAISearchIndexFields.png\"><img decoding=\"async\" class=\"alignnone wp-image-922\" src=\"https:\/\/devblogs.microsoft.com\/dotnet-ch\/wp-content\/uploads\/sites\/75\/2025\/01\/10AzureAISearchIndexFields-300x177.png\" alt=\"Image 10AzureAISearchIndexFields\" width=\"758\" height=\"447\" srcset=\"https:\/\/devblogs.microsoft.com\/dotnet-ch\/wp-content\/uploads\/sites\/75\/2025\/01\/10AzureAISearchIndexFields-300x177.png 300w, https:\/\/devblogs.microsoft.com\/dotnet-ch\/wp-content\/uploads\/sites\/75\/2025\/01\/10AzureAISearchIndexFields-1024x603.png 1024w, https:\/\/devblogs.microsoft.com\/dotnet-ch\/wp-content\/uploads\/sites\/75\/2025\/01\/10AzureAISearchIndexFields-768x452.png 768w, https:\/\/devblogs.microsoft.com\/dotnet-ch\/wp-content\/uploads\/sites\/75\/2025\/01\/10AzureAISearchIndexFields.png 1387w\" sizes=\"(max-width: 758px) 100vw, 758px\" \/><\/a><\/p>\n<h3><span style=\"font-family: tahoma, arial, helvetica, sans-serif; font-size: 14pt;\"><strong>\u4e3a\u4ec0\u4e48\u9009\u62e9 Azure AI <\/strong><strong>\u641c\u7d22\uff1f<\/strong><\/span><\/h3>\n<p><span style=\"font-family: tahoma, arial, helvetica, sans-serif; font-size: 12pt;\"><a href=\"https:\/\/azure.microsoft.com\/products\/ai-services\/ai-search\/\">Azure AI \u641c\u7d22<\/a>\u63d0\u4f9b<strong>\u4f01\u4e1a\u7ea7\u7684\u53ef\u6269\u5c55\u6027\u548c\u96c6\u6210<\/strong>\uff0c\u4f7f\u5176\u6210\u4e3a\u5728\u751f\u4ea7\u73af\u5883\u4e2d\u9700\u8981\u9ad8\u7ea7\u8bed\u4e49\u641c\u7d22\u7684\u5e94\u7528\u7a0b\u5e8f\u7684\u5f3a\u5927\u89e3\u51b3\u65b9\u6848\u3002\u6b64\u5916\uff0c<strong>AI Search <\/strong><strong>\u8fd8\u5177\u6709\u5185\u7f6e\u7684\u5b89\u5168\u529f\u80fd<\/strong>\uff0c\u4f8b\u5982\u52a0\u5bc6\u548c\u5b89\u5168\u8eab\u4efd\u9a8c\u8bc1\uff0c\u4ee5\u4fdd\u62a4\u60a8\u7684\u6570\u636e\u3002\u5b83\u8fd8\u9075\u5b88\u5408\u89c4\u6027\u6807\u51c6\uff0c\u786e\u4fdd\u60a8\u7684\u641c\u7d22\u89e3\u51b3\u65b9\u6848\u6ee1\u8db3\u76d1\u7ba1\u8981\u6c42\u3002<\/span><\/p>\n<h3><span style=\"font-family: tahoma, arial, helvetica, sans-serif; font-size: 14pt;\"><strong>\u4ee3\u7801\u89e3\u91ca<\/strong><\/span><\/h3>\n<h4><span style=\"font-family: tahoma, arial, helvetica, sans-serif; font-size: 12pt;\"><strong>\u7528\u4e8e\u6f14\u793a\u7684\u63a7\u5236\u53f0\u5e94\u7528\u7a0b\u5e8f<\/strong><\/span><\/h4>\n<p><span style=\"font-family: tahoma, arial, helvetica, sans-serif; font-size: 12pt;\">\u6bcf\u4e2a\u8bed\u4e49\u641c\u7d22\u6f14\u793a\u90fd\u4ee5\u00a0<strong>.NET 9 <\/strong><strong>\u63a7\u5236\u53f0\u5e94\u7528\u7a0b\u5e8f<\/strong>\u7684\u5f62\u5f0f\u5b9e\u73b0\u3002\u793a\u4f8b\u7684\u4ee3\u7801\u5e93\u53ef\u4ee5\u8ffd\u6eaf\u5230\u00a0<a href=\"https:\/\/devblogs.microsoft.com\/dotnet\/introducing-microsoft-extensions-vector-data\/\">Luis \u63d0\u4f9b\u7684\u539f\u59cb\u6f14\u793a<\/a>\uff0c\u5e76\u9488\u5bf9 Azure AI \u641c\u7d22\u548c Qdrant \u573a\u666f\u8fdb\u884c\u4e86\u62d3\u5c55\u3002<\/span><\/p>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/dotnet-ch\/wp-content\/uploads\/sites\/75\/2025\/01\/20SolutionWithAllTheSamples.png\"><img decoding=\"async\" class=\"alignnone wp-image-923\" src=\"https:\/\/devblogs.microsoft.com\/dotnet-ch\/wp-content\/uploads\/sites\/75\/2025\/01\/20SolutionWithAllTheSamples-300x165.png\" alt=\"Image 20SolutionWithAllTheSamples\" width=\"736\" height=\"405\" srcset=\"https:\/\/devblogs.microsoft.com\/dotnet-ch\/wp-content\/uploads\/sites\/75\/2025\/01\/20SolutionWithAllTheSamples-300x165.png 300w, https:\/\/devblogs.microsoft.com\/dotnet-ch\/wp-content\/uploads\/sites\/75\/2025\/01\/20SolutionWithAllTheSamples-768x422.png 768w, https:\/\/devblogs.microsoft.com\/dotnet-ch\/wp-content\/uploads\/sites\/75\/2025\/01\/20SolutionWithAllTheSamples.png 897w\" sizes=\"(max-width: 736px) 100vw, 736px\" \/><\/a><\/p>\n<h4><span style=\"font-family: tahoma, arial, helvetica, sans-serif; font-size: 12pt;\"><strong>\u7528\u4e8e\u6570\u636e\u8868\u793a\u7684\u5171\u4eab\u7c7b<\/strong><\/span><\/h4>\n<p><span style=\"font-family: tahoma, arial, helvetica, sans-serif; font-size: 12pt;\">\u5171\u4eab\u7c7b\u8868\u793a\u00a0<strong>Movie<\/strong>\u00a0\u5b9e\u4f53\uff0c\u5176\u4e2d\u5305\u62ec\uff1a<\/span><\/p>\n<ul>\n<li><span style=\"font-family: tahoma, arial, helvetica, sans-serif; font-size: 12pt;\"><strong>\u5411\u91cf\u5d4c\u5165\u7684\u5b57\u6bb5<\/strong>\uff1a\u8fd9\u4e9b\u5d4c\u5165\u7528\u4e8e\u6267\u884c\u8bed\u4e49\u641c\u7d22\u3002<\/span><\/li>\n<li><span style=\"font-family: tahoma, arial, helvetica, sans-serif; font-size: 12pt;\"><strong>\u7535\u5f71\u5217\u8868<\/strong>\uff1a\u4f5c\u4e3a\u793a\u4f8b\u6570\u636e\u800c\u751f\u6210\u7684\u9759\u6001\u7535\u5f71\u5217\u8868\u3002<\/span><\/li>\n<li><span style=\"font-family: tahoma, arial, helvetica, sans-serif; font-size: 12pt;\"><strong>\u952e\u7684\u7c7b\u578b\u5de5\u5382<\/strong>\uff1a\u8be5\u7c7b\u5b9e\u73b0\u5de5\u5382\u6a21\u5f0f\u6765\u5904\u7406\u952e\u6570\u636e\u7c7b\u578b\u7684\u5dee\u5f02\u3002<\/span><\/li>\n<\/ul>\n<h4><span style=\"font-family: tahoma, arial, helvetica, sans-serif; font-size: 12pt;\"><strong>\u5904\u7406\u952e\u7684\u4e0d\u540c\u6570\u636e\u7c7b\u578b<\/strong><\/span><\/h4>\n<ul>\n<li><span style=\"font-family: tahoma, arial, helvetica, sans-serif; font-size: 12pt;\"><strong>Qdrant<\/strong>\uff1a\u4f7f\u7528 <code>ulong<\/code> \u4f5c\u4e3a\u952e\u5b57\u6bb5\u7684\u6570\u636e\u7c7b\u578b\u3002\u00a0<\/span><\/li>\n<li><span style=\"font-family: tahoma, arial, helvetica, sans-serif; font-size: 12pt;\"><strong>Azure AI <\/strong><strong>\u641c\u7d22<\/strong>\uff1a\u4f7f\u7528 <code>string<\/code> \u4f5c\u4e3a\u952e\u5b57\u6bb5\u7684\u6570\u636e\u7c7b\u578b\u3002\u00a0<\/span><\/li>\n<li><span style=\"font-family: tahoma, arial, helvetica, sans-serif; font-size: 12pt;\"><strong>MovieFactory<\/strong>\uff1a\u786e\u4fdd\u5e94\u7528\u7a0b\u5e8f\u4e3a\u6bcf\u79cd\u573a\u666f\u751f\u6210\u6b63\u786e\u7684\u6570\u636e\u7c7b\u578b\uff0c\u4fdd\u6301\u5b9e\u73b0\u7684\u7075\u6d3b\u6027\u3002\u00a0<\/span><\/li>\n<\/ul>\n<h4><span style=\"font-family: tahoma, arial, helvetica, sans-serif; font-size: 12pt;\"><strong>Movie Factory <\/strong><strong>\u5b9e\u73b0<\/strong><\/span><\/h4>\n<pre class=\"prettyprint language-default\"><code class=\"language-default\">public class MovieFactory&lt;T&gt;\r\n{\r\n    public static List&lt;Movie&lt;T&gt;&gt; GetMovieList()\r\n    {\r\n        var movieData = new List&lt;Movie&lt;T&gt;&gt;()\r\n        {\r\n            \/\/ all movie sample collection is defined here\r\n        };\r\n        return movieData;\r\n    }\r\n\r\n    public static List&lt;MovieVector&lt;T&gt;&gt; GetMovieVectorList()\r\n    {\r\n        var movieData = GetMovieList();\r\n        var movieVectorData = new List&lt;MovieVector&lt;T&gt;&gt;();\r\n        foreach (var movie in movieData)\r\n        {\r\n            movieVectorData.Add(new MovieVector&lt;T&gt;\r\n            {\r\n                Key = movie.Key,\r\n                Title = movie.Title,\r\n                Description = movie.Description\r\n            });\r\n        }\r\n        return movieVectorData;\r\n    }<\/code><\/pre>\n<p><span style=\"font-family: tahoma, arial, helvetica, sans-serif; font-size: 12pt;\">\u60a8\u53ef\u4ee5\u6d4f\u89c8<a href=\"https:\/\/aka.ms\/netaivectorstoreqdrantazureaisearchrepo\">\u5305\u542b\u5b8c\u6574\u4ee3\u7801\u793a\u4f8b\u7684 github \u5b58\u50a8\u5e93<\/a>\u3002<\/span><\/p>\n<h2><span style=\"font-family: tahoma, arial, helvetica, sans-serif; font-size: 18pt;\"><strong>\u63a5\u4e0b\u6765\u4f1a\u53d1\u751f\u4ec0\u4e48\uff1f<\/strong><\/span><\/h2>\n<p><span style=\"font-family: tahoma, arial, helvetica, sans-serif; font-size: 12pt;\"><strong>Microsoft.Extensions.VectorData<\/strong>\u00a0\u7684\u65c5\u7a0b\u5e76\u4e0d\u6b62\u4e8e\u6b64\u3002\u60a8\u53ef\u4ee5\u9009\u62e9\u5176\u4ed6\u8fde\u63a5\u5668\uff0c\u6bd4\u5982<strong>\u5185\u5b58\u4e2d\u7684<\/strong><strong> SQLite<\/strong>\u3001<strong>Pinecone<\/strong>\u00a0\u6216\u00a0<strong>Redis<\/strong>; \u4f7f\u5f00\u53d1\u4eba\u5458\u80fd\u591f\u5728\u672c\u5730\u8fd0\u884c\u8f7b\u91cf\u7ea7\u7684\u8bed\u4e49\u641c\u7d22\u89e3\u51b3\u65b9\u6848\u3002\u6b64\u529f\u80fd\u975e\u5e38\u9002\u7528\u4e8e\u6027\u80fd\u548c\u7b80\u6d01\u6027\u81f3\u5173\u91cd\u8981\u7684\u573a\u666f\u3002<\/span><\/p>\n<p><span style=\"font-family: tahoma, arial, helvetica, sans-serif; font-size: 12pt;\">\u6211\u4eec\u8fd8\u4e0e\u5408\u4f5c\u4f19\u4f34\u5408\u4f5c\uff0c\u6bd4\u5982Elasticsearch\u00a0\u5df2\u7ecf\u5728 Microsoft.Extensions.VectorData \u7684\u57fa\u7840\u4e0a\u8fdb\u884c\u6784\u5efa\u3002\u60a8\u53ef\u4ee5\u5728<a href=\"https:\/\/devblogs.microsoft.com\/semantic-kernel\/customer-case-study-announcing-the-microsoft-semantic-kernel-elasticsearch-connector\/\">\u5ba2\u6237\u6848\u4f8b\u7814\u7a76\uff1a\u5ba3\u5e03\u63a8\u51fa Microsoft Semantic Kernel Elasticsearch Connector<\/a>\u00a0\u4e2d\u4e86\u89e3\u6709\u5173\u6b64\u7528\u4f8b\u7684\u66f4\u591a\u4fe1\u606f\u3002<\/span><\/p>\n<h2><span style=\"font-family: tahoma, arial, helvetica, sans-serif; font-size: 18pt;\"><strong>\u7ed3\u8bba<\/strong><\/span><\/h2>\n<p><span style=\"font-family: tahoma, arial, helvetica, sans-serif; font-size: 12pt;\"><strong>Microsoft.Extensions.VectorData<\/strong>\u00a0\u548c\u00a0<strong>Semantic Kernel<\/strong>\u00a0\u7684\u7ec4\u5408\u4f7f .NET \u5f00\u53d1\u4eba\u5458\u80fd\u591f\u6784\u5efa\u667a\u80fd\u3001\u53ef\u7f29\u653e\u548c\u4e0a\u4e0b\u6587\u611f\u77e5\u7684\u5e94\u7528\u7a0b\u5e8f\u3002\u65e0\u8bba\u60a8\u662f\u5728\u5904\u7406\u5c0f\u578b\u9879\u76ee\u8fd8\u662f\u5927\u578b\u4f01\u4e1a\u7cfb\u7edf\uff0c\u8fd9\u4e9b\u5de5\u5177\u90fd\u4e3a\u63d0\u4f9b\u5c16\u7aef\u7684\u8bed\u4e49\u641c\u7d22\u4f53\u9a8c\u5960\u5b9a\u4e86\u57fa\u7840\u3002<\/span><\/p>\n<h3><span style=\"font-family: tahoma, arial, helvetica, sans-serif; font-size: 14pt;\"><strong>\u4e86\u89e3\u66f4\u591a\u4fe1\u606f<\/strong><\/span><\/h3>\n<ul>\n<li><span style=\"font-family: tahoma, arial, helvetica, sans-serif; font-size: 12pt;\"><a href=\"https:\/\/learn.microsoft.com\/semantic-kernel\/concepts\/vector-store-connectors\/code-samples?pivots=programming-language-csharp\">\u8bed\u4e49\u5185\u6838\u5411\u91cf\u5b58\u50a8\u4ee3\u7801\u793a\u4f8b\uff08\u9884\u89c8\u7248\uff09<\/a><\/span><\/li>\n<li><span style=\"font-family: tahoma, arial, helvetica, sans-serif; font-size: 12pt;\"><a href=\"https:\/\/learn.microsoft.com\/semantic-kernel\/overview\">\u8bed\u4e49\u5185\u6838\u6982\u8ff0<\/a><\/span><\/li>\n<li><span style=\"font-family: tahoma, arial, helvetica, sans-serif; font-size: 12pt;\"><a href=\"https:\/\/qdrant.tech\/documentation\/\">Qdrant \u6587\u6863<\/a><\/span><\/li>\n<li><span style=\"font-family: tahoma, arial, helvetica, sans-serif; font-size: 12pt;\"><a href=\"https:\/\/learn.microsoft.com\/azure\/search\/\">Azure AI \u641c\u7d22\u6587\u6863<\/a><\/span><\/li>\n<\/ul>\n<h2><span style=\"font-family: tahoma, arial, helvetica, sans-serif; font-size: 18pt;\"><strong>\u603b\u7ed3<\/strong><\/span><\/h2>\n<p><span style=\"font-family: tahoma, arial, helvetica, sans-serif; font-size: 12pt;\">\u656c\u8bf7\u5173\u6ce8\u66f4\u591a\u7684\u6559\u7a0b\u548c\u8d44\u6e90\uff0c\u5e76\u968f\u65f6\u5728\u793e\u4ea4\u5a92\u4f53\u4e0a\u4e0e\u6211\u4eec\u8054\u7cfb\u4ee5\u63d0\u51fa\u95ee\u9898\u6216\u53cd\u9988\u3002 \u795d\u7f16\u7801\u6109\u5feb\uff01<\/span><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u672c\u6587\u7ffb\u8bd1\u81eaBruno Capuano\u7684Exploring Microsoft.Extensions.VectorData with Qdrant and Azure AI Search \u4e86\u89e3\u5982\u4f55\u4f7f\u7528 Microsoft.Extensions.VectorData\u5e76\u901a\u8fc7 Qdrant \u548c Azure AI \u641c\u7d22\u5b9e\u73b0\u8bed\u4e49\u641c\u7d22\u3002 \u4f7f\u7528 Microsoft.Extensions.VectorData \u6df1\u5165\u4e86\u89e3\u8bed\u4e49\u641c\u7d22\uff1aQdrant \u548c Azure AI \u641c\u7d22 \u8bed\u4e49\u641c\u7d22\u6b63\u5728\u6539\u53d8\u5e94\u7528\u7a0b\u5e8f\u67e5\u627e\u548c\u89e3\u91ca\u6570\u636e\u7684\u65b9\u5f0f\uff0c\u5b83\u4e13\u6ce8\u4e8e\u542b\u4e49\uff0c\u800c\u4e0d\u4ec5\u4ec5\u662f\u5173\u952e\u5b57\u5339\u914d\u3002\u968f\u7740\u00a0Microsoft.Extensions.VectorData\u00a0\u7684\u53d1\u5e03\uff0c.NET \u5f00\u53d1\u4eba\u5458\u62e5\u6709\u4e86\u4e00\u7ec4\u65b0\u7684\u6784\u5efa\u6a21\u5757\uff0c\u7528\u4e8e\u5c06\u57fa\u4e8e\u5411\u91cf\u7684\u641c\u7d22\u529f\u80fd\u96c6\u6210\u5230\u5176\u5e94\u7528\u7a0b\u5e8f\u4e2d\u3002\u5728\u672c\u6587\u4e2d\uff0c\u6211\u4eec\u5c06\u63a2\u8ba8\u4f7f\u7528\u672c\u5730Qdrant\u548cAzure AI\u641c\u7d22\u8fd9\u4e24\u79cd\u5b9e\u73b0\u65b9\u5f0f\u6765\u8fdb\u884c\u8bed\u4e49\u641c\u7d22\u3002 Microsoft.Extensions.VectorData \u5feb\u901f\u4ecb\u7ecd Microsoft.Extensions.VectorData \u662f\u4e00\u7ec4 .NET\u4ee3\u7801\u5e93\uff0c\u65e8\u5728\u7ba1\u7406 .NET \u5e94\u7528\u7a0b\u5e8f\u4e2d\u57fa\u4e8e\u5411\u91cf\u7684\u6570\u636e\u3002\u8fd9\u4e9b\u5e93\u4e3a\u4e0e\u5411\u91cf\u5b58\u50a8\u4ea4\u4e92\u63d0\u4f9b\u4e86\u4e00\u4e2a\u7edf\u4e00\u7684 C# \u62bd\u8c61\u5c42\uff0c\u4f7f\u5f00\u53d1\u4eba\u5458\u80fd\u591f\u6709\u6548\u5730\u5904\u7406\u5d4c\u5165\u5e76\u6267\u884c\u5411\u91cf\u76f8\u4f3c\u6027\u67e5\u8be2\u3002 \u8981\u8be6\u7ec6\u4e86\u89e3\u8be5\u5e93\u7684\u67b6\u6784\u548c\u529f\u80fd\uff0c\u63a8\u8350\u9605\u8bfb\u00a0Luis \u7684\u7cbe\u5f69\u535a\u5ba2\u6587\u7ae0\u3002 \u5728\u8fd9\u7bc7\u535a\u5ba2\u6587\u7ae0\u4e2d\uff0c\u6211\u4eec\u5c06\u5c55\u793a\u4e24\u4e2a\u5b9e\u9645\u7528\u4f8b\uff1a \u5728\u672c\u5730\u4f7f\u7528\u00a0Qdrant\u00a0\u8fdb\u884c\u8bed\u4e49\u641c\u7d22\u3002 \u5229\u7528\u00a0Azure AI \u641c\u7d22\u8fdb\u884c\u4f01\u4e1a\u7ea7\u5411\u91cf\u641c\u7d22\u3002 \u8981\u8fd0\u884c\u8fd9\u4e9b\u6f14\u793a\uff0c\u60a8\u9700\u8981\u4f7f\u7528 Ollama \u4e3a\u751f\u6210\u5d4c\u5165\u63d0\u4f9b\u7684\u6a21\u578b\u4e4b\u4e00\u3002\u5728\u672c\u793a\u4f8b\u4e2d\uff0c\u4f7f\u7528\u7684\u6a21\u578b\u662f all-minilm\u3002 \u5b89\u88c5\u00a0Ollama\u3002 \u4e0b\u8f7d\u00a0all-minilm \u6a21\u578b\u3002 \u51c6\u5907\u4e00\u4e2a\u7b26\u5408 OCI \u6807\u51c6\u7684\u5bb9\u5668\u8fd0\u884c\u65f6\uff0c\u4f8b\u5982\uff1a Docker Desktop\u00a0\u6216\u00a0Podman\u3002 \u4f7f\u7528 [&hellip;]<\/p>\n","protected":false},"author":177361,"featured_media":937,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[59,1,68,63],"tags":[52,57,69,70,71],"class_list":["post-915","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-net","category-dotnet-ch","category-ai","category-c","tag-net-9","tag-ai","tag-azure-ai-search","tag-microsoft-extensions-ai","tag-vectordb"],"acf":[],"blog_post_summary":"<p>\u672c\u6587\u7ffb\u8bd1\u81eaBruno Capuano\u7684Exploring Microsoft.Extensions.VectorData with Qdrant and Azure AI Search \u4e86\u89e3\u5982\u4f55\u4f7f\u7528 Microsoft.Extensions.VectorData\u5e76\u901a\u8fc7 Qdrant \u548c Azure AI \u641c\u7d22\u5b9e\u73b0\u8bed\u4e49\u641c\u7d22\u3002 \u4f7f\u7528 Microsoft.Extensions.VectorData \u6df1\u5165\u4e86\u89e3\u8bed\u4e49\u641c\u7d22\uff1aQdrant \u548c Azure AI \u641c\u7d22 \u8bed\u4e49\u641c\u7d22\u6b63\u5728\u6539\u53d8\u5e94\u7528\u7a0b\u5e8f\u67e5\u627e\u548c\u89e3\u91ca\u6570\u636e\u7684\u65b9\u5f0f\uff0c\u5b83\u4e13\u6ce8\u4e8e\u542b\u4e49\uff0c\u800c\u4e0d\u4ec5\u4ec5\u662f\u5173\u952e\u5b57\u5339\u914d\u3002\u968f\u7740\u00a0Microsoft.Extensions.VectorData\u00a0\u7684\u53d1\u5e03\uff0c.NET \u5f00\u53d1\u4eba\u5458\u62e5\u6709\u4e86\u4e00\u7ec4\u65b0\u7684\u6784\u5efa\u6a21\u5757\uff0c\u7528\u4e8e\u5c06\u57fa\u4e8e\u5411\u91cf\u7684\u641c\u7d22\u529f\u80fd\u96c6\u6210\u5230\u5176\u5e94\u7528\u7a0b\u5e8f\u4e2d\u3002\u5728\u672c\u6587\u4e2d\uff0c\u6211\u4eec\u5c06\u63a2\u8ba8\u4f7f\u7528\u672c\u5730Qdrant\u548cAzure AI\u641c\u7d22\u8fd9\u4e24\u79cd\u5b9e\u73b0\u65b9\u5f0f\u6765\u8fdb\u884c\u8bed\u4e49\u641c\u7d22\u3002 Microsoft.Extensions.VectorData \u5feb\u901f\u4ecb\u7ecd Microsoft.Extensions.VectorData \u662f\u4e00\u7ec4 .NET\u4ee3\u7801\u5e93\uff0c\u65e8\u5728\u7ba1\u7406 .NET \u5e94\u7528\u7a0b\u5e8f\u4e2d\u57fa\u4e8e\u5411\u91cf\u7684\u6570\u636e\u3002\u8fd9\u4e9b\u5e93\u4e3a\u4e0e\u5411\u91cf\u5b58\u50a8\u4ea4\u4e92\u63d0\u4f9b\u4e86\u4e00\u4e2a\u7edf\u4e00\u7684 C# \u62bd\u8c61\u5c42\uff0c\u4f7f\u5f00\u53d1\u4eba\u5458\u80fd\u591f\u6709\u6548\u5730\u5904\u7406\u5d4c\u5165\u5e76\u6267\u884c\u5411\u91cf\u76f8\u4f3c\u6027\u67e5\u8be2\u3002 \u8981\u8be6\u7ec6\u4e86\u89e3\u8be5\u5e93\u7684\u67b6\u6784\u548c\u529f\u80fd\uff0c\u63a8\u8350\u9605\u8bfb\u00a0Luis \u7684\u7cbe\u5f69\u535a\u5ba2\u6587\u7ae0\u3002 \u5728\u8fd9\u7bc7\u535a\u5ba2\u6587\u7ae0\u4e2d\uff0c\u6211\u4eec\u5c06\u5c55\u793a\u4e24\u4e2a\u5b9e\u9645\u7528\u4f8b\uff1a \u5728\u672c\u5730\u4f7f\u7528\u00a0Qdrant\u00a0\u8fdb\u884c\u8bed\u4e49\u641c\u7d22\u3002 \u5229\u7528\u00a0Azure AI \u641c\u7d22\u8fdb\u884c\u4f01\u4e1a\u7ea7\u5411\u91cf\u641c\u7d22\u3002 \u8981\u8fd0\u884c\u8fd9\u4e9b\u6f14\u793a\uff0c\u60a8\u9700\u8981\u4f7f\u7528 Ollama \u4e3a\u751f\u6210\u5d4c\u5165\u63d0\u4f9b\u7684\u6a21\u578b\u4e4b\u4e00\u3002\u5728\u672c\u793a\u4f8b\u4e2d\uff0c\u4f7f\u7528\u7684\u6a21\u578b\u662f all-minilm\u3002 \u5b89\u88c5\u00a0Ollama\u3002 \u4e0b\u8f7d\u00a0all-minilm \u6a21\u578b\u3002 \u51c6\u5907\u4e00\u4e2a\u7b26\u5408 OCI \u6807\u51c6\u7684\u5bb9\u5668\u8fd0\u884c\u65f6\uff0c\u4f8b\u5982\uff1a Docker Desktop\u00a0\u6216\u00a0Podman\u3002 \u4f7f\u7528 [&hellip;]<\/p>\n","_links":{"self":[{"href":"https:\/\/devblogs.microsoft.com\/dotnet-ch\/wp-json\/wp\/v2\/posts\/915","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/devblogs.microsoft.com\/dotnet-ch\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/devblogs.microsoft.com\/dotnet-ch\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/dotnet-ch\/wp-json\/wp\/v2\/users\/177361"}],"replies":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/dotnet-ch\/wp-json\/wp\/v2\/comments?post=915"}],"version-history":[{"count":0,"href":"https:\/\/devblogs.microsoft.com\/dotnet-ch\/wp-json\/wp\/v2\/posts\/915\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/dotnet-ch\/wp-json\/wp\/v2\/media\/937"}],"wp:attachment":[{"href":"https:\/\/devblogs.microsoft.com\/dotnet-ch\/wp-json\/wp\/v2\/media?parent=915"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/dotnet-ch\/wp-json\/wp\/v2\/categories?post=915"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/dotnet-ch\/wp-json\/wp\/v2\/tags?post=915"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}