# sieves | Mantis | Knowledge Base | Instagit

Plug-and-play document AI with zero-shot models.

GitHub Stars: 125

Repository: https://github.com/mantisai/sieves

---

## Articles

### [How to Use Observability and Logging with Loguru in Sieves Pipelines](/mantisai/sieves/observability-logging-sieves)

Master Loguru logging and observability in Sieves pipelines. Capture parsing errors and LLM outputs for better debugging and analysis. Learn how to integrate seamlessly.

- Tags: how-to-guide
- Published: 2026-03-06

### [How to Perform Information Extraction with Single vs Multi-Entity Mode in Sieves](/mantisai/sieves/information-extraction-modes-sieves)

Master information extraction with Sieves single vs multi-entity modes. Learn when to use each for optimal accuracy and F1 scores in your NLP projects.

- Tags: how-to-guide
- Published: 2026-03-06

### [How to Handle Image Inputs with PIL Images in Sieves: A Complete Guide](/mantisai/sieves/handle-image-inputs-sieves)

Learn to handle image inputs with PIL Images in Sieves. The Doc class allows direct processing of Pillow Image objects for multimodal pipelines. Explore visual data integration.

- Tags: how-to-guide
- Published: 2026-03-06

### [How to Export Results to HuggingFace Datasets Format in Sieves](/mantisai/sieves/export-to-hf-datasets-sieves)

Easily export Sieves results to HuggingFace Datasets format. Use to_hf_dataset() to create standard datasets with text and labels for local saving or pushing to the Hub.

- Tags: how-to-guide
- Published: 2026-03-06

### [How to Handle PII Masking and Anonymization in Sieves: A Complete Developer Guide](/mantisai/sieves/pii-masking-sieves)

Learn to handle PII masking and anonymization in Sieves. This guide explores the PIIMasking task for automatic PII detection, masking, and scoring with DSPy LangChain and Outlines.

- Tags: how-to-guide
- Published: 2026-03-06

### [How to Use the GLiNER2 Bridge for Named Entity Recognition in Sieves](/mantisai/sieves/use-gliner2-ner-sieves)

Learn to use the GLiNER2 bridge for Named Entity Recognition in Sieves. Adapt the GLiNER2 model easily for efficient entity extraction without custom prompts. Get started today

- Tags: how-to-guide
- Published: 2026-03-06

### [How to Add Few-Shot Examples to Tasks in Sieves: A Complete Guide](/mantisai/sieves/add-few-shot-examples-sieves)

Learn how to add few-shot examples to Sieves tasks. Inject contextual examples into your model prompts by passing FewshotExample objects to PredictiveTask subclasses for enhanced performance.

- Tags: how-to-guide
- Published: 2026-03-06

### [How to Use Predictive Tasks in Sieves: NER, Classification, IE, RE, and QA](/mantisai/sieves/using-predictive-tasks-sieves)

Learn how to use Sieves for NER, Classification, IE, RE, and QA. Unify predictive tasks with a common Pipeline interface for efficient execution.

- Tags: how-to-guide
- Published: 2026-03-06

### [How to Compose Pipelines Using the + Operator in Sieves: A Complete Guide](/mantisai/sieves/compose-pipelines-sieves)

Learn to compose Sieves pipelines with the + operator. Combine pipelines or append tasks for sequential execution and cache preservation. Get the complete guide.

- Tags: how-to-guide
- Published: 2026-03-06

### [How to Configure ModelSettings for Inference Modes and Batch Processing in Sieves](/mantisai/sieves/configure-modelsettings-sieves)

Configure ModelSettings in Sieves for JSON or chain-of-thought inference modes and optimize throughput using the batch size parameter. Learn how to streamline your processing.

- Tags: how-to-guide
- Published: 2026-03-06

### [How to Access Raw Model Outputs and Debugging Meta Information in Sieves](/mantisai/sieves/access-raw-model-outputs-sieves)

Access raw model outputs and debugging meta info in Sieves by setting include_meta=True. Capture LLM responses token usage and per chunk debug data in Doc.meta.

- Tags: debugging-guide
- Published: 2026-03-06

### [How to Track Token Usage and Input/Output Counts in Sieves](/mantisai/sieves/track-token-usage-sieves)

Easily track token usage input and output counts in your Sieves projects. Learn how Sieves automatically records valuable data for every model call within your Doc objects.

- Tags: how-to-guide
- Published: 2026-03-06

### [How to Evaluate Pipeline Performance Against Ground Truth Data in Sieves](/mantisai/sieves/evaluate-pipeline-performance-sieves)

Evaluate pipeline performance in Sieves by comparing predictions to ground truth. Populate Doc gold attribute, run pipeline, and use pipeline.evaluate to generate a report.

- Tags: performance
- Published: 2026-03-06

### [How to Optimize Prompts Using DSPy's MIPROv2 in Sieves: A Complete Guide](/mantisai/sieves/prompt-optimization-sieves)

Optimize DSPy prompts with Sieves MIPROv2. Automatically improve templates and few-shot examples via Bayesian search without writing DSPy code yourself. Get better AI results effortlessly.

- Tags: how-to-guide
- Published: 2026-03-06

### [How to Apply Model Distillation with SetFit and Model2Vec in Sieves](/mantisai/sieves/model-distillation-sieves)

Apply model distillation with SetFit and Model2Vec in Sieves. Fine-tune lightweight student models using task.distill() for fast, cost-effective inference without external LLM calls.

- Tags: tutorial
- Published: 2026-03-06

### [How to Use Text Chunking with Chonkie vs NaiveChunker in Sieves](/mantisai/sieves/text-chunking-sieves)

Master text chunking in Sieves with Chonkie vs NaiveChunker. Learn token-aware splitting and character-interval slicing using the Chunking task for efficient data processing.

- Tags: how-to-guide
- Published: 2026-03-06

### [How to Perform Document Ingestion with Docling and Marker in Sieves](/mantisai/sieves/document-ingestion-sieves)

Learn to ingest documents with Docling and Marker in the Sieves repository. Easily convert PDFs to plain text and extract content for streamlined processing.

- Tags: how-to-guide
- Published: 2026-03-06

### [How to Handle Errors in Strict vs Non-Strict Mode in Sieves](/mantisai/sieves/strict-vs-non-strict-mode-sieves)

Learn to handle errors in Sieves strict vs non-strict mode. Understand how the strict flag impacts runtime errors and pipeline execution for seamless data processing. Read now.

- Tags: how-to-guide
- Published: 2026-03-06

### [How to Use Conditional Task Execution with the Condition Parameter in Sieves](/mantisai/sieves/conditional-task-execution-in-sieves)

Master conditional task execution in Sieves. Learn how to use the condition parameter to skip documents per task and control your workflow efficiently.

- Tags: how-to-guide
- Published: 2026-03-06

### [How to Serialize and Deserialize Sieves Pipelines with YAML Configuration](/mantisai/sieves/serializing-sieves-pipelines)

Learn to serialize and deserialize Sieves pipelines using YAML config with pipeline dump and load functions. Ensure version safe persistence for your tasks.

- Tags: how-to-guide
- Published: 2026-03-06

### [How Pipeline Caching Works in Sieves: A Complete Technical Guide](/mantisai/sieves/pipeline-caching-in-sieves)

Learn how pipeline caching in Sieves stores hashed document results to skip redundant processing. Save API calls and ensure deterministic outputs with this technical guide.

- Tags: deep-dive
- Published: 2026-03-06

### [How to Create Custom Tasks and Bridges in Sieves Pipelines: A Complete Guide](/mantisai/sieves/creating-custom-tasks-in-sieves)

Learn to create custom Sieves tasks and bridges for deterministic or LLM-powered pipelines. This guide covers subclassing Task and PredictiveTask, implementing abstract methods like _call, integrate, and prompt_signature.

- Tags: how-to-guide
- Published: 2026-03-06

### [How to Configure DSPy, Outlines, LangChain, and GLiNER 2 Backends in Sieves](/mantisai/sieves/how-to-configure-model-backends-in-sieves)

Easily configure DSPy Outlines LangChain and GLiNER 2 backends in Sieves. Swap model providers with one line of code and maintain identical task logic. Explore flexible LLM integration.

- Tags: how-to-guide
- Published: 2026-03-06

