azure-search-openai-demo icon indicating copy to clipboard operation
azure-search-openai-demo copied to clipboard

Documentation please: Exclude category

Open mhalomari opened this issue 2 years ago • 5 comments

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.

mhalomari avatar Sep 18 '23 17:09 mhalomari

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'"

krumkrum avatar Sep 19 '23 06:09 krumkrum

Thank you very much @krumkrum

mhalomari avatar Sep 19 '23 09:09 mhalomari

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.

axemanks avatar Sep 24 '23 01:09 axemanks

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.

github-actions[bot] avatar Nov 23 '23 01:11 github-actions[bot]

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.

github-actions[bot] avatar Jan 27 '24 01:01 github-actions[bot]