Configurare il recupero del grafico degli argomenti in Foundry IQ (Azure AI Search)

Importante

Il recupero del grafico degli argomenti è in anteprima ed è soggetto alle Condizioni per l'utilizzo supplementari per le anteprime di Microsoft Azure. Per i termini di anteprima specifici di questa funzionalità, vedere Funzionalità di anteprima.

Un grafico degli argomenti (anteprima) rappresenta gruppi di contenuti correlati, detti anche community e come questi gruppi si connettono all'interno di una gerarchia di argomenti. Consente di rispondere a domande generali su temi o modelli in una raccolta di documenti, anziché sui fatti in un unico passaggio. Eseguendo il campionamento di prove provenienti da più argomenti, il recupero supporta risposte che riflettono una gamma più ampia di temi anziché solo le corrispondenze vettoriali più vicine.

Usare il recupero del grafico degli argomenti per aumentare il recupero vettoriale esistente con il campionamento degli argomenti su una fonte delle informazioni searchIndex. In questo articolo si collega la fonte a una Knowledge Base, si recuperano prove estrattive e si esegue l'override delle impostazioni archiviate per le singole richieste.

Prerequisites

Limitations

Durante l'anteprima, una Knowledge Base non identifica automaticamente una query come diversificata. Per una query diversificata, impostare topicGraph.kind su diverse nella richiesta di recupero.

Configurare le richieste

Per gli esempi dell'SDK, impostare SEARCH_ENDPOINT, CONTENT_INDEX_NAME, TOPIC_INDEX_NAME, VECTOR_FIELD_NAME, CONTENT_FIELD_NAME, KNOWLEDGE_SOURCE_NAME, KNOWLEDGE_BASE_NAME e QUESTION nell'ambiente del processo.

Per esempi REST, usare Visual Studio Code con l'estensione client REST per inviare le richieste da un .http file.

  1. Impostare l'endpoint del servizio IQ Foundry e il token di accesso. Per ottenere un token di accesso, vedere Connettersi a Foundry IQ. L'endpoint non deve avere una barra finale.

  2. Aggiungere le variabili seguenti. Sostituire i nomi di indice e di campo con i nomi del proprio ambiente. Usare i nuovi nomi della fonte delle informazioni e della knowledge base che appartengono a questa attività.

    @api-version = 2026-11-01-preview
    @search-endpoint = <search-endpoint>
    @access-token = <search-access-token>
    @content-index-name = sample-content
    @topic-index-name = sample-topics
    @vector-field-name = embedding
    @content-field-name = content
    @knowledge-source-name = sample-topic-ks
    @knowledge-base-name = sample-topic-kb
    @question = What are the main themes across the documents in this collection?
    @content-url = {{search-endpoint}}/indexes('{{content-index-name}}')
    @topic-url = {{search-endpoint}}/indexes('{{topic-index-name}}')
    @source-url = {{search-endpoint}}/knowledgesources('{{knowledge-source-name}}')
    @base-url = {{search-endpoint}}/knowledgebases('{{knowledge-base-name}}')
    

    Reference:Search Service REST API.

    Per i nomi predefiniti, embedding è il campo vettore ricercabile ed content è testo recuperabile.

  3. Esaminare la definizione dell'indice del contenuto.

import os

from azure.identity import DefaultAzureCredential
from azure.search.documents.indexes import SearchIndexClient

content_index_client = SearchIndexClient(
    endpoint=os.environ["SEARCH_ENDPOINT"],
    credential=DefaultAzureCredential(),
)
content_index_definition = content_index_client.get_index(
    os.environ["CONTENT_INDEX_NAME"]
)

Reference:SearchIndexClient.

using System;
using Azure.Identity;
using Azure.Search.Documents.Indexes;
using Azure.Search.Documents.Indexes.Models;

var contentIndexClient = new SearchIndexClient(
    new Uri(Environment.GetEnvironmentVariable("SEARCH_ENDPOINT")!),
    new DefaultAzureCredential());
SearchIndex contentIndexDefinition =
    (await contentIndexClient.GetIndexAsync(
        Environment.GetEnvironmentVariable(
            "CONTENT_INDEX_NAME")!)).Value;

Reference:SearchIndexClient.

###
GET {{content-url}}?api-version={{api-version}}
Authorization: Bearer {{access-token}}

Reference:Indexes - Get.

Verificare che embedding.topicGraphProfile indichi il profilo previsto, ad esempio content-topics. Seguire il profilo in vectorSearch.topicGraphProfiles[name].indexName, che deve identificare sample-topics per queste impostazioni predefinite. Controllare anche il profilo di ricerca vettoriale del campo e la configurazione del vettorizzatore per input di stringa.

  1. Esaminare la definizione dell'indice topic.
import os

from azure.identity import DefaultAzureCredential
from azure.search.documents.indexes import SearchIndexClient

topic_index_client = SearchIndexClient(
    endpoint=os.environ["SEARCH_ENDPOINT"],
    credential=DefaultAzureCredential(),
)
topic_index_definition = topic_index_client.get_index(
    os.environ["TOPIC_INDEX_NAME"]
)

Reference:SearchIndexClient.

using System;
using Azure.Identity;
using Azure.Search.Documents.Indexes;
using Azure.Search.Documents.Indexes.Models;

var topicIndexClient = new SearchIndexClient(
    new Uri(Environment.GetEnvironmentVariable("SEARCH_ENDPOINT")!),
    new DefaultAzureCredential());
SearchIndex topicIndexDefinition =
    (await topicIndexClient.GetIndexAsync(
        Environment.GetEnvironmentVariable(
            "TOPIC_INDEX_NAME")!)).Value;

Reference:SearchIndexClient.

###
GET {{topic-url}}?api-version={{api-version}}
Authorization: Bearer {{access-token}}

Reference:Indexes - Get.

Non inviare definizioni di indice sostitutivo come parte di questa procedura.

Creare la fonte delle informazioni

Creare un'origine dati separata searchIndex con le impostazioni archiviate balanced .

  1. Creare l'origine con campi di ricerca espliciti, campi dati restituiti e impostazioni dell'argomento.
import os

from azure.identity import DefaultAzureCredential
from azure.search.documents.indexes import SearchIndexClient
from azure.search.documents.indexes.models import (
    SearchIndexFieldReference,
    SearchIndexKnowledgeSource,
    SearchIndexKnowledgeSourceParameters,
)
from azure.search.documents.models import BalancedVectorQueryTopicGraph

topic_source_parameters = SearchIndexKnowledgeSourceParameters(
    search_index_name=os.environ["CONTENT_INDEX_NAME"],
    search_fields=[
        SearchIndexFieldReference(
            name=os.environ["VECTOR_FIELD_NAME"]
        )
    ],
    source_data_fields=[
        SearchIndexFieldReference(
            name=os.environ["CONTENT_FIELD_NAME"]
        )
    ],
    topic_graph=BalancedVectorQueryTopicGraph(
        min_diversity_pool_size=1000
    ),
)
topic_knowledge_source = SearchIndexKnowledgeSource(
    name=os.environ["KNOWLEDGE_SOURCE_NAME"],
    results_processing="none",
    search_index_parameters=topic_source_parameters,
)
topic_source_index_client = SearchIndexClient(
    endpoint=os.environ["SEARCH_ENDPOINT"],
    credential=DefaultAzureCredential(),
)
topic_source_index_client.create_or_update_knowledge_source(
    topic_knowledge_source
)

Riferimento:Libreria dei client Python.

using System;
using Azure.Identity;
using Azure.Search.Documents.Indexes;
using Azure.Search.Documents.Indexes.Models;
using Azure.Search.Documents.Models;

var topicSourceParameters = new SearchIndexKnowledgeSourceParameters(
    Environment.GetEnvironmentVariable("CONTENT_INDEX_NAME")!)
{
    TopicGraph = new BalancedVectorQueryTopicGraph
    {
        MinDiversityPoolSize = 1000
    }
};
topicSourceParameters.SearchFields.Add(
    new SearchIndexFieldReference(
        Environment.GetEnvironmentVariable("VECTOR_FIELD_NAME")!));
topicSourceParameters.SourceDataFields.Add(
    new SearchIndexFieldReference(
        Environment.GetEnvironmentVariable("CONTENT_FIELD_NAME")!));

var topicKnowledgeSource = new SearchIndexKnowledgeSource(
    Environment.GetEnvironmentVariable("KNOWLEDGE_SOURCE_NAME")!,
    topicSourceParameters)
{
    ResultsProcessing = KnowledgeSourceResultsProcessing.None
};
var topicSourceIndexClient = new SearchIndexClient(
    new Uri(Environment.GetEnvironmentVariable("SEARCH_ENDPOINT")!),
    new DefaultAzureCredential());
await topicSourceIndexClient.CreateOrUpdateKnowledgeSourceAsync(
    topicKnowledgeSource);

Riferimento:Libreria dei client .NET.

###
PUT {{source-url}}?api-version={{api-version}}
Authorization: Bearer {{access-token}}
Content-Type: application/json

{
  "name": "{{knowledge-source-name}}",
  "kind": "searchIndex",
  "resultsProcessing": "none",
  "searchIndexParameters": {
    "searchIndexName": "{{content-index-name}}",
    "searchFields": [{"name": "{{vector-field-name}}"}],
    "sourceDataFields": [{"name": "{{content-field-name}}"}],
    "topicGraph": {
      "kind": "balanced",
      "minDiversityPoolSize": 1000
    }
  }
}

Reference:Knowledge Sources - Create or Update.

  1. Leggere la definizione di origine per verificare l'indice archiviato, i campi e topicGraph le impostazioni.
import os

from azure.identity import DefaultAzureCredential
from azure.search.documents.indexes import SearchIndexClient

stored_source_index_client = SearchIndexClient(
    endpoint=os.environ["SEARCH_ENDPOINT"],
    credential=DefaultAzureCredential(),
)
stored_topic_knowledge_source = (
    stored_source_index_client.get_knowledge_source(
        os.environ["KNOWLEDGE_SOURCE_NAME"]
    )
)

Reference:SearchIndexClient.

using System;
using Azure.Identity;
using Azure.Search.Documents.Indexes;
using Azure.Search.Documents.Indexes.Models;

var storedSourceIndexClient = new SearchIndexClient(
    new Uri(Environment.GetEnvironmentVariable("SEARCH_ENDPOINT")!),
    new DefaultAzureCredential());
KnowledgeSource storedTopicKnowledgeSource =
    (await storedSourceIndexClient.GetKnowledgeSourceAsync(
        Environment.GetEnvironmentVariable(
            "KNOWLEDGE_SOURCE_NAME")!)).Value;

Reference:SearchIndexClient.

###
GET {{source-url}}?api-version={{api-version}}
Authorization: Bearer {{access-token}}

Reference:Knowledge Sources - Get.

Collegare l'origine dati a una knowledge base

  1. Creare la knowledge base di proprietà dell'attività, facendo riferimento all'origine creata in precedenza.
import os

from azure.identity import DefaultAzureCredential
from azure.search.documents.indexes import SearchIndexClient
from azure.search.documents.indexes.models import (
    KnowledgeBase,
    KnowledgeSourceReference,
)
from azure.search.documents.knowledgebases.models import (
    KnowledgeRetrievalMinimalReasoningEffort,
    KnowledgeRetrievalOutputMode,
)

topic_knowledge_base = KnowledgeBase(
    name=os.environ["KNOWLEDGE_BASE_NAME"],
    knowledge_sources=[
        KnowledgeSourceReference(
            name=os.environ["KNOWLEDGE_SOURCE_NAME"]
        )
    ],
    retrieval_reasoning_effort=(
        KnowledgeRetrievalMinimalReasoningEffort()
    ),
    output_mode=KnowledgeRetrievalOutputMode.EXTRACTIVE_DATA,
)
topic_base_index_client = SearchIndexClient(
    endpoint=os.environ["SEARCH_ENDPOINT"],
    credential=DefaultAzureCredential(),
)
topic_base_index_client.create_or_update_knowledge_base(
    topic_knowledge_base
)

Riferimento:Libreria dei client Python.

using System;
using Azure.Identity;
using Azure.Search.Documents.Indexes;
using Azure.Search.Documents.Indexes.Models;
using Azure.Search.Documents.KnowledgeBases.Models;

var topicKnowledgeBase = new KnowledgeBase(
    Environment.GetEnvironmentVariable("KNOWLEDGE_BASE_NAME")!,
    [
        new KnowledgeSourceReference(
            Environment.GetEnvironmentVariable(
                "KNOWLEDGE_SOURCE_NAME")!)
    ])
{
    RetrievalReasoningEffort =
        new KnowledgeRetrievalMinimalReasoningEffort(),
    OutputMode = KnowledgeRetrievalOutputMode.ExtractiveData
};
var topicBaseIndexClient = new SearchIndexClient(
    new Uri(Environment.GetEnvironmentVariable("SEARCH_ENDPOINT")!),
    new DefaultAzureCredential());
await topicBaseIndexClient.CreateOrUpdateKnowledgeBaseAsync(
    topicKnowledgeBase);

Riferimento:Libreria dei client .NET.

###
PUT {{base-url}}?api-version={{api-version}}
Authorization: Bearer {{access-token}}
Content-Type: application/json

{
  "name": "{{knowledge-base-name}}",
  "knowledgeSources": [{"name": "{{knowledge-source-name}}"}],
  "retrievalReasoningEffort": {"kind": "minimal"},
  "outputMode": "extractiveData"
}

Reference:Knowledge Bases - Creare o aggiornare.

  1. Verificare il riferimento all'origine corrispondente, l'impegno e la modalità di output.

Recupera con le impostazioni archiviate

  1. Invia la seguente richiesta.
import os

from azure.identity import DefaultAzureCredential
from azure.search.documents.knowledgebases import (
    KnowledgeBaseRetrievalClient,
)
from azure.search.documents.knowledgebases.models import (
    KnowledgeBaseRetrievalRequest,
    KnowledgeRetrievalMinimalReasoningEffort,
    KnowledgeRetrievalOutputMode,
    KnowledgeRetrievalSemanticIntent,
    SearchIndexKnowledgeSourceParams,
)

stored_topic_source = SearchIndexKnowledgeSourceParams(
    knowledge_source_name=os.environ["KNOWLEDGE_SOURCE_NAME"],
    include_references=True,
    include_reference_source_data=True,
)
stored_topic_request = KnowledgeBaseRetrievalRequest(
    intents=[
        KnowledgeRetrievalSemanticIntent(
            search=os.environ["QUESTION"]
        )
    ],
    retrieval_reasoning_effort=(
        KnowledgeRetrievalMinimalReasoningEffort()
    ),
    output_mode=KnowledgeRetrievalOutputMode.EXTRACTIVE_DATA,
    include_activity=True,
    knowledge_source_params=[stored_topic_source],
)
stored_topic_client = KnowledgeBaseRetrievalClient(
    endpoint=os.environ["SEARCH_ENDPOINT"],
    knowledge_base_name=os.environ["KNOWLEDGE_BASE_NAME"],
    credential=DefaultAzureCredential(),
)
stored_topic_response = stored_topic_client.retrieve(
    stored_topic_request
)

Riferimento:Libreria dei client Python.

using System;
using Azure.Identity;
using Azure.Search.Documents.KnowledgeBases;
using Azure.Search.Documents.KnowledgeBases.Models;

var storedTopicSource = new SearchIndexKnowledgeSourceParams(
    Environment.GetEnvironmentVariable("KNOWLEDGE_SOURCE_NAME")!)
{
    IncludeReferences = true,
    IncludeReferenceSourceData = true
};
var storedTopicRequest = new KnowledgeBaseRetrievalRequest
{
    RetrievalReasoningEffort =
        new KnowledgeRetrievalMinimalReasoningEffort(),
    OutputMode = KnowledgeRetrievalOutputMode.ExtractiveData,
    IncludeActivity = true
};
storedTopicRequest.Intents.Add(
    new KnowledgeRetrievalSemanticIntent(
        Environment.GetEnvironmentVariable("QUESTION")!));
storedTopicRequest.KnowledgeSourceParams.Add(storedTopicSource);

var storedTopicClient = new KnowledgeBaseRetrievalClient(
    new Uri(Environment.GetEnvironmentVariable("SEARCH_ENDPOINT")!),
    Environment.GetEnvironmentVariable("KNOWLEDGE_BASE_NAME")!,
    new DefaultAzureCredential());
KnowledgeBaseRetrievalResponse storedTopicResponse =
    (await storedTopicClient.RetrieveAsync(
        storedTopicRequest)).Value;

Riferimento:KnowledgeBaseRetrievalClient.

###
POST {{base-url}}/retrieve?api-version={{api-version}}
Authorization: Bearer {{access-token}}
Content-Type: application/json

{
  "intents": [{"type": "semantic", "search": "{{question}}"}],
  "retrievalReasoningEffort": {"kind": "minimal"},
  "outputMode": "extractiveData",
  "includeActivity": true,
  "knowledgeSourceParams": [
    {
      "knowledgeSourceName": "{{knowledge-source-name}}",
      "kind": "searchIndex",
      "includeReferences": true,
      "includeReferenceSourceData": true
    }
  ]
}

Reference:Knowledge Retrieval - Retrieve.

Eseguire l'override della selezione dell'argomento per una richiesta

  1. Inviare la stessa domanda con un override completo diverse .
import os

from azure.identity import DefaultAzureCredential
from azure.search.documents.knowledgebases import (
    KnowledgeBaseRetrievalClient,
)
from azure.search.documents.knowledgebases.models import (
    KnowledgeBaseRetrievalRequest,
    KnowledgeRetrievalMinimalReasoningEffort,
    KnowledgeRetrievalOutputMode,
    KnowledgeRetrievalSemanticIntent,
    SearchIndexKnowledgeSourceParams,
)
from azure.search.documents.models import DiverseVectorQueryTopicGraph

diverse_topic_source = SearchIndexKnowledgeSourceParams(
    knowledge_source_name=os.environ["KNOWLEDGE_SOURCE_NAME"],
    include_references=True,
    include_reference_source_data=True,
    topic_graph=DiverseVectorQueryTopicGraph(
        diversity_factor=0.1,
        min_diversity_pool_size=1000,
    ),
)
diverse_topic_request = KnowledgeBaseRetrievalRequest(
    intents=[
        KnowledgeRetrievalSemanticIntent(
            search=os.environ["QUESTION"]
        )
    ],
    retrieval_reasoning_effort=(
        KnowledgeRetrievalMinimalReasoningEffort()
    ),
    output_mode=KnowledgeRetrievalOutputMode.EXTRACTIVE_DATA,
    include_activity=True,
    knowledge_source_params=[diverse_topic_source],
)
diverse_topic_client = KnowledgeBaseRetrievalClient(
    endpoint=os.environ["SEARCH_ENDPOINT"],
    knowledge_base_name=os.environ["KNOWLEDGE_BASE_NAME"],
    credential=DefaultAzureCredential(),
)
diverse_topic_response = diverse_topic_client.retrieve(
    diverse_topic_request
)

Riferimento:Libreria dei client Python.

using System;
using Azure.Identity;
using Azure.Search.Documents.KnowledgeBases;
using Azure.Search.Documents.KnowledgeBases.Models;
using Azure.Search.Documents.Models;

var diverseTopicSource = new SearchIndexKnowledgeSourceParams(
    Environment.GetEnvironmentVariable("KNOWLEDGE_SOURCE_NAME")!)
{
    IncludeReferences = true,
    IncludeReferenceSourceData = true,
    TopicGraph = new DiverseVectorQueryTopicGraph
    {
        DiversityFactor = 0.1f,
        MinDiversityPoolSize = 1000
    }
};
var diverseTopicRequest = new KnowledgeBaseRetrievalRequest
{
    RetrievalReasoningEffort =
        new KnowledgeRetrievalMinimalReasoningEffort(),
    OutputMode = KnowledgeRetrievalOutputMode.ExtractiveData,
    IncludeActivity = true
};
diverseTopicRequest.Intents.Add(
    new KnowledgeRetrievalSemanticIntent(
        Environment.GetEnvironmentVariable("QUESTION")!));
diverseTopicRequest.KnowledgeSourceParams.Add(diverseTopicSource);

var diverseTopicClient = new KnowledgeBaseRetrievalClient(
    new Uri(Environment.GetEnvironmentVariable("SEARCH_ENDPOINT")!),
    Environment.GetEnvironmentVariable("KNOWLEDGE_BASE_NAME")!,
    new DefaultAzureCredential());
KnowledgeBaseRetrievalResponse diverseTopicResponse =
    (await diverseTopicClient.RetrieveAsync(
        diverseTopicRequest)).Value;

Riferimento:KnowledgeBaseRetrievalClient.

###
POST {{base-url}}/retrieve?api-version={{api-version}}
Authorization: Bearer {{access-token}}
Content-Type: application/json

{
  "intents": [{"type": "semantic", "search": "{{question}}"}],
  "retrievalReasoningEffort": {"kind": "minimal"},
  "outputMode": "extractiveData",
  "includeActivity": true,
  "knowledgeSourceParams": [
    {
      "knowledgeSourceName": "{{knowledge-source-name}}",
      "kind": "searchIndex",
      "includeReferences": true,
      "includeReferenceSourceData": true,
      "topicGraph": {
        "kind": "diverse",
        "diversityFactor": 0.1,
        "minDiversityPoolSize": 1000
      }
    }
  ]
}

Reference:Knowledge Retrieval - Retrieve.

Disabilitare il campionamento degli argomenti per una richiesta

  1. Invia la seguente richiesta.
import os

from azure.identity import DefaultAzureCredential
from azure.search.documents.knowledgebases import (
    KnowledgeBaseRetrievalClient,
)
from azure.search.documents.knowledgebases.models import (
    KnowledgeBaseRetrievalRequest,
    KnowledgeRetrievalMinimalReasoningEffort,
    KnowledgeRetrievalOutputMode,
    KnowledgeRetrievalSemanticIntent,
    SearchIndexKnowledgeSourceParams,
)
from azure.search.documents.models import NoneVectorQueryTopicGraph

none_topic_source = SearchIndexKnowledgeSourceParams(
    knowledge_source_name=os.environ["KNOWLEDGE_SOURCE_NAME"],
    include_references=True,
    include_reference_source_data=True,
    topic_graph=NoneVectorQueryTopicGraph(),
)
none_topic_request = KnowledgeBaseRetrievalRequest(
    intents=[
        KnowledgeRetrievalSemanticIntent(
            search=os.environ["QUESTION"]
        )
    ],
    retrieval_reasoning_effort=(
        KnowledgeRetrievalMinimalReasoningEffort()
    ),
    output_mode=KnowledgeRetrievalOutputMode.EXTRACTIVE_DATA,
    include_activity=True,
    knowledge_source_params=[none_topic_source],
)
none_topic_client = KnowledgeBaseRetrievalClient(
    endpoint=os.environ["SEARCH_ENDPOINT"],
    knowledge_base_name=os.environ["KNOWLEDGE_BASE_NAME"],
    credential=DefaultAzureCredential(),
)
none_topic_response = none_topic_client.retrieve(
    none_topic_request
)

Riferimento:Libreria dei client Python.

using System;
using Azure.Identity;
using Azure.Search.Documents.KnowledgeBases;
using Azure.Search.Documents.KnowledgeBases.Models;
using Azure.Search.Documents.Models;

var noneTopicSource = new SearchIndexKnowledgeSourceParams(
    Environment.GetEnvironmentVariable("KNOWLEDGE_SOURCE_NAME")!)
{
    IncludeReferences = true,
    IncludeReferenceSourceData = true,
    TopicGraph = new NoneVectorQueryTopicGraph()
};
var noneTopicRequest = new KnowledgeBaseRetrievalRequest
{
    RetrievalReasoningEffort =
        new KnowledgeRetrievalMinimalReasoningEffort(),
    OutputMode = KnowledgeRetrievalOutputMode.ExtractiveData,
    IncludeActivity = true
};
noneTopicRequest.Intents.Add(
    new KnowledgeRetrievalSemanticIntent(
        Environment.GetEnvironmentVariable("QUESTION")!));
noneTopicRequest.KnowledgeSourceParams.Add(noneTopicSource);

var noneTopicClient = new KnowledgeBaseRetrievalClient(
    new Uri(Environment.GetEnvironmentVariable("SEARCH_ENDPOINT")!),
    Environment.GetEnvironmentVariable("KNOWLEDGE_BASE_NAME")!,
    new DefaultAzureCredential());
KnowledgeBaseRetrievalResponse noneTopicResponse =
    (await noneTopicClient.RetrieveAsync(
        noneTopicRequest)).Value;

Riferimento:KnowledgeBaseRetrievalClient.

###
POST {{base-url}}/retrieve?api-version={{api-version}}
Authorization: Bearer {{access-token}}
Content-Type: application/json

{
  "intents": [{"type": "semantic", "search": "{{question}}"}],
  "retrievalReasoningEffort": {"kind": "minimal"},
  "outputMode": "extractiveData",
  "includeActivity": true,
  "knowledgeSourceParams": [
    {
      "knowledgeSourceName": "{{knowledge-source-name}}",
      "kind": "searchIndex",
      "includeReferences": true,
      "includeReferenceSourceData": true,
      "topicGraph": {"kind": "none"}
    }
  ]
}

Reference:Knowledge Retrieval - Retrieve.

Esaminare le impostazioni e i limiti di verifica

Utilizzare solo le combinazioni pubbliche nella tabella seguente.

Setting Valori e valori predefiniti
topicGraph.kind Obbligatorio quando l'oggetto è presente: none, diverseo balanced.
none Disabilita il campionamento degli argomenti. Non includere diversityFactor o minDiversityPoolSize.
balanced Usa un fattore di diversità fisso di 0.2, indipendentemente dal fattore del profilo. Non includere diversityFactor.
diversityFactor Solo per diverse. Intervallo inclusivo: da 0 a 1. L'omissione usa il fattore del profilo o 0.2 se non ne è configurato alcuno.
minDiversityPoolSize Solo per diverse o balanced. Intervallo inclusivo: da 250 a 10000. L'omissione usa il valore minimo del profilo o 1000 se non è configurato.

Troubleshooting

Risolvere gli errori di configurazione prima di interpretare i risultati del recupero.

Problem Action
Associazione dell'argomento mancante Controllare il topicGraphProfilecampo vettore di ricerca effettivo, il profilo corrispondente e il relativo indice di argomento indexName.
Vettorizzatore mancante o incompatibile Configurare una vettorizzazione nel campo del vettore.