The Concept
The complete discovery deliverable set
By the end of discovery (week 1), you produce 5 artifacts. These are what the client's security team, engineering team, and leadership review before greenlighting the build phase.
The 5 discovery deliverables:
- 1. Problem statement
- Purpose: Aligns everyone on what problem we're solving and what success looks like
- Contents
- Stated problem (client's words)
- Restated problem (measurable)
- Success criteria with metrics
- Business value estimate
- Reviewers
- VP Support (sponsor)
- CTO (approver)
- VP Eng (implementer)
- Signoff: Required — without this, nothing else matters
- 2. Technical spec
- Purpose: Tells the engineering team exactly what to build
- Contents
- Solution overview
- Architecture diagram
- Data requirements
- Component list with build/buy decisions
- Timeline
- Reviewers
- VP Eng
- Architecture review board
- Security team
- Signoff: Required — architecture review board must approve before build starts
- 3. Risk register
- Purpose: Shows stakeholders you've thought through what can go wrong
- Contents
- Risk description
- Likelihood
- Impact
- Mitigation
- Owner
- Status
- Reviewers
- VP Support
- VP Eng
- Security team
- Signoff: Required — security team won't approve without seeing the risk register
- 4. MVP scope
- Purpose: Defines exactly what's in and what's out for the first deployment
- Contents
- In-scope items
- Explicit out-of-scope items
- Phase 2 backlog
- Ship day one deliverable
- Reviewers
- VP Support (sponsor)
- VP Eng (implementer)
- Signoff: Required — both sides sign the scoping document
- 5. Evaluation plan
- Purpose: Defines how we'll know the system is working — before and after deployment
- Contents
- Metrics with thresholds
- Test data source
- Evaluation cadence
- Rollback triggers
- Reviewers
- VP Support
- VP Eng
- FDE
- Signoff: Required — without eval plan, we can't prove the system works
Structuring a risk register
# Risk register — the artifact that gets security teams to say yes
risk_register = [
{
"id": "R-001",
"risk": "SharePoint documents contain PII that gets exposed in search results",
"likelihood": "Medium — 10% of SharePoint docs contain customer PII per discovery audit",
"impact": "High — data breach, regulatory fines, loss of client trust",
"mitigation": "PII detection scan during ingestion. Documents with PII are tagged and excluded from search results unless user has PII-access role. Access control middleware enforces this at query time.",
"owner": "FDE (implementation) + Security team (review)",
"status": "Mitigation designed — awaiting security review",
"residual_risk": "Low — after PII scan + access control, exposure risk is minimal",
},
{
"id": "R-002",
"risk": "LLM hallucinates answers not grounded in retrieved documents",
"likelihood": "Medium — LLMs can generate plausible but incorrect answers",
"impact": "High — agents act on wrong information, customer receives incorrect guidance",
"mitigation": "Structured prompt with explicit 'answer only from context' instruction. RAGAS faithfulness metric >0.85 threshold. Citation required for every answer. Confidence threshold — if retrieval score <0.7, system says 'I couldn't find relevant information' instead of guessing.",
"owner": "FDE",
"status": "Mitigation in design — prompt engineering + eval harness",
"residual_risk": "Low — faithfulness >0.85 + citations + confidence threshold = triple safeguard",
},
{
"id": "R-003",
"risk": "SAP integration delayed, blocking Phase 2 expansion",
"likelihood": "High — SAP team is backlogged 3 weeks",
"impact": "Low — SAP is Phase 2, not MVP-blocking",
"mitigation": "Start SAP access request on day 1. Build SharePoint-only MVP. SAP becomes Phase 2 with no timeline pressure.",
"owner": "Client VP Eng (escalation) + FDE (tracking)",
"status": "Open — request submitted day 1",
"residual_risk": "Low — MVP doesn't depend on SAP",
},
{
"id": "R-004",
"risk": "LLM API costs exceed $30K budget",
"likelihood": "Medium — depends on query volume and average tokens",
"impact": "Medium — requires budget increase or feature reduction",
"mitigation": "Query caching for common questions. Daily API spend limit with alerting. Weekly cost review. Fallback to GPT-6 Luna for simple queries if costs trend high.",
"owner": "FDE",
"status": "Monitoring planned",
"residual_risk": "Low — caching + spend limit + model fallback = cost controlled",
},
{
"id": "R-005",
"risk": "System unavailable during business hours (99.5% uptime target)",
"likelihood": "Low — single-region deployment with auto-restart",
"impact": "High — agents can't search, fall back to manual process",
"mitigation": "Health check endpoint with auto-restart. Monitoring with PagerDuty alert for downtime >5 min. Runbook for manual fallback to SharePoint native search. Weekly backup of vector index.",
"owner": "FDE + Client IT ops",
"status": "Mitigation in design",
"residual_risk": "Medium — single-region is not HA, but acceptable for 15-user pilot",
},
]
print("RISK REGISTER")
print(f"{'ID':<8} {'Risk':<50} {'Likelihood':<12} {'Impact':<8} {'Status'}")
print("-" * 120)
for r in risk_register:
print(f"{r['id']:<8} {r['risk'][:48]:<50} {r['likelihood'].split(' — ')[0]:<12} {r['impact'].split(' — ')[0]:<8} {r['status']}")
print(f"\n\nDETAILED RISK: R-001 (PII Exposure)")
r = risk_register[0]
for k, v in r.items():
print(f" {k}: {v}")
Designing an evaluation plan
Evaluation plan — the artifact that proves the system works:
- Metrics
- faithfulness
- Definition: Percentage of answer statements that are supported by retrieved context
- Tool: RAGAS faithfulness metric
- Threshold: >0.85
- Failure action: If <0.85: tune prompt to be more conservative, add 'if unsure, say you don't know' instruction
- answer_relevancy
- Definition: How relevant the answer is to the question asked
- Tool: RAGAS answer relevancy metric
- Threshold: >0.80
- Failure action: If <0.80: improve retrieval precision, add query rewriting step
- context_precision
- Definition: Fraction of retrieved documents that are actually relevant
- Tool: RAGAS context precision metric
- Threshold: >0.75
- Failure action: If <0.75: tune chunk size, adjust hybrid search weights, improve reranking
- latency_p95
- Definition: 95th percentile response time from query to answer
- Tool: Prometheus histogram + Grafana dashboard
- Threshold: <3 seconds
- Failure action: If >3s: add query caching, reduce top-k, use faster embedding model for initial retrieval
- user_satisfaction
- Definition: Average user rating per answer (1-5 scale)
- Tool: In-app thumbs up/down + weekly survey
- Threshold: >4.0/5
- Failure action: If <4.0: interview pilot users, identify failure patterns, prioritize fixes
- Test data
- Source: 200 queries curated from engineering team's actual search logs (week 2)
- Ground truth: Engineering team lead reviews and labels correct answer + relevant documents for each query
- Split: 150 for tuning, 50 for held-out evaluation (never used during tuning)
- Refresh: Add 50 new queries monthly from production logs
- Cadence
- Build phase: Weekly — run full eval suite every Friday
- Hardening: Daily — run eval suite + latency check every morning
- Production: Weekly — automated eval on sample of production queries
- Regression: Before any deployment change — run full eval suite
- Rollback
- Trigger: Any metric below threshold for 2 consecutive eval runs
- Action: Roll back to previous deployment. Investigate root cause. Fix and redeploy with full eval pass.
- Communication: Notify VP Eng within 1 hour. Incident report within 24 hours. Postmortem within 48 hours.
The deployment proposal
# Deployment proposal — combines all 5 deliverables into one document for sign-off
def create_deployment_proposal(client, problem, spec, risks, mvp, eval_plan):
proposal = f"""DEPLOYMENT PROPOSAL
{'='*60}
CLIENT: {client}
DATE: End of Week 1 — Discovery Complete
1. PROBLEM STATEMENT
{problem['stated']}
→ {problem['restated']}
Success: {problem['success_criteria']}
Value: {problem['business_value']}
2. TECHNICAL SPEC
Approach: {spec['approach']}
Components: {len(spec['components'])} ({sum(1 for c in spec['components'] if 'BUILD' in c)} build, {sum(1 for c in spec['components'] if 'BUY' in c)} buy)
Timeline: {spec['timeline']}
3. RISK REGISTER
{len(risks)} risks identified
High impact: {sum(1 for r in risks if 'High' in r['impact'])}
All have mitigations and owners
4. MVP SCOPE
In scope: {len(mvp['in_scope'])} items
Out of scope: {len(mvp['out_of_scope_explicit'])} items (explicit)
Ship day one: {mvp['ship_day_one']}
5. EVALUATION PLAN
Metrics: {len(eval_plan['metrics'])} (faithfulness, relevancy, precision, latency, satisfaction)
Test data: {eval_plan['test_data']}
Rollback: {eval_plan['rollback']}
{'='*60}
SIGNOFF REQUIRED:
☐ VP Support — approves problem statement, success criteria, timeline
☐ VP Eng — approves architecture, security approach, build/buy decisions
☐ Security team — approves risk register, access control design
☐ FDE — confirms scope is achievable within timeline
DATE: _______________ SIGNATURE: _______________
"""
return proposal
proposal = create_deployment_proposal(
client="Acme Manufacturing",
problem={
"stated": "We need an AI chatbot for customer support",
"restated": "Support agents spend 40% of time searching across 6 systems. Avg resolution: 45 min, 15% escalation.",
"success_criteria": "Search time <15 min for 80% of queries. Escalation <8%.",
"business_value": "$3.2M/year productivity recovery + CSAT 4.2→4.5+",
},
spec={
"approach": "RAG system over SharePoint with hybrid search + reranking + answer generation",
"components": ["BUILD: SharePoint connector", "BUILD: Embedding pipeline", "BUY: OpenAI embeddings", "BUILD: Hybrid search", "BUY: Cohere rerank", "BUY: GPT-4 API"],
"timeline": "8 weeks to production",
},
risks=[{"impact": "High"}, {"impact": "High"}, {"impact": "Low"}, {"impact": "Medium"}, {"impact": "High"}],
mvp={
"in_scope": ["SharePoint RAG", "Access control", "SSO", "15 pilot users", "Monitoring", "Eval harness"],
"out_of_scope_explicit": ["SAP", "Shared drive", "Multi-language", "Mobile", "Custom UI", "Real-time indexing"],
"ship_day_one": "Basic RAG on 100 documents, deployed on dev K8s, accessible via SSO",
},
eval_plan={
"metrics": ["faithfulness >0.85", "answer_relevancy >0.80", "context_precision >0.75", "latency_p95 <3s", "satisfaction >4.0/5"],
"test_data": "200 queries from engineering search logs",
"rollback": "Any metric below threshold for 2 consecutive runs",
},
)
print(proposal)
Build
Practical application
In the lab, you'll produce all 5 discovery deliverables for a simulated client engagement. You'll write a risk register with 5+ entries, design an evaluation plan with RAGAS metrics and rollback triggers, and combine everything into a deployment proposal document formatted for stakeholder sign-off.
Try it yourself: check an evaluation run against thresholds and decide whether to trigger rollback.
thresholds = {
"faithfulness": 0.85,
"answer_relevancy": 0.80,
"context_precision": 0.75,
"latency_p95_sec": 3.0,
}
def check_eval_run(results, consecutive_failures):
failing = {k: v for k, v in results.items() if
(k == "latency_p95_sec" and v > thresholds[k]) or
(k != "latency_p95_sec" and v < thresholds[k])}
rollback = len(failing) > 0 and consecutive_failures >= 2
return failing, rollback
run1 = {"faithfulness": 0.82, "answer_relevancy": 0.81, "context_precision": 0.78, "latency_p95_sec": 2.1}
run2 = {"faithfulness": 0.80, "answer_relevancy": 0.79, "context_precision": 0.76, "latency_p95_sec": 2.4}
failing1, rollback1 = check_eval_run(run1, consecutive_failures=1)
print(f"Run 1 failing metrics: {failing1} | Rollback: {rollback1}")
failing2, rollback2 = check_eval_run(run2, consecutive_failures=2)
print(f"Run 2 failing metrics: {failing2} | Rollback: {rollback2}")
The security team asks "what happens if the LLM gives a wrong answer?" Which artifact answers this?
The risk register is the artifact that directly answers "what can go wrong and what are we doing about it?" R-002 (LLM hallucination) has a specific mitigation: structured prompt with "answer only from context" instruction, RAGAS faithfulness threshold >0.85, mandatory citations, and a confidence threshold below which the system says "I couldn't find relevant information" instead of guessing. This is the triple safeguard. The security team needs to see this specific mitigation — not the architecture, not the scope, but the risk + mitigation + residual risk assessment.