Research and Implementation of a Hybrid Algorithm Based on Fuzzy Inference, Machine Learning, and RAG Models for Event Stream Analysis in Financial Infrastructure
Abstract
A hybrid analytical platform for collecting and analyzing event streams in distributed information and financial systems is proposed and implemented, combining fuzzy logic, machine learning, and Retrieval-Augmented Generation (RAG) based on large language models. An end-to-end processing pipeline for system logs is developed, including structural parsing, knowledge-based event classification, feature extraction, sliding window-based granulation, fuzzification using triangular membership functions, Mamdani fuzzy inference, and centroid defuzzification. The fuzzy layer provides a graded criticality score criticality $\in[0, 1]$, serving as an interpretable filter for semantic search of similar incidents in a vector storage based on the pgvector extension for PostgreSQL and recommendation generation using a local language model within the RAG paradigm. The proposed solution is oriented towards practical application as a foundation for developing parsers for event data collection and analytical processing. A key advantage is that the fuzzy inference model does not require labeled training data for rule construction - all rules and membership functions are defined by domain experts. For validation purposes only, a small set of expert-labeled incidents was used to compute AUC-ROC and Average Precision metrics, demonstrating that the model's scoring aligns with human expert judgment. A decision support system prototype is implemented as a web application (FastAPI, React) with a modular architecture. Experimental validation is performed on LogHub datasets (HDFS) and MOEX monitoring data; scoring quality is confirmed by AUC-ROC and Average Precision metrics. The interpretability of fuzzy inference provides a foundation for building an explainable root cause analysis system.