Skip to main content

VerityNgn Configuration Reference

Complete reference for all configuration options.

Environment Variables

VerityNgn is configured via environment variables in a .env file.

Create .env File


Required Configuration

Google Cloud

Notes:
  • GOOGLE_CLOUD_PROJECT and PROJECT_ID are aliases (set both for compatibility)
  • LOCATION should be a Vertex AI supported region (us-central1 recommended)
  • GOOGLE_APPLICATION_CREDENTIALS points to service account JSON file

Optional APIs

Google Custom Search (Evidence Gathering)

Without these:
  • ✅ Core functionality works
  • ⚠️ Limited evidence verification
  • ⚠️ Fewer source citations in reports
To set up:
  1. Create API key: https://console.cloud.google.com/apis/credentials
  2. Create CSE: https://programmablesearchengine.google.com/

YouTube Data API v3 (Counter-Intelligence)

Without this:
  • ✅ Core functionality works
  • ✅ Uses yt-dlp fallback (automatic)
  • ⚠️ Slower metadata extraction
To set up:
  1. Enable YouTube Data API v3
  2. Create API key: https://console.cloud.google.com/apis/credentials

Model Configuration

Vertex AI Model

Model Comparison:

Output Token Limits

Notes:
  • Higher tokens = more detailed claims extraction
  • Don’t exceed model limits (will error)
  • 65K is optimal for 2.5 Flash

Thinking Budget

Recommendations:
  • 0: Fast mode (default) - no internal reasoning tokens
  • 10000: Deep analysis mode - model thinks before responding
  • Higher = slower but potentially better quality

Video Segmentation

Intelligent Segmentation (Automatic)

Behavior:
  • System auto-calculates optimal segment duration
  • Maximizes context window utilization (40-60%)
  • Minimizes API calls (86% reduction)
For 33-minute video:
  • Calculates: 1 segment of 2860 seconds
  • Context usage: 58%
  • API calls: 1 (vs 7 in v1.0)

Manual Segmentation Override

Use cases:
  • Debugging: Use short segments (300-600s)
  • API errors: Reduce segment size
  • Special requirements: Custom durations
Trade-offs:
  • Shorter segments: More API calls, higher cost
  • Longer segments: Risk of timeout, larger memory

Frame Rate

Recommendations:
  • 1.0 FPS: Optimal balance (default) - captures all visual content
  • 0.5 FPS: Slower, cheaper - good for static content
  • 2.0 FPS: Higher detail - use only if needed (doubles token cost)
Token impact:
  • 1 FPS: 258 tokens/sec video
  • 0.5 FPS: 129 tokens/sec video
  • 2 FPS: 516 tokens/sec video

Claims Extraction

Enhanced Claims Extraction

Notes:
  • ENABLE_ENHANCED_CLAIMS: Multi-pass extraction with specificity scoring
  • ENABLE_ABSENCE_CLAIMS: Generate claims about missing evidence
  • CLAIM_SPECIFICITY_THRESHOLD: Minimum score to keep claim (higher = stricter)

Claim Filtering


Counter-Intelligence

Notes:
  • YOUTUBE_REVIEW_IMPACT: How much each review affects truthfulness (-0.35 in v1.0, -0.20 in v2.0)
  • Negative value = reduces truthfulness score
  • Lower magnitude = less aggressive impact

Press Release Detection

Notes:
  • Press releases heavily penalized (promotional bias)
  • -1.0 validation power vs +1.5 for peer-reviewed

Storage Configuration

Deployment Mode

Modes:

Storage Backend

Local Storage Paths


Logging

Log Level

Levels:
  • DEBUG: Verbose output, all operations logged
  • INFO: Normal operation, important events (default)
  • WARNING: Only warnings and errors
  • ERROR: Only errors

Log Output

Unbuffered Output


Performance Tuning

Parallel Processing

Rate Limiting

Caching


Development & Debugging

Debug Mode

Effects:
  • Sets LOG_LEVEL=DEBUG
  • Disables caching
  • Enables request/response logging
  • Saves intermediate outputs

Test Mode

Dry Run


Example Configurations

Minimal (Required Only)

Debug (Maximum Verbosity)

Production (Cloud Run)


Configuration Validation

Test Configuration

Expected output:

Check Environment

Validates:
  • .env file exists
  • Required variables set
  • Service account file exists
  • File permissions correct

Configuration Priority

Variables can be set in multiple places. Priority (highest first):
  1. Environment variables (explicitly set in shell)
  2. .env file (project root)
  3. Default values (in code)
Example:

Security Best Practices

Never Commit Credentials

Restrict File Permissions

Use Environment-Specific Files

Load based on environment:

Next Steps


Last Updated: October 28, 2025
Version: 2.0