#4839 Verifying Completeness and Correctness of LLM Response
#4839 Verifying Completeness and Correctness of LLM Response
#4839 After prompting an LLM to evaluate whether a NASA launch provider software development document complies with NASA standards and requirements, how can I verify the response is complete and correct?
Verifying an LLM's compliance evaluation for mission-critical aerospace documentation requires a systematic audit across both the authoritative standards and the target document.
1. Verification Checklist
| Dimension | Primary Failure Mode | How to Verify |
| Standard Baseline | Hallucinated clauses, outdated revisions | Cross-reference cited paragraph numbers against the contractually binding baseline (e.g., NPR 7150.2D vs. earlier revisions). |
| Exemption & Tailoring | Flagging waived clauses as violations | Check the program’s approved Compliance Matrix / Tailoring Plan for explicitly waived or modified requirements. |
| Traceability & Grounding | Plausible but fabricated document quotes | Search the provider's document for exact quote strings and cited section numbers. |
| Completeness (Recall) | Hallucination of omission (skipping hard requirements) | Reconcile the LLM’s evaluated items against the complete set of mandatory "shall" statements for that software classification. |
| Logic & Classification | Misjudged compliance status | Manually inspect borderline verdicts (e.g., marked "Compliant" based only on intent rather than objective evidence). |
2. Systematic Audit Protocol
Audit the Governing Standard Baseline
Confirm the specific document identifier and revision: NPR 7150.2 (NASA Software Engineering Requirements), NASA-STD-8739.8 (Software Assurance and Safety), and NASA-STD-8719.13 (Software Safety Standard).
Verify software classification (Class A human-rated vs. Class B/C non-crewed). An LLM often cites requirements that only apply to Class A systems when assessing Class B software, or vice versa.
Verify Bidirectional Citation Grounding
Source Document Grounding: Ensure every claim of non-compliance quotes exact, verbatim passages with verifiable section/page numbers from the provider's document.
Standard Grounding: Check that every NASA standard cited exists verbatim in the official standard text, particularly verifying that numerical clause IDs match the applicable revision.
Check Tailoring and Approved Variances
NASA programs routinely grant deviations, waivers, and tailoring allowances (documented via the NASA Software Compliance Matrix).
Compare the LLM's finding list against the approved compliance matrix. LLMs frequently flag missing processes that were formally tailored out or satisfied by alternative commercial industry standards (such as DO-178C or CMMI Level 3+).
Run an Automated "Second-Pass" Differential Verification
Extraction Pass: Use an independent, deterministic script or an isolated LLM prompt strictly tasked with extracting all mandatory requirements from the governing standard into a structured CSV:
[Req ID] | [Mandatory "Shall" Text] | [Classification Applicability]Verification Matrix: Prompt a separate instance with access to the original evaluation to verify only:
Does citation [X] exist in [Document]? (Yes/No + Verbatim Quote) Does standard clause [Y] match the exact wording of [NPR 7150.2]? (Yes/No)
Examine Evidence Sufficiency vs. Process Intent
Distinguish between process commitment ("The vendor will perform static code analysis") and objective quality evidence ("Static code analysis reports, rule sets, and threshold criteria are defined in Section 4.2").
LLMs often mark requirements compliant if the text merely mentions the topic, ignoring whether actionable verification criteria exist.
3. Subject-Matter Expert (SME) Sampling Strategy
Do not review the LLM output in arbitrary order. Stratify human review:
100% Review of Safety-Critical Findings: Any finding intersecting software safety hazard analyses, fault tolerance, or command/control inhibits.
Random 20% Spot-Check of "Compliant" Items: LLM false positives typically hide here (marking ambiguous provider language as fully compliant).
100% Review of Identified Non-Compliances: Validate before escalating findings to the contractor or joint control board.
All steps, initial and verification, need to be AI-automated
An autonomous, dual-engine AI verification architecture replaces manual spot-checking by decoupling requirement extraction, compliance evaluation, adversarial verification, and deterministic schema gating into independent execution nodes.
Architecture Overview
[Governing Baseline DB] ──┐ (NPR 7150.2D, NASA-STD) │ ▼ [1. Auditor Node] (Candidate Audit) │ ▼ [Provider Target Doc] ───► [2. Adversarial Verifier] ◄─── [Compliance Matrix / Waivers] (Independent Model) │ ▼ [3. Reconciliation Gating] (Pydantic / Deterministic AST) │ ┌─────┴─────┐ ▼ ▼ [Verified Pass] [Flagged Discrepancy]
1. Verification Dimensions & Automated Tests
| Verification Dimension | Failure Mode Caught | Automated Verification Check |
| Citation Hallucination | Fabricated clauses or vendor quotes | Exact substring matching against raw document text & authoritative standards database. |
| Omission / Recall Gap | Skipped mandatory "shall" statements | Set difference analysis: {Applicable Class Requirements} \ {Audited Requirements}. |
| Baseline Mismatch | Using wrong standard revision | Primary key check against official requirement baseline tables (e.g., NPR 7150.2D clause IDs). |
| Tailoring False Positive | Flagging formally approved waivers | Automated lookup against approved program Tailoring Matrix / DIDs. |
| Weak Evidence Acceptance | Accepting intent instead of objective proof | Adversarial prompt checking for concrete artifacts (DIDs, test records, tool IDs, section tables). |
2. Multi-Agent Automated Pipeline Execution
3. Execution Schema & Concrete Next Steps
Serialize Governing Requirements: Ensure your NPR 7150.2D and NASA-STD-8739.8B records are structured with primary keys (
SWE-013,SWE-020) and classification tags in an indexed data store.Implement Dual-Model Orchestration: Run the Auditor and Adversarial Verifier on distinct model backends to eliminate shared blind spots.
Hard-Gate via Pydantic: Constrain both audit and verification responses to structured output schemas; reject and retry raw Markdown or unstructured prose.
Log Automated Discrepancy Reports: Aggregate items where the Auditor and Adversarial Verifier disagree into a dedicated discrepancy table for formal engineering baseline sign-off.
From <https://gemini.google.com/app/f3494350cda117d4> Google Gemini (3.8 Flash)
Comments
Post a Comment