Scientific claim validation framework for LLM-generated content.
AIvidence is a Python package that helps validate scientific claims generated by Large Language Models (LLMs) against real scientific literature. It retrieves relevant papers from PubMed, analyzes them using semantic search, and evaluates whether they support, refute, or are neutral toward the claim.
git clone https://github.com/Zaoqu-Liu/aividence.git
cd aividence
pip install -e .from aividence import ClaimValidator
# Initialize the validator
validator = ClaimValidator(
email="your.email@example.com", # Required for PubMed API
llm_api_key="your-llm-api-key", # API key for the LLM service
embedding_model="pubmedbert" # Or path to local model
)
# Validate a scientific claim
results = validator.validate_claim(
"Overexpression of THBS2 inhibits tumor cell migration and reduces cancer progression"
)
# Generate a detailed report
validator.generate_report(output_file="validation_report.md")
# Visualize the results
validator.visualize_results()MIT License
- Zaoqu Liu
- Email: liuzaoqu@163.com
- GitHub: https://github.com/Zaoqu-Liu