@vaicli/vai-workflow-batch-quality-gate
v1.0.0
Published
Evaluate incoming documents against exemplar documents from the collection and only ingest those that meet a quality/relevance threshold.
Maintainers
Readme
vai-workflow-batch-quality-gate
Not all documents belong in a knowledge base. When ingesting from diverse sources, off-topic or low-quality content can pollute the collection and degrade search results. A quality gate that evaluates each document against the collection's existing content before ingesting prevents this.
Install
vai workflow install vai-workflow-batch-quality-gateHow It Works
- Sample exemplars — Retrieve representative documents from the collection
- Score quality — Compare incoming document against exemplars using similarity
- Gate — Ingest if quality meets threshold, otherwise generate rejection explanation
Execution Plan
Layer 1: get_exemplars
Layer 2: score_quality
Layer 3: ingest_if_quality | rejection_report (conditional)Example Usage
vai workflow run vai-workflow-batch-quality-gate \
--input document="This comprehensive guide covers Kubernetes pod scheduling, resource limits, and affinity rules..." \
--input collection="devops_docs" \
--input quality_threshold=0.55What This Teaches
- Exemplar-based quality scoring uses the collection's existing content as the relevance benchmark
- Conditional branching creates two mutually exclusive paths: ingest or reject with explanation
- The
generatestep only runs for rejections, providing actionable feedback - This pattern is composable — wrap it around any ingestion pipeline for quality control
License
MIT © 2026 Michael Lynn
