How deepsparkchaker/signalmira works
SignalMira ingests tenant-scoped customer feedback, persists it, and supports enrichment, search, and dashboard review. The documented opinion workflow validates review input, extracts schema-checked opinions through a bounded LLM adapter, and can stream results without database writes; existing sentiment jobs can persist enrichment separately. Retrieval combines semantic and lexical search, with optional reranking. The graph also preserves documented independent enrichment stages and indexing. Some subsystem implementations were not sampled, so their internal links are omitted; edges reflect shown imports, calls, or README statements.
Main entry points: postgres.py PostgreSQL store · service.py Workspace service · hybrid.py Hybrid search · retrieval_lab.py Retrieval lab
Components 33
Feedback ingestion
- CSV reader
ingestion/csv_reader.py - Scraped reader
ingestion/scraped_reader.py - Feedback contract
ingestion/schemas.py - Import entry point
ingestion/__main__.py - Storage entry point
storage/__main__.py
Review enrichment
- Sentiment analysis
enrichment/sentiment.py - Entity extraction
enrichment/ner.py - Entity catalog matching
enrichment/ned.py - Language detection
enrichment/language.py - Topic modeling
enrichment/topics.py - Topic policy
enrichment/topic_policy.py - Aspect groups
enrichment/aspect_groups.py - Opinion service
enrichment/opinion_service.py - Opinion extractor
enrichment/langchain_opinions.py - Opinion schema
enrichment/opinion_schema.py - LLM factory
llm_providers/llm_factory.py - Sentiment jobs
enrichment/sentiment_jobs.py
Search and retrieval
- Review chunking
indexing/chunking.py - Chunk storage
indexing/chunk_store.py - Text embeddings
retrieval/embedders.py - Lexical search
retrieval/lexical.py - Hybrid search
retrieval/hybrid.py - Search reranker
retrieval/reranker.py - Reranked search
retrieval/reranked_search.py
Analyst workspace
- Streamlit dashboard
frontend/app.py - Workspace service
frontend/service.py - Retrieval lab
frontend/retrieval_lab.py - Aspect groups page
frontend/pages/2_Aspect_Groups.py - Opinion preview
scripts/opinion_preview.py
Data and tenancy
- PostgreSQL store
storage/postgres.py - Tenant context
security/tenant_context.py - Tenant RLS
security/tenant_rls.py
Other components
- Feedback sources
Connections 42
- Feedback sources → Import entry point: supplies files
ingestion/__main__.py - Import entry point → CSV reader: reads CSV
ingestion/__main__.py - Import entry point → Scraped reader: reads exports
ingestion/__main__.py - CSV reader → Feedback contract: normalizes rows
ingestion/csv_reader.py - Scraped reader → Feedback contract: normalizes records
ingestion/scraped_reader.py - Storage entry point → CSV reader: reads CSV
storage/__main__.py - Storage entry point → Scraped reader: reads exports
storage/__main__.py - Storage entry point → PostgreSQL store: persists records
storage/__main__.py - PostgreSQL store → Feedback contract: accepts records
storage/postgres.py - Streamlit dashboard → Workspace service: loads workspace
frontend/app.py - Streamlit dashboard → Entity extraction: runs NER
frontend/app.py - Streamlit dashboard → Retrieval lab: opens search lab
frontend/app.py - Workspace service → PostgreSQL store: reads reviews
frontend/service.py - Workspace service → Topic modeling: previews topics
frontend/service.py - Workspace service → Entity catalog matching: matches entities
frontend/service.py - Workspace service → Tenant context: validates tenant
- Aspect groups page → Aspect groups: manages groups
frontend/pages/2_Aspect_Groups.py - Aspect groups page → Workspace service: uses service
frontend/pages/2_Aspect_Groups.py - Aspect groups page → PostgreSQL store: reads data
frontend/pages/2_Aspect_Groups.py - Opinion service → Opinion extractor: extracts opinions
enrichment/opinion_service.py - Opinion service → Opinion schema: returns validated data
enrichment/opinion_service.py - Opinion service → Tenant context: validates tenant
enrichment/opinion_service.py - Opinion extractor → Opinion schema: validates output
enrichment/langchain_opinions.py - Opinion extractor → LLM factory: creates client
enrichment/langchain_opinions.py - Opinion preview → Opinion service: analyzes reviews
scripts/opinion_preview.py - Sentiment jobs → Sentiment analysis: runs enrichment
enrichment/sentiment_jobs.py - Sentiment jobs → Opinion extractor: runs opinions
enrichment/sentiment_jobs.py - Sentiment jobs → PostgreSQL store: persists results
enrichment/sentiment_jobs.py - Topic modeling → Topic policy: applies policy
enrichment/topics.py - Language detection → Tenant context: sets tenant context
enrichment/language.py - Language detection → PostgreSQL store: reads and writes
enrichment/language.py - Hybrid search → Text embeddings: embeds queries
retrieval/hybrid.py - Hybrid search → Lexical search: searches lexically
retrieval/hybrid.py - Hybrid search → PostgreSQL store: queries reviews
retrieval/hybrid.py - Reranked search → Hybrid search: retrieves candidates
retrieval/reranked_search.py - Reranked search → Search reranker: reranks results
retrieval/reranked_search.py - Retrieval lab → Text embeddings: loads embeddings
frontend/retrieval_lab.py - Retrieval lab → Search reranker: loads reranker
frontend/retrieval_lab.py - Retrieval lab → Hybrid search: searches reviews
frontend/retrieval_lab.py - Chunk storage → Review chunking: chunks reviews
indexing/chunk_store.py - Chunk storage → PostgreSQL store: stores chunks
indexing/chunk_store.py - Tenant RLS → Tenant context: uses tenant setting
security/tenant_rls.py