Skip to content

Conversation

@quge009
Copy link
Collaborator

@quge009 quge009 commented Oct 27, 2025

This PR is mainly about improving the user experience.

  • Changes made to optimize users perceived latency and reading experience:
    • Implement streaming output for LLMSession class, change the final answer generation call to streaming output, to post the answer to user as-soon-as the first few tokens are ready.
    • Implement the push_frontend method to leverage the steaming output to feedback the CoPilot progress status message to user in real-time, to manage users' experience during waiting for the answer.
    • Add auto scroll feature for frontend plugin to enhance readability.
  • Changes made to reduce the average_response_latency (defined as time between question receival and answer posting):
    • Refactor several components' (SmartHelp, LTP, ...) implementation into classes, to make it possible to preserve the states when necessary.
    • Reuse the same llm_session instance for requests within the same conversation, by avoiding unnecessary https re-connection in initialization.
    • Implement a new question parsing function to combine contextualization and classification llm calls into one efficient call, to reduce time.
    • Move prompt reading to instance initialization, to avoid unnecessary file I/O operations.
  • Also a minor bug fix is included:
    • Change the assignment of 'turnId' to frontend.

Effectiveness of this PR:

  • Impact on accuracy
    • No change
  • Impact on response latency
    • ~15% response time reduction on average
    • ~50% response time reduction for extreme simple question

@quge009 quge009 changed the title tmp Improve Performance: CoPilot, response latency, user expectation Oct 28, 2025
@quge009 quge009 changed the title Improve Performance: CoPilot, response latency, user expectation Improve Performance: CoPilot: response latency, user expectation Oct 28, 2025
@quge009 quge009 changed the title Improve Performance: CoPilot: response latency, user expectation Improve Performance: CoPilot: users' perceived response latency Oct 28, 2025
@quge009 quge009 marked this pull request as ready for review October 28, 2025 20:04
@quge009 quge009 changed the title Improve Performance: CoPilot: users' perceived response latency Improve Performance: CoPilot: users experience Oct 28, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants