Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Current »


Functionality

This module is designed to answer a user query based on documents ingested into the knowledge center. The module will first create a search string from the user question, embed it, and then perform a semantic search or a full text search in the VectorDB or the PostgreSQL DB. Finally, the module generates an answer for the user input based on retrieved internal knowledge, either referencing this knowledge with appropriate documents or stating that no information was found in the internal system.

Input

A user question related to information within the document database.

Example input:

  • "What is the guideline saying about travels to Europe?"

Output

An answer based on internal knowledge, either referencing the appropriate documents or stating that no information was found in the internal system.

Configuration settings (technical)

General parameters

Parameter

Description

languageModel: string

Specifies the language model used

Default: AZURE_GPT_35_TURBO_0613

searchType: string

Defines the type of search to be performed (VECTOR or COMBINED)

Default: COMBINED

maxTokens: number

Maximum number of tokens used by sources and previous conversation in the LLM call

scopeIds: [string]

Optional scope identifiers to limit the search

scopeToChatOnUpload: boolean

Indicates if the scope should be limited to the current chat upon upload

Default: false → Scope restriction off

chunkedSources: boolean

Indicates if chunks of same document are appended as individual sources (true) to the LLM content or merged to one source (false)
We recommend setting this parameter to true for GPT-4 and false for GPT-3.5.

Default: false

historyIncluded: boolean

Flag that allows to include previous chat conversation in GPT-calls only if the new user input is a follow-up question (false)

Default: true → History always included

keyWordExtractionTemperature: number

Temperature setting for keyword extraction

Default: 0

evaluationConfig: object

Enable the evaluation of the generated assistant’s response for hallucination detection by defining the evaluationConfig object. Note: This feature requires at least GPT-4 and incurs additional token costs. To activate hallucination detection, configure the object as follows:

"evaluationConfig": {
    "displayName": "Hallucination-Level",
    "metricConfigs": [
      {
        "name": "hallucination",
        "enabled": true,
        "scoreToEmoji": {
          "LOW": "🟢",
          "HIGH": "🔴",
          "MEDIUM": "🟡"
        },
        "languageModel": "AZURE_GPT_4_0613"
      }
    ]
  }

chunkRelevancySort: object

Enable the sorting of retrieved chunks based on their relevance to the user input by defining the chunkRelevancySort object. Note: Activating this feature will incur additional token costs.

  "chunkRelevancySortConfig": {
    "enabled": true,
    "relevancy_levels_to_consider": [
      "high", "medium", "low"
    ],
    "language_model" : "AZURE_GPT_35_TURBO_0613",
    "fallback_language_model" :"AZURE_GPT_35_TURBO"
  }

Prompts

Only adjust prompts if you are fully familiar with the code logic. Small changes can break the module or reduce the output quality.

Parameter

Description

systemPromptSearch: string

triggerPromptSearch: string

System and trigger prompt used to interpret user input and form search queries

systemPromptChatUpload: string

triggerPromptChatUpload: string

System and trigger prompt used for chat upload scenarios

systemPromptSearchString: string

triggerPromptSearchString: string

System and trigger prompt used to extract the search string from the user question


  • No labels