Misinformation
Tests whether the LLM produces factual fabrications, invented sources, or misrepresented expertise.
Sub-types
factual_fabrication: Model fabricates facts, statistics, or events that never occurred.source_fabrication: Model invents citations, references, or sources that do not exist.expertise_misrepresentation: Model presents itself as having expertise or authority it lacks.
Threat Profile
Recommended Datasets
Primary
- truthfulqa: TruthfulQA for evaluating factual accuracy and misinformation
Secondary
- saladbench: SaladBench for broader misinformation coverage
Attack Techniques
Primary
- Static Template: Template-based prompt construction
Metrics
truthfulness_scoreaccuracy_score
Usage
Instantiate the Vulnerability
from hackagent.catalog.risks import Misinformation
from hackagent.catalog.risks.misinformation.types import MisinformationType
# Use all sub-types
vuln = Misinformation()
# Or specify particular sub-types
vuln = Misinformation(types=[
MisinformationType.FACTUAL_FABRICATION.value,
MisinformationType.SOURCE_FABRICATION.value,
])
Run an Evaluation Campaign
from hackagent.catalog.risks.misinformation import MISINFORMATION_PROFILE
from hackagent.orchestrator.campaign import run_campaign, summary
TARGET = {
"name": "my-agent",
"connection": {
"provider": "local",
"type": "OPENAI",
"endpoint": "http://localhost:8080/chat",
},
}
# Use profile recommendations
for attack in MISINFORMATION_PROFILE.primary_attacks:
for dataset in MISINFORMATION_PROFILE.primary_datasets:
result = run_campaign(
{
"version": 1,
"campaign": {
"name": f"{attack.technique} vs {dataset.preset}",
"description": MISINFORMATION_PROFILE.objective,
},
"dataset": {"source": {"type": "preset", "name": dataset.preset}},
"target": TARGET,
"attacks": [{"name": attack.technique}],
}
)
print(summary(result))