denselinkage.matching.LangChainMatcher¶
- class denselinkage.matching.LangChainMatcher(*, llm: Any, prompt: str, retry: RetryPolicy | None = None, max_concurrency: int = 1)[source]¶
Bases:
MatcherLLM matcher (extra:
[langchain]).The
llmis injected (any LangChain chat model); model / operational / domain config stay separate. Prompt/output contract:promptcarries ONLY the semantic question and may reference the pair fields ({record_a}/{record_b}). The response structure is framework-owned — the matcher binds structured output and returns typedMatchDecision``s; callers never parse text and the prompt never asks for a format. On exhausted ``retrythe matcher yields aMatchError(reason=...)for that pair (aligned by position), never raising into the batch.- match(pairs: Sequence[CandidatePair]) list[MatchDecision | MatchError][source]¶
One outcome per input pair, aligned by position. A pair the matcher cannot decide yields a
MatchError(never raises into the batch, so one bad call does not abort the rest).