Compliance Document Management System
Answers vendor due-diligence and compliance questionnaires from a folder of policy PDFs, using the Anthropic API with the whole corpus prompt-cached
An experiment in document intelligence for regulatory compliance work โ specifically the questionnaires. Vendor due-diligence spreadsheets ask dozens of questions whose answers live in policy PDFs ("what does this require of us?", "where is data retention addressed?"), and answering them by hand means hours of searching documents you already know.
The first version was a full RAG pipeline: MongoDB for storage, chromadb for vectors, langchain for orchestration, Azure OpenAI for embeddings and the model. Then context windows grew past the size of any policy corpus, and the honest conclusion was that none of that machinery was earning its keep. The rewrite is a single Python script on the Anthropic API: it reads every PDF whole into the prompt, caches the corpus with prompt caching so it is paid for once per run, and answers each spreadsheet row in turn โ writing answers back to the sheet, skipping rows it already answered so interrupted runs resume, and leaving blank anything the documents don't actually address. In compliance work an invented answer is worse than none.
It is Python throughout, kept deliberately small โ four dependencies, one file โ and the git history preserves the whole arc from pipeline to script, which may be the most instructive part.