MarginaliaSearch/MarginaliaSearch

(public api) Expose query ranking parameters on the public API

Opened this issue · 0 comments

These are presently available internally in ResultRankingParameters, most are probably safe to expose.

public final Bm25Parameters fullParams;
/** Tuning for BM25 when applied to priority matches, terms with relevance signal indicators */
public final Bm25Parameters prioParams;

/** Documents below this length are penalized */
public int shortDocumentThreshold;

public double shortDocumentPenalty;


/** Scaling factor associated with domain rank (unscaled rank value is 0-255; high is good) */
public double domainRankBonus;

/** Scaling factor associated with document quality (unscaled rank value is 0-15; high is bad) */
public double qualityPenalty;

/** Average sentence length values below this threshold are penalized, range [0-4), 2 or 3 is probably what you want */
public int shortSentenceThreshold;

/** Magnitude of penalty for documents with low average sentence length */
public double shortSentencePenalty;

public double bm25FullWeight;
public double bm25PrioWeight;
public double tcfWeight;

Some of the parameters in QueryLimits are probably also useful if given upper bounds

int resultsByDomain; 
int resultsTotal;  
int timeoutMs;  
int fetchSize;