Unofficial prototype built from public information. Not affiliated with DeepJudge. It has no access to internal documents. Every fact it uses comes from DeepJudge's public website or job posting, with the URL next to it.
Drafts first answers to a law firm's security questionnaire from a bank of approved facts, cites the source of every answer, and flags everything it cannot support as needs input, with the internal owner who should confirm it.
Before a large law firm signs, its IT and security team sends a questionnaire: often 100 to 300 questions in Excel, on hosting, certifications, encryption, identity, permissions, AI data use, logging and business continuity. Today that work tends to land on whoever knows the answers, often the CTO.
Three things make it slow and risky:
- The same questions come back in every deal, phrased differently. Answers get rewritten instead of reused, and drift apart between deals.
- A confident wrong answer is worse than "we'll confirm". It can end up in a contract, create legal exposure, or lose the trust of a security team.
- The real work is routing. Most of the effort is finding out who knows each missing answer, chasing them, and keeping track.
So the tool is built around one rule: never invent facts. It answers what the approved facts support, and turns everything else into a clear, owned to-do list.
npm run fill -- samples/law_firm_security_questionnaire.csv| Output | For whom |
|---|---|
out/filled.xlsx |
The questionnaire with answer, status, confidence, sources, owner and what is missing. Rows coloured green / amber / red. An approved column for the reviewer. |
out/review_summary.md |
Internal summary: counts, open items grouped by owner (Security, Engineering, Legal, Product), partial drafts, and answered items for spot check. This is what pre-sales sends around. |
out/answers.json |
Machine-readable result, used by npm run eval. |
On the 33-question sample (9 sections) a typical run takes about 20 to 30 seconds and gives roughly 11 answered, 6 partial, 16 needs input. Every open item comes with its owner and what is missing:
### Engineering (7)
- Q11 Identity and access. Do you support single sign-on with Microsoft Entra ID? Which protocols (SAML 2.0, OIDC)?
Missing: Confirm whether DeepJudge supports SSO with Microsoft Entra ID and which protocols are supported.
About half the questions end up open, and that is on purpose: the public pages simply do not cover SSO providers, key management, retention, backups or incident response. The tool says so instead of guessing.
Requires Node 20+ and an OpenAI API key.
npm ci
cp .env.example .env # then set OPENAI_API_KEY
npm run fill -- samples/law_firm_security_questionnaire.csv
npm run eval # compare with the hand-written answer key
npm test # unit tests, no network
npm run web # local web page on http://localhost:3000Options: --out <path> (default out/filled.xlsx), --limit <n> (first n questions only). Environment: COPILOT_MODEL (default gpt-5.5), COPILOT_CONCURRENCY (default 8). Input can be CSV or XLSX with columns id, section, question; any other columns are kept.
1. Grounding is enforced in code, not only asked for in the prompt. Each fact in knowledge/deepjudge_public.md has a stable ID (SEC-03) and a source URL. The model returns fact IDs, never URLs. Then src/grounding.ts applies the rules whatever the model said:
- Citations to fact IDs that do not exist are dropped.
- An answer with no supporting fact is downgraded to
needs_input. - A
needs_inputanswer is replaced by a fixed line ("Needs input from DeepJudge."), so it cannot carry an invented claim. - Source URLs are filled in by code from the knowledge base.
2. Known gaps are written down. The knowledge file has a "Not stated publicly" section (NP-*): SSO and MFA, key management, retention, sub-processors, backups and DR, incident response. These facts can explain why an item is open but never count as support. In a real team, this list is the backlog for the security documentation.
3. Every open item has an owner. The model suggests one (Security, Engineering, Legal, Product); if it does not, the section decides. The summary is grouped by owner so each person gets only their questions.
4. It is measured, not just eyeballed. samples/expected_status.csv is a hand-written answer key. npm run eval compares a run with it and fails if any item claims more than the key allows. Being more cautious than the key is acceptable; being more confident is a bug. Typical result: 30 to 32 of 33 match, 0 overclaims.
5. Simple on purpose. The whole knowledge base (44 facts) fits in the prompt, so there is no vector database. One call per question with a strict JSON schema (OpenAI structured outputs + zod), retried once, run 8 at a time. A failed question becomes needs_input; it never stops the run.
- Public information only. The answers are only as good as the public pages. Many real answers (SSO, retention, DR) are simply not public.
- A citation is not proof. The check guarantees that every answer cites real facts, not that the sentence follows from them. The model can still phrase a fact more strongly than the source ("enforces" vs "designed to maintain"). Human review stays mandatory, which is why every row has an
approvedcolumn. - Runs vary a little. The same question can come back
answeredin one run andpartialin the next. The eval checks that variation stays on the cautious side. - Not built yet: the
approvecommand that saves reviewed answers back to the answer bank (designed in docs/03-APP-FLOW.md, Journey 2) and the discovery brief.
- Replace the public facts with the approved answer bank: the security overview, past questionnaires, policies. Same format: one fact, one ID, one source (document and section), one owner.
- Close the loop. Answers a human approves in the XLSX go back into the bank (
AB-*IDs), with who approved them and when. The next questionnaire starts with more answers already covered. - Add retrieval once the bank grows past a few hundred facts: search the bank per question, pass the top matches, keep the same grounding check.
- Add visibility levels: some answers are fine for any prospect, others only under NDA.
- Run it as an internal tool with SSO, roles (pre-sales drafts, owners approve their area) and an audit trail of approvals. The data model is sketched in docs/05-DATA-SCHEMA.md, Part B.
The build was planned before it was coded. Each document answers one question for whoever works on it next (person or AI agent):
| Doc | Answers |
|---|---|
| 01 PRD | What are we building and why? Features and acceptance criteria. |
| 02 TRD | Which stack, APIs and rules? |
| 03 App flow | What happens on each command, step by step? |
| 04 Design brief | How do the outputs look? |
| 05 Data schema | How is data stored and related? |
| 06 Implementation plan | In what order, and how is each step verified? |
src/knowledge.ts parse knowledge Markdown into facts (ID, topic, text, URL)
src/questionnaire.ts read CSV / XLSX questionnaires
src/drafter.ts prompt + OpenAI call with strict schema, retry once
src/grounding.ts citation check, downgrades, owner defaults
src/report.ts XLSX and review summary
src/cli.ts npm run fill
src/evaluate.ts npm run eval
src/pipeline.ts shared by CLI and web: draft all questions, write outputs
src/server.ts npm run web (local only)
web/index.html the page: upload, live results, filters, downloads
Built by Mario Arranz: software engineer for 12+ years (payments at Paddle, digital identity at Yoti, now lead engineer and main technical contact for clients at Deep Impact AG, with LLM integrations in production). Built as a small example of how I would approach the security questionnaire part of a technical pre-sales role.