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.tsx → analysis-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
| Element | Status | What it is | Operational definition | Where it renders |
|---|---|---|---|---|
| Conclusion answer | ACTIVE | Natural-language statement answering the investigative question | The AI's direct answer to the question posed, based on the evidence provided | Purple block, bold text |
| Confidence level | ACTIVE | How well the evidence supports the conclusion | See Confidence Level Definitions below | "Finding: [Level]" badge, top-right of conclusion block |
| Reasoning | ACTIVE | Brief explanation of why the AI reached this conclusion | Supporting logic connecting evidence to conclusion | Lighter text below conclusion |
| Finding direction | IN SCHEMA ONLY | Whether evidence supports, contradicts, or is inconclusive relative to the conclusion | supports / contradicts / inconclusive | Not rendered in question analysis UI. Kept in schema (optional field) for potential topic synthesis use. |
| Relevancy rating | IN SCHEMA ONLY | Whether the analysis answers the question actually asked | directly_addresses / partially_addresses / tangentially_related / does_not_address | Code 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 context | ACTIVE (conditional) | What changed since previous version | Shows new evidence added, modified evidence, direction changes, user feedback | Blue 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.
| Level | Badge color | Tooltip text | Operational definition |
|---|---|---|---|
| Established | Green | "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. |
| Probable | Blue | "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. |
| Possible | Amber | "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. |
| Insufficient | Gray | "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
| Element | Status | What it is | Operational definition | Where it renders |
|---|---|---|---|---|
| Cited findings | ACTIVE | Key findings with inline citation markers [1], [2] linking to specific evidence excerpts | Each 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 assessments | ACTIVE (not rendering — bug) | Per-evidence-item breakdown: title, type, relevance, hasLimitations, contribution, limitations | Every piece of evidence the AI considered, how it classified it, and whether it found limitations | Collapsed expandable "View evidence details (N items)". Currently not populating — see NQU-480 item 6. |
| Alternative explanations | ACTIVE | Other explanations the AI considered | Each 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 application | DEPRECATED | Which standards/framework documents were applied | Was: disclosure of which uploaded regulatory standards the AI used | Dead 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.
| Type | Definition |
|---|---|
| Testimonial | Witness statements, interviews, depositions, first-person accounts |
| Documentary | Written records, emails, reports, contracts, official documents |
| Physical | Tangible objects, forensic evidence |
| Digital | System logs, metadata, electronic records, digital artifacts |
| Expert | Professional opinions, specialist analyses, technical assessments |
| Quantitative | Statistical data, numerical measurements, metric-based evidence |
| Standard | Normative or compliance documents such as policies, regulations, or standards of practice |
Step 3 — What's Missing or Concerning?
Component: analysis-step-concerns.tsx
| Element | Status | What it is | Operational definition | Where it renders |
|---|---|---|---|---|
| Evidence gaps | ACTIVE | What evidence is missing from the collection | Each gap identifies missing evidence, its expected type, and potential impact on conclusions | Amber cards with impact badges |
| Link divergence | ACTIVE (not firing — bug) | Evidence the investigator manually linked to this question that the AI didn't cite | Measures 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 coverage | ACTIVE (needs change) | How many evidence items were considered vs. total | Only meaningful when < 100%. | Plain text statement. Suppress when 100% — see NQU-480 item 7. |
| Issues | ACTIVE | Contradictions, inconsistencies, procedural concerns, bias indicators | Each issue has: type, description, evidence involved, suggested resolution | Red cards with issue type badge |
Gap Impact Definitions
These appear as colored badges on each evidence gap.
| Impact | Badge color | Definition |
|---|---|---|
| Critical | Red | This missing evidence would likely change the analysis conclusions if obtained. |
| Significant | Amber | This missing evidence would materially strengthen or weaken the conclusions. |
| Minor | Gray | This 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
| Type | Definition |
|---|---|
| Contradiction | Direct conflicts between two or more evidence sources on the same factual claim |
| Inconsistency | Variations between sources that may or may not be explainable without indicating falsehood |
| Procedural concern | Issues with how evidence was collected, handled, or documented |
| Bias indicator | Signs that a source may be influenced by interest, relationship, or perspective |
Step 4 — Your Judgment
Component: analysis-step-judgment.tsx
| Element | Status | What it is | Operational definition | Where it renders |
|---|---|---|---|---|
| Gate progress | ACTIVE | Two prerequisite gates before judgment is enabled | Gate A: "Analysis reviewed" (scrolled through). Gate B: "Citation checked" (opened at least one citation badge). | Progress indicator at top of Step 4 block |
| Judgment buttons | ACTIVE | Three-way user judgment | Agree: 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 notes | ACTIVE | Free-text annotation on any judgment | Up to 500 characters. Available before judgment is submitted. | Expandable text area below buttons |
Below Step 4
| Element | Status | What it is | Where it renders |
|---|---|---|---|
| Quality badge | ACTIVE | Overall quality assessment (Established/Probable/Possible/Insufficient) | Badge below judgment block |
| Quality Metrics expandable | ACTIVE | Detailed quality check results (faithfulness, coverage, relevancy, contradiction scores) | Collapsed expandable "Quality Metrics" with warning icon if issues |
| Quality Details and Diagnostics | ACTIVE | Deep-dive quality information | Collapsed expandable below quality badge |
| Version History | ACTIVE | Previous versions of this analysis with timestamps | List at bottom showing v1, v2, v3... with generation timestamps |
| Viewed status | ACTIVE | Whether 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:
| Element | Type | Status | Notes |
|---|---|---|---|
FindingDirection | Type on AnalysisConclusion | IN SCHEMA ONLY | Optional. Keep for potential topic synthesis use. |
FrameworkApplication | Interface | DEPRECATED | Remove — feature retired (NQU-480 item 1) |
highlightRange on AnalysisCitation | Field | IN SCHEMA ONLY | Character positions for source highlighting. Not implemented in frontend. |
chunkId on AnalysisCitation | Field | IN SCHEMA ONLY | Chunk ID from vector search for audit trail. Not surfaced to user. |
Change Log
| Date | Change | Issue |
|---|---|---|
| 2026-03-26 | Initial version from CD/Joe walkthrough | NQU-480 |