Skip to content

Follow-up context fails for implicit reference queries (e.g., "now give formula") #3

Description

@ujandey

Problem

The system fails to resolve implicit follow-up queries that refer to the previously discussed concept.

Reproduction

Input sequence:

  1. "Explain Gauss law"
  2. "Explain simply"
  3. "Explain even simpler"
  4. "Now give formula"

Current Behavior

The system asks:
"What formula are you referring to?"

Expected Behavior

The system should infer that "formula" refers to Gauss law and return:

  • The mathematical expression of Gauss law
  • Optionally a brief explanation

Root Cause (Suspected)

  • Follow-up detection relies too heavily on semantic similarity
  • Weak handling of implicit references ("this", "that", "formula", "result")
  • Missing concept memory in active topic block

Proposed Fix

  • Add concept memory to topic block (e.g., current_topic = "Gauss law")

  • Improve reference detection:

    • Detect keywords like "formula", "equation", "result"
    • Map them to current topic
  • Override similarity threshold when reference_score is high

Priority

High — affects core conversational continuity

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workinghelp wantedExtra attention is needed

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions