GitAuto Logo
  1. Home
  2. Pricing
  3. Docs
  4. Dashboard
  5. Blog
  6. Contact
  1. Home
  2. How It Works
  3. Use Cases
  4. Pricing
  5. Docs
  6. Dashboard
  7. FAQ
  8. Blog
  9. Contact

Anti-Hallucination Prompts

GitAuto includes explicit instructions in the system message that tell the model: "NEVER claim a file exists unless you can see it," "Do NOT invent or hallucinate file names," and "Always verify by reading the file first." These prompts reduce the frequency of hallucinated imports and file references.

Why This Exists

The model confidently imports from files that don't exist, references functions with wrong signatures, and assumes project structures based on common patterns rather than the actual repository. Without explicit anti-hallucination instructions, the model writes imports like import { utils } from './utils' for a utils file it has never seen and that may not exist. These phantom imports cause immediate build failures that waste agent iterations to debug.

Why Models Hallucinate File Paths and Imports

Models predict file paths based on naming conventions they've seen in training data. If a project puts utilities in src/lib/utils, but the model's training data more commonly shows src/utils or lib/helpers, it will confidently generate the wrong import path. The model has no file system access to verify paths exist - it's purely guessing based on patterns. Code generation benchmarks provide self-contained problems where all imports are known, so models are never evaluated on navigating real repositories with complex directory structures and have no training signal for import path accuracy in unfamiliar codebases.

How It Works

The anti-hallucination instructions are embedded in the system message that starts every agent session. They are phrased as direct prohibitions: "NEVER," "Do NOT," "ALWAYS verify." Strong wording is intentional because softer instructions like "try to verify files" are ignored under pressure when the model is trying to complete a task quickly. The instructions reduce but do not fully eliminate hallucinations - the model still occasionally invents imports, which is why other safeguards like verification exist.

Related Features

  • Web Search - lets the model search for current information about libraries and APIs
  • URL Fetching - lets the model read full page content from search results
  • Full File Reads - gives the model actual file contents to reference instead of guessing

Need Help?

Have questions or suggestions? We're here to help you get the most out of GitAuto.

Contact us with your questions or feedback!

URL FetchingGITAUTO.md Restrictions

Getting Started

  • Installation
  • Setup

Triggers

  • Overview
  • Schedule Trigger
  • Test Failure Trigger
  • Review Comment Trigger
  • Dashboard Trigger

Coverage Dashboard

  • Overview
  • Python Testing
  • JavaScript Testing
  • Java Testing
  • Go Testing
  • PHP Testing
  • Ruby Testing
  • Flutter Testing
  • Multi-Language
  • Coverage Charts

Customization

  • Repository Rules
  • Output Language
  • GITAUTO.md

Integrations

  • CircleCI Integration
  • npm Integration

How It Works

Context Enrichment

  • Line Numbers
  • Full File Reads
  • Test File Preloading
  • Test Naming Detection
  • Error Baselines
  • CI Log Cleaning
  • Trigger-Specific Prompts
  • Coding Standards

Output Auto-Correction

  • Diff Hunk Repair
  • Diff Prefix Repair
  • Tool Name Correction
  • Tool Argument Correction
  • Import Sorting
  • Trailing Space Removal
  • Final Newline
  • Line Ending Preservation
  • Sanitize Tool Arguments
  • Lint Disable Headers

Quality Verification

  • Formatting
  • Linting
  • Type Checking
  • Test Execution
  • Coverage Enforcement
  • phpcs / phpstan Support
  • PHPUnit Support
  • pytest Support
  • Snapshot Auto-Update
  • Untestable Detection
  • Should-Skip Detection
  • Dead Code Removal
  • Quality Check Scoring
  • Quality Checklist

Safety Guardrails

  • File Edit Restrictions
  • Temperature Zero
  • PR/Branch Checks
  • Race Condition Prevention
  • Bot Loop Prevention
  • Webhook Deduplication
  • Duplicate Error Hashing
  • Infrastructure Failure Detection
  • Strict Tool Schemas
  • No-Change Detection

Token/Cost Management

  • Token Trimming
  • Outdated Diff Removal
  • Stale File Replacement
  • Skip CI Intermediate
  • CI Log Deduplication
  • Web Fetch Summarization
  • Context Forgetting
  • File Query Routing
  • On-Demand Diff

Resilience & Recovery

  • Model Fallback
  • Overload Retry
  • Forced Verification
  • Error Files Editable

Hallucination Prevention

  • Web Search
  • URL Fetching
  • Anti-Hallucination Prompts
  • GITAUTO.md Restrictions
  • Review Response Guardrails

Ready to improve your test coverage?

Go from 0% to 90% test coverage with GitAuto. Start for free, no credit card required.

Install FreeContact Sales

Product

  • Home
  • Why GitAuto
  • What GitAuto Does
  • How It Works
  • Use Cases
  • How to Get Started
  • Solution
  • Pricing
  • Pricing Details
  • ROI Calculator
  • ROI Methodology
  • FAQ
  • Blog
  • Contact

Dashboard

  • Dashboard
  • Coverage Trends
  • File Coverage
  • Credits
  • Open PRs
  • Usage
  • Triggers
  • Actions
  • References
  • Rules
  • CircleCI Integration
  • npm Integration

Documentation

  • Docs
  • Getting Started
  • Setup
  • Triggers
  • Coverage Setup
  • Customization
  • How It Works
  • Auto Merge
  • CircleCI
  • npm

Legal

  • Privacy Policy
  • Terms of Service

Connect

  • GitHub
  • LinkedIn
  • Twitter
  • YouTube
GitAuto Logo© 2026 GitAuto, Inc. All Rights Reserved