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.
The naive recipe — chunk the docs, embed, retrieve, prompt, paste — demos beautifully. Then it fills a compliance form with details your evidence never contained.
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.
attestq retrieves first and scores the best-matching evidence. Drag the retrieval score across the threshold and watch what the kernel does.
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.
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.
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.
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)
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.
# 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
Two internal tools were independently solving the same retrieve → rerank → gate → cited-draft problem, and quietly drifting apart.
Drafts a due-diligence form from a vendor's uploaded evidence — per-vendor, with strict evidence isolation.
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.