Skip to content

GovTech · Contract intelligence · Case study

GovDoc AI: AI contract analysis platform for government contractors

Multi-tenant SaaS that reads government RFPs, RFQs, SOWs and MSAs with a RAG pipeline on AWS Bedrock and extracts 50+ data points per contract.

GovDoc AI product interface
Client
GovDoc AI is a US GovTech startup building contract intelligence software for government contractors and procurement teams.
Team
Full-stack team led by Innovation Insight
Timeline
Ongoing engagement, MVP to production
Services
AI and data, Web development, Cloud and DevOps, Enterprise software
50+
data points extracted per contract
3
independently deployable microservices
1,024
dimension embeddings per chunk
2 to 4 min
typical deep analysis of a large contract

In short

GovDoc AI needed to turn hundreds of pages of government solicitation into structured intelligence in minutes. Innovation Insight built the full product: a Next.js front end, three NestJS microservices behind GraphQL, and a Python RAG pipeline using Cohere embeddings, OpenSearch and Claude on AWS Bedrock. The platform now extracts 50+ data points per contract with page-level references, inside a database-per-tenant architecture on AWS.

The challenge

Where they started.

  • Government solicitations run to hundreds of pages, and reviewing one by hand takes a bid team hours before they know whether to pursue it.
  • Contracts follow different structures (RFP, RFQ, SOW, MSA), so a fixed extraction template misses the sections that matter for each type.
  • Full documents exceed LLM context limits, and contact details for contracting officers are often missing from the PDF itself.
  • Each customer's contracts are commercially sensitive, so cross-tenant data leakage was not an acceptable risk.
What we did

The approach.

  • Designed a three-service NestJS backend (API gateway, AI service, auth service) communicating over RabbitMQ, behind a single GraphQL endpoint.
  • Built a retrieval-augmented generation pipeline: PyMuPDF text extraction, 1,500-character chunks, Cohere embeddings, OpenSearch vector search and Claude on AWS Bedrock for structured extraction.
  • Added a self-correcting three-pass analysis: initial extraction, an evaluation audit that finds missing sections, and a gap-filling pass.
  • Implemented database-per-tenant isolation with a dedicated MongoDB database and S3 bucket provisioned automatically for every account.
  • Enriched missing contact data with concurrent lookups across DuckDuckGo, LinkedIn and the SAM.gov API, with source attribution per field.
  • Shipped a free instant-analysis tier for screening and a paid deep-analysis tier with page-level references for every extracted value.
Deliverables

What shipped.

  • Next.js 15 web application with dashboard, PDF viewer, drag-and-drop upload and dark mode
  • GraphQL API (560+ line schema) covering auth, documents, projects and profiles
  • Three NestJS microservices in a monorepo with shared libraries
  • Python ML services (FastAPI) for embeddings and extraction, deployed as Lambda and ECS containers
  • AWS infrastructure: Bedrock, Cognito, S3, SES, OpenSearch, ECS, Lambda, CodeBuild and ECR pipelines
  • Docker Compose local environment with a single startup script for all services
  • Engineered extraction prompts with contract-type-specific output schemas
In detail

How the engagement ran.

Context

Government contractors, procurement teams and business development staff spend hours reading each solicitation before deciding whether to bid. GovDoc AI, a US GovTech startup, set out to compress that review into minutes: upload a contract PDF and get back the agency, compliance requirements, deadlines, contacts, financial terms and a risk assessment as structured data. Innovation Insight was engaged to take the product from MVP to production and led the full build, from architecture through cloud deployment.

What we built

  • A Next.js 15 application with a project dashboard, deadline tracking, inline PDF viewer, drag-and-drop upload for PDF, DOCX, TXT, MD and CSV files, export to PDF and a like/dislike feedback loop on every AI summary.
  • A single GraphQL API in front of three NestJS services: an API gateway that validates JWTs and routes work over RabbitMQ, an AI service that orchestrates document processing, and an auth service built on AWS Cognito.
  • A Python pipeline that extracts text page by page with PyMuPDF, splits it into 1,500-character chunks, generates 1,024-dimension Cohere embeddings in batches of 20, indexes them in OpenSearch and sends the merged content to Claude Sonnet on Bedrock with a contract-type-aware extraction prompt.
  • Two analysis tiers: a free instant pass that returns the essentials in seconds and augments gaps with web search, and a paid deep pass with 50+ fields, dynamic sections per contract type, page references and organisational chart scraping.
  • Contact enrichment that fills missing contracting-officer details from DuckDuckGo, LinkedIn and the SAM.gov API, storing the source of every field.

Architecture and stack

LayerTechnologyWhy
FrontendNext.js 15, React 19, Zustand, Apollo Client, Tailwind CSS 4, shadcn/uiServer rendering for the marketing surface, typed GraphQL data, dark mode and PDF tooling out of the box
APINestJS 11 monorepo, Apollo Server 4, RabbitMQ RPCIndependent scaling and fault isolation for gateway, AI and auth services
AI pipelinePython, FastAPI, PyMuPDF, Cohere embed-english-v3, OpenSearch KNN, Claude on BedrockRetrieval keeps large contracts inside context limits; Bedrock keeps data in the customer's AWS account
DataMongoDB with a database per tenantHard isolation between customers without application-level filtering
Auth and securityAWS Cognito, Passport JWT, bcrypt, reCAPTCHA, login throttlingEnterprise identity with MFA capability and abuse protection on public forms
InfrastructureAWS ECS, Lambda, S3 per tenant, SES with Mailgun fallback, CodeBuild, ECR, Docker ComposeContainer CI/CD per service and a local environment that mirrors production

How we worked

The engagement covered every layer. Our architects designed the service boundaries, the tenant provisioning flow and the messaging patterns first, so the three services could be built and deployed independently. The AI work ran as its own track: prompt design defined four output section types with strict JSON schemas, and the extraction, evaluation and gap-filling passes were tuned against real solicitations at a temperature of 0.2 for consistent output. Everything runs locally through Docker Compose from one script, which kept onboarding new engineers to a single command.

Security was treated as a product feature rather than a checklist. Tenant databases and buckets are created at email verification, JWTs carry the tenant context for seven days, presigned S3 URLs expire after an hour, and five failed logins trigger a fifteen-minute lockout.

Scale and complexity

MetricValue
Data points extracted per contract50+
GraphQL schema560+ lines across auth, documents, projects and profiles
Chunk size and embedding dimensions1,500 characters, 1,024 dimensions
Max tokens per extraction request16,000 to 20,000
Parallel page extraction workers (paid tier)Up to 15
Chunks retrieved per projectUp to 1,000

What this means for your project

If your business runs on long, semi-structured documents, such as contracts, tenders, claims, policies or compliance filings, the same architecture applies: retrieval over your documents, a schema-driven extraction prompt, an evaluation pass that catches omissions and page references so users can trust the output. The multi-tenant isolation pattern is ready for regulated markets.

Innovation Insight delivers this kind of AI product end to end, with the front end, API, pipeline and AWS infrastructure under one team. A discovery sprint on your document set usually produces a working extraction prototype within two weeks.

Outcome

What changed.

  • 50+ data points extracted automatically per contract, reducing manual review from hours to minutes
  • Production-ready SaaS serving both quick screening (free) and deep analysis (paid) use cases.
  • Complete data isolation per customer at the infrastructure level.
  • Self-correcting analysis with evaluation audits covering poorly structured documents that span hundreds of pages.
FAQ

Questions about this project.

Can this kind of document-analysis pipeline work with our own contracts or forms?

Yes. The pattern is document type agnostic: extraction, chunking, embeddings, vector retrieval and a structured LLM prompt. The prompt schema and evaluation pass are the parts adapted to your document types, which is typically a two to four week discovery and build.

How do you keep customer documents isolated in a multi-tenant AI product?

In GovDoc AI every tenant gets its own MongoDB database and S3 bucket, provisioned at signup, and the tenant context travels inside the JWT so every service routes to the right store. The same approach applies to any regulated or commercially sensitive workload.

Which LLM providers can you build on?

This project runs Claude and Cohere through AWS Bedrock so data stays inside the client's AWS account. We also build on OpenAI, Google and open-weight models, chosen by data residency, cost and accuracy requirements.