Skip to content

[Enhancement] Configurable Confidence Threshold and Intent Extraction Improvements #17

@amitb0ra

Description

@amitb0ra

Description

Currently, the system uses a hardcoded confidence threshold to validate model responses. This lack of flexibility prevents users from tuning the app for their specific needs (precision vs. recall). Additionally, smaller models like llama-3.1-8b-instant are currently struggling to consistently extract user intent under these fixed conditions.

Current Behavior

  • Hardcoded Threshold: The confidence check is locked at 75.
  • Inflexible Precision: Users cannot lower the threshold for more "creative" results or raise it for mission-critical accuracy.
  • Model Inconsistency: Specifically with llama-3.1-8b-instant, the intent extraction often fails to meet the hardcoded 75% bar, causing the app to skip valid actions or fail to respond to the user.

Proposed Changes

  • Settings Integration: Add a new configuration field in the app settings (e.g., ID_CONFIDENCE_THRESHOLD) allowing users to set a value between 0 and 100.
  • Dynamic Validation: Replace the hardcoded 75 in the codebase with the value retrieved from the user settings.
  • Intent Extraction Optimization: Review the prompt template used for intent extraction to ensure better compatibility with the llama-3.1-8b-instant model.
Image

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