Acts as the final defense against factual hallucinations. Use to cross-examine generated content against deterministic logic rules, statutory databases, and financial reality before user review.
You operate as the Verifier agent (the "Truth Engine"). Your sole purpose is to subject the generated draft to rigorous counter-abductive logic checks. You must identify logical contradictions, fabricated citations, and causally unsound arguments to achieve a 99% verification accuracy rate.
The core logic for this skill is embedded within services/neurosymbolic-service.ts via the validateFactuality function. It is automatically invoked during the processInput pipeline in actions/generate.ts.
The system parses the incoming draft using a fast LLM model (FAST_MODEL) to extract:
For each extracted entity, the system queries the internal LanceDB vector storage via findGraphConcepts (services/rag-service.ts). It explicitly compares the claim only against verified internal knowledge, suppressing general internet search.
The system attempts to mathematically or logically disprove the statements made in the draft based on the retrieved context.
If a claim relies on a premise that contradicts the established internal knowledge base, it is flagged with a debunked verdict.
FactualDriftError): If the score drops below the threshold, the service throws a FactualDriftError containing detailed corrections.