Architecture and business value

General AI answers questions. DiligenceIQ structures the diligence before them.

Investors get value before they know what to ask: what is happening, what changed, what deserves attention, and why. When they need to go deeper, any question becomes a cited brief written by exactly one model call. This page describes what runs in this deployment; the future state at the end is marked as not built.

Business value

How this creates value for a private-equity deal team.

It knows how to structure the diligence process, so associates spend their time on judgment rather than on finding the right page of a 10-K.

  • Tells you what is happening

    A company dashboard before any question: performance, current risks, and what to look at first.

  • Shows what changed

    Filing-to-filing changes and attention signals, each with the passages for every period compared.

  • Explains why it matters

    Plain-language context that educates without rating, scoring, or recommending.

  • Suggests what to investigate

    Recommended questions open Deep Analysis prefilled; nothing runs until the analyst clicks Run.

  • Answers any question

    Deep Analysis over every filing, multi-company and multi-year, as a cited Diligence Brief.

  • Proves every conclusion

    Each claim opens its source passage; citations outside the supplied evidence are removed and flagged.

  • Keeps what the team learns

    Findings carry a copy of their cited passages, ready for the Investment Committee.

  • Compares companies

    A fixed-rule bottom line and one risk-area grid across two to five companies, composed without a model call.

Two planes

Questions run live. Company profiles are built offline.

Everything a user opens is read from storage. Only an explicit Run analysis will reach a model.

LIVE · BUILT, PHASES 3–5

One generative call per question

Deep Analysis is retrieval, then exactly one generation request, then validation, in a worker that runs only when an analysis is queued. Every run, including a re-run after a failure, is a new analysis with its own single call. The api queues analyses after checking the kill switch and the spend caps. Compare, Save Finding and the Findings Board are deterministic application logic.
OFFLINE · BUILT, PHASE 4B

Profiles computed once per index version

Company Intelligence profiles are built by an admin-run script after indexing: deterministic figures, risks and change signals, plus at most one model call per company per index and prompt version, enforced by a build ledger and a required call budget. The builder is never deployed and never scheduled, and pages only read the stored result.

The one cost exception, stated plainly

The offline profile build is the only place a model call is not a direct response to a user’s question. It was chosen deliberately, it is bounded as described above, and it can be withdrawn at any time: a zero-call deterministic profile set is always built alongside it, and one parameter switches the product to that set instantly, with no rebuild or deploy.

Single-call guarantee · built, Phase 4

Six steps. One of them talks to a model.

Defense in depth: a conditional claim, an SDK client with retries off, a per-analysis gateway that refuses a second call, a persisted call count, and tests that assert exactly one call on success, error, malformed output and redelivery.

  1. 01

    Claim job

    Conditional QUEUED → RUNNING with a claim token; a redelivered message is acknowledged without work.

  2. 02

    Analyze query

    Deterministic: companies, aliases, sectors, fiscal periods, filing types. No model call.

  3. 03

    Retrieve

    Hybrid keyword and vector search over a pre-built index, with lanes so every company and period asked about is represented.

  4. 04

    Build context

    Deduplicated passages with citation IDs inside a fixed budget, marked as untrusted filing text.

  5. 05

    Generate

    Exactly one Bedrock request. The count is persisted before the call; SDK retries are off.

    The one model call

  6. 06

    Validate

    Schema, citation IDs against the supplied passages, and figures against their cited text.

System

Serverless tiers that scale to near zero when idle.

State lives in on-demand DynamoDB; the corpus, the pre-built index and the profile sets live in S3. Every stack is CDK TypeScript.

  1. 01

    Amplify Hosting

    Built
    • Static Next.js export
    • Same-origin /api rewrite
    • Opening a page never calls a model
  2. 02

    HTTP API → api Lambda

    Built
    • Sessions, findings, stored profiles and Compare; no Bedrock permission
    • Checks the kill switch and the spend caps before it queues an analysis
    • One structured log line per request, with its request ID
  3. 03

    SQS → worker Lambda

    Built
    • Hybrid retrieval over the S3 index
    • The one generation call per question
    • Validation, then idle
IDLE

Storage only

No search cluster, NAT gateway, servers, containers, relational database, firewall, provisioned concurrency or scheduled jobs. A CDK test fails the build if one appears.
IN USE

Proportional to questions asked

The single generation request dominates the cost of an analysis. Spend is bounded by a kill switch, a global daily cap, per-workspace caps and a cap on new workspaces, with an AWS Budget alert by email.

This build

What exists today.

Built means it runs in this deployment.

  • Ingestion, chunking and the hybrid keyword and vector index over every filingBuilt
  • The analysis worker: retrieval, exactly one generation request, deterministic validation of citations and figuresBuilt
  • Deep Analysis form with an editable prefill that never runs by itself; Run queues the analysis for the worker and the page shows its real stagesBuilt
  • Offline profile build: a deterministic set and a model-written set for 53 companies, a build ledger, and one parameter that switches between themBuilt
  • Company Intelligence and Compare read from the stored profiles; every passage opens in a readable source viewBuilt
  • Demo workspaces without an account, seeded with real pre-run briefs; findings saved on the server with their cited passagesBuilt
  • A kill switch on new analyses, and spend caps per workspace per hour, for the whole demo per day, and on new workspaces per network and per dayBuilt
  • Security headers, and a per-page Content-Security-Policy under which scripts run only by their hashBuilt
  • Structured logs with request IDs, 14-day retention, and metrics for generation latency, cost and failures; an alarm if an analysis ever makes a second callBuilt
  • A CDK test that fails the build if an always-on resource appearsBuilt
  • Alarm notifications by email (SNS) and the AWS Budget alert on the account’s DiligenceIQ budgetBuilt

Evaluation

Measured, not claimed.

Every number here was measured by the evaluation harness or in production, and names its record in docs/evaluation.md. There are no estimated or illustrative numbers on this page.

Deep Analysis answers

The 20-question evaluation set (including the assessment’s three example questions, word for word) plus 6 robustness questions, prompt da-v4, Claude Sonnet 4.6. Deterministic checks, no model judging a model. A later prompt, da-v5, was tried and reverted: it did not improve these checks (evaluation.md §11).

  • 1

    model call per analysis

    Exactly one generation request for each of the 26 questions.

    Source: evals/results/generation-…-da-v4.json and -robustness.json · evaluation.md §4, §7

  • 100%

    of citations point to supplied passages

    Every citation left in a brief is a passage the model was given; validation removes any other.

    Source: generation-…-da-v4 (citationValidityPost) · evaluation.md §4

  • 98.9%

    of figures found in their cited passage

    531 of 537 currency and percentage figures in the main set, read against the passage each one cites.

    Source: generation-…-da-v4 (numericGrounding) · evaluation.md §4

  • 14 of 20

    main-set questions pass every check

    Five of the six misses have one or two figures the validator could not verify, and one has a misaligned comparison table.

    Source: generation-…-da-v4 (passed) · evaluation.md §4

  • 5 of 6

    prompt-injection attempts pass every check

    Three typed into the question and three planted in retrieved passages. The miss did not follow the planted text or cite it, but repeated it in order to reject it, which the check counts as a failure.

    Source: generation-…-da-v4 and -robustness (adversarial questions) · evaluation.md §4, §7

  • 3 of 3

    unanswerable questions declined

    A year, a company and market data the filings do not contain: each brief says so instead of answering.

    Source: generation-…-da-v4 and -robustness (abstention) · evaluation.md §4, §7

  • 9

    claims marked “Period not cited”

    Sentences in 3 of the 20 main-set briefs that say something is new or absent in a fiscal year none of their own citations is from. Shown on the brief; reported, not counted as a failed check.

    Source: generation-…-da-v4 (periodClaims) · evaluation.md §12

Retrieval

The same 20 questions, scored on the retrieved context before any model call.

  • 19 of 20

    questions pass the retrieval checks

    Hybrid keyword and vector search: every company and period asked about is in the context, and the supporting passage was found.

    Source: evals/results/retrieval-….json (hybrid) · evaluation.md §1

Latency and cost in production

Three analyses through the deployed queue and worker in us-east-1 (prompt da-v3, 2026-10-02).

  • 43–64 s

    from queued to a finished brief

    About 98% of it is the model writing the brief; the first token arrives in about 1 s. Excludes the browser’s request and polling.

    Source: evaluation.md §5

  • 2.8 s

    to load the index after idle

    The 236 MB pre-built index, read from S3 into the worker’s memory on a cold start.

    Source: evaluation.md §5

  • $0.12–0.13

    model cost per analysis

    Estimated from the tokens each call used, at the $3 / $15 per million tokens then in the code; the account is billed 10% more.

    Source: evaluation.md §5 · evals/results/idle-cost-2026-10-03.json

Company Intelligence profiles

Built offline once per index version; opening a page only reads them.

  • 53

    companies profiled, every citation and figure checked

    100% of citations are real passages of that company, and 100% of figures match a source; no banned phrase.

    Source: evals/results/profiles-…-llm-v3.json · evaluation.md §6

  • 3 of 12

    deep-coverage companies fell back to the deterministic profile

    Their one model-written draft failed a check, so the page shows the zero-call version instead, labeled.

    Source: profiles-…-llm-v3 (deepTierFallbackRate) · evaluation.md §6

Future state

From public filings to the whole deal.

What is being built now, what comes next, and the longer-term direction. Nothing marked next or later exists yet.

StageScopeStatus
Public company intelligenceSEC filings · Company Intelligence · Compare · Deep Analysis · FindingsIn progress
Thesis, watchlist, IC briefThesis tracking, historical filing and intelligence events, an IC Brief with print modeNext
Live monitoringNew filings detected, indexed and compared; watch matches become alertsLater
Deal room intelligenceCIMs, quality-of-earnings reports, financial models, contracts, management presentationsLater
Investment Committee workflowCollaboration, approvals, memo workflows, diligence ownershipLater
Portfolio intelligenceKPI monitoring, new-filing alerts, covenant risk, operating signals, benchmarkingLater

Scenario questions, such as which areas look most exposed if demand weakens, are future state. DiligenceIQ does not produce price targets or financial forecasts.

Live monitoring pipeline

Not built · future state

How new filings would reach a deal team without anyone asking. Nothing here runs in this deployment.

  1. EventBridge schedule

    A daily trigger (the first scheduled job; none exists today).

  2. SEC new-filing check

    Looks for new 10-K and 10-Q filings of watched companies.

  3. Ingestion

    The same parsing and chunking as today, for the new filing only.

  4. Index update

    New passages embedded and added to the hybrid index.

  5. Change detection

    The deterministic signal detectors, run against the prior filing.

  6. Watch match

    Changes matched to the companies and themes a team watches.

  7. Intelligence events

    Stored events with their evidence, shown in Watchlist.

  8. SNS / email

    A notification that links to the event and its passages.