How erenunalll/semantic-anomaly-grouping works
This repository provides a FastAPI service for finding semantically similar log-like records and grouping related records. Requests are sanitized and embedded by an external model server; vector search selects candidate pairs, which are returned directly or further grouped with canonical-record selection and chain-link mitigation. The graph follows the calls visible in the sampled API and core modules; documentation filenames suggest additional context, but their contents were not provided.
Main entry points: semantic_match.py Match Orchestration · main.py FastAPI Endpoints · graph_grouping.py Cluster Orchestration · sanitize.py Text Sanitization
Components 13
API
- FastAPI Endpoints
main.py
Semantic Matching
- Request Preparation
semantic_match.py - Text Sanitization
sanitize.py - Match Orchestration
semantic_match.py - Vector Search
semantic_match.py - Pair Selection
semantic_match.py - Similarity Response
semantic_match.py
Record Grouping
- Cluster Orchestration
graph_grouping.py - Connected Groups
graph_grouping.py - Chain Mitigation
graph_grouping.py - Cluster Response
graph_grouping.py
Other components
- API Client
- Embedding Server
Connections 13
- API Client → FastAPI Endpoints: submits request
main.py - FastAPI Endpoints → Request Preparation: prepares input
main.py - Request Preparation → Text Sanitization: sanitizes text
semantic_match.py - FastAPI Endpoints → Match Orchestration: runs similarity
main.py - FastAPI Endpoints → Cluster Orchestration: runs clustering
main.py - Match Orchestration → Embedding Server: requests embeddings
semantic_match.py - Match Orchestration → Vector Search: builds and searches
semantic_match.py - Match Orchestration → Pair Selection: selects candidates
semantic_match.py - Match Orchestration → Similarity Response: formats pairs
semantic_match.py - Cluster Orchestration → Match Orchestration: computes pairs
graph_grouping.py - Cluster Orchestration → Connected Groups: forms groups
graph_grouping.py - Cluster Orchestration → Chain Mitigation: refines groups
graph_grouping.py - Chain Mitigation → Cluster Response: provides final groups
graph_grouping.py