docs: add Vaultak runtime security integration#516
Conversation
Adds integration page for haystack-vaultak (https://pypi.org/project/haystack-vaultak/). Ships two @component classes — VaultakSecurityChecker and VaultakPIIMasker — that can be inserted into any Haystack 2.0 pipeline to risk-score inputs and mask PII in LLM replies. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
@samueloladji-beep is attempting to deploy a commit to the deepset Team on Vercel. A member of the Team first needs to authorize it. |
bilgeyucel
left a comment
There was a problem hiding this comment.
Thanks for the PR @samueloladji-beep! Left my comments
| pipeline.add_component("prompt_builder", PromptBuilder(template=prompt_template)) | ||
| pipeline.add_component("llm", OpenAIGenerator()) |
There was a problem hiding this comment.
Can you replace these components with ChatPromptBuilder and OpenAIChatGenerator compoennts?
There was a problem hiding this comment.
Done — replaced with ChatPromptBuilder and OpenAIChatGenerator throughout. The connection is also updated to prompt_builder.prompt → llm.messages.
| from haystack_vaultak import VaultakSecurityChecker | ||
|
|
||
| checker = VaultakSecurityChecker( | ||
| api_key="YOUR_VAULTAK_API_KEY", | ||
| threshold=7.0, | ||
| verbose=True, | ||
| ) | ||
|
|
||
| pipeline.add_component("security", checker) | ||
| pipeline.connect("security.query", "retriever.query") |
There was a problem hiding this comment.
This code doesn't work. It misses the pipeline object. Also, when I initialize the VaultakSecurityChecker, I get "Vaultak.init() got an unexpected keyword argument 'agent_name'" error
There was a problem hiding this comment.
Fixed both issues. The missing pipeline = Pipeline() is now added before add_component() in the VaultakSecurityChecker example. The agent_name bug was a mismatch between our wrapper's param and the SDK — Vaultak.__init__() takes agent_id, not agent_name. Fixed in components.py and published as haystack-vaultak==0.1.1 on PyPI.
| from haystack_vaultak import VaultakPIIMasker | ||
|
|
||
| masker = VaultakPIIMasker(api_key="YOUR_VAULTAK_API_KEY") | ||
|
|
||
| pipeline.add_component("pii_masker", masker) | ||
| pipeline.connect("llm.replies", "pii_masker.replies") |
There was a problem hiding this comment.
Same fix applied here — Vaultak(api_key=..., agent_id=agent_name) in both VaultakSecurityChecker and VaultakPIIMasker. Published as haystack-vaultak==0.1.1.
- Add missing Pipeline() init before add_component() in VaultakSecurityChecker example - Replace PromptBuilder/OpenAIGenerator with ChatPromptBuilder/OpenAIChatGenerator per @bilgeyucel's request Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Summary
Adds an integration page for haystack-vaultak, a runtime security package for Haystack pipelines.
The integration ships two
@componentclasses:VaultakSecurityChecker— inserted before the LLM/retriever; risk-scores every query on a 0–10 scale and raisesRuntimeErrorif the score exceeds the configured thresholdVaultakPIIMasker— inserted after the LLM; scans replies for PII and masks before they reach usersIncludes a full RAG pipeline example demonstrating both components working together.
Checklist
pip install haystack-vaultakYOUR_VAULTAK_API_KEY,YOUR_OPENAI_API_KEY)RuntimeErrorused throughout (no custom exception classes)samueloladji-beepVaultakAI