Design an on-prem agent for pharma deviation investigations

    Hard40 minSystem design · AI rubric, per criterionCAASA
    • private deployment
    • audit trail
    • human in the loop

    The brief

    Anvika Pharma (fictional) makes generic oral solids and injectables at three plants in Hyderabad and one in Cork, Ireland. It supplies the US and EU markets, so its systems are inspected by the US FDA and EU regulators.

    When something goes wrong in manufacturing (a tablet hardness result out of specification, a temperature excursion in a cold room), QA opens a deviation. An investigator then pulls data from several systems, works out the root cause, and writes a report with corrective and preventive actions (CAPA). Average closure time is 28 days; the target is 15. About 1,900 deviations a year.

    The client wants an agent that drafts the investigation: gathers the relevant data, proposes likely root causes with evidence, and drafts the report for a human investigator.

    Constraints:

    • On-prem only. No cloud model calls. Available hardware: a cluster with 8 NVIDIA H100 GPUs in the Hyderabad data centre; Cork connects over a private WAN.
    • Source systems: MES (batch records), LIMS (lab results), a historian for equipment sensor data, the QMS (past deviations and CAPAs), and SOPs in a document management system. The agent may read them; it must never write to them.
    • Computerised systems must meet 21 CFR Part 11 / EU GMP Annex 11 expectations: every AI contribution must be attributable, time-stamped, reproducible and reviewable. The QA investigator signs the final report.
    • Investigators have been burned by "confident nonsense" from an earlier chatbot. Credibility is fragile.
    • The system must be validated before use in production (computer system validation).

    Design the agent and how you would get it into production.

    How it's graded

    • Agent structure fits the task2 pts
    • Credible on-prem serving plan2 pts
    • Part 11 / Annex 11 audit trail and reproducibility2 pts
    • Grounding that rebuilds investigator trust2 pts
    • Validation, evals and rollout2 pts

    Your answer

    The end-to-end flow: where data enters, where models run, what is stored where. A text diagram is fine.

    0/250 words

    Models, retrieval, tools, guardrails. Say why you picked each and what you rejected.

    0/250 words

    Take the stated constraints one by one, with numbers where they apply.

    0/220 words

    How you know it works before and after launch, and how you roll it out safely.

    0/200 words

    Graded by AI against the ADaSci rubric. Your answers stay private; only your score shows on your profile.