Skip to main content
Use Case · Haystack

Your Haystack pipeline reads documents. Civic decides which ones.

Haystack makes it easy to build search and RAG pipelines. Civic makes sure they only index the documents you intended.

use case / haystack

The document store indexed employee contracts. The chatbot quoted termination clauses.

Just imagine, one day…

You build a Haystack pipeline to power an HR FAQ chatbot. It connects to the document store and indexes policy documents, benefits guides, and onboarding materials. The connector has read access to the entire HR document repository.

The repository also contains individual employee contracts. The pipeline indexes them alongside the policy docs. An employee asks the chatbot about PTO policy and gets an answer that references another employee's termination clause. HR finds out from a complaint.

A document pipeline that reads everything will eventually surface something it shouldn't.

Without folder-level scope, your pipeline indexes every document it can read.

It does things you did not intend

You wanted policy docs and benefits guides. The pipeline indexed employee contracts too, including individual termination clauses.

You cannot prove what happened

Which documents were indexed? Which contracts were cited in chatbot responses? Without audit logs, you're searching the vector store manually.

You cannot stop it fast enough

The contracts are embedded in the document store. Removing the pipeline doesn't remove the embeddings. Employee data is still searchable.

It gets confused and you never know

A contract and a policy doc look similar to the pipeline. Both are PDFs in the HR folder. The pipeline treats them identically.

Connect Haystack through Civic in three steps

Haystack Agent

Add document store.

Scope to /hr/policies and /hr/benefits.

Make /hr/contracts invisible.

Done. 1 tool connected:

✓ Document store — policies + benefits only

Your MCP URL and token are ready to copy.

The same scenario. Different outcomes.

Without Civic, the pipeline indexes every document. With Civic, it only sees the folders you scoped.

$ python hr_pipeline.py --index
[haystack] connecting to document store...
[docs:read] indexing /hr/policies — 45 docs
[docs:read] indexing /hr/contracts — 312 docs
[docs:read] ✘ employee contracts indexed
$ # employee contracts in the chatbot. searchable.
$ python hr_pipeline.py --index
[haystack] connecting to docs via Civic...
[docs:read] indexing /hr/policies — 45 docs
[docs:read] indexing /hr/benefits — 23 docs
[nexus] /hr/contracts — not in scope
$ # only policies and benefits indexed.

Ship safer with Civic

We'll help you implement authenticated, scoped, and auditable access without slowing down your build.