Skip to content

Semantic Kernel Integration

The TruthVouch Semantic Kernel integration provides chat completion and embedding services that route all AI calls through TruthVouch Firewall for governance.

Status: Coming Soon (Q2 2026)

Installation

Terminal window
dotnet add package TruthVouch.SemanticKernel

Planned Features

  • IChatCompletionService implementation for TruthVouch Firewall
  • ITextEmbeddingGenerationService with vector caching
  • Full governance pipeline (fact-checking, PII detection, policy enforcement)
  • Streaming support
  • Circuit breaker and retry logic
  • OpenTelemetry integration

Planned Usage

Configure Semantic Kernel

var builder = Kernel.CreateBuilder();
// Add TruthVouch as chat completion service
builder.AddTruthVouchChatCompletion(
apiKey: "tv_live_...",
gatewayUrl: "https://gateway.truthvouch.com"
);
// Add TruthVouch embeddings
builder.AddTruthVouchTextEmbedding(
apiKey: "tv_live_..."
);
var kernel = builder.Build();

Use in Semantic Kernel Functions

var prompt = """
Analyze the sentiment of this customer review:
@input
Return: positive, negative, or neutral
""";
var function = kernel.CreateFunctionFromPrompt(prompt);
var result = await kernel.InvokeAsync(
function,
new KernelArguments { ["input"] = "This product exceeded my expectations!" }
);
Console.WriteLine(result.GetValue<string>());
// Governed by TruthVouch, fact-checked, audit-logged

With Plugins

[Description("Get product information")]
[return: Description("Product details")]
public async Task<string> GetProductInfo(string productId)
{
// Fetch from database
return productInfo;
}
kernel.ImportPluginFromFunctions("products", new[] {
kernel.CreateFunctionFromMethod(GetProductInfo, "GetProductInfo")
});
// Now all calls are governed
var result = await kernel.InvokeAsync(
"products-GetProductInfo",
new KernelArguments { ["productId"] = "123" }
);

Timeline

  • Q2 2026: Public beta release
  • Q3 2026: GA release with full feature parity

Next Steps