AI-Generated Taxonomies
taxonomy.generate_from_context bootstraps a taxonomy from a free-form description of your data. Nothing is saved, so you can review the result first:
industry, data_type, use_case, taxonomy_type (default hierarchical) and max_depth (default 3).
Validate Against Your Documents
For higher accuracy, pass the data source’s id and setvalidate_tags=True. The platform samples that data source’s files and scores the suggested tags against them; tag_not_found_rates reports how often each tag was not found in the sample.
-1 means there is no score for that tag. Validation was not requested, no sample files were found, or validation failed. Without a data source and validate_tags=True, every tag reports -1.
generate_from_context takes the data source by id only. The lookup above is the same name-to-id lookup described in the SDK README.Create the Tags
Once you are happy with the suggestion, create its tags withtags.upsert. Each entry in suggested_tags is keyed by tag name:
The suggested graph names its nodes by tag name, while a saved taxonomy refers to tags by id, so don’t pass
suggestion.taxonomy_data to taxonomy.upsert as returned. Use the suggestion as a blueprint for the tags above.Common Use Cases
- Financial Reports
- Resumes
- Insurance Claims
Next Steps
Organize a SharePoint Library
Enrich libraries at the source with your taxonomy.
Clean Up a RAG Index
Curate a serving collection with your taxonomy.
Protect Sensitive Data
Add sensitive data detection.
Taxonomies Concept
Learn the fundamentals of taxonomies.
