-
Notifications
You must be signed in to change notification settings - Fork 4.1k
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
Feature: include category #2021
Feature: include category #2021
Conversation
- Modified approach.py to include category logic - Updated models.ts with category types - Added translations for category("All") in en, es, fr, and ja locales - Updated Ask.tsx and Chat.tsx to handle category - Updated data ingestion documentation
Are there any updates on this feature? |
@glaucia86 Could you suggest the pt-br strings for "All" and "Include category" so @bnodir can add to the new pt-br file for this PR? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For Spanish, sounds pretty good for me
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We need pt-br strings since I just merged that file, and I've asked humans to review the other strings.
@glaucia86 Thank you! Can you also provide the portuguese translations of those strings? The pt-br file isn't showing up in this PR since I just merged it in, but it needs updating with the same new strings. |
Co-authored-by: Alfredo Deza <alfredo@deza.pe>
Co-authored-by: Alfredo Deza <alfredo@deza.pe>
Co-authored-by: Wassim Chegham <github@wassim.dev>
Thank you, everyone. I have made the changes based on the reviewers' feedback. |
Just wondering, if the category isn't mandatory and some documents don't have a category, will the "All" option include them? Thanks |
@zedhaque - Yes, the "All" option includes documents that don't have a category as well. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we may have some confusion with "All", with people wondering if that includes uncategorized, but we can watch and see if any issues come in about that. Thank you! I'll ask @mattgotteiner for a review as well since this adds a search filter.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for your contribution!
Does "All" also includes Uploaded Documents? It would be great to have as well "Uploaded" or "MyDocs" |
Yes, it does! It would indeed be helpful to tag manually uploaded documents with an "Uploaded" or "MyDocs" category to distinguish them easily. Additionally, supporting multiple categories would enable users to filter and select specific document subsets more precisely. |
Ensure your code looks like this:
This should display the additional option in the dropdown. Additionally, please ensure to refresh your browser to see the changes. |
I found out indeed. Thanks for the help! |
Purpose
Adding "Include category" functionality in developer settings, with "All" as a default option. By combining data categorization with the
prepdocs.py
scripts, it lets you filter Azure AI Search based on categories. This functionality allows category-based inquiries and informs the user about the categories present in the search index.This PR is somehow related to the following past issues:
Changes
Quick insight
Here is an example of how categories appear when ingested into the search index:
Let's add category keys like this:
Then, in the default "All" category, we get answers from all three categories, like this:
When specifying a particular category, we get generated answers from that category's data:
Does this introduce a breaking change?
When developers merge from main and run the server, azd up, or azd deploy, will this produce an error?
If you're not sure, try it out on an old environment.
Does this require changes to learn.microsoft.com docs?
This repository is referenced by this tutorial
which includes deployment, settings and usage instructions. If text or screenshot need to change in the tutorial,
check the box below and notify the tutorial author. A Microsoft employee can do this for you if you're an external contributor.
Type of change
Code quality checklist
See CONTRIBUTING.md for more details.
python -m pytest
).python -m pytest --cov
to verify 100% coverage of added linespython -m mypy
to check for type errorsruff
andblack
manually on my code.