hackerai-tech / PentestGPT

AI-Powered Automated Penetration Testing Tool
https://pentestgpt.ai/
GNU General Public License v3.0
840 stars 40 forks source link

Implement User Option to Disable RAG Enhanced Search #198

Open RostyslavManko opened 7 months ago

RostyslavManko commented 7 months ago

Description

We are using RAG to enhance user searches, but in some cases, users may not need or want the RAG functionality, such as when coding or performing other tasks. To accommodate user preferences, we need to provide an option to disable the RAG by adding a switch with the text "Enhance Search" next to it. When users hover over the "Enhance Search" text, we should provide an explanation of what the Enhance Search feature is. On larger screens, the Enhance Search switch should be placed next to the plugins select bar. For mobile screens, we need to find an alternative placement due to space limitations.

Objective

Our goal is to implement a user-friendly option to enable or disable the RAG Enhance Search feature, providing users with more control over their search experience.

Actions and Considerations (ACC)

  1. Design and Implement Enhance Search Switch:

    • [x] Create an on-off switch for the Enhance Search feature with the label "Enhance Search."
    • [x] Place the switch next to the plugins select bar on larger screens and find an alternative placement for mobile screens.
  2. Add Hover Explanation:

    • [x] Implement a tooltip or hover text that explains the Enhance Search feature when users hover over the label.
  3. Update RAG Functionality:

    • [x] Modify the RAG functionality to respect the user's preference when the Enhance Search switch is turned off.
  4. Testing and Quality Assurance:

    • [ ] Conduct thorough testing to ensure that the Enhance Search switch works as expected and that the RAG functionality is correctly disabled when the switch is turned off.
    • [ ] Test various scenarios, including potential edge cases, to guarantee a robust and reliable solution.

Expected Outcomes

fkesheh commented 7 months ago

What do you think of instead creating a switch, detect that during the standalone question creation the situations we don't want the RAG and automatically disable it?

RostyslavManko commented 7 months ago

It sounds like a wonderful idea, but in my mind, the actual implementation is not really possible. I don't know how to not search when a user, for example, wants to write code, only by asking AI itself, but I don't really know how it will work. What do you have in mind? @fkesheh

fkesheh commented 6 months ago

https://github.com/Hacker-GPT/HackerGPT-2.0/pull/257/