Skip to main content

Analysis Output Reference

Created: 2026-03-26 (NQU-480) Source: Joint CD/Joe walkthrough of live Davenheim E2E case Purpose: Single source of truth for what the analysis output contains, where each element renders, and its operational definition. Serves CD/CC development, AI Guide, and future end-user documentation. Status: Living document. Update when analysis elements change.


How to Read This Document

Each analysis type (question, topic, summary, gap, error check) has its own section. Within each section, elements are organized by the Step where they render in the UI. Elements marked ACTIVE are rendering in production. Elements marked IN SCHEMA ONLY exist in analysis-output-schema.ts but don't render or aren't populated. Elements marked DEPRECATED should be removed.

The Davenheim E2E Case was the reference instance for this document.


1. Question Analysis (analysis_question)

Answers a single investigative question against the evidence collection. This is Nquiry's primary analysis type and the most thoroughly validated.

Schema type: AnalysisOutput (in lib/ai/analysis-output-schema.ts) Prompt: A1 (stored in prompt_template table, type analysis_question) Rendering: analysis-list.tsxanalysis-step-conclusion.tsx, analysis-step-evidence.tsx, analysis-step-concerns.tsx, analysis-step-judgment.tsx

Step 1 — What Did the AI Find?

Component: analysis-step-conclusion.tsx

ElementStatusWhat it isOperational definitionWhere it renders
Conclusion answerACTIVENatural-language statement answering the investigative questionThe AI's direct answer to the question posed, based on the evidence providedPurple block, bold text
Confidence levelACTIVEHow well the evidence supports the conclusionSee Confidence Level Definitions below"Finding: [Level]" badge, top-right of conclusion block
ReasoningACTIVEBrief explanation of why the AI reached this conclusionSupporting logic connecting evidence to conclusionLighter text below conclusion
Finding directionIN SCHEMA ONLYWhether evidence supports, contradicts, or is inconclusive relative to the conclusionsupports / contradicts / inconclusiveNot rendered in question analysis UI. Kept in schema (optional field) for potential topic synthesis use.
Relevancy ratingIN SCHEMA ONLYWhether the analysis answers the question actually askeddirectly_addresses / partially_addresses / tangentially_related / does_not_addressCode exists in component but not rendering (field likely null). Design decision: this is a generation quality check, not a user-facing insight. Keep for internal monitoring only.
Regeneration contextACTIVE (conditional)What changed since previous versionShows new evidence added, modified evidence, direction changes, user feedbackBlue info block, only on iteration > 1

Confidence Level Definitions

These appear as the "Finding: [Level]" badge and on hover via tooltip.

The definitions below were tightened on 2026-05-04 (NQU-605) to give investigators investigative-standards anchors rather than Likert-scale qualitative phrasing. They describe what each level means operationally for an investigator reading the finding — they are not rigid thresholds the AI counts mechanically. The AI assigns confidence based on its evaluation of the evidence corpus against the standards in the A1 analysis prompt; these definitions describe how the user should interpret the resulting badge.

LevelBadge colorTooltip textOperational definition
EstablishedGreen"Finding confidence: Strong, convergent evidence supports this conclusion."Three or more independent evidence items point to the same conclusion. Evidence is direct (the documents/data state the fact, not inferred from related circumstances). Any contradicting evidence has been addressed and resolved. Triangulation across source types where applicable. Investigator action: treat as a substantiated finding suitable for the report's findings section.
ProbableBlue"Finding confidence: Moderate evidence supports this conclusion, with minor gaps."Two independent sources, OR three or more with one or more minor (non-material) gaps. Evidence is direct, or strongly inferential with the reasoning chain explicit and supported. Contradictions, if any, are minor and explained. Investigator action: suitable for a substantiated finding; document the gaps in the report so a reader can evaluate them.
PossibleAmber"Finding confidence: Limited evidence suggests this is plausible; significant gaps remain."One direct source plus inferential support, OR two or more sources with significant unresolved gaps. Evidence may be circumstantial. Some contradicting evidence may be unresolved. Investigator action: treat as a hypothesis — not a finding. Document as inconclusive in the report unless additional evidence collection is feasible.
InsufficientGray"Finding confidence: Evidence is too limited to support a reliable conclusion."Zero or one direct sources without corroborating support, OR contradicting evidence outweighs supporting evidence, OR evidence is sparse, weak, or systematically biased. Investigator action: do not draw a conclusion; this is Inconclusive in the finding-status field. Collect more evidence or document why further collection is not feasible.
Contradicted (legacy)Red"Finding confidence: Available evidence weighs against this conclusion."Legacy value from older analyses. Not generated by current prompts. May appear on archived analyses generated before NQU-459.

On counting "independent sources": independent means the sources do not derive from each other. Two summaries of the same underlying document are one source. A document plus an interview about that document are one source. A document, a system log, and a third-party witness statement are three independent sources even if they all describe the same event.

On "direct vs. inferential" evidence: direct evidence states the fact (e.g., a payment record stating an amount and date). Inferential evidence requires a reasoning step (e.g., a calendar entry plus a parking receipt to establish a meeting occurred). Both are valid; direct evidence is stronger per item.

On contradictions: a contradiction is unresolved when the analysis has not addressed why the contradicting evidence does not undermine the conclusion. Acknowledging a contradiction without addressing it is not resolution.

Step 2 — Show Me the Evidence

Component: analysis-step-evidence.tsx

ElementStatusWhat it isOperational definitionWhere it renders
Cited findingsACTIVEKey findings with inline citation markers [1], [2] linking to specific evidence excerptsEach finding is a claim supported by cited evidence. Citation badges show source count and evidence type breakdown (Testimonial, Documentary, Physical, etc.)White cards with green numbered badges. Source summary below each card.
Evidence assessmentsACTIVE (not rendering — bug)Per-evidence-item breakdown: title, type, relevance, hasLimitations, contribution, limitationsEvery piece of evidence the AI considered, how it classified it, and whether it found limitationsCollapsed expandable "View evidence details (N items)". Currently not populating — see NQU-480 item 6.
Alternative explanationsACTIVEOther explanations the AI consideredEach alternative has: explanation text, supporting evidence, weaknesses, likelihood (Ruled Out / Less Likely / Equally Likely / More Likely)Collapsed expandable below cited findings. Shows likelihood badge per alternative.
Framework applicationDEPRECATEDWhich standards/framework documents were appliedWas: disclosure of which uploaded regulatory standards the AI usedDead code. Feature retired. Remove per NQU-480 items 1-3.

Evidence Type Classifications

The AI classifies each cited evidence source. These appear as colored labels below each cited finding.

TypeDefinition
TestimonialWitness statements, interviews, depositions, first-person accounts
DocumentaryWritten records, emails, reports, contracts, official documents
PhysicalTangible objects, forensic evidence
DigitalSystem logs, metadata, electronic records, digital artifacts
ExpertProfessional opinions, specialist analyses, technical assessments
QuantitativeStatistical data, numerical measurements, metric-based evidence
StandardNormative or compliance documents such as policies, regulations, or standards of practice

Step 3 — What's Missing or Concerning?

Component: analysis-step-concerns.tsx

ElementStatusWhat it isOperational definitionWhere it renders
Evidence gapsACTIVEWhat evidence is missing from the collectionEach gap identifies missing evidence, its expected type, and potential impact on conclusionsAmber cards with impact badges
Link divergenceACTIVE (not firing — bug)Evidence the investigator manually linked to this question that the AI didn't citeMeasures gap between expert judgment and AI retrieval. Only appears when there IS divergence.Amber advisory block. Currently not populating — see NQU-480 item 5.
Evidence coverageACTIVE (needs change)How many evidence items were considered vs. totalOnly meaningful when < 100%.Plain text statement. Suppress when 100% — see NQU-480 item 7.
IssuesACTIVEContradictions, inconsistencies, procedural concerns, bias indicatorsEach issue has: type, description, evidence involved, suggested resolutionRed cards with issue type badge

Gap Impact Definitions

These appear as colored badges on each evidence gap.

ImpactBadge colorDefinition
CriticalRedThis missing evidence would likely change the analysis conclusions if obtained.
SignificantAmberThis missing evidence would materially strengthen or weaken the conclusions.
MinorGrayThis missing evidence would add context but is unlikely to change the conclusions.

TODO (NQU-480 items 8-9): These definitions need to be added as hover tooltips in the UI and included in the A1 prompt template so the AI and users share the same standard.

Issue Type Definitions

TypeDefinition
ContradictionDirect conflicts between two or more evidence sources on the same factual claim
InconsistencyVariations between sources that may or may not be explainable without indicating falsehood
Procedural concernIssues with how evidence was collected, handled, or documented
Bias indicatorSigns that a source may be influenced by interest, relationship, or perspective

Step 4 — Your Judgment

Component: analysis-step-judgment.tsx

ElementStatusWhat it isOperational definitionWhere it renders
Gate progressACTIVETwo prerequisite gates before judgment is enabledGate A: "Analysis reviewed" (scrolled through). Gate B: "Citation checked" (opened at least one citation badge).Progress indicator at top of Step 4 block
Judgment buttonsACTIVEThree-way user judgmentAgree: Investigator concurs with the AI's conclusion. Disagree: Investigator does not concur. Unsure: Investigator cannot determine — triggers different downstream behavior than Disagree.Three buttons, disabled until both gates pass
Optional notesACTIVEFree-text annotation on any judgmentUp to 500 characters. Available before judgment is submitted.Expandable text area below buttons

Below Step 4

ElementStatusWhat it isWhere it renders
Quality badgeACTIVEOverall quality assessment (Established/Probable/Possible/Insufficient)Badge below judgment block
Quality Metrics expandableACTIVEDetailed quality check results (faithfulness, coverage, relevancy, contradiction scores)Collapsed expandable "Quality Metrics" with warning icon if issues
Quality Details and DiagnosticsACTIVEDeep-dive quality informationCollapsed expandable below quality badge
Version HistoryACTIVEPrevious versions of this analysis with timestampsList at bottom showing v1, v2, v3... with generation timestamps
Viewed statusACTIVEWhether the analysis has been opened"Viewed" label next to quality badge

2. Topic Analysis (topic_analysis)

Synthesizes completed question analyses within a topic. Does NOT re-evaluate individual evidence — identifies patterns, contradictions, and emergent gaps that only become visible when reading question findings together.

Schema type: TopicSynthesisOutput Prompt: A2

TODO: Document topic analysis elements after walkthrough. Current document covers question analysis only.


3. Summary Analysis (summary_analysis)

Executive summary synthesizing all analyses.

Schema type: SummaryAnalysisOutput Prompt: A3

TODO: Document summary analysis elements after walkthrough.


4. Gap Analysis (gap_analysis)

Investigation-level gap identification.

Schema type: GapAnalysisOutput Prompt: A4

TODO: Document gap analysis elements after walkthrough.


5. Error Check (error_check)

Investigation-level contradiction and inconsistency detection.

Schema type: ErrorCheckOutput Prompt: A5

TODO: Document error check elements after walkthrough.


Appendix: Elements Not in UI

These exist in analysis-output-schema.ts but are not rendered or populated:

ElementTypeStatusNotes
FindingDirectionType on AnalysisConclusionIN SCHEMA ONLYOptional. Keep for potential topic synthesis use.
FrameworkApplicationInterfaceDEPRECATEDRemove — feature retired (NQU-480 item 1)
highlightRange on AnalysisCitationFieldIN SCHEMA ONLYCharacter positions for source highlighting. Not implemented in frontend.
chunkId on AnalysisCitationFieldIN SCHEMA ONLYChunk ID from vector search for audit trail. Not surfaced to user.

Change Log

DateChangeIssue
2026-03-26Initial version from CD/Joe walkthroughNQU-480