Skip to main content

Overview

Binary detection is a fast, cost-effective way to find documents matching a single category without running full taxonomy generation. Instead of classifying documents into multiple categories, it answers a simple question: “Does this document match my category?”

When to Use Binary Detection

Comparison

Quick Start

How It Works

Binary detection uses a hybrid scoring approach combining:
  1. Semantic Similarity (default: 70% weight)
    • Embeds your category description using OpenAI embeddings
    • Computes cosine similarity between category and each document
    • Catches synonyms, paraphrases, and conceptually similar content
  2. Keyword Matching (default: 30% weight)
    • Counts how many keywords appear in each document
    • Provides a boost for exact terminology matches
    • Fast and deterministic
Documents with a score above your threshold are returned as matches.

API Reference

Delve.find_matches()

str | Path | DataFrame | List[Doc]
required
Documents to search. Supports:
  • CSV file path
  • JSON file path
  • pandas DataFrame
  • List of Doc objects
dict
required
Category definition with:
  • name (str, required): Category name
  • description (str, required): What this category represents
  • keywords (list[str], optional): Keywords to boost matching
Write a detailed description - it’s used for semantic matching. Keywords provide an additional boost for exact matches.
float
default:"0.5"
Minimum score (0-1) for a document to be considered a match.
Use matches.score_histogram() to see the score distribution and tune your threshold.
float
default:"0.7"
Weight for semantic (embedding) similarity. Combined with keyword_weight, these are normalized to sum to 1.0.
float
default:"0.3"
Weight for keyword matching. Set to 0 for pure semantic matching.

Working with Results

MatchResult Object

Export Results

Tune Threshold

Examples

Filter Support Tickets

Analyze LLM Traces

Pure Semantic Search (No Keywords)

DataFrame Input

Cost Estimation

Binary detection only uses the OpenAI Embeddings API (no LLM calls).
Use text-embedding-3-small for even lower costs at slightly reduced accuracy:

Next Steps

Full Taxonomy Generation

When you need multiple categories

Classifier Workflow

Train reusable classifiers