Replaces the direct import logic with a workflow using Microsoft.Agents.AI.Workflows. Adds executors for file conversion, embedding generation, and storage. Updates dependency injection, API endpoint, and UI to use the new workflow. Replaces ImportDocumentResponse with StoreEmbeddingResponse. Adds required NuGet packages.
Refactored PlainTextChunker to add input validation, null checks, and argument validation in public methods. Renamed SplitMarkDownLines to SplitMarkdownLines for consistency and updated all references. Centralized line ending normalization and token count validation into dedicated methods. Enhanced error handling with clearer messages and exception types. Simplified paragraph merging logic and ensured GetDefaultTokenCount returns at least 1 for non-empty input. Updated MarkdownTextChunker to use the corrected method name.
Removed Microsoft.SemanticKernel dependencies in favor of Microsoft.Agents.AI.OpenAI for embedding and chat services. Updated DI registrations in Program.cs to use OpenAIClient. Reimplemented text chunking with a new PlainTextChunker class, updating DefaultTextChunker and MarkdownTextChunker accordingly. Updated .csproj to add new package references and suppress related analyzer warnings.
Updated several NuGet package references in SqlDatabaseVectorSearch.csproj to their latest versions, including EntityFrameworkCore.Exceptions.SqlServer, Microsoft.AspNetCore.OpenApi, Microsoft.EntityFrameworkCore.SqlServer, Microsoft.EntityFrameworkCore.Tools, Microsoft.Extensions.Caching.Hybrid, Microsoft.Extensions.Http.Resilience, Microsoft.SemanticKernel, Swashbuckle.AspNetCore.SwaggerUI, and TinyHelpers.AspNetCore. No other changes were made.
Updated package references in SqlDatabaseVectorSearch.csproj:
- Microsoft.AspNetCore.OpenApi to 10.0.7
- Microsoft.EntityFrameworkCore.SqlServer to 10.0.7
- Microsoft.EntityFrameworkCore.Tools to 10.0.7
- Microsoft.SemanticKernel to 1.76.0
Clarified ConfigureAwait(false) usage in copilot-instructions.md for library vs ASP.NET Core scenarios. Upgraded multiple NuGet dependencies in SqlDatabaseVectorSearch.csproj to their latest versions for improved compatibility and features.
Upgraded several NuGet packages in SqlDatabaseVectorSearch.csproj, including Microsoft.AspNetCore.OpenApi, EntityFrameworkCore.SqlServer/Tools, Microsoft.Extensions.Caching.Hybrid, Microsoft.Extensions.Http.Resilience, Microsoft.SemanticKernel, Swashbuckle.AspNetCore.SwaggerUI, and TinyHelpers.AspNetCore to their latest patch releases. No other code or configuration changes were made.
Upgraded the Microsoft.SemanticKernel NuGet package in SqlDatabaseVectorSearch.csproj from version 1.69.0 to 1.70.0 to incorporate the latest features and improvements.
Updated several NuGet packages in SqlDatabaseVectorSearch.csproj:
- Microsoft.AspNetCore.OpenApi, Microsoft.EntityFrameworkCore.SqlServer, and Tools to 10.0.2
- Microsoft.Extensions.Caching.Hybrid and Http.Resilience to 10.2.0
- Microsoft.SemanticKernel to 1.69.0
- MimeMapping to 3.2.0
- TinyHelpers.AspNetCore to 4.1.15
- Add null check for Document in DocxContentDecoder to prevent exceptions.
- Set DocumentChunk.Id to auto-generate in ApplicationDbContext.
- Order vector search results by cosine similarity for relevance.
- Order document chunks by cosine vector distance for better relevance in VectorSearchService; limit results to MaxRelevantChunks.
- Update multiple NuGet dependencies to latest versions for improved stability and features.
Updated the following NuGet package dependencies in the
`SqlDatabaseVectorSearch.csproj` file:
- `FluentValidation.DependencyInjectionExtensions` updated
from version `12.1.0` to `12.1.1` to incorporate potential
bug fixes and improvements.
- `Microsoft.SemanticKernel` updated from version `1.67.1`
to `1.68.0` to include enhancements and new functionality.
These updates aim to improve stability, performance, and
compatibility of the project.
Reduced `.card-body` height in `Ask.razor.css` for screens with a minimum width of 768px. Updated `Blazor.Bootstrap` package in `SqlDatabaseVectorSearch.csproj` from version 3.4.0 to 3.5.0.
Renamed `CreateQuestionAsync` to `CreateReformulateQuestionAsync` for clearer intent. Updated `CreateChatAsync` to include a new `ChatSystemPrompt` property in `AzureOpenAIPromptExecutionSettings` and modified `ChatHistory` initialization to simplify setup. Removed redundant `prompt` string construction and added user messages directly to `ChatHistory`.
Updated `VectorSearchService` to use the renamed `CreateReformulateQuestionAsync` method for consistency. These changes improve code clarity, maintainability, and functionality.
Updated `ProductVersion` in `ApplicationDbContextModelSnapshot.cs`
to target the stable release version `10.0.0`.
Added `TinyHelpers.AspNetCore.OpenApi` to `Program.cs` and
enabled OpenAPI options by uncommenting `RemoveServerList`
and `AddDefaultProblemDetailsResponse`. These changes improve
API documentation and error handling.
Updated multiple NuGet package dependencies to their latest stable versions, including:
- `Microsoft.AspNetCore.OpenApi` to `10.0.0`
- `Microsoft.EntityFrameworkCore.SqlServer` to `10.0.0`
- `Microsoft.Extensions.Caching.Hybrid` to `10.0.0`
- `Microsoft.ML.Tokenizers` to `2.0.0`
- `Microsoft.SemanticKernel` to `1.67.1`
- `Swashbuckle.AspNetCore.SwaggerUI` to `10.0.1`
- Other minor updates to `PdfPig`, `TinyHelpers.AspNetCore`, and more.
These updates ensure compatibility with the latest features and improvements.
Updated the `FluentValidation.DependencyInjectionExtensions` package
from version 12.0.0 to 12.1.0 to incorporate potential bug fixes
and improvements.
Updated the `Microsoft.SemanticKernel` package from version 1.66.0
to 1.67.0, which may include enhancements, bug fixes, or new
functionality.
Updated the `<PackageReference>` for `Microsoft.ML.Tokenizers` and its related data packages (`Data.Cl100kBase` and `Data.O200kBase`) from version `1.0.2` to `1.0.3`. These updates may include bug fixes, performance improvements, or new features introduced in the latest version.
Updated the token counting method from CountChatCompletionTokens to CountEmbeddingTokens in VectorSearchService, DefaultTextChunker, and MarkdownTextChunker to align with embedding token counting. Added a new logging configuration for Microsoft.AspNetCore.Watch.BrowserRefresh in appsettings.Development.json to manage log verbosity during development.
Introduced a new `<ReconnectModal />` component in `App.razor` to handle reconnection scenarios with a user interface. Added a `<ResourcePreloader />` to optimize resource loading. Updated `_Imports.razor` with a new namespace for layout components. Enhanced error handling in `Program.cs` by modifying `UseExceptionHandler` to create a new scope for errors. Added `ReconnectModal.razor`, `ReconnectModal.razor.css`, and `ReconnectModal.razor.js` to implement the modal's HTML, CSS, and JavaScript logic.
Updated several package dependencies in the SqlDatabaseVectorSearch.csproj file to their latest versions:
- Microsoft.AspNetCore.OpenApi, Microsoft.EntityFrameworkCore.SqlServer, and Microsoft.EntityFrameworkCore.Tools to 10.0.0-rc.2.25502.107
- Microsoft.Extensions.Caching.Hybrid and Microsoft.Extensions.Http.Resilience to 9.10.0
- Microsoft.SemanticKernel to 1.66.0
- TinyHelpers.AspNetCore to 4.1.8
These updates may include bug fixes, performance improvements, or new features.
Updated README.md to specify that for gpt-4.1 and gpt-5 models,
the ModelId should be set to gpt-4o for proper token counting.
Aligned appsettings.json comments with this guidance to ensure
consistency and clarity for users configuring Azure OpenAI settings.
Upgraded the `Swashbuckle.AspNetCore.SwaggerUI` package in the `SqlDatabaseVectorSearch.csproj` file from version 9.0.5 to 9.0.6. This minor version update likely includes bug fixes, enhancements, or other improvements while maintaining backward compatibility.
Upgraded the `Swashbuckle.AspNetCore.SwaggerUI` package in the
`SqlDatabaseVectorSearch.csproj` file from version 9.0.4 to 9.0.5.
This update may include bug fixes, new features, or other
improvements provided in the latest version.
Upgraded the `Microsoft.SemanticKernel` package reference in
`SqlDatabaseVectorSearch.csproj` from version 1.64.0 to 1.65.0.
This update may include new features, bug fixes, or performance
improvements.
Upgraded the `Microsoft.SemanticKernel` package reference in
`SqlDatabaseVectorSearch.csproj` from version 1.64.0 to 1.65.0.
This update may include bug fixes, new features, or performance
improvements introduced in the newer version.
Updated the application to use SQL Server's native vector data type (`SqlVector<float>`) for embeddings, replacing the previous `float[]` or `string` representations.
- Updated `.editorconfig` with new code style preferences and diagnostic rule severities.
- Modified `DocumentChunk.cs` to use `SqlVector<float>` for the `Embedding` property.
- Updated migrations and `ApplicationDbContextModelSnapshot` to reflect the new `SqlVector<float>` type.
- Replaced `AddAzureSql` with `AddSqlServer` in `Program.cs` and removed `UseVectorSearch`.
- Adjusted `DocumentService` and `VectorSearchService` to handle `SqlVector<float>` and updated vector search logic.
- Removed the `EFCore.SqlServer.VectorSearch` package and upgraded EF Core to `10.0.0-rc.1`.
- Made minor adjustments to OpenAPI configuration and dependency management.
Updated the project to target .NET 10.0, replacing the previous .NET 9.0 target framework. Upgraded several NuGet packages to their latest pre-release versions:
- `Microsoft.AspNetCore.OpenApi` to `10.0.0-rc.1.25451.107`
- `Microsoft.EntityFrameworkCore.SqlServer` to `10.0.0-rc.1.25451.107`
- `Microsoft.EntityFrameworkCore.Tools` to `10.0.0-rc.1.25451.107`
Retained `<PrivateAssets>` and `<IncludeAssets>` settings for `Microsoft.EntityFrameworkCore.Tools`. These changes ensure compatibility with the updated framework and leverage new features and improvements.
Updated the following NuGet packages to their latest versions:
- `Microsoft.AspNetCore.OpenApi` to `9.0.9`
- `Microsoft.EntityFrameworkCore.SqlServer` to `9.0.9`
- `Microsoft.EntityFrameworkCore.Tools` to `9.0.9`
- `Microsoft.Extensions.Caching.Hybrid` to `9.9.0`
- `Microsoft.Extensions.Http.Resilience` to `9.9.0`
- `TinyHelpers.AspNetCore` to `4.1.6`
- Clarified test practices in `copilot-instructions.md`.
- Revised Azure rules for best practices and tool usage.
- Added instruction in `ChatService.cs` for asking clarifying questions.
- Updated package versions in `SqlDatabaseVectorSearch.csproj` for several dependencies.
Updated the version of
`TinyHelpers.AspNetCore` in `SqlDatabaseVectorSearch.csproj`
from `4.1.2` to `4.1.3`. Clarified comments in
`appsettings.json` for the `ModelId` field under
`ChatCompletion` to specify requirements for `gpt-4.1` models.
Updated the following packages:
- `MinimalHelpers.Routing.Analyzers` to version `1.2.2`
- `PdfPig` to version `0.1.11`
- `TinyHelpers.AspNetCore` to version `4.1.2`
Updated the Visual Studio solution file to remove obsolete project configuration lines, indicating a cleanup.
The `Microsoft.SemanticKernel` package version has been upgraded from `1.60.0` to `1.61.0`.
Introduced a new solution file format (`SqlDatabaseVectorSearch.slnx`) to better organize solution items in a structured XML format.
Updated system prompts in ChatService to emphasize that responses must match the user's question language. Added formatting requirements for answers, including the need for a period before citations. Clarified citation format and adjusted prompt construction for improved readability.
Updated `Ask.razor` to conditionally apply a CSS class for the `streaming-text` div based on message status, enabling a spinner display during streaming. Adjusted spinner position from bottom right to bottom left and ensured proper layout with a minimum height for `streaming-content`. Modified a comment for clarity regarding the `Citations` property.
In `Ask.razor.css`, added padding to `streaming-text` for spinner accommodation and adjusted spinner styling to maintain layout integrity.
- Introduced a new `MessageStatus` enum to replace the `IsCompleted` boolean in the `Message` class, allowing for better tracking of message states (New, Streaming, Completed).
- Updated UI rendering to enhance message display with new div elements and conditional spinner for streaming messages.
- Modified the `AskQuestion` method to set the status of user and assistant messages appropriately.
- Added new CSS styles for improved layout and alignment of message components.
- Overall improvements enhance functionality and user experience in the messaging system.
Updated ChatService to include static readonly fields for
reformulation and answering prompts. Replaced the existing
ChatSystemPrompt in CreateQuestionAsync. Simplified
GetTokenUsage using expression-bodied members. Modified
SetChatHistoryAsync to ensure correct chat history updates
in the cache.
Updated ChatService to use AzureOpenAIPromptExecutionSettings for improved chat message generation.
The CreateChatAsync method now returns both ChatHistory and settings, allowing for better configuration.
Refined question reformulation prompts to ensure context relevance and language consistency.
These changes enhance the overall functionality and interaction of the chat service.
Updated several package references in the `SqlDatabaseVectorSearch.csproj` file to newer versions, including:
- `Microsoft.AspNetCore.OpenApi` to `9.0.7`
- `Microsoft.EntityFrameworkCore.SqlServer` to `9.0.7`
- `Microsoft.EntityFrameworkCore.Tools` to `9.0.7`
- `Microsoft.Extensions.Caching.Hybrid` to `9.7.0`
- `Microsoft.Extensions.Http.Resilience` to `9.7.0`
- `Microsoft.SemanticKernel` to `1.60.0`
- `MinimalHelpers.FluentValidation` to `1.1.4`
- `Swashbuckle.AspNetCore.SwaggerUI` to `9.0.3`
Updated button styles in Documents.razor for better appearance and usability. Improved the document table layout for responsiveness, integrating checkboxes into rows. Corrected comments in VectorSearchService.cs for clarity. Added new styles for content-type badges in app.css.
Updated the return statement in the `VectorSearchService` class to return citations sorted by `FileName` and `PageNumber`, improving the organization of the output.
Updated `copilot-instructions.md` to include new guidelines for Markdown documentation and testing practices. Modified the `DocumentChunk` record in `DocumentChunk.cs` to add `PageNumber` and `IndexOnPage` properties. Adjusted `GetChunksAsync` and `GetChunkEmbeddingAsync` methods in `DocumentService.cs` to accommodate the new properties.
Updated response guidelines in ChatService.cs to clarify
requirements for answer formatting, including citation rules
and examples of correct and incorrect responses.
Binary differences noted in SqlDatabaseVectorSearch_WebApp.png,
indicating modifications to the image file.
Updated the ChatService class to require that all responses end with a period and a space. Added a condition to include citations in a specified XML format when the answer is known, and to omit citations when the answer is unknown.
Updated `Home.razor` to provide a more detailed overview of the application's capabilities, including document loading, embedding generation, and semantic search. Improved clarity in the supported features section and added a new feature for citations. Included new paragraphs to encourage user interaction and referenced the README for API usage details.