Skip to content

[feat] : display real-time prompt quality grade on floating enhancement pill #97

Description

@hrshjswniii

Overview


PromptPilot currently displays a generic floating enhancement pill () whenever a user selects text on a webpage. While this successfully indicates that prompt enhancement is available, it provides no insight into the quality of the selected prompt until the user opens the enhancement interface.

This feature introduces live prompt quality scoring directly on the floating pill, allowing users to instantly understand whether their selected prompt is strong, average, or weak before initiating any enhancement workflow.

By surfacing the quality grade directly in the selection experience, PromptPilot can provide immediate feedback while reducing unnecessary enhancement requests and helping users learn prompt engineering principles organically.



Problem Statement


Today, the prompt evaluation engine is only exposed after the user interacts with the floating pill and opens the enhancement modal.

Current flow:

Select Text
     ↓
Generic ✦ Pill Appears
     ↓
Click Pill
     ↓
Open Modal
     ↓
Run Evaluation
     ↓
View Quality Score

This creates unnecessary friction because users must perform several interactions before receiving feedback on prompt quality.

As a result:

  • Users cannot quickly assess whether enhancement is needed.
  • Weak prompts are not identified until after opening the modal.
  • Strong prompts receive the same visual treatment as poor prompts.
  • The floating pill provides no meaningful signal beyond availability.


User Stories


Developers

As a developer, I want to see the quality grade of a prompt immediately after selecting text so I can decide whether enhancement is worth the additional processing step.

Writers

As a writer, I want real-time visual feedback while refining prompt text so I can understand how additional context affects prompt quality.

Prompt Engineers

As a power user, I want instant grading directly on the page so I can rapidly iterate on prompts without repeatedly opening the enhancement interface.



Proposed Solution


Leverage the existing prompt scoring engine to evaluate selected text immediately after selection and surface the resulting grade directly on the floating pill.

Instead of displaying:

the pill would display:

S ✦
A ✦
B ✦
C ✦
D ✦
F ✦

with color-coded visual styling that reflects prompt quality.



Acceptance Criteria


Functionality

  • Prompt score is calculated automatically when text is selected.
  • Floating pill displays the corresponding grade letter.
  • Pill styling updates dynamically based on grade.
  • Existing enhancement workflows remain unchanged.

Performance

  • No noticeable lag during text selection.
  • Scoring requests are debounced.
  • No AI API calls are triggered during grading.

Reliability

  • Unsupported selections gracefully fall back to the default pill.
  • Errors in the scoring engine do not prevent the pill from rendering.

Compatibility

  • Works on all currently supported websites.
  • Works in both light and dark page environments.


Contribution Interest


Hii @Bindu2020324 👋
I’d like to work on this issue as part of GSSoC'26
please assign this issue to me !!

Metadata

Metadata

Assignees

Labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions