The Concept
Step 1: problem framing
Restate the business problem in measurable terms with success criteria. This is the most important step — get this wrong and everything downstream is wasted.
# Step 1: Problem framing
def frame_problem(stated_problem, discovery_findings):
"""
Transform a vague business problem into a measurable problem statement.
"""
framed = {
"stated": stated_problem,
"restated": discovery_findings["real_problem"],
"business_metric": {
"current": discovery_findings["current_metric"],
"target": discovery_findings["target_metric"],
"measurement": discovery_findings["how_measured"],
},
"success_criteria": f"Reduce {discovery_findings['metric_name']} from {discovery_findings['current_metric']} to {discovery_findings['target_metric']} within {discovery_findings['timeline']}",
"business_value": discovery_findings["annual_cost"],
}
return framed
# Example: client says "we need better document search"
framed = frame_problem(
stated_problem="We need better document search",
discovery_findings={
"real_problem": "Engineers spend 4 hours/day searching across 50K documents in SharePoint, SAP, and a shared drive. 30% of searches end without finding the right document, leading to duplicated work and delayed projects.",
"current_metric": "4 hours/day average search time, 30% search failure rate",
"target_metric": "<15 min for 80% of queries, <5% failure rate",
"how_measured": "Time-tracking tool logs + search outcome audit over 2-week baseline",
"metric_name": "average search time",
"timeline": "8 weeks",
"annual_cost": "$3.2M in lost engineering productivity (45 engineers × 4 hrs/day × $150/hr × 220 days)",
},
)
print(f"STATED: {framed['stated']}")
print(f"RESTATED: {framed['restated']}")
print(f"\nSUCCESS CRITERIA: {framed['success_criteria']}")
print(f"BUSINESS VALUE: {framed['business_value']}")
Step 2: constraint mapping
Map every constraint that affects the deployment. Missing a constraint in week 1 costs weeks of rework in week 4.
Step 2: Constraint mapping:
- Data
- Sources
- SharePoint Online (50K docs)
- SAP ERP (2M records)
- Shared drive (200K files)
- Quality: SharePoint: mixed metadata. SAP: clean. Shared drive: poor — needs cleanup.
- Volume: 252K documents + 2M structured records
- Freshness: SharePoint: real-time. SAP: nightly batch. Shared drive: static archive.
- Security
- Authentication: SAML SSO via Azure AD required for all users
- Authorization: Department-based access control — Legal docs only visible to Legal team
- Data residency: All data must stay within client's Azure tenant. No external API calls with data.
- Encryption: TLS 1.2 in transit, AES-256 at rest (Azure default)
- Latency
- Search latency: <3 seconds for 95% of queries (user tolerance threshold)
- Indexing latency: New documents searchable within 1 hour of upload
- Availability: 99.5% uptime during business hours (8am-6pm EST)
- Compliance
- Regulations
- SOX (financial data from SAP)
- Internal data classification policy
- Audit: All queries must be logged with user ID, timestamp, and documents accessed
- Retention: Query logs retained 2 years per internal policy
- Budget
- Approved: $200K
- Breakdown: FDE time: $120K, Infrastructure: $40K, LLM API costs: $30K, Contingency: $10K
- Ongoing: ~$3K/month for LLM API + infrastructure
- Timeline
- Total: 8 weeks to production
- Hard deadline: Q3 board presentation (week 10 from start)
- Buffer: 2 weeks between deployment target and board presentation
Step 3: solution decomposition
Break the problem into AI-solvable and non-AI components. This determines what you build, what you configure, and what you buy.
# Step 3: Solution decomposition
decomposition = {
"ai_components": [
{
"component": "Document embedding pipeline",
"description": "Chunk and embed 252K documents into vector DB",
"build_or_buy": "BUILD — use OpenAI embeddings API + pgvector",
"effort": "1 week",
"depends_on": "Data pipeline (non-AI)",
},
{
"component": "Hybrid search (BM25 + dense)",
"description": "Combine keyword and semantic search for retrieval",
"build_or_buy": "BUILD — pgvector + Elasticsearch BM25, merge scores",
"effort": "1 week",
"depends_on": "Embedding pipeline",
},
{
"component": "Reranking",
"description": "Rerank top-20 results with cross-encoder for precision",
"build_or_buy": "BUY — use Cohere rerank API",
"effort": "2 days",
"depends_on": "Hybrid search",
},
{
"component": "Answer generation",
"description": "Generate natural language answer from retrieved context",
"build_or_buy": "BUILD — use GPT-4 via API with structured prompt",
"effort": "3 days",
"depends_on": "Reranking",
},
],
"non_ai_components": [
{
"component": "SharePoint connector",
"description": "Pull documents from SharePoint via Microsoft Graph API",
"build_or_buy": "BUILD — custom Python connector",
"effort": "3 days",
"depends_on": "Azure AD app registration",
},
{
"component": "SAP connector",
"description": "Pull order/customer data from SAP via OData",
"build_or_buy": "BUILD — custom Python connector",
"effort": "4 days",
"depends_on": "SAP RFC access provisioning (client responsibility, 3-week backlog)",
},
{
"component": "SAML SSO integration",
"description": "Integrate with client's Azure AD for authentication",
"build_or_buy": "BUILD — use python3-saml library",
"effort": "3 days",
"depends_on": "Azure AD app registration",
},
{
"component": "Access control middleware",
"description": "Filter search results by user's department",
"build_or_buy": "BUILD — metadata filtering in pgvector",
"effort": "2 days",
"depends_on": "SAML SSO, document metadata tagging",
},
{
"component": "Monitoring & alerting",
"description": "Track latency, error rate, query volume, retrieval quality",
"build_or_buy": "BUILD — Prometheus + Grafana, custom metrics",
"effort": "2 days",
"depends_on": "Application deployed",
},
],
}
total_effort = 0
for category, components in decomposition.items():
print(f"\n{category.upper()}:")
for c in components:
print(f" {c['component']}: {c['effort']} — {c['build_or_buy']}")
print(f" Depends on: {c['depends_on']}")
print(f"\nTotal components: {len(decomposition['ai_components']) + len(decomposition['non_ai_components'])}")
Step 4: MVP scoping
The MVP is the smallest deployment that proves value. It's not a demo — it's a production system with a narrow scope.
Step 4: MVP scoping:
- In scope
- SharePoint documents only (50K) — defer SAP and shared drive to Phase 2
- Search + answer generation for engineering department only (15 users)
- Basic access control (engineering docs visible to engineering team)
- SAML SSO integration
- Monitoring (latency, error rate, query volume)
- Evaluation harness (200 test queries with RAGAS)
- Out of scope explicit
- SAP integration — Phase 2 (client's SAP team is backlogged anyway)
- Shared drive — Phase 2 (needs data cleanup first)
- Multi-language support — not needed (all docs in English)
- Mobile interface — not needed (engineers use desktop)
- Custom UI — use existing platform UI with branding
- Real-time document indexing — batch nightly is sufficient for MVP
- Ship day one: Basic RAG pipeline running on 100 SharePoint documents, deployed on client's dev K8s cluster, accessible via SSO
- Value proof: 15 engineers search 50K documents with <15 min average search time and >90% answer accuracy
- Phase 2: Backlog
- SAP integration (when SAP team provisions access)
- Shared drive ingestion (after data cleanup)
- Expand to all departments (after engineering team validates)
- Real-time indexing (if nightly batch is insufficient)
Step 5: risk and evaluation plan
Step 5: Risk register and evaluation plan:
- SAP access provisioning delayed beyond week 3
- Likelihood: High (client's SAP team is backlogged 3 weeks)
- Impact: Medium (SAP is Phase 2, not MVP-blocking)
- Mitigation: Start SAP access request on day 1. Build SharePoint-only MVP. SAP becomes Phase 2.
- Owner: Client VP Eng (escalation) + FDE (tracking)
- Status: Open — request submitted day 1
- SharePoint documents have poor metadata (30% untagged)
- Likelihood: Certain (discovery confirmed)
- Impact: High (access control depends on department metadata)
- Mitigation: Run metadata enrichment script in week 1. Use SharePoint API to infer department from site path.
- Owner: FDE
- Status: Mitigation planned
- LLM API costs exceed budget ($30K)
- Likelihood: Medium (depends on query volume)
- Impact: Medium (could require budget increase)
- Mitigation: Implement query caching. Set daily API spend limit. Monitor usage weekly.
- Owner: FDE
- Status: Monitoring planned
- Retrieval quality below 90% target
- Likelihood: Medium (first deployment, unknown document quality)
- Impact: High (fails success criteria)
- Mitigation: Build evaluation harness in week 2. Test with 200 queries. Tune chunking and reranking before user testing.
- Owner: FDE
- Status: Planned — eval harness in week 2
- Metrics
- Faithfulness: RAGAS faithfulness score >0.85 (answers grounded in retrieved context)
- Answer relevancy: RAGAS answer relevancy >0.80 (answers address the question)
- Context precision: RAGAS context precision >0.75 (retrieved docs are relevant)
- Latency p95: <3 seconds for 95% of queries
- User satisfaction: >4.0/5 average rating from pilot users
- Test data
- Source: 200 queries curated from engineering team's actual search logs
- Ground truth: Engineering team lead reviews and labels correct answers for each query
- Cadence: Run eval suite weekly during build, daily during hardening, weekly in production
- Rollback plan
- Trigger: Faithfulness drops below 0.75 OR latency exceeds 10s OR user satisfaction <3.0
- Action: Roll back to previous deployment version. Investigate root cause. Fix and redeploy.
- Communication: Notify client VP within 1 hour. Send incident report within 24 hours.
Build
Practical application
In the lab, you'll apply all 5 steps to a simulated client problem. You'll take a vague business problem ("our support team is overwhelmed"), run it through the framework, and produce a complete decomposition document with problem framing, constraints, solution components, MVP scope, and risk/eval plan.
Before the lab, try a quick self-check: this tryit scores a problem statement against the criteria a well-framed Step 1 output should hit.
def score_problem_statement(statement):
"""Score a problem statement 0-4 on decomposition-framework criteria."""
checks = {
"has_current_metric": any(c.isdigit() for c in statement),
"has_target": "target" in statement.lower() or "<" in statement or ">" in statement,
"has_timeframe": any(w in statement.lower() for w in ["week", "day", "month", "hour"]),
"avoids_solutioning": not any(w in statement.lower() for w in ["chatbot", "gpt", "deploy ai", "build a"]),
}
score = sum(checks.values())
return score, checks
candidates = [
"Build a chatbot to handle customer support tickets automatically",
"Reduce average resolution time from 45 min to under 20 min within 8 weeks",
]
for statement in candidates:
score, checks = score_problem_statement(statement)
print(f"'{statement}'")
print(f" Score: {score}/4")
for name, passed in checks.items():
print(f" {'PASS' if passed else 'FAIL'}: {name}")
print()
A client says "our support team is overwhelmed." Which is the correctly framed problem statement?
The correct framing restates the problem in measurable terms with specific current metrics, target metrics, and scope. It identifies what's actually happening (40% time spent searching), quantifies it (45 min resolution, 15% escalation), and defines success (<20 min, <8% escalation). The other options jump to solutions (chatbot, GPT-4) or stay vague (reduce workload, improve satisfaction) without measurable criteria. Problem framing is Step 1 of the decomposition framework — get this wrong and everything downstream is wasted effort.