Skip to main content

Evidence-aware web search, browsing, and claim verification for AI agents.

Project description

Cross-Validated Search

Cross-Validated Search

Evidence-aware web search, browsing, and claim verification for AI agents.

CLI + MCP + skill surfaces for Gemini, OpenClaw, and other agent runtimes.

PyPI package Python Version MCP Ready License

Cross-Validated Search is an evidence-aware verification layer for AI agents. It combines live web search, page reading, and claim checking so an agent can surface supporting evidence, conflicting evidence, and source-backed confidence before presenting factual answers.

Canonical names in v16: package cross-validated-search, module cross_validated_search, and MCP command cross-validated-search-mcp. Legacy free_web_search imports and free-web-search-mcp remain available as compatibility aliases.

Recommended free path: ddgs + self-hosted SearXNG. Configure CROSS_VALIDATED_SEARCH_SEARXNG_URL to unlock a free second provider and stronger evidence reports.

Indexer Quick Review

If you are reviewing this repo for collection or ecosystem inclusion, the fastest path is:

  1. verify the flagship workflow: evidence-report "Python 3.13 stable release" --claim "Python 3.13 is the latest stable release" --deep --json
  2. review the ecosystem contract: docs/ecosystem-readiness.md
  3. review the free dual-provider bootstrap: docs/searxng-self-hosted.md

60-second verification

Install and verify the public surface:

pip install cross-validated-search
search-web "Python 3.13 release" --json
verify-claim "Python 3.13 is the latest stable release" --deep --max-pages 2 --json
evidence-report "Python 3.13 stable release" --claim "Python 3.13 is the latest stable release" --deep --json

Typical evidence-report JSON shape:

{
  "verdict": "contested",
  "confidence": "MEDIUM",
  "coverage_warnings": [
    "Single-provider evidence path. Add another provider when possible."
  ],
  "analysis": {
    "report_model": "evidence-report-v2",
    "provider_diversity": 1,
    "page_aware": true,
    "support_score": 1.42,
    "conflict_score": 0.61,
    "coverage_warning_count": 1
  }
}

If you are evaluating the repo for ecosystem collection, start with docs/ecosystem-readiness.md.

Why this exists

Most search wrappers stop at “here are some results.” This repository goes one step further:

  • returns structured search results with citations
  • reads full pages when snippets are not enough
  • classifies evidence as supporting, conflicting, or neutral
  • generates a higher-level evidence report with citation-ready sources and next steps
  • exposes explainable confidence signals instead of a black-box claim
  • works across CLI, MCP, Gemini, OpenClaw, and other agent workflows

Current capabilities

search-web

Use live search for factual or time-sensitive queries.

search-web "Python 3.13 release"
search-web "OpenAI release news" --type news --timelimit w
search-web "人工智能最新进展" --region zh-cn --json

browse-page

Read the full text of a URL when snippets are not enough.

browse-page "https://example.com/article"
browse-page "https://example.com/article" --json

verify-claim

Check whether a claim looks supported, contested, likely false, or still under-evidenced.

verify-claim "Python 3.13 is the latest stable release"
verify-claim "OpenAI released GPT-5 this week" --timelimit w --json
verify-claim "Python 3.13 is the latest stable release" --with-pages --max-pages 2

evidence-report

Generate a compact report that combines search, verification, citations, and follow-up guidance.

evidence-report "Python 3.13 stable release"
evidence-report "Python 3.13 stable release" --claim "Python 3.13 is the latest stable release" --deep --json

The report now includes:

  • verdict rationale that explains why the score landed where it did
  • stance summary buckets for supporting, conflicting, and neutral evidence
  • coverage warnings when provider diversity, domain diversity, or page-aware depth look weak
  • citation-ready source digests and recommended next steps

Free dual-provider setup

If you want the strongest free setup, self-host SearXNG and pair it with ddgs:

./scripts/start-searxng.sh
export CROSS_VALIDATED_SEARCH_SEARXNG_URL="http://127.0.0.1:8080"
./scripts/validate-free-path.sh

Or use the compose file directly:

cp .env.searxng.example .env
docker compose -f docker-compose.searxng.yml up -d

Full setup and validation guide: docs/searxng-self-hosted.md.

The current verification model is evidence-aware-heuristic-v3, and the flagship report surface is evidence-report-v2. Together they use:

  • keyword overlap between the claim and returned evidence
  • contradiction markers in titles and snippets
  • source-quality heuristics
  • source freshness when a parseable date exists
  • domain diversity across the evidence set
  • optional page text from top fetched sources
  • optional provider diversity when a second provider is configured

Details and limitations are documented in docs/trust-model.md. For a quick product-level comparison with plain search wrappers, see docs/why-not-just-search.md. The next calibration step is outlined in docs/benchmark-plan.md.

Installation

pip install cross-validated-search

Or install from source:

git clone https://github.com/wd041216-bit/cross-validated-search.git
cd cross-validated-search
pip install -e .

Python 3.10+ is required.

Platform support

Surface Status Notes
CLI Yes search-web, browse-page, verify-claim, evidence-report
MCP Yes cross-validated-search-mcp
Gemini CLI Yes .gemini/SKILL.md
OpenClaw Yes cross_validated_search/skills/SKILL.md
Claude Code / Cursor / Continue / Copilot Yes Bundled skill and instruction files

Verification model

verify-claim returns one of five verdicts:

Verdict Meaning
supported Strong support, low conflict, and enough domain diversity
likely_supported Evidence leans positive but is not decisive
contested Support and conflict both carry meaningful weight
likely_false Conflict is strong and support is weak
insufficient_evidence Evidence exists but is too weak for a firmer claim

This is an evidence-aware heuristic system, not a fact-level proof engine. Today it still has three important limits:

  • default install still starts with ddgs; the recommended collection-grade free path is ddgs + self-hosted searxng
  • page-aware verification is optional and still heuristic rather than full-document entailment
  • no benchmark-driven confidence calibration yet

MCP example

Add the server to your MCP client:

{
  "mcpServers": {
    "cross-validated-search": {
      "command": "cross-validated-search-mcp",
      "args": []
    }
  }
}

Development

Run the test suite:

python -m unittest discover -s tests -v

Build distributables:

python -m build

Run deterministic benchmark regressions:

python benchmarks/run_benchmark.py

Roadmap

The next upgrades needed for ecosystem-grade collection are:

  1. calibrate provider weighting and add stronger provider-specific tests
  2. improve page-aware verification beyond snippet and keyword heuristics
  3. add benchmark fixtures and regression scoring
  4. improve the flagship evidence-report workflow with richer source summarization and calibration

License

MIT License.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

cross_validated_search-16.0.0.tar.gz (61.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

cross_validated_search-16.0.0-py3-none-any.whl (59.7 kB view details)

Uploaded Python 3

File details

Details for the file cross_validated_search-16.0.0.tar.gz.

File metadata

  • Download URL: cross_validated_search-16.0.0.tar.gz
  • Upload date:
  • Size: 61.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.0

File hashes

Hashes for cross_validated_search-16.0.0.tar.gz
Algorithm Hash digest
SHA256 8fd800eddbd17e050aa6cd9cfe048913cf775511d824c7dfb695bae24d9e0c58
MD5 a8ae11ad8eca1f4aef1ab58ef60eda88
BLAKE2b-256 8f3574c05ff91c5c841231217982e0481a6cba08c2423b26ce1d067956f85411

See more details on using hashes here.

File details

Details for the file cross_validated_search-16.0.0-py3-none-any.whl.

File metadata

File hashes

Hashes for cross_validated_search-16.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 c7031362774f845b3cabe61f80e82c9e4d02044aaa704bed08390e1fe3d255c2
MD5 3448003a72bc4223505f001336a5b0fd
BLAKE2b-256 2cbe6c04d12a391ab588f622b12a45d6d681afc84937c30eb544c1c4f298f1f0

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page