retrieval fusion

This commit is contained in:
Storme-bit
2026-04-27 05:21:43 -07:00
parent 9c6c5c9a42
commit 49982a85de
4 changed files with 29 additions and 10 deletions

View File

@@ -96,6 +96,12 @@ const ENTITIES = {
],
}
const RETRIEVAL = {
RRF_K: 60, // Reciprocal Rank Fusion smoothing constant, softens rank-1 advantage, not exposed in settings
SEMANTIC_WEIGHT: 1.0, // Weight applied to semantic (QDrant) results
KEYWORD_WEIGHT: 0, // Weight applied to keyword (SQLite) results, 0 = disables, set >0 to enable and tune balance between semantic vs keyword matches
}
module.exports = {
QDRANT,
COLLECTIONS,
@@ -108,5 +114,6 @@ module.exports = {
SQLITE,
ORCHESTRATION,
SUMMARIES,
ENTITIES
ENTITIES,
RETRIEVAL,
};

View File

@@ -1,5 +1,5 @@
const {getEnv} = require('./config/env');
const {QDRANT, COLLECTIONS, EPISODIC, SERVICES, OLLAMA, PORTS, LLAMACPP, INFERENCE_DEFAULTS, SQLITE, ORCHESTRATION, SUMMARIES, ENTITIES } = require('./config/constants');
const {QDRANT, COLLECTIONS, EPISODIC, SERVICES, OLLAMA, PORTS, LLAMACPP, INFERENCE_DEFAULTS, SQLITE, ORCHESTRATION, SUMMARIES, ENTITIES, RETRIEVAL } = require('./config/constants');
const {parseRow, formatEpisodeText} = require('./utils')
const logger = require('./utils/logger');
@@ -20,4 +20,5 @@ module.exports = {
SUMMARIES,
ENTITIES,
logger,
RETRIEVAL,
};