azure-search-openai-demo
azure-search-openai-demo copied to clipboard
Documentation please: Exclude category
Please provide us with the following information:
This issue is for a: (mark with an x)
- [ ] bug report -> please search issues before submitting
- [ ] feature request
- [x] documentation issue or request
- [ ] regression (a behavior that used to work and stopped in a new release)
Minimal steps to reproduce
NA
Any log messages given by the failure
NA
Expected/desired behavior
To exclude a set/category of sources from search
OS and Version?
Windows 10.
azd version?
azd version 1.1.0
Versions
NA
Mention any other details that might be useful
I would love to use the "Exclude category" option but can't find it mentioned in the documentation. My data includes PDF and HTML files, so let's say I want to ask a question and tell the chatbot to search in PDFs only (or files with a specific predefined category), how can I use the "Exclude category" functionality? Your time and efforts to help are highly appreciated.
regards Mo
Thanks! We'll be in touch soon.
I use something like this.
filter = "category ne '{}'".format(exclude_category.replace("'", "''")) if exclude_category else None
example
"category ne 'Configuring_the_Server' and category ne 'Features' and category ne 'Casino_Games' and category ne 'Administration_Panel' and category ne 'Affiliate_program'"
Thank you very much @krumkrum
I've gone into the Azure portal, to blob storage and added index tags to my files, as M$ docs said categorys will be generated by index tags, can we use those tags to exclude? I see in the gtpkb fields category, sourcepage, and sourcefile are filterable, so in theory we should be able to filter by category, sourcepage or sourcefile right? It hasn't seemed to work for me yet, but i'm probably missing something. Would love a bit more clarification on how it works.
This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this issue will be closed.
This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this issue will be closed.