Migration Guides

Step-by-step migration guides for upgrading SmartRAG versions.


Migrating from v2.x to v3.0.0

Key Changes

The primary change is the renaming of GenerateRagAnswerAsync to QueryIntelligenceAsync.

This migration guide covers the changes needed when upgrading from SmartRAG v2.x to v3.0.0.

Step 1: Update Method Call

Update your service method call from GenerateRagAnswerAsync to QueryIntelligenceAsync:

// Before (v2.x)
var response = await _searchService.GenerateRagAnswerAsync(query, maxResults);

// After (v3.0.0)
var response = await _searchService.QueryIntelligenceAsync(query, maxResults);

Step 2: Update API Endpoints (if using Web API)

If you have a Web API controller, simply update the service method call:

// Before (v2.x)
[HttpPost("generate-answer")]
public async Task<IActionResult> GenerateAnswer([FromBody] QueryRequest request)
{
    var response = await _searchService.GenerateRagAnswerAsync(request.Query);
    return Ok(response);
}

// After (v3.0.0) - Only the method name changed
[HttpPost("generate-answer")]
public async Task<IActionResult> GenerateAnswer([FromBody] QueryRequest request)
{
    var response = await _searchService.QueryIntelligenceAsync(request.Query);
    return Ok(response);
}

Note

You can keep your existing endpoint paths and controller method names. Only the service method call needs to be updated.

Step 3: Update Client Code (if applicable)

If you have client code that calls the API, update the endpoint:

// Before
const response = await fetch('/api/intelligence/generate-answer', { ... });

// After
const response = await fetch('/api/intelligence/query', { ... });

No Immediate Action Required

The old GenerateRagAnswerAsync method still works (marked as deprecated). You can migrate gradually before v4.0.0 is released.


Migrating from v1.x to v2.0.0

Framework Change

Version 2.0.0 migrated from .NET 9.0 to .NET Standard 2.1

This migration guide covers the framework compatibility changes when upgrading from SmartRAG v1.x to v2.0.0.

Step 1: Verify Framework Compatibility

Your project must target one of these frameworks:

<TargetFramework>netstandard2.0</TargetFramework>
<TargetFramework>netstandard2.1</TargetFramework>
<TargetFramework>netcoreapp2.0</TargetFramework>
<TargetFramework>net461</TargetFramework>
<TargetFramework>net5.0</TargetFramework>
<TargetFramework>net6.0</TargetFramework>
<TargetFramework>net7.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
<TargetFramework>net9.0</TargetFramework>

Step 2: Update NuGet Package

Update the SmartRAG package to version 2.0.0:

dotnet add package SmartRAG --version 2.0.0

Step 3: Verify Code Compatibility

No API changes - all functionality remains the same. Just ensure your project targets compatible framework.


Next Steps

Version History

Complete version history with all releases and changes

Version History

Deprecation Notices

Deprecated features and planned removals

Deprecation Notices