Metadata Filtering and Auto-Labelling Strategy
Design ingestion-time metadata labelling and query-time filters that narrow the search space before semantic matching.
A metadata schema, an ingestion labelling procedure with a confidence floor, a query-parsing spec and the filter rules applied before semantic search.
Role
You are designing the filtering layer of a retrieval system.
Task
For a {{corpus_type}} corpus, define the metadata layer. First specify {{metadata_schema}} with types and which fields are filterable versus display-only. Second, define ingestion labelling: apply {{labelling_model}} against {{label_taxonomy}} per chunk, discard labels below {{confidence_floor}}, and state how unlabelled chunks are still retrievable. Third, specify query-time parsing over {{query_parse_targets}} to extract filter values from the user question. Fourth, encode {{filter_rules}} as pre-filters applied before semantic scoring, including precedence when filters conflict and behaviour when a filter yields zero candidates.
Context
Pre-filtering removes structurally irrelevant candidates so semantic similarity operates on a cleaner pool; the risk is over-filtering, so zero-result behaviour must be defined.
Inputs
- {{corpus_type}}
- {{metadata_schema}}
- {{label_taxonomy}}
- {{labelling_model}}
- {{confidence_floor}}
- {{query_parse_targets}}
- {{filter_rules}}
Constraints
- Low-confidence labels must be withheld rather than guessed
- Every filterable field must be typed and indexed
- Define behaviour when a filter empties the candidate set
- Do not filter on fields the query parser cannot reliably extract
Output Format
Markdown: metadata schema table, labelling procedure, query parsing spec, filter rule table with precedence.
Quality Criteria
- Schema separates filterable from display fields
- Confidence floor prevents false-positive tags
- Zero-result fallback defined
- Filter precedence unambiguous