Skip to content
Akhil Pinnani
Back to selected work

Oct 2026

SOPilot

A multi-tenant AI copilot that answers questions from standard operating procedures and cites the exact section.

Synthetic data: two fictional tenants.

SOPilot's Ask page: a question about changing gloves in a cleanroom, answered from an SOP with numbered citations and a collapsed retrieval trace.
The Ask page. Every claim carries a citation; the trace shows retrieval hits, tool calls and cost.
SOPilot's citation drawer open beside an answer, showing the cited SOP section.
A citation opens the source section beside the answer.
SOPilot's version compare view showing two versions of an SOP side by side.
Comparing two versions of an SOP.
SOPilot's Evals page with a grid of small bar charts comparing retrieval configurations.
The Evals page compares retrieval configurations.

The problem

People need answers from SOPs they can check: every claim tied to a section, and a plain refusal when the documents do not answer.

Overview

SOPilot is a multi-tenant AI copilot for Standard Operating Procedures. People ask questions in a chat, and an agent answers from the SOPs it retrieves, citing the exact section for every claim and saying so when the documents do not answer.

I designed and built it from a written spec as four apps in one repository: a FastAPI service, a Spring Boot ingest worker, a React app and a TypeScript webhook Lambda. All data is synthetic: two fictional tenants, and every generated document carries a "FICTIONAL - FOR DEMO ONLY" notice. It uses patterns common in regulated environments and makes no compliance claim.

What I built

  • A FastAPI agent that answers from retrieved SOPs with citations, using hybrid search and reranking, with a human-in-the-loop approval for the one action it may only propose: a draft deviation report.
  • A Spring Boot SQS ingest worker with a dead-letter queue, partial batch failures and idempotency, fed by browser uploads and by signed webhook deliveries.
  • A React app with live ingestion progress, version compare, an audit log, an eval dashboard and per-tenant API keys that connect Claude Code over MCP.
  • Tenant isolation in the database: every tenant-scoped query runs in a transaction that first sets the tenant, and Postgres Row-Level Security does the isolating.
  • Webhook intake that verifies HMAC signatures and handles duplicate deliveries idempotently.

How it is checked

  • More than 500 automated tests, and Playwright journeys that run accessibility checks.
  • An eval runner that scores retrieval configurations on recall, citation precision and version correctness. No quality numbers are published yet.
  • The Terraform covers Lambda, CloudFront, Cognito, SQS, and Bedrock, and is validated offline.

Stack

  • FastAPI
  • Spring Boot
  • React
  • TypeScript
  • Terraform
  • AWS
  • PostgreSQL

Status

Runs end to end on a local Docker Compose stack. The AWS infrastructure is written in Terraform but not yet deployed.