{"id":4550,"date":"2025-04-08T07:47:05","date_gmt":"2025-04-08T14:47:05","guid":{"rendered":"https:\/\/devblogs.microsoft.com\/semantic-kernel\/?p=4550"},"modified":"2025-04-08T07:47:05","modified_gmt":"2025-04-08T14:47:05","slug":"python-vector-store-connectors-update-faiss-azure-sql-server-and-pinecone","status":"publish","type":"post","link":"https:\/\/devblogs.microsoft.com\/agent-framework\/python-vector-store-connectors-update-faiss-azure-sql-server-and-pinecone\/","title":{"rendered":"Python Vector Store Connectors update: Faiss, Azure SQL Server and Pinecone"},"content":{"rendered":"<div>\n<h2>Announcing New Vector Stores: Faiss, SQL Server, and Pinecone<\/h2>\n<div>We are thrilled to announce the availability of three new Vector Stores and Vector Store Record Collections: Faiss, SQL Server, and Pinecone. These new connectors will enable you to store and retrieve vector data efficiently, making it easier to work with your own data and data models.<\/div>\n<h3>Faiss<\/h3>\n<div>Faiss is a library for efficient similarity search and clustering of dense vectors. It builds on the built-in InMemoryCollection, by creating Faiss indexes on the side, which are then used for the actual vector search.<\/div>\n<\/div>\n<div>\n<h4>Setup<\/h4>\n<p>Install Semantic Kernel with the Faiss extra:<\/p>\n<\/div>\n<pre><code>pip install semantic-kernel[faiss]<\/code><\/pre>\n<div><\/div>\n<div><\/div>\n<div>And then create your collection:<\/div>\n<div><\/div>\n<div>\n<div>\n<pre class=\"prettyprint language-py\"><code class=\"language-py\">from semantic_kernel.connectors.memory.faiss import FaissCollection\r\n\r\ncollection = FaissCollection(\r\n    collection_name=\"my_collection\",\r\n    data_model_type=MyDataModel,\r\n)<\/code><\/pre>\n<\/div>\n<\/div>\n<div>With this connector you can also use your own indexes for one or all vectors fields, this allows you to create highly optimized indexes for your specific use case, potentially even leveraging GPU&#8217;s see the <a href=\"https:\/\/learn.microsoft.com\/en-us\/semantic-kernel\/concepts\/vector-store-connectors\/out-of-the-box-connectors\/faiss-connector?pivots=programming-language-python\">documentation<\/a> for more info on how to set that up.<\/div>\n<div>\n<h3><\/h3>\n<h3>SQL Server<\/h3>\n<div>SQL Server is a relational database management system developed by Microsoft. Azure SQL Server now supports vector data types and a set of vector distance\/scoring functions, these can now be used with Semantic Kernel. Currently this only works with Flat indexes.<\/div>\n<\/div>\n<div><\/div>\n<div>The Python SQL Server Collection uses pyodbc to connect, that can be installed by the command below, but you will need to install the ODBC driver for SQL Server separately, this differs by platform, see the <a href=\"https:\/\/learn.microsoft.com\/azure\/azure-sql\/database\/azure-sql-python-quickstart?view=azuresql&amp;tabs=windows%2Csql-inter\">Azure SQL Documentation<\/a> for details.<\/div>\n<h4><\/h4>\n<div>\n<h4>Setup<\/h4>\n<p>&nbsp;<\/p>\n<\/div>\n<div>\n<pre>pip install semantic-kernel[sql]<\/pre>\n<div><\/div>\n<\/div>\n<div>\n<p>Then you can create the collection like this:<\/p>\n<div>\n<pre class=\"prettyprint language-py\"><code class=\"language-py\">from semantic_kernel.connectors.memory.sql_server import SqlServerCollection\r\n\r\ncollection = SqlServerCollection(\r\n    collection_name=\"my_collection\",\r\n    data_model_type=MyDataModel,\r\n)<\/code><\/pre>\n<\/div>\n<h4>Environment Variables<\/h4>\n<pre>- SQL_SERVER_CONNECTION_STRING: The connection string for your SQL Server database.<\/pre>\n<\/div>\n<div><\/div>\n<div>\n<p>For more info, see our <a href=\"https:\/\/learn.microsoft.com\/semantic-kernel\/concepts\/vector-store-connectors\/out-of-the-box-connectors\/sql-connector?pivots=programming-language-python\">documentation.<\/a><\/p>\n<h3><\/h3>\n<h3>Pinecone<\/h3>\n<div>Pinecone is a vector database that provides fast and scalable vector search capabilities. It is designed to handle large-scale vector data and offers seamless integration with machine learning models.<\/div>\n<\/div>\n<h4><\/h4>\n<div>\n<h4>Setup<\/h4>\n<p>&nbsp;<\/p>\n<\/div>\n<div>First install the pinecone client package, by using the extra:<\/div>\n<div>\n<pre>pip install semantic-kernel[pinecone]<\/pre>\n<\/div>\n<div>\n<div>and then you can create the collection:<\/div>\n<pre class=\"prettyprint language-py\"><code class=\"language-py\">from semantic_kernel.connectors.memory.pinecone import PineconeCollection\r\n\r\ncollection = PineconeCollection(\r\n    collection_name=\"my_collection\",\r\n    data_model_type=MyDataModel,\r\n)<\/code><\/pre>\n<h4>Environment Variables<\/h4>\n<pre>- PINECONE_API_KEY: Your Pinecone API key.<\/pre>\n<\/div>\n<div><\/div>\n<div>\n<p>For more info, see the <a href=\"https:\/\/learn.microsoft.com\/semantic-kernel\/concepts\/vector-store-connectors\/out-of-the-box-connectors\/pinecone-connector?pivots=programming-language-python\">documentation<\/a>.<\/p>\n<h3><\/h3>\n<h3>Get Started Today<\/h3>\n<div>We are excited to see what you will build with these new connectors. Whether you are working on a simple chatbot, or building multi-agent group chats running inside of a larger process, these connectors will provide you with the tools you need to succeed. Get started today and take your projects to the next level!<\/div>\n<div>Happy coding!<\/div>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>Announcing New Vector Stores: Faiss, SQL Server, and Pinecone We are thrilled to announce the availability of three new Vector Stores and Vector Store Record Collections: Faiss, SQL Server, and Pinecone. These new connectors will enable you to store and retrieve vector data efficiently, making it easier to work with your own data and data [&hellip;]<\/p>\n","protected":false},"author":150044,"featured_media":2364,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[34,1,19],"tags":[48,63,53,9],"class_list":["post-4550","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-python-2","category-semantic-kernel","category-vector-database","tag-ai","tag-microsoft-semantic-kernel","tag-python","tag-semantic-kernel"],"acf":[],"blog_post_summary":"<p>Announcing New Vector Stores: Faiss, SQL Server, and Pinecone We are thrilled to announce the availability of three new Vector Stores and Vector Store Record Collections: Faiss, SQL Server, and Pinecone. These new connectors will enable you to store and retrieve vector data efficiently, making it easier to work with your own data and data [&hellip;]<\/p>\n","_links":{"self":[{"href":"https:\/\/devblogs.microsoft.com\/agent-framework\/wp-json\/wp\/v2\/posts\/4550","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/devblogs.microsoft.com\/agent-framework\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/devblogs.microsoft.com\/agent-framework\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/agent-framework\/wp-json\/wp\/v2\/users\/150044"}],"replies":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/agent-framework\/wp-json\/wp\/v2\/comments?post=4550"}],"version-history":[{"count":0,"href":"https:\/\/devblogs.microsoft.com\/agent-framework\/wp-json\/wp\/v2\/posts\/4550\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/agent-framework\/wp-json\/wp\/v2\/media\/2364"}],"wp:attachment":[{"href":"https:\/\/devblogs.microsoft.com\/agent-framework\/wp-json\/wp\/v2\/media?parent=4550"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/agent-framework\/wp-json\/wp\/v2\/categories?post=4550"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/agent-framework\/wp-json\/wp\/v2\/tags?post=4550"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}