Inspiration

I saw how Hong Kong’s small and medium businesses often lack real-time, AI-enhanced insights for dynamic decision-making. Inspired by the city’s fast-changing markets, my goal was to bring together live data, machine learning, and explainable AI agents—using AWS Bedrock and Amazon Q Developer—to power confidence-weighted predictions for HK businesses.

What I Learned

  • How to integrate AWS Bedrock Claude 3 Sonnet via Amazon Q Developer as a reasoning engine for multi-agent business intelligence.
  • The value of triple-model ensemble ML (Random Forest, Gaussian Naive Bayes, Monte Carlo) for robustness and explainability:

$$ \text{Integrated Success Rate} = \min\bigl(95,\;\max(50,\;0.25P_{\text{market}} + 0.25P_{\text{customer}} + 0.20P_{\text{risk}} + 0.15P_{\text{competitor}} + 0.15P_{\text{pricing}})\bigr) $$

  • How to design a scalable microservices architecture with separate services for CSV ingestion, ML training, AI agent collaboration, and real-time dashboard visualization.
  • The importance of strict data schema for reliable ML training and prediction.

How I Built It

  • I defined a custom CSV schema (transactionid, amount, category, agegroup, issuccessful, etc.) for real HK SME transaction data.
  • I trained three scikit-learn models—Random Forest, Gaussian Naive Bayes, Monte Carlo—on user-uploaded data.
  • I used Amazon Q Developer to build and orchestrate five AWS Bedrock-powered AI agents—Market Analysis, Customer Behavior, Risk Assessment, Competitor Analysis, Pricing Strategy. These agents collaboratively analyze business context and produce enhanced, explainable predictions.
  • I combined agent predictions with a weighted ensemble for the final, business-aware result.
  • I built a React dashboard for live visualization of predictions, agent discussions, and system health.
  • I deployed the full stack (ports: 5000–5002 for services, 8000 for dashboard) with Docker Compose for scalability and reproducibility.
# Example: Agent collaboration logic
weights = {"market": 0.25, "customer": 0.25, "risk": 0.20, "competitor": 0.15, "pricing": 0.15}
final_prediction = sum(agent.prediction * weights[agent.name] for agent in agents)

Challenges I Faced

  • AWS Bedrock and Amazon Q Developer access and IAM configuration required careful setup and debugging.
  • Managing concurrent agent operations with thread safety and API rate limits.
  • Enforcing data quality—missing or misformatted CSV columns could crash training.
  • Balancing system latency with real-time agent reasoning and visualization.
  • Providing graceful fallbacks when AWS Bedrock is unavailable, falling back to base ML predictions in Demo Mode.

Built With

Share this project:

Updates