How lakhmaisszineb/eleva works
Eleva is an AI marketing decision agent for e-commerce and retail. Users provide company data and an analysis question through the Streamlit interface or the FastAPI endpoint; the decision engine loads company context, observes and analyzes business data, detects issues, retrieves playbooks, and produces prioritized, explainable recommendations. Separate capabilities import and validate CSV data, calculate per-customer recommendations, and display results. The README documents the full decision sequence; source excerpts and the index confirm orchestration and selected calls, while some subsystem links are documented rather than verified in sampled implementation.
Main entry points: decision_engine.py Decision engine · views.py App views · company_store.py Company data access · groq_client.py Groq LLM client
Components 29
User interfaces
- Streamlit app
streamlit_app.py - App views
ui/views.py - Analysis API
api/main.py - Results display
ui/pipeline_view.py - UI components
ui/components.py - Session state
ui/state.py
Data management
- Company data access
data/company_store.py - SQLite database
data/db.py - CSV import
data/importer/csv_importer.py - Column mapping
data/importer/column_mapper.py - Company administration
data/company_admin.py
Decision workflow
- Decision engine
engine/decision_engine.py - Understand context
engine/nodes/understand.py - Observe data
engine/nodes/observe.py - Detect issues
engine/nodes/detect.py - Retrieve playbooks
engine/nodes/retrieve.py - Reason hypotheses
engine/nodes/reason.py - Plan strategies
engine/nodes/plan.py - Prioritize strategies
engine/nodes/decide.py - Generate recommendations
engine/nodes/recommend.py - Explain decisions
engine/explain.py
Knowledge and language
- Marketing knowledge RAG
knowledge/rag.py - Groq LLM client
llm/groq_client.py
Customer insights
- RFM segmentation
services/rfm.py - Marketing metrics
services/metrics.py - Customer recommendations
services/client_recommendations.py
Other components
- Business user
- API client
- Groq service
Connections 39
- Business user → Streamlit app: uses
- Streamlit app → App views: renders
streamlit_app.py - App views → Session state: uses
ui/views.py - App views → Results display: renders
ui/views.py - App views → CSV import: imports data
ui/views.py - App views → Company administration: manages companies
ui/views.py - App views → Customer recommendations: requests recommendations
ui/views.py - Session state → Company data access: accesses data
ui/state.py - Session state → Decision engine: runs analysis
ui/state.py - Results display → Explain decisions: uses explanation
ui/pipeline_view.py - Results display → UI components: renders with
ui/pipeline_view.py - API client → Analysis API: submits analysis
api/main.py - Analysis API → Decision engine: runs analysis
api/main.py - Analysis API → Explain decisions: explains result
api/main.py - CSV import → Column mapping: maps columns
data/importer/csv_importer.py - Column mapping → Groq LLM client: requests mapping
data/importer/column_mapper.py - CSV import → SQLite database: writes imported data
data/importer/csv_importer.py - Company administration → SQLite database: uses database
data/company_admin.py - Company data access → SQLite database: reads company data
data/company_store.py - Decision engine → Understand context: runs first
engine/decision_engine.py - Decision engine → Observe data: runs next
engine/decision_engine.py - Decision engine → Detect issues: runs next
engine/decision_engine.py - Decision engine → Retrieve playbooks: runs next
engine/decision_engine.py - Decision engine → Reason hypotheses: runs next
engine/decision_engine.py - Decision engine → Plan strategies: runs next
engine/decision_engine.py - Decision engine → Prioritize strategies: runs next
engine/decision_engine.py - Decision engine → Generate recommendations: runs last
engine/decision_engine.py - Understand context → Company data access: loads context
engine/nodes/understand.py - Observe data → Company data access: loads business data
engine/nodes/observe.py - Observe data → Marketing metrics: calculates KPIs
engine/nodes/observe.py - Observe data → RFM segmentation: segments customers
engine/nodes/observe.py - Retrieve playbooks → Marketing knowledge RAG: retrieves knowledge
engine/nodes/retrieve.py - Reason hypotheses → Groq LLM client: requests reasoning
engine/nodes/reason.py - Plan strategies → Groq LLM client: requests strategies
engine/nodes/plan.py - Generate recommendations → Groq LLM client: requests recommendations
engine/nodes/recommend.py - Groq LLM client → Groq service: sends prompts
llm/groq_client.py - Customer recommendations → RFM segmentation: uses segmentation
services/client_recommendations.py - Business user → API client: may use
- Marketing knowledge RAG → Company data access: loads playbooks