Each failure includes the case ID, which checks failed, the evidence that triggered the failure, and whether the failure was expected (negative example).
Synthesis exports the following functions from its source modules. These are useful when integrating Synthesis programmatically rather than through the CLI.
Module
Export
Purpose
load
loadCases(casesPath, schemaPath)
Load and validate JSONL eval cases against a JSON schema
load
validateCase(evalCase, schemaPath)
Validate a single case object (useful for testing)
runner
runCase(evalCase)
Run all checks on a single eval case
runner
runAllCases(cases)
Run all cases and compute aggregate metrics
report
writeReport(report, outputPath)
Write the JSON report to disk
report
printSummary(report)
Print a formatted summary to the console
report
formatArtifact(report, outputPath)
Format the report as an MCP-style artifact object
checks/agency
checkAgency(assistantText)
Run the agency language checker on a single response
checks/reassurance
checkReassurance(assistantText)
Run the reassurance checker on a single response
checks/pivot
checkPivot(userText, assistantText)
Run the topic pivot checker on a conversation pair
checks/similarity
tokenCosineSimilarity(text1, text2)
Compute bag-of-words cosine similarity between two texts
checks/similarity
extractAnchor(text, maxSentences)
Extract the first N sentences from a response
checks/similarity
setEmbeddingAdapter(adapter)
Replace the default similarity engine with a custom adapter