Add AI-powered company name matching using Claude API
Replace fuzzy string matching with semantic AI matching to fix false positives where similar-sounding but different companies were matched (e.g., "Families First CiC" incorrectly matching "FAMILIES AGAINST CONFORMITY LTD"). Changes: - Add ICompanyNameMatcherService interface and AICompanyNameMatcherService implementation using Claude Sonnet 4 for semantic company name comparison - Add SemanticMatchResult and related models for AI match results - Update CompanyVerifierService to use AI matching with fuzzy fallback - Add detection for public sector employers, charities, and self-employed entries that cannot be verified via Companies House - Update tests to work with new AI matcher integration Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,15 @@
|
||||
using TrueCV.Application.Models;
|
||||
|
||||
namespace TrueCV.Application.Interfaces;
|
||||
|
||||
public interface ICompanyNameMatcherService
|
||||
{
|
||||
/// <summary>
|
||||
/// Uses AI to semantically compare a company name from a CV against Companies House candidates.
|
||||
/// Returns the best match with confidence score and reasoning.
|
||||
/// </summary>
|
||||
Task<SemanticMatchResult?> FindBestMatchAsync(
|
||||
string cvCompanyName,
|
||||
List<CompanyCandidate> candidates,
|
||||
CancellationToken cancellationToken = default);
|
||||
}
|
||||
Reference in New Issue
Block a user