VOOZH about

URL: https://www.nuget.org/packages/Encamina.Enmarcha.AI.QuestionsAnswering.Azure/

⇱ NuGet Gallery | Encamina.Enmarcha.AI.QuestionsAnswering.Azure 10.0.5




Encamina.Enmarcha.AI.QuestionsAnswering.Azure 10.0.5

dotnet add package Encamina.Enmarcha.AI.QuestionsAnswering.Azure --version 10.0.5
 
 
NuGet\Install-Package Encamina.Enmarcha.AI.QuestionsAnswering.Azure -Version 10.0.5
 
 
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Encamina.Enmarcha.AI.QuestionsAnswering.Azure" Version="10.0.5" />
 
 
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Encamina.Enmarcha.AI.QuestionsAnswering.Azure" Version="10.0.5" />
 
Directory.Packages.props
<PackageReference Include="Encamina.Enmarcha.AI.QuestionsAnswering.Azure" />
 
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Encamina.Enmarcha.AI.QuestionsAnswering.Azure --version 10.0.5
 
 
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: Encamina.Enmarcha.AI.QuestionsAnswering.Azure, 10.0.5"
 
 
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package Encamina.Enmarcha.AI.QuestionsAnswering.Azure@10.0.5
 
 
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Encamina.Enmarcha.AI.QuestionsAnswering.Azure&version=10.0.5
 
Install as a Cake Addin
#tool nuget:?package=Encamina.Enmarcha.AI.QuestionsAnswering.Azure&version=10.0.5
 
Install as a Cake Tool
The NuGet Team does not provide support for this client. Please contact its maintainers for support.

AI - Azure Questions Answering

👁 Nuget package

Azure Intent Prediction is a wrapper project for Azure Cognitive Language Services Question Answering client library. Its main functionality is to simplify and abstract the usage of the library, primarily focused on question answering.

Setup

Nuget package

First, install NuGet. Then, install Encamina.Enmarcha.AI.QuestionsAnswering.Azure from the package manager console:

PM> Install-Package Encamina.Enmarcha.AI.QuestionsAnswering.Azure

.NET CLI:

Install .NET CLI. Next, install Encamina.Enmarcha.AI.QuestionsAnswering.Azure from the .NET CLI:

dotnet add package Encamina.Enmarcha.AI.QuestionsAnswering.Azure

How to use

Question Answering

First, you need to add the to your project configuration. You can achieve this by using any configuration provider. The followng code is an example of how the settings would appear using the appsettings.json file:

 {
 // ...
 "QuestionAnsweringConfigurations": {
 "QuestionAnsweringOptions": [
 {
 "Name": "DefaultQuestionAnswering", // Name of this configuration
 "EndpointUrl": "https://example.cognitiveservices.azure.com/", // Language Service endpoint's url
 "KeyCredential": "<API-KEY>", // Language Service (security) key
 "DeploymentSlot": "development", // Deployment type, allowing the 'test' and 'prod' ('production' works as well)
 "KnowledgeBaseName": "<YOUR-PROJECT-NAME>", // Name of the Question Answering project in Language Service which represents a Knowledge Base
 "ConfidenceThreshold": 0.65, // Minimum threshold score for answers, value ranges from 0 to 1
 "Top": 3 // Maximum number of answers to be returned per question.
 }
 ]
 }
 // ...
 }

Next, in Program.cs or a similar entry point file in your project, add the following code.

// Entry point
var builder = WebApplication.CreateBuilder(new WebApplicationOptions
{
 // ...
});

// ...

// Or others configuration providers...
builder.Configuration.AddJsonFile("appsettings.json", optional: true, reloadOnChange: true); 

builder.Services.AddDefaultCognitiveServiceProvider()
 .AddAzureQuestionAnsweringServices(builder.Configuration);

The extension methods AddDefaultCognitiveServiceProvider and AddAzureQuestionAnsweringServices manage the configuration to create instances of ICognitiveServiceProvider. With this, you can retrieve instances of IQuestionAnsweringService (whose implementation is ). As seen in the configuration JSON, QuestionAnsweringConfigurations is an array, allowing you to generate different Question Answerings configurations and retrieve the appropriate one based on the Name. Now, you can inject ICognitiveServiceProvider through the constructor for use.

public class MyClass
{
 private readonly IQuestionAnsweringService questionAnsweringService;

 public MyClass(ICognitiveServiceProvider cognitiveServiceProvider)
 {
 // The value "DefaultQuestionAnswering" is the name specified in the JSON from the previous code.
 // This is just an example code; avoid hardcoding strings :)
 questionAnsweringService = cognitiveServiceProvider.GetQuestionsAnsweringService("DefaultQuestionAnswering");
 }

 public async Task<string> GetAnswerAsync(string userInput, CancellationToken cancellationToken)
 {
 var questionRequest = new QuestionRequest() { Question = userInput };

 var questionResult = await questionAnsweringService.GetAnswersAsync(questionRequest, CancellationToken.None);

 return questionResult.Answers.MaxBy(d => d.ConfidenceScore).Value;
 }
}

Metadata Handler

provides metadata handling using parameters stored in an Azure Table Storage with the optional posibility to cached these parameters to improve performance. First, you need to add the Azure Storage data to your project configuration. You can achieve this by using any configuration provider. The followng code is an example of how the settings would appear using the appsettings.json file:

{
 // ...
 "ConnectionStrings": {
 "TableStorage": "<TABLE-STORAGE-CONNECTION-STRING>" // Table Storage connection string
 },
 "TableName": "Metadata", // Table Storage table name
 // ...
}

Next, in Program.cs or a similar entry point file in your project, add the following code.

// Entry point
var builder = WebApplication.CreateBuilder(new WebApplicationOptions
{
 // ...
});

// ...

// Or others configuration providers...
builder.Configuration.AddJsonFile("appsettings.json", optional: true, reloadOnChange: true); 

builder.Services.AddCachedTableStorageCompositeMetadataHandler(options =>
{
 options.TableConnectionString = builder.Configuration.GetConnectionString("TableStorage");
 options.TableName = builder.Configuration.GetValue<string>("TableName");
});

The extension methods AddCachedTableStorageCompositeMetadataHandler manages of configuring everything necessary to create instances of IMetadataHandler based on implementation. Now, you can inject IMetadataHandler through the constructor for use.

public class MyClass
{
 private readonly IMetadataHandler metadataHandler;

 public MyClass(IMetadataHandler metadataHandler)
 {
 this.metadataHandler = metadataHandler;
 }

 public async Task<IDictionary<string, string>> GetMetadataAsync(string message, CancellationToken cancellationToken)
 {
 var metadataOptions = await metadataHandler.HandleMessageAsync(message, currentMetadataOptions: null, cancellationToken);

 return metadataOptions.Metadata;
 }
}
Product Versions Compatible and additional computed target framework versions.
.NET net5.0 net5.0 was computed.  net5.0-windows net5.0-windows was computed.  net6.0 net6.0 was computed.  net6.0-android net6.0-android was computed.  net6.0-ios net6.0-ios was computed.  net6.0-maccatalyst net6.0-maccatalyst was computed.  net6.0-macos net6.0-macos was computed.  net6.0-tvos net6.0-tvos was computed.  net6.0-windows net6.0-windows was computed.  net7.0 net7.0 was computed.  net7.0-android net7.0-android was computed.  net7.0-ios net7.0-ios was computed.  net7.0-maccatalyst net7.0-maccatalyst was computed.  net7.0-macos net7.0-macos was computed.  net7.0-tvos net7.0-tvos was computed.  net7.0-windows net7.0-windows was computed.  net8.0 net8.0 was computed.  net8.0-android net8.0-android was computed.  net8.0-browser net8.0-browser was computed.  net8.0-ios net8.0-ios was computed.  net8.0-maccatalyst net8.0-maccatalyst was computed.  net8.0-macos net8.0-macos was computed.  net8.0-tvos net8.0-tvos was computed.  net8.0-windows net8.0-windows was computed.  net9.0 net9.0 was computed.  net9.0-android net9.0-android was computed.  net9.0-browser net9.0-browser was computed.  net9.0-ios net9.0-ios was computed.  net9.0-maccatalyst net9.0-maccatalyst was computed.  net9.0-macos net9.0-macos was computed.  net9.0-tvos net9.0-tvos was computed.  net9.0-windows net9.0-windows was computed.  net10.0 net10.0 was computed.  net10.0-android net10.0-android was computed.  net10.0-browser net10.0-browser was computed.  net10.0-ios net10.0-ios was computed.  net10.0-maccatalyst net10.0-maccatalyst was computed.  net10.0-macos net10.0-macos was computed.  net10.0-tvos net10.0-tvos was computed.  net10.0-windows net10.0-windows was computed. 
.NET Core netcoreapp3.0 netcoreapp3.0 was computed.  netcoreapp3.1 netcoreapp3.1 was computed. 
.NET Standard netstandard2.1 netstandard2.1 is compatible. 
MonoAndroid monoandroid monoandroid was computed. 
MonoMac monomac monomac was computed. 
MonoTouch monotouch monotouch was computed. 
Tizen tizen60 tizen60 was computed. 
Xamarin.iOS xamarinios xamarinios was computed. 
Xamarin.Mac xamarinmac xamarinmac was computed. 
Xamarin.TVOS xamarintvos xamarintvos was computed. 
Xamarin.WatchOS xamarinwatchos xamarinwatchos was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
10.0.5 95 6/1/2026
10.0.4 118 4/8/2026
10.0.3 117 4/6/2026
10.0.2 320 12/17/2025
10.0.1 319 12/17/2025
10.0.0 303 12/16/2025
10.0.0-preview-09 425 11/19/2025
10.0.0-preview-08 422 11/18/2025
10.0.0-preview-07 213 10/22/2025
10.0.0-preview-06 206 10/14/2025
10.0.0-preview-05 197 10/8/2025
10.0.0-preview-04 206 10/7/2025
10.0.0-preview-03 329 9/16/2025
10.0.0-preview-02 333 9/16/2025
8.3.0 249 9/10/2025
8.3.0-preview-02 198 9/10/2025
8.3.0-preview-01 207 9/8/2025
8.2.1-preview-08 207 8/18/2025
8.2.1-preview-07 203 8/12/2025
Loading failed