Interface for the arguments required to initialize an Azion library.

interface AzionRetrieverArgs {
    callbacks?: Callbacks;
    dbName?: string;
    entityExtractor?: BaseChatModel<BaseChatModelCallOptions, AIMessageChunk>;
    expandedMetadata?: boolean;
    filters?: AzionFilter[];
    ftsK?: number;
    ftsTable?: string;
    maxItemsSearch?: number;
    metadata?: Record<string, unknown>;
    metadataItems?: string[];
    promptEntityExtractor?: string;
    searchType?: "similarity" | "hybrid";
    similarityK?: number;
    tags?: string[];
    vectorTable?: string;
    verbose?: boolean;
}

Hierarchy

  • BaseRetrieverInput
    • AzionRetrieverArgs

Properties

callbacks?: Callbacks
dbName?: string

The name of the database to search for documents.

entityExtractor?: BaseChatModel<BaseChatModelCallOptions, AIMessageChunk>

The chatmodel to extract entities to perform Full text search on the database

expandedMetadata?: boolean

Whether the metadata is contained in a single column or multiple columns

filters?: AzionFilter[]

Filters to apply to the search. Default is an empty array.

ftsK?: number

The number of documents retrieved with full text search. Minimum is 1.

ftsTable?: string

Name of the table to perform full text search. Default is 'document_fts'

maxItemsSearch?: number

Max items to maintain per searchtype. Default is 3.

metadata?: Record<string, unknown>
metadataItems?: string[]

The columns from the tables that metadata must contain

promptEntityExtractor?: string

The prompt to the chatmodel to extract entities to perform Full text search on the database

searchType?: "similarity" | "hybrid"

Search type to perform. Cosine similarity and hybrid (vector + FTS) are currently supported.

similarityK?: number

The number of documents retrieved with cosine similarity (vector) search. Minimum is 1.

tags?: string[]
vectorTable?: string

Name of the table to perform vector similarity seach. Default is 'documents'

verbose?: boolean