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

Documentation please: Exclude category #647

Closed
mhalomari opened this issue Sep 18, 2023 · 6 comments
Closed

Documentation please: Exclude category #647

mhalomari opened this issue Sep 18, 2023 · 6 comments
Labels

Comments

@mhalomari
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
- [ ] 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.

@krumkrum
Copy link

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

@mhalomari
Copy link
Author

Thank you very much @krumkrum

@axemanks
Copy link

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.

Copy link

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 github-actions bot added the Stale label Nov 23, 2023
@pamelafox pamelafox removed the Stale label Nov 23, 2023
Copy link

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 github-actions bot added the Stale label Jan 27, 2024
@bnodir bnodir mentioned this issue Oct 5, 2024
5 tasks
@pamelafox
Copy link
Collaborator

The ingestion guide discusses categories now, and there's an Include category feature, so I think we can close this:
https://github.com/Azure-Samples/azure-search-openai-demo/blob/main/docs/data_ingestion.md#enhancing-search-functionality-with-data-categorization

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants