Document Search


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

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)

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

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

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


Author

@Sadique Sheik @Fabian Schläpfer

 

© 2024 Unique AG. All rights reserved. Privacy PolicyTerms of Service