open source · pip install attestq

attestq

Answer security questionnaires from your own evidence — and refuse to guess when the evidence isn't there.

A small, model-, embedder-, and store-agnostic RAG kernel for vendor security reviews, SIG/CAIQ responses, audit-evidence requests, and due-diligence forms. It drafts grounded, cited answers — and tells you plainly when it can't.

$pip install attestqclick to copy See the confidence gate ↓ View source
scroll
0
dependencies
pure-stdlib core — bring your own model, embedder, and store as plain callables. Adapters are opt-in extras.
0
confidence gate
below threshold, the answer is "insufficient evidence" — with no LLM call at all.
0
production tools
extracted from a vendor due-diligence assistant and a customer-assurance drafter — now both run on this kernel.
the failure mode nobody talks about

A confident wrong answer is worse than no answer.

The naive recipe — chunk the docs, embed, retrieve, prompt, paste — demos beautifully. Then it fills a compliance form with details your evidence never contained.

Question
Do you encrypt customer data at rest with a customer-managed key?
LLM, ungated
Yes. Customer data at rest is encrypted using AES-256 with customer-managed keys rotated every 90 days.
⚠ None of the evidence says "customer-managed" or "90 days." The corpus had encryption-at-rest; the model pattern-matched the shape of a good answer and invented the rest.

The fix isn't a better prompt. It's accepting that absence of evidence is a valid, first-class result — and building the pipeline so the model never gets the chance to paper over it.

the centerpiece · interactive

The confidence gate runs before the LLM.

attestq retrieves first and scores the best-matching evidence. Drag the retrieval score across the threshold and watch what the kernel does.

best retrieved evidence score 0.62
0.00 · no match1.00 · exact match
Determination: Met
The evidence clears the bar, so the LLM drafts a grounded answer — strictly from the retrieved chunks — and returns it with citations and a confidence score.
DataProtection.pdf → "All customer data at rest is encrypted with AES-256…"
AccessControl.docx → "MFA is enforced for all privileged access…"
LLM called → drafts cited answer
the two hard-won fixes

Two defaults you can't forget to apply.

🚦

A gate that fires before the model

If the best evidence scores below min_confidence, attestq returns an "insufficient evidence" answer with no prompt, no token spend, no chance to hallucinate. The gate keys on the raw retrieval score — before reranking — so your one tuned threshold stays calibrated whatever reranker you bolt on.

🪟

A wide rerank window

The subtle bug: you retrieve a few chunks, rerank, keep the top 3 — and on a small or lopsided corpus the single focused document that actually answered the question gets shoved out by vaguely-related ones. attestq keeps a deliberately generous post-rerank window so a lone relevant chunk survives. It was a real production bug; now it's a default.

bring your own everything

attestq owns the orchestration. Nothing else.

Inject any chat model and any embedder as plain callables. The core has zero third-party dependencies; heavy adapters ride on opt-in extras, lazily imported.

quickstart.py
from attestq import Engine, Question

# bring your own model + embedder — one-liners around any provider
def my_chat(prompt): ...      # OpenAI, Anthropic, a local model, a corp gateway
def my_embed(texts): ...      # return one vector per text

engine = Engine(chat=my_chat, embed=my_embed)   # in-memory store by default
engine.ingest(evidence_chunks, namespace="helios")  # per-vendor isolation

ans = engine.evaluate(
    Question(id="ENC-1", prompt="Is data encrypted at rest?",
             choices=["Met", "Not Met", "Not Applicable"]),
    namespace="helios",
)
print(ans.determination, ans.confidence, ans.insufficient_evidence)
for c in ans.citations: print(c.source, c.snippet)
pip install attestq [chroma] persistent store [openai] chat + embed [ollama] local, nothing leaves the host [rerank] cross-encoder [loaders] pdf · docx · xlsx [all] everything
try it in ten seconds

No model required to watch it work.

A built-in hash embedder needs no service, so the retrieval pipeline and the gate run the moment you install — then swap in a real provider when you're ready.

terminal
# run the bundled fictional sample end-to-end
$ pip install attestq
$ attestq demo -o report.md

# evaluate your own questionnaire against a folder of evidence
$ attestq run -q questionnaire.yaml -e ./vendor-evidence -n acme -o report.docx

# local, no key, nothing leaves the host
$ attestq demo --provider ollama
where it came from

Extracted from production, not a greenfield toy.

Two internal tools were independently solving the same retrieve → rerank → gate → cited-draft problem, and quietly drifting apart.

● source #1

Vendor due-diligence assistant

Drafts a due-diligence form from a vendor's uploaded evidence — per-vendor, with strict evidence isolation.

● source #2

Customer-assurance drafter

Answers inbound customer security questionnaires from an internal policy corpus.

Extracting the shared kernel — and then refactoring the production tool to consume the public package instead of its own copy — means the open-source version is the one under real load, not a sanitized fork. The same code that ships to PyPI is the code answering real questionnaires.

bring your own model · let it tell you when you don't have the evidence

pip install attestq

$pip install attestqclick to copy
copied ✓