plexus.scores.nodes.FuzzyMatchClassifier module
- class plexus.scores.nodes.FuzzyMatchClassifier.FuzzyMatchClassifier(**parameters)
Bases:
BaseNodeA node that performs fuzzy string matching on extracted data from state and returns classification results compatible with conditions/routing.
Combines data extraction capabilities with fuzzy matching to provide flexible classification based on various state attributes.
- class GraphState(*, text: str, metadata: dict | None = None, results: dict | None = None, messages: ~typing.List[~typing.Dict[str, ~typing.Any]] | None = None, is_not_empty: bool | None = None, value: str | None = None, explanation: str | None = None, reasoning: str | None = None, chat_history: ~typing.List[~typing.Any] = <factory>, completion: str | None = None, classification: str | None = None, confidence: float | None = None, retry_count: int | None = 0, at_llm_breakpoint: bool | None = False, good_call: str | None = None, good_call_explanation: str | None = None, non_qualifying_reason: str | None = None, non_qualifying_explanation: str | None = None, match_found: bool | None = None, matches: ~typing.List[~typing.Dict[str, ~typing.Any]] | None = None, **extra_data: ~typing.Any)
Bases:
GraphStateState specific to the FuzzyMatchClassifier node.
Create a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- match_found: bool | None
- matches: List[Dict[str, Any]] | None
- model_config: ClassVar[ConfigDict] = {'arbitrary_types_allowed': True, 'extra': 'allow', 'validate_default': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class Parameters(*, model_provider: ~typing.Literal['ChatOpenAI', 'AzureChatOpenAI', 'BedrockChat', 'ChatVertexAI', 'ChatOllama'] = 'AzureChatOpenAI', model_name: str | None = None, base_model_name: str | None = None, reasoning_effort: str | None = 'low', verbosity: str | None = 'medium', model_region: str | None = None, temperature: float | None = 0, top_p: float | None = 0.03, max_tokens: int | None = 500, logprobs: bool | None = False, top_logprobs: int | None = None, input: dict | None = None, output: dict | None = None, system_message: str | None = None, user_message: str | None = None, example_refinement_message: str | None = None, single_line_messages: bool = False, name: str | None = None, data_paths: ~typing.List[str], targets: ~plexus.scores.shared.fuzzy_matching.core.FuzzyTargetGroup | ~plexus.scores.shared.fuzzy_matching.core.FuzzyTarget, classification_mapping: ~typing.Dict[str, str] = <factory>, default_classification: str | None = None)
Bases:
ParametersParameters for configuring the FuzzyMatchClassifier.
Create a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- classification_mapping: Dict[str, str]
- data_paths: List[str]
- default_classification: str | None
- model_config: ClassVar[ConfigDict] = {'ignored_types': (<class 'plexus.LangChainUser.LangChainUser.Parameters'>,), 'protected_namespaces': ()}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- targets: FuzzyTargetGroup | FuzzyTarget
- __init__(**parameters)
- add_core_nodes(workflow: StateGraph) StateGraph
Adds the core classifier node to the workflow.
- get_classifier_node() Callable
Returns the callable node function for the graph.