Backend dataclass

Bases: AbstractRAGBackend

__init__(relevance_threshold=0.5)

Initialize the backend.

@param relevance_threshold: The relevance threshold for the MMR query engine. 0-1 (default: 0.5) The higher the threshold, the stricter the document relevance requirement. Increasing the threshold increases the relevance, but also decreases the chance of finding an answer.

query(user_input, conversation=None)

Query the index with the user input.

Returns a tuple comprising (a) the response dicts and (b) the response object, if any.