Inferensys

Glossary

Hybrid Matching Architecture

A clinical trial screening system design that combines deterministic rule-based filtering with probabilistic semantic matching to maximize both precision and recall.
Developer building agentic RAG system, retrieval pipeline diagram on laptop, technical workspace with notes.
CLINICAL TRIAL SCREENING

What is Hybrid Matching Architecture?

A system design that combines deterministic rule-based filtering with probabilistic semantic matching to maximize both precision and recall in patient-trial matching.

Hybrid Matching Architecture is a clinical trial screening system design that fuses deterministic rule-based filtering with probabilistic semantic matching to evaluate patient eligibility. It applies strict logical criteria for hard constraints while using vector embeddings to rank patients by semantic similarity to complex, unstructured protocol requirements.

This architecture mitigates the brittleness of purely rule-based systems and the opacity of purely neural approaches. A rule engine enforces non-negotiable criteria like lab values, while a semantic model scores narrative criteria, producing a ranked cohort with both high precision and high recall.

ARCHITECTURAL COMPONENTS

Key Features of Hybrid Matching Architecture

A clinical trial screening system design that combines deterministic rule-based filtering with probabilistic semantic matching to maximize both precision and recall.

01

Deterministic Rule Engine

The first-pass filter that applies hard constraints with absolute certainty. This layer handles binary inclusion/exclusion criteria such as:

  • Age ranges and sex assignments
  • Lab value thresholds (e.g., platelet count > 100,000/μL)
  • Concomitant medication exclusions
  • Prior therapy washout periods

Rules are compiled from structured eligibility criteria parsing output and executed against normalized patient data. This layer guarantees 100% precision on explicitly defined criteria and eliminates patients who definitively do not qualify before more expensive semantic processing occurs.

100%
Precision on Hard Constraints
< 50ms
Per-Patient Rule Evaluation
02

Semantic Similarity Matching

The second-pass layer that handles ambiguous or narrative criteria where exact matching fails. This component:

  • Converts patient records and trial criteria into dense vector embeddings using domain-adapted language models
  • Computes cosine similarity between patient profiles and eligibility requirements
  • Identifies patients with conditions that are clinically similar but not identically phrased (e.g., 'renal insufficiency' vs. 'CKD stage 3')

This layer dramatically improves recall by surfacing candidates that a pure rule-based system would miss due to terminology gaps or implicit clinical relationships.

40-60%
Recall Improvement Over Rules Alone
768-dim
Typical Embedding Dimensionality
03

Confidence Scoring & Thresholding

A unified scoring layer that combines outputs from both matching passes into a single, interpretable eligibility score per patient-trial pair. The mechanism:

  • Assigns binary pass/fail weights to deterministic rule results
  • Converts semantic similarity scores into probabilistic confidence values
  • Applies criteria weighting where critical inclusion criteria carry higher importance
  • Produces a ranked candidate list with explainable score breakdowns

Thresholds are configurable per trial, allowing study teams to balance precision vs. recall based on recruitment urgency and screen failure tolerance.

0-100
Normalized Score Range
Per-Criterion
Explainability Granularity
04

Temporal Reasoning Module

A specialized sub-engine that validates time-dependent criteria against longitudinal patient records. This module:

  • Reconstructs patient timelines from timestamped clinical events
  • Evaluates sequence constraints (e.g., 'progression after platinum-based chemotherapy')
  • Validates washout windows and recency requirements
  • Handles relative time expressions like 'within 6 months of screening'

Integrates with both deterministic rules for exact date math and semantic matching for fuzzy temporal expressions found in unstructured criteria text.

Day-level
Temporal Resolution
10+ years
Longitudinal Lookback
05

Ontology-Backed Normalization Layer

A preprocessing pipeline that harmonizes disparate clinical terminologies before matching occurs. This layer:

  • Maps local lab codes to LOINC standards
  • Normalizes drug names to RxNorm concepts
  • Aligns diagnoses across ICD-10-CM and SNOMED CT
  • Resolves unit-of-measure discrepancies (e.g., mg/dL vs. mmol/L)

By normalizing both patient data and parsed trial criteria to common ontologies, the architecture eliminates false negatives caused by coding system mismatches and enables cross-institutional screening across heterogeneous EHR systems.

5+
Ontologies Supported
Pre-Match
Normalization Timing
06

Protocol Amendment Adaptation

An automated monitoring system that detects and integrates protocol amendments into the active screening logic without manual reconfiguration. Capabilities include:

  • Version comparison of structured eligibility criteria
  • Identification of added, removed, or modified constraints
  • Automatic recompilation of rule sets and re-indexing of semantic embeddings
  • Flagging of previously screened patients for re-evaluation under amended criteria

This ensures screening accuracy persists across the trial lifecycle, preventing the common problem of sites using outdated eligibility logic after protocol revisions.

< 1 hour
Amendment Propagation Time
Automated
Re-screening Trigger
HYBRID MATCHING ARCHITECTURE

Frequently Asked Questions

Explore the core concepts behind clinical trial screening systems that combine deterministic rule-based filtering with probabilistic semantic matching to maximize both precision and recall in patient recruitment.

A Hybrid Matching Architecture is a clinical trial screening system design that combines two distinct computational approaches: deterministic rule-based filtering and probabilistic semantic matching. The rule-based component applies strict, Boolean logic to structured data fields—such as lab values, demographics, and coded diagnoses—to enforce absolute inclusion and exclusion criteria with 100% precision. The semantic component uses vector embeddings and natural language processing to evaluate unstructured clinical narratives against free-text eligibility criteria, identifying patients whose records contain conceptually similar but not identically worded conditions. This dual-layer approach ensures that no eligible patient is missed due to rigid keyword matching while maintaining the regulatory compliance required for protocol adherence. The architecture typically routes a patient profile through the deterministic filter first to eliminate clear non-matches, then applies the semantic layer to rank remaining candidates by relevance score.

Prasad Kumkar

About the author

Prasad Kumkar

CEO & MD, Inference Systems

Prasad Kumkar is the CEO & MD of Inference Systems and writes about AI systems architecture, LLM infrastructure, model serving, evaluation, and production deployment. Over 5+ years, he has worked across computer vision models, L5 autonomous vehicle systems, and LLM research, with a focus on taking complex AI ideas into real-world engineering systems.

His work and writing cover AI systems, large language models, AI agents, multimodal systems, autonomous systems, inference optimization, RAG, evaluation, and production AI engineering.