feat(backend): add semantic matchmaking with embedding pipeline

Add a pluggable embedding provider with an offline deterministic default, vector indexing for problems and innovations, cosine semantic ranking, similar cases and solution suggestions, area filtering and an admin reindex endpoint. Refresh the index when innovations or submissions change.
This commit is contained in:
Rafał Tyński
2026-10-04 02:44:03 +02:00
parent 2bc083fb95
commit 25ce901021
13 changed files with 611 additions and 2 deletions
@@ -0,0 +1,19 @@
using TarninaHub.Application.Dtos;
namespace TarninaHub.Application.Abstractions;
public interface IMatchmakingService
{
Task IndexInnovationAsync(string innovationId, CancellationToken cancellationToken);
Task IndexProblemAsync(string problemId, CancellationToken cancellationToken);
Task IndexSubmissionAsync(string submissionId, CancellationToken cancellationToken);
Task<int> ReindexAsync(CancellationToken cancellationToken);
Task<MatchResponse?> MatchAsync(
string submissionId,
MatchRequest request,
CancellationToken cancellationToken);
}