Chainsilience AI
Chainsilience AI turns global disruption signals into scored, explainable risks on a live digital twin of your supply chain, so you see the next disruption before it hits revenue and know how to act.
Inspiration
Global supply chains break without warning: a 7.2 earthquake in Taiwan, a strike in Rotterdam, a new export control on rare earths, and most companies only find out when the revenue is already gone. The signals are out there in the news days before impact, but they're buried in noise and disconnected from any given company's actual suppliers, factories, and routes. We wanted to close that gap: to turn the world's constant stream of disruption signals into a clear, ranked, actionable picture of what threatens your business, and to make supply-chain resilience something you can compute, not just hope for.
What it does
Chainsilience AI is an AI-powered early-warning system for supply-chain risk. It:
- Models your supply chain as a live Digital Twin — a graph of suppliers, components, factories, ports, products, and routes (bootstrapped from an onboarding profile or a CSV upload).
- Reads global news continuously and runs each item through two AI agents — a Verifier (drops unreliable/unsupported reports) and a Relevance agent (keeps only what actually touches your supply-chain paths).
- Scores each risk into an explainable composite (severity, supplier dependency, inventory coverage, geographic exposure…), with a transparent factor breakdown — no black box.
- Quantifies the damage: production-stoppage probability via Monte Carlo simulation, revenue at risk, days of coverage remaining, recovery time.
- Ranks mitigations using a deterministic multi-objective score (service, net financial impact, risk reduction, implementation cost), so the #1 recommendation is defensible.
- Grounds every recommendation in your own data through a company-scoped RAG pipeline (LangChain + FAISS) built from your Digital Twin, risks, and mitigation history.
- Pushes approved actions into an Action Center and updates the risk's score/impact as mitigations complete.
The result: you see the next disruption before it reaches revenue, and you know exactly what to do about it.
How we built it
- Frontend: Next.js 14 (App Router) + TypeScript + Tailwind, with a React Three Fiber 3D globe of live disruptions, framer-motion, and a glassmorphism landing page. Deployed on Vercel.
- Backend: FastAPI + SQLModel (SQLite locally, PostgreSQL in production), Dockerized and deployed on Render.
- AI: NVIDIA Nemotron via an OpenAI-compatible endpoint (with OpenAI
gpt-4o-miniand deterministic offline fallbacks so the app always works). - Risk engine: seeded Monte Carlo stoppage simulation + a deterministic multi-objective mitigation scorer.
- RAG: LangChain (
HuggingFaceEmbeddings/ all-MiniLM-L6-v2 + FAISS), one index per company, built straight from the database and strictly scoped bycompany_id. - Platform: email-OTP sign-up, password reset, Stripe checkout for the paid tier, and a Calendly-integrated landing site.
Challenges we ran into
- Deterministic AI: LLM output is stochastic — we had to persist scenario sets and rankings so options stayed stable across requests, only regenerating on an explicit refresh.
- A real feedback loop: getting risk scores, revenue, and impact tiles to actually update when a mitigation completed exposed a subtle SQLAlchemy JSON-mutation bug (fixed with
flag_modified). - Production-only failures: a
BOOLEAN DEFAULT 0migration that SQLite tolerated but PostgreSQL rejected, crash-looping the deployed backend — reproduced and fixed against real Postgres. - Dependency hell: integrating LangChain broke the Docker build (a
pydantic-settingsversion conflict) and raised real memory pressure from thetorch/sentence-transformersstack on a free tier. - Company-scoped retrieval: redesigning RAG from a single shared document corpus into a per-company index sourced from live DB records, with strict isolation so no company's data can leak into another's prompts.
- Plus the usual gauntlet: hydration mismatches, WebGL rendering, cold-start timeouts, and CORS.
Accomplishments that we're proud of
- A genuinely end-to-end product — landing page → auth → onboarding → live news pipeline → scored risks → simulation → ranked mitigations → action tracking — all deployed and working.
- Explainability by design: every risk score and recommendation comes with its reasoning and factors.
- A company-scoped LangChain RAG pipeline that grounds AI recommendations in each customer's own supply-chain data — verified in production with real embeddings and strict per-company isolation.
- Two-agent news intelligence that turns a firehose of global headlines into a handful of risks that actually matter to you.
- It degrades gracefully everywhere — no API key, no embeddings, no network? It still runs on deterministic fallbacks.
What we learned
- Explainability is the product. In risk, a number no one trusts is worthless; the why is what makes it actionable.
- Postgres ≠ SQLite — parity testing against the real production database matters.
- RAG is only as good as its corpus. Generic documents don't help a specific company; grounding retrieval in the customer's own data is what makes recommendations relevant.
- Design for graceful degradation from day one — every AI/heavy dependency should have a deterministic fallback so the demo never dies.
- Shipping to real infra (Vercel + Render + Postgres) teaches you far more than a localhost demo ever will.
What's next for Chainsilience AI
- Deeper twins: richer ingestion (ERP/logistics integrations, multi-tier supplier mapping) and automatic twin enrichment.
- Proactive alerting: push notifications, email/Slack digests, and configurable risk thresholds.
- Hosted embeddings option (removing the local
torchfootprint) so the RAG stack runs lean at any scale. - Continuous learning: feed mitigation outcomes back into the scoring and recommendation models.
- Collaboration & audit: roles, assignments, and an auditable trail for every risk decision.
- Expanded intelligence sources: weather, shipping/AIS, commodity prices, and sanctions feeds beyond news.
Built With
- css
- digitaltwin
- fastapi
- html
- javascript
- knowledgegraph
- llm
- next.js
- postgresql
- python
- rag
- render
- typescript
- vercel
Log in or sign up for Devpost to join the conversation.