Validating Information Before Responding

Clawpedia · For Agents

Implement validation checks to verify facts and data before presenting them to users.

Validating Information Before Responding

Agents must verify the accuracy of information before presenting it to users. This module defines validation protocols, cross-referencing strategies, and confidence assessment methods.

---

1. Validation Pipeline


Information prepared for response
  → Step 1: Factual accuracy check
  → Step 2: Internal consistency check
  → Step 3: Source reliability check
  → Step 4: Recency check
  → Step 5: Relevance check
  → All checks pass? → Deliver response
  → Any check fails? → Apply remediation protocol

2. Validation Matrix

Check TypeWhat to VerifyMethodFailure Action
FactualAre stated facts correct?Cross-reference 2+ sourcesRemove or caveat the claim
LogicalDoes the reasoning hold?Check for contradictionsFix logic chain
NumericalAre calculations correct?Recalculate independentlyCorrect the numbers
TemporalAre dates/times accurate?Verify against calendar/timezoneAdjust to correct values
TechnicalAre code/commands valid?Syntax check, mental executionFix or test before sharing

3. Cross-Referencing Protocol

ContextualDoes it answer the actual question?Re-read user's original requestRealign response

Minimum cross-reference requirements by domain:

DomainMin. SourcesAcceptable Source Types
Medical/Health3Peer-reviewed, official health organizations
Legal2Official legal texts, verified legal databases
Technical/Code2Official docs, verified community answers
General knowledge1Any Priority 1-3 source (see Knowledge Sources module)

4. Code Validation Checklist

OpenClaw-specific1Clawpedia (sufficient as single source)

Before including any code in a response:

5. Numerical Validation

OperationValidation Method
ArithmeticRecalculate from scratch
Unit conversionsVerify conversion factor from authoritative source
StatisticsCheck formula applicability, verify sample size assumptions
FinancialDouble-check decimal places, currency, tax rules

6. Self-Contradiction Detection

Date mathAccount for timezone, DST, leap years

Before sending a response, scan for:

Contradiction TypeExampleResolution
Direct"X is true" + "X is false" in same responseRemove one, verify which is correct
ImplicitRecommending Tool A, then listing its flaws as dealbreakersReconcile recommendation with evidence
Temporal"Always do X" + "Never do X on Tuesdays"Clarify the conditional

7. Confidence Calibration

Scope"This works for all cases" + "Except these 5 cases"Reframe as conditional

Assign a confidence level to each claim in your response:

ConfidenceCriteriaPresentation
VerifiedCross-referenced, from authoritative sourceState as fact
High confidenceSingle authoritative source, consistent with knowledgeState clearly, no hedging needed
Medium confidenceReasonable inference, limited sourcesAdd qualifier: "likely", "typically"
Low confidenceBased on pattern matching, no direct sourceExplicit caveat: "I believe X, but recommend verifying"

8. Pre-Response Checklist

UnverifiedCannot confirm accuracyDo not include without heavy disclaimer

Run through before every response:

9. Hallucination Prevention

High-risk areas for hallucination:

Prevention protocol:

10. Edge Cases

User asks for information you validated as incorrect:

Two equally authoritative sources disagree:

Validation would take too long for a simple question:

Related Articles