The second preview of the .NET AI Chat Web App template has been released, introducing several enhancements. This update includes support for .NET Aspire and integration with the Qdrant vector database, enabling the creation of cloud-native applications with this template.
The .NET AI template is a component of Microsoft’s effort to simplify AI development, offering scaffolding and guidance through Visual Studio, Visual Studio Code, and the .NET CLI. It is designed to expedite the development of AI-powered chat applications capable of interacting with custom data. This release continues to employ the Retrieval Augmented Generation (RAG) pattern, commonly used in chat applications, while adding new features tailored for developers using .NET Aspire.
A notable addition in Preview 2 is the support for .NET Aspire, which enhances the development toolkit by enabling advanced AI capabilities and offering improved integration options. Additionally, the inclusion of the Qdrant vector database demonstrates how it can be leveraged in conjunction with .NET Aspire to create scalable applications utilizing vector data.
Preview 2 also introduces configuration options for Visual Studio Code. When creating a new project with the C# Dev Kit extension, developers can configure settings such as model service providers and vector stores, further enhancing the flexibility of the template.
Key features of the template include the ability to create chat-based UI interactions using sample PDFs or custom data with the RAG pattern. Developers can select between local vector stores for rapid prototyping or Azure AI Search for more complex use cases. The template also allows for the customization of generated code to meet specific project requirements, including chat interactions, citation tracking, and follow-up suggestions.
The update introduces .NET Aspire Orchestration, which facilitates powerful integrations with both local and cloud-based AI models. The Use .NET Aspire Orchestration option generates a new .NET Aspire solution with an .AppHost project for configuring integrations with various AI services and vector store providers.
Developers can host local models using the Ollama container image available on Docker, integrated via the .NET Aspire Community Toolkit Ollama package.
(Source: Microsoft Official Documentation)
Support for GitHub Models, OpenAI, and Azure OpenAI is also included, offering direct connections to advanced language models through Azure’s secure environment or OpenAI APIs. Developers can also leverage enhanced semantic search capabilities, powered by Azure AI Search and Qdrant vector stores, to index and query vectorized data more effectively.
To start with Preview 2, developers can install the Microsoft.Extensions.AI.Templates package by running the following command:
dotnet new install Microsoft.Extensions.AI.Templates
Microsoft continues to refine the .NET AI template based on feedback from the community. As stated in the source, the future releases will include support for Console and Minimal API templates, deeper integration with Azure AI Foundry, and closer collaboration with the Semantic Kernel team. Eventually, as reported, the template will be bundled with the .NET SDK by default.