Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Switching between search index #2006

Open
daptatea opened this issue Sep 29, 2024 · 8 comments
Open

Switching between search index #2006

daptatea opened this issue Sep 29, 2024 · 8 comments
Labels
enhancement New feature or request

Comments

@daptatea
Copy link

Please provide us with the following information:

This issue is for a: (mark with an x)

- [ ] bug report -> please search issues before submitting
- [x ] feature request
- [ ] documentation issue or request
- [ ] regression (a behavior that used to work and stopped in a new release)

Minimal steps to reproduce

Hi,

I’m looking to switch between different indexes in the Azure AI search from the frontend. Like a dropdown menu: Index1, Index2, Index3. Could you guide me on how to do this? Specifically, which file should I edit to modify the API call for selecting different indexes?

I’m currently editing the chatReadRetrieveread file, but I’ve struggled to adjust the frontend code to facilitate this switching. Any tips on what parts of the code I should focus on would be greatly appreciated!

Thanks for your help!

Any log messages given by the failure

Expected/desired behavior

OS and Version?

Windows 7, 8 or 10. Linux (which distribution). macOS (Yosemite? El Capitan? Sierra?)

azd version?

run azd version and copy paste here.

Versions

Mention any other details that might be useful


Thanks! We'll be in touch soon.

@bnodir
Copy link
Contributor

bnodir commented Sep 30, 2024

@daptatea - I've implemented a feature similar to what you might considering for switching between search indexes. In my case, I use a single index (named "gptkbindex") which contains categorized data, let's say category1(for Past Inquiries), category2(for Product Manuals), category3(etc.). To facilitate this, I introduce an "include category"(*) option in the developer settings as a dropdown menu for selecting categories, with "All" as the default option.
image

(*) Check azure-search-openai-demo:RAG_Hack_Project for details.

Currently, we have an "exclude category" text box where specifying category1 filters for category2 and category3. However, this setup isn't very user-friendly, I guess. A more intuitive approach, like the multiselect list suggested in #1333, might be beneficial.

To utilize the "category" parameter, it should be included during the data ingestion process. I think there isn't any documentation in repo on this right now, but you might find relevant information in previous issues like this one: #1715

@cforce
Copy link

cforce commented Sep 30, 2024

This is great . Would you please create a Pull Request

@daptatea
Copy link
Author

@pamelafox Is there anything you'd like to add? I am not entirely sure how we can approach this yet.

@jeannot-prvlimburg
Copy link

This functionality would be very useful and is definitely worth exploring for integration into the main branch.

@pamelafox
Copy link
Collaborator

I've seen this implemented on a colleague's version of this app. He put the dropdown in the same spot where @bnodir put the optional language picker, as opposed to putting it in the Developer Settings. The question is whether you consider this more of a "user setting" or more of a "developer setting", or if you end up exposing the developer settings to end users anyway. I don't know what is most common in production.

@cforce
Copy link

cforce commented Oct 1, 2024

If there would be an entitlement based role mapping
a.) developer
b.) user

the existing settings dialog could be used for any setting valuable for users but not showing those for developers at the same time

@daptatea
Copy link
Author

daptatea commented Oct 2, 2024

@pamelafox We've enabled Microsoft login for the app via Azure App Services, and based on that, we prefer this feature to be a user setting rather than a developer setting. This approach will enhance the user experience by allowing users to easily switch between different data sources / indexes. This flexibility helps ensure that the AI Search retrieves relevant data without being overwhelmed by excessive or irrelevant information, leading to a smoother interaction with the app.

However, either approach works for us, as we can always adapt it to our specific needs later.

@jeannot-prvlimburg
Copy link

It would also be helpful to include a "None" option to disable RAG, allowing the chat to rely solely on the model's general knowledge.

@pamelafox pamelafox added the enhancement New feature or request label Oct 4, 2024
@bnodir bnodir mentioned this issue Oct 5, 2024
5 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

5 participants