Skip to content

docs(ai): AI Co-pilot system design — agentic RAG adapted for CA#6

Open
DeepakChander wants to merge 1 commit into
mainfrom
docs/ai-copilot-system-design
Open

docs(ai): AI Co-pilot system design — agentic RAG adapted for CA#6
DeepakChander wants to merge 1 commit into
mainfrom
docs/ai-copilot-system-design

Conversation

@DeepakChander
Copy link
Copy Markdown
Owner

Summary

Adds docs/architecture/ai-copilot-system-design.md — the concrete blueprint for Phase 3.

Adapts the proven Agentic RAG pattern (Coordinator → Retrieval → Rerank → Context → Generation → Validation → Export) to CA-firm reality: regulatory citations, ICAI rules, UDIN/DSC gates, DPDP residency, and strict per-firm tenant isolation.

What's in it

  • Architecture diagrams (online + offline pipelines)
  • Tenant isolation model — per-firm Qdrant collection (structural, not metadata-filter)
  • Two-collection retrieval — firm corpus + shared regulatory corpus, in parallel
  • Full agent inventory including the new Compliance Critic agent (CA-specific)
  • Citation model — every claim must resolve to a primary source (voucher ID / clause / SRN)
  • Stakes tiering (Low / Medium / High / Blocked) replacing EdTech's "difficulty"
  • UDIN / DSC gates — AI never marks output "final"
  • Six CA use cases mapped to the same chassis
  • Tech stack pinning: Qwen 2.5 (7B + 14B) via vLLM on Indian GPU host, BGE-M3, BGE Reranker, Qdrant, FastAPI
  • Local dev with mocks — zero GPU
  • Cost model + India residency table
  • 12 failure modes + handling
  • Phase 3A–3F sub-phasing plan with exit criteria

Test plan

  • Markdown renders cleanly
  • All internal links resolve
  • Cross-references to existing docs (ai-copilot.md, tech-stack.md, security-and-data-residency.md, dpdp-act.md, icai-regulatory.md, pricing.md) are correct
  • Linked from docs/README.md under Architecture
  • CA advisor review (CODEOWNERS — pending merge)

Rollout notes

Docs-only change, no code or infra impact. Becomes the source-of-truth blueprint when Phase 3 build kicks off.

🤖 Generated with Claude Code

Adapts the Agentic RAG architecture (Coordinator → Retrieval → Rerank →
Context → Generation → Validation → Export) to a CA firm's needs:

- Per-firm Qdrant collection (structural tenant isolation)
- Two-collection retrieval: firm corpus + shared regulatory corpus
- New Compliance Critic agent (validates statute, math, UDIN status)
- Citation-must-resolve-to-primary-source rule
- Stakes-tiered validation (Low / Medium / High / Blocked)
- UDIN + DSC gates (AI never marks output "final")
- India-resident inference only (Qwen 2.5 via vLLM on Indian GPU)
- Mock providers kept for zero-GPU local dev
- 6 use cases mapped: Doc AI, Ask-your-books, Notice intelligence,
  Certificate draft, WP draft, Article training Q&A
- Phase 3A–3F sub-phasing plan with exit criteria

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant