Skip to main content
Every enrichment result includes confidence scores that indicate how certain Triqai is about each piece of data. Understanding these scores helps you make better decisions about when to trust automated enrichment and when to require manual review.

What Are Confidence Scores?

Confidence scores are integer values from 0 to 100 that represent Triqai’s certainty about an enrichment result:
  • 0: No confidence (should not be used)
  • 50: Low confidence (uncertain match)
  • 75: Moderate confidence (likely correct)
  • 90: High confidence (very likely correct)
  • 100: Maximum confidence (definitive match)

Where Scores Appear

Confidence scores are provided at multiple levels:

Overall Transaction Confidence

{
  "data": {
    "transaction": {
      "confidence": 92
    }
  }
}
This represents the overall quality of the enrichment across all modules.

Category Confidence

{
  "category": {
    "primary": { "name": "Shopping" },
    "secondary": { "name": "Online Shopping" },
    "confidence": 95
  }
}

Per-Enrichment Confidence

Each enrichment module has its own confidence score:
{
  "enrichments": {
    "merchant": {
      "status": "found",
      "confidence": 98
    },
    "location": {
      "status": "found",
      "confidence": 72
    },
    "paymentProcessor": {
      "status": "not_applicable",
      "confidence": null
    }
  }
}

Score Interpretation

Interpretation: Highly reliable for automated decisionsWhen you see this:
  • Transaction string closely matches known patterns
  • Multiple data points confirm the identification
  • Entity is well-known with clear signatures
Recommended action: Use directly in your application without review

Confidence by Entity Type

Different entity types typically have different confidence distributions:
EntityTypical RangeNotes
Merchant70-99Well-known merchants score higher
Location50-95Store-level matching is harder
Category75-99Based on merchant + context
Payment Processor90-99Distinct patterns, high accuracy
P2P Platform85-99Clear signatures per platform

Factors Affecting Confidence

Positive Factors

  • Clear merchant identifiers in transaction string
  • Location hints (city, state, store number)
  • Common, well-known merchants
  • Standard transaction formats
  • Multiple corroborating signals

Negative Factors

  • Truncated transaction descriptions
  • Unknown or rare merchants
  • Generic payment processor strings
  • Ambiguous location data
  • Unusual character encodings

Using Confidence in Your Application

Threshold-Based Logic

function shouldAutoApprove(enrichment) {
  const threshold = 85;
  
  return (
    enrichment.merchant.confidence >= threshold &&
    enrichment.data.transaction.confidence >= threshold
  );
}

function needsReview(enrichment) {
  return enrichment.data.transaction.confidence < 70;
}

Displaying Confidence to Users

function getConfidenceLabel(score) {
  if (score >= 90) return { text: "Verified", color: "green" };
  if (score >= 70) return { text: "Likely", color: "blue" };
  if (score >= 50) return { text: "Uncertain", color: "yellow" };
  return { text: "Unverified", color: "red" };
}

Filtering by Confidence

// Only process high-confidence results
const reliableTransactions = transactions.filter(
  tx => tx.enrichment.confidence >= 80
);

// Queue low-confidence for review
const needsReview = transactions.filter(
  tx => tx.enrichment.confidence < 60
);

Null Confidence Values

When confidence is null, it means:
  • The enrichment module wasn’t applicable (status: "not_applicable")
  • The module failed to run (status: "no_match" due to error)
  • No meaningful confidence could be calculated
{
  "paymentProcessor": {
    "status": "not_applicable",
    "confidence": null,
    "data": null
  }
}

Best Practices

Different applications have different tolerance for errors. A personal finance app might accept lower confidence than a compliance system.
If incorrect categorization has serious consequences, require higher confidence thresholds or manual review.
You might trust merchant identification but want to verify location. Check individual enrichment confidences, not just the overall score.
Monitor the confidence scores you’re seeing. Consistently low scores for certain transaction types might indicate a need for different handling.
Use the Issue Report API to flag incorrect enrichments. This helps improve accuracy over time.

Next Steps