TrustTest documentation gap analysis
Docs:docs/trusttest (72 MDX files, 64 in docs.json nav)
Code: TrustTest/trusttest (current package)
Date: 2026-09-03
This report compares the public TrustTest documentation against the current Python package. It covers missing features, incorrect APIs, stale pages, and structural issues.
Executive summary
The docs cover the happy path well: install, connect an HTTP target, runrun_red_teaming(), build catalog scenarios, generate functional/RAG tests, and evaluate with the main LLM judges and a few heuristics.
They have fallen behind the catalog. The largest gap is prompt injection: the package ships 39 single-turn catalog subcategories; the docs list 18 and give dedicated pages to only 2. Several recent attack families (MCP, multimodal/agent ingestion, memory poison, CoT forgery, kidnap-RAG) are invisible to readers.
The second gap is accuracy. Several documented class names and import paths do not exist (CustomEvaluator, PostgresKnowledgeBase, trusttest.kb, trusttest.evaluation_context). Copied examples will fail.
The third gap is evaluator coverage. Signature heuristics (Virus, Spam, Phishing, XssAttackVector) and BiasComparisonEvaluator exist in code and are used by unsafe-output / bias probes, but have no evaluate-result pages.
Priority if you only do three things:
- Refresh the prompt-injection catalog (add the 22 missing single-turn probes; move payload splitting to multi-turn).
- Fix broken APIs (
CustomEvaluator*, knowledge-base class/import names, evaluation context module). - Document the Dataset vs Prompt probe pattern and
StaticDatasetProbe(jailbreaks, model-focus, translation).
What the docs already cover well
These areas match the code closely enough to keep as the baseline:
Threat-category overviews (content bias, sensitive data leak, system prompt disclosure, input leakage, unsafe outputs, off-topic, agentic behavior) list the right subcategory names. They do not explain the Dataset vs Prompt implementation split (see below).
1. Critical feature gaps
Features that exist in code, are user-facing, and are missing or nearly missing from docs.1.1 Single-turn prompt injections — 22 probes not in the catalog
Canonical catalog:trusttest/catalog/prompt_injections/single_turn.py (SubCategory, 39 values).
Documented in create/threat-detection/prompt-injections/overview.mdx: 18 class names. Dedicated pages: DAN and Best-of-N only.
Documented (keep, but most need a real page):
AntiGPTProbe, DANJailbreakProbe, BestOfNJailbreakingProbe, RolePlayingExploitsProbe, SystemOverrideProbe, InstructionalInversionProbe, EncodedPayloadProbe, EncodingAndCapitalizationProbe, SymbolicEncodingProbe, ObfuscationAndTokenSmugglingProbe, TypoTricksProbe, ContextHijackingProbe, JsonInjectionProbe, AllowedAndDisallowedQuestionsProbe, MultiLanguageAttacksProbe, SynonymsProbe, MultimodalInjectionProbe
In the catalog, absent from docs:
These are the highest-value missing pages. MCP, multimodal/agent ingestion, memory poison, and kidnap-RAG are the ones most likely to surprise customers who only read the docs.
1.2 Multi-turn: PayloadSplittingProbe is misplaced
Code (catalog/prompt_injections/multi_turn.py):
CrescendoAttackProbeEchoChamberAttackProbeMultiTurnManipulationProbePayloadSplittingProbe(SubCategory.PAYLOAD_SPLITTING) — requiresConversationTarget
1.3 Dataset vs Prompt probes (threat categories)
Almost every threat category ships two implementations per subcategory:*DatasetProbe— bundled YAML objectives (trusttest/datasets/static_objectives/)*PromptProbe— LLM-generated attacks
HateDatasetProbe / HatePromptProbe, DirectRequestDatasetProbe / DirectRequestPromptProbe, ToolMisuseSimulationDatasetProbe / ToolMisuseSimulationPromptProbe.
Category pages show one *ScenarioBuilder example and never mention:
- That each subcategory has static + generated variants
- How the builder chooses between them
- When to instantiate a
*DatasetProbevs*PromptProbedirectly - Shared params:
num_test_cases,sampling,use_jailbreaks,translate_into_language
1.4 StaticDatasetProbe, jailbreaks, and model-focus
trusttest.probes.static_dataset.StaticDatasetProbe is the shared engine behind many catalog dataset probes. User-facing params:
categories,max_objectives_per_category,samplinguse_jailbreaks,max_jailbreak_per_objectivemodel_focus(ModelFocusCompany: OpenAI, Anthropic, Google, Meta, …)translate_into_language
datasets/static_jailbreaks/model_focus/.
None of this is documented. The “From Dataset” prompt-injection page talks about user YAML/JSON/Parquet via DatasetProbe, not the bundled static-objective + jailbreak wrapper system.
1.5 Evaluators missing from Evaluate results
Heuristics in code, not in docs:
Unsafe-output docs describe Phishing / Spam / Virus / XSS as probes that “test if the model generates” those things. They do not say evaluation is signature-based, not an LLM judge.
LLM judges:
1.6 Config, providers, and install extras
Config (trusttest.config):
LLM providers in
get_llm_client: openai, azure, google, anthropic, ollama, vllm, groq, deepseek, http.
Docs omit groq and http (HTTPClient — judge/generator against an arbitrary HTTP endpoint, with url, payload_config, concatenate_field).
Embeddings: Azure is supported (get_embeddings_model(provider="azure")) but missing from the embeddings provider list in connect/llms.mdx.
Install extras in pyproject.toml not in installation docs:
trusttest[language-detection]— FastText detector (language evaluators default to this)trusttest[azure]— Azure identity / OpenAI Azure client (separate fromrag-azure)
1.7 Persistence client features
Documented: save/load scenario, test set, run, evaluator. Not documented (NeuralTrustClient):
run_evaluation_scenario/run_evaluation_scenario_test_case(remote execution)get_evaluation_scenario_run_metrics,get_evaluation_run_status,get_evaluation_test_set_statusget_target_total_metrics
FileSystemClient):
get_overview()→RedTeamingOverview(local red-team rollup by language / category / framework)
1.8 Compliance frameworks on catalog scenarios
Each catalog builder attaches framework metadata (EU AI Act, OWASP AITG / LLM Top 10, MITRE ATLAS, ISO/IEC 42001). This is howrun_scenarios / FileSystemClient.get_overview() group results.
Docs never mention framework tags. The “compliance” tutorial only runs unsafe outputs + DAN — it does not explain the mapping.
1.9 Other user-facing APIs with little or no coverage
MaliciousCodeDatasetProbe exists with YAML but is not exported from trusttest.probes or the unsafe-outputs catalog. Do not document as public until it is exported.
2. Incorrect or stale documentation
These will break copy-paste or teach the wrong mental model.2.1 Custom evaluator class does not exist
Affected:
getting-started/tutorials/custom-llm-judge.mdx (the canonical custom-judge guide). evaluate-result/llm-as-a-judge/custom.mdx is an empty stub and is not in the nav.
2.2 Knowledge-base class and import drift
knowledge_base.__init__ only exports KnowledgeBase, InMemoryKnowledgeBase, Document. Connector pages should use submodule imports.
2.3 Evaluation context module name
evaluate-result/evaluation-strategy.mdx imports trusttest.evaluation_context (singular). The module is trusttest.evaluation_contexts (plural). Other pages already use the correct name.
The page also omits BiasComparisonContext, which bias probes require.
2.4 Language detection
evaluate-result/heuristics/language.mdx says evaluators use langdetect. Implementation defaults to FastTextLanguageDetector (trusttest[language-detection]). Parameter is expected_languages (plural), not a single expected_language.
2.5 HTTP placeholder inconsistency
Pick one canonical placeholder (
{{ test }}) and use it everywhere.
2.6 Payload splitting taxonomy
See §1.2. Listing it as a single-turn probe is wrong.2.7 Iterate / Capture-the-Flag naming
getting-started/tutorials/iterate.mdx and orphan create/iterate.mdx title a Crescendo run as “Capture the Flag” / “Iterate Scenario”. There is no iterate module. This confuses Crescendo with a separate product feature.
2.8 Azure / pgvector extra names in code vs docs
Docs extras (rag-azure, rag-postgres) match pyproject.toml. Some library ImportError strings still say trusttest[azure] / trusttest[rag-pgvector]. Docs are right; worth aligning the code messages so users are not sent to a non-existent extra.
2.9 Small copy / example bugs
getting-started/tutorials/local-llm.mdx:target_targettypo.getting-started/tutorials/http-model.mdx:ErrorHandelingConfigtypo (code:ErrorHandlingConfig/error_config).core-concepts/overview.mdx: “EvaluatorScenarios” (should beEvaluationScenario+EvaluatorSuite).- LLM client install snippets in
connect/llms.mdxare wrapped in```pythoninstead of```shell.
3. Incomplete coverage (listed, not explained)
These appear in tables but a reader cannot actually use them from the docs alone.Prompt injections
Only DAN and Best-of-N have constructor params, objectives, and a full example. The other 16 listed single-turn probes are name-only. Multimodal injection is listed with no image / technique params (injection_techniques exists on the class).
Echo Chamber’s SteeringObjective / steering_keywords appear on the orphan create/echo-chamber.mdx, not on the canonical multi-turn page.
Threat-category pages
Each page has purpose + subcategory table + one builder snippet. Missing:- Dataset vs Prompt split
- Default evaluator (
TrueFalseEvaluatorfor most catalog runs) language,objectives,max_turns(multi-turn)- How
run_scenarios()differs frombuilder.get_scenario() - Framework tags
RAG / automatic generation
create/automatic-test-generation.mdx is the best question-type reference (BenignQuestion, MaliciousQuestion). Still missing:
RagContextBuilder- Topic clustering params (UMAP / HDBSCAN) as user-tunable (overview describes the pipeline as Azure-only)
- Language detection on ingested documents
- That vector KBs need
set_configembeddings +topic_summarizer
Connect
- Custom target page is adequate for
Target/ConversationTarget. - No guide for using
HTTPClientas the judge/generator (distinct fromHttpTargetas the SUT). - No Azure OpenAI embeddings walkthrough.
4. Information architecture
Orphan MDX (on disk, not in docs.json)
Likely still reachable by URL; several contradict the canonical pages.
Action: delete or redirect orphans; harvest Echo Chamber
SteeringObjective into the canonical page first.
Stubs and thin pages
evaluate-result/llm-as-a-judge/custom.mdx— emptycore-concepts/overview.mdx— glossary only; typos- KB connector pages (in-memory, azure, neo4j, upstash) — no frontmatter title/description
evaluate-result/overview.mdx— does not list current evaluator inventory
No API reference
Unlike TrustGate, TrustTest has no symbol index. With 100+ probe classes and submodule-only imports (trusttest.__init__ exports only client and set_config), a compact “import cheat sheet” would remove a lot of guesswork.
5. Recommended doc work (ordered)
P0 — correctness (broken examples)
- Replace
CustomEvaluatorwithCustomEvaluatorExpected/CustomEvaluatorObjective; add the custom judge page to the nav (or fold the tutorial into it). - Fix KB names and imports (
PgVectorKnowledgeBase,AzureKnowledgeBase, notrusttest.kb). - Fix
trusttest.evaluation_contextsimports; addBiasComparisonContext. - Standardize
HttpTargetplaceholder to{{ test }}. - Move payload splitting to multi-turn; remove it from the single-turn table.
P1 — catalog completeness (the real product gap)
- Expand the single-turn overview table to all 39
SubCategoryvalues with class names. - Add short pages (or one grouped page per family) for the 22 missing probes, starting with:
- MCP (
MCPToolPoisoning,MCPServerSideSampling) - Agentic ingestion (
AgenticBrowserOCRInjection,ImageStegoInjection,ConcurrentAudioInjection,WebIDPICloaking) - Memory / RAG (
PersistentMemoryPoison,KidnapRAG,AdaptiveMultiturnTranscript) - Modern jailbreaks (
CoTForgery,PolicyPuppetry,ManyShotJailbreak,AdversarialPoetry/AdversarialTales)
- MCP (
- Document
StaticDatasetProbe: bundled objectives,use_jailbreaks,model_focus, translation. - On every threat-category page, explain Dataset vs Prompt probes.
P2 — evaluators and config
- Pages (or one “signature evaluators” page) for Virus / Spam / Phishing / XSS heuristics.
- Page for
BiasComparisonEvaluator. - Page for
AnswerRelevanceEvaluator; add it and RAG poisoning to the LLM-judge overview. - Document
translation, config-file auto-discovery,groq+httpLLM providers, Azure embeddings,language-detectionextra.
P3 — cleanup and depth
- Remove or redirect the 8 orphan files.
- Rename iterate/CTF tutorial to Crescendo / multi-turn red teaming.
- Document NeuralTrust remote run + metrics APIs and
FileSystemClient.get_overview(). - Document catalog framework tags (EU AI Act, OWASP, MITRE ATLAS).
- Add an import / public-API cheat sheet (root exports only
clientandset_config). - Document
RagContextBuildernext to RAG generation. - Fix typos (
target_target,ErrorHandelingConfig,EvaluatorScenarios).
6. Side-by-side inventory
Prompt injection catalog
Evaluators
Knowledge bases
Install extras
Documented:google, openai, deepseek, anthropic, ollama, vllm, rag-azure, rag-upstash, rag-neo4j, rag-postgres.
Missing: language-detection, azure.
Root package exports
Onlytrusttest.client and trusttest.set_config. Everything else is a submodule import. Docs mix styles (from trusttest.probes import DatasetProbe vs from trusttest.probes.dataset import DatasetProbe) without stating the rule.
7. Out of scope / do not document yet
MaliciousCodeDatasetProbe— present on disk, not inprobes.__all__or the unsafe-outputs catalog.- Internal helpers (
timezone, logger internals, probe-private prompt generators except as RAG question types). - There is no CLI (
pyproject.tomlhas no[project.scripts]). Do not invent one.
HarmbenchDatasetProbe is usable via submodule import but is not catalog-registered. Document only if product intends it as public.
Appendix — suggested new nav (P1 slice)
Under Prompt Injections → Single Turn, add groups rather than 22 more top-level pages:- Jailbreaking (existing + Grandma, Indirect, Many-shot, Policy puppetry, CoT forgery, ICO, SN-guided)
- Encoding & obfuscation (existing)
- Structural (JSON, structured payload, context hijack, allowed/disallowed; drop payload splitting)
- Language (existing + training-data replay, repeated-token)
- Multimodal & agent surfaces (multimodal, OCR, image stego, audio, web cloaking)
- MCP & agent config (tool poisoning, server-side sampling, coding-agent escalation)
- Memory & RAG (persistent memory, kidnap-RAG, adaptive transcript)