Skip to content

enhancement: Make result fusion weights configurable via env vars #81

@QuantumByte-01

Description

@QuantumByte-01

Problem

In fuse_results (agents.py), vector and KS search results are merged with hardcoded weights:

"final_score": res.get("similarity", 0) * 0.6   # vector
"final_score": res.get("_score", 0) * 0.4        # KS

No explanation for the 0.6/0.4 split. These cannot be tuned without code changes.

Fix

Make them env-var configurable:

VECTOR_WEIGHT = float(os.getenv("FUSION_VECTOR_WEIGHT", "0.6"))
KS_WEIGHT = float(os.getenv("FUSION_KS_WEIGHT", "0.4"))

Add to .env.template with a comment explaining the tradeoff.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions