Technical FAQ

How RepliSec works under the hood.

For engineers and security reviewers who want the detail behind the claims: the architecture, where data goes, how answer policies are enforced, and how to run everything locally or air-gapped.

Everything on this page was checked against the code in July 2026. Where something is only true under a condition, the condition is stated rather than smoothed over.

1. Architecture

One container. One data directory.

What is RepliSec, architecturally?

A single container that runs two processes and stores everything in one directory.

  • Next.js (App Router) serves the UI on port 3000 and proxies /api/* to the backend.
  • FastAPI runs the backend on 127.0.0.1:8000, bound to loopback, so it is not reachable from outside the container.
  • SQLite holds questionnaires, answers, the knowledge base and the approved answer library.
  • Chroma (embedded mode, not a server) holds the vectors used for semantic search.
  • SQLite FTS5 holds the full-text index used for lexical search.

The container runs as a non-root user with tini as PID 1.

How do I back it up?

All state lives under /app/data: replisec.db, chroma/, and documents/ for the files you uploaded. Copy that one directory and you have backed up everything. Stop the container first for a consistent snapshot, or take the copy while it is running and accept that an in-flight upload may be missing.

To start over, delete the directory and restart.

2. Data location

Your data stays where you put it.

Where does my data go?

Nowhere, unless you configure a cloud model and use the AI-assisted workflow policy. Concretely:

  • Your documents and answers are written to disk in the directory you mounted. They are never uploaded anywhere by RepliSec.
  • Embeddings are always computed locally. RepliSec uses sentence-transformers with the all-MiniLM-L6-v2 model (384 dimensions) running in-process. There is no configuration in which your text is sent to a third party to be embedded.
  • The only outbound call RepliSec makes is to the LLM you configured, and only in a mode that permits LLM use. If you point it at Ollama on your own machine, that call does not leave your machine either.
  • No telemetry. Chroma, Next.js and LiteLLM all ship usage telemetry enabled by default; all three are disabled in the image.

Do I need a cloud API key?

No. With a local model, or under the approved-answers-only and no-AI policies, RepliSec needs no API key and sends your content nowhere. These setups need no ongoing external service connection. Semantic matching requires a one-time embedding-model download before an environment is isolated (see Air-gapped deployment). No-AI lexical mode requires no model or API key at all. If you choose a cloud model, you supply your own key and pay that provider directly.

3. Knowledge tiers

Three tiers, and the more specific one wins.

What is the three-tier knowledge model?

Every piece of knowledge is filed at one of three tiers:

  • Platform and supplier knowledge (technical name: Foundation): a third party's published posture, such as a cloud provider's trust centre or certifications. Controls you inherit rather than operate.
  • Organisation knowledge: your own policies, configurations, procedures, controls and approved answers.
  • Customer-specific knowledge: commitments, exceptions and configurations that apply to one customer or engagement.

All three are searched together, and where they overlap the more specific tier takes precedence.

How does RepliSec stop supplier controls being presented as mine?

Foundation knowledge never automatically becomes your answer. When you add a third party's material you declare how you rely on them: you build on them, they process data for you, or you merely hold the document for reference. Anything undeclared is excluded from answers entirely.

Without that step a system will happily answer a question about your subprocessors using another company's subprocessor list, and present it as yours. Declaring the relationship is what keeps an inherited answer defensible, and every inherited answer carries a link back to the source so a reviewer can check it is still current.

How is customer-specific knowledge kept apart?

Client-specific knowledge is physically isolated in its own vector collection rather than filtered at query time, so the separation is structural rather than a WHERE clause someone can forget.

4. Answer policies

Enforced in the import graph, not the settings page.

What are the answer policies?

The homepage describes three ways an answer can be produced:

  • AI-assisted workflow: AI may draft wording or provide reference material; a person reviews and approves every answer. In Human Authored mode, a person writes the final response and remains the author of record.
  • Approved answers only: an existing human-approved answer is returned verbatim. Semantic matching may be used to find it, but nothing is generated.
  • No AI: deterministic lexical matching. No LLM, embeddings or neural model is loaded.

The policy is set for the engagement, so every answer in a questionnaire follows the same rules.

How do they map to the compliance modes in the product?

Inside the product, and in its configuration, the three policies are implemented as five compliance modes:

The five compliance modes, what each permits, and the public answer policy each belongs to
Compliance mode Answer policy LLM Embeddings What it means
StandardAI-assisted workflowYesYesAI drafts answers from your knowledge base.
DisclosureAI-assisted workflowYesYesSame, and exports carry an AI disclosure report.
Human AuthoredAI-assisted workflowReference onlyYesRetrieval is allowed; the answer field blocks paste, so a person types the response.
Library Only (Semantic)Approved answers onlyNoYesAnswers come only from your approved library, matched by meaning.
Library Only (Lexical)No AINoNoKeyword matching only. No neural models are loaded at all.

Human Authored belongs to the AI-assisted workflow because a model may still provide reference material. The final response, though, is written by a person, who remains the author of record.

Is semantic matching "no AI"?

No. Semantic matching uses embeddings, which are produced by a small neural model (all-MiniLM-L6-v2) running locally. That is AI, used to find text by meaning. It is not generative: it ranks your existing, approved answers and never writes or changes wording. Generative drafting is the separate step where an LLM composes new text.

So the approved-answers-only policy is no generative drafting, not no AI. Only Library Only (Lexical) is no AI.

How is "no AI" enforced?

When RepliSec boots with REPLISEC_COMPLIANCE_MODE_DEFAULT=library_only_lexical, the modules that would import sentence-transformers and litellm are short-circuited at import time. Those libraries never enter the process. It is not that the code declines to call them. The code that could call them is not there.

Every other mode enforces its rules per call: each entry point that could reach a model asks the gate first.

5. Air-gapped deployment

Offline operation, and what to install first.

Is air-gapped the same as no AI?

No, and RepliSec treats them as separate controls. Air-gapped describes where the data and computation remain: nothing can leave the environment. No AI describes how answers are found and produced. You can run the AI-assisted workflow air-gapped with a local model, or run the no-AI policy on a connected machine.

Can I run it completely offline?

Yes, with one thing to know about the first run.

library_only_lexical is offline by construction. It loads no neural models, so there is nothing to download:

docker run --network none --rm -p 3000:3000 \
  -v $(pwd)/data:/app/data \
  -e REPLISEC_ENCRYPTION_KEY=$(openssl rand -base64 32) \
  -e REPLISEC_COMPLIANCE_MODE_DEFAULT=library_only_lexical \
  replisec:latest

The semantic modes need the embedding model on disk first. all-MiniLM-L6-v2 is about 90 MB and is downloaded from Hugging Face the first time it is used. It is not baked into the image. So the sequence for an air-gapped semantic deployment is: run once with network access to warm the cache, then run with --network none afterwards.

Local-model drafting needs the model installed too. Pull the model into Ollama, or whichever local runtime you use, before the environment is isolated.

6. Local models

A fully local pipeline, if you want one.

How do I use it with a local LLM?

RepliSec talks to models through LiteLLM, so anything LiteLLM can reach, it can use. For a fully local setup, Ollama is the shortest path.

  1. Install and start Ollama on your host (not in the container):

    brew install ollama          # macOS; see ollama.com for Linux/Windows
    ollama serve
  2. Pull a model. An 8B model is a reasonable starting point on a laptop:

    ollama pull llama3.1:8b
  3. Start RepliSec. Nothing special is needed, and no API key:

    docker run -d --rm --name replisec \
      -p 3000:3000 -v $(pwd)/data:/app/data \
      -e REPLISEC_ENCRYPTION_KEY=$(openssl rand -base64 32) \
      replisec:latest
  4. Point RepliSec at Ollama. Open http://localhost:3000, go to Settings → AI Provider, and choose Ollama (local). Two fields:

    • Ollama URL: http://host.docker.internal:11434 on macOS and Windows. On Linux, use http://172.17.0.1:11434, or run the container with --network host and use http://localhost:11434.
    • Model: llama3.1:8b, or whatever you pulled; the name must match ollama list exactly.

    There is no API key field, because there is no API key.

  5. Test it. Settings has a Test connection button. Then upload a document and generate answers on a questionnaire. The whole pipeline is now local: local embeddings, local vector store, local model.

Other local runtimes. LM Studio, vLLM, LocalAI and anything else exposing an OpenAI-shaped API work through the OpenAI-compatible provider. Set the base URL (for example http://localhost:1234/v1) and the model name the endpoint advertises.

Which models should I use?

For cloud providers, any current model from Anthropic, OpenAI, Google, Groq or Together works; you supply the model identifier and your key.

For local models, the trade-off is quality against hardware. An 8B model is usable for drafting from retrieved sources, which is the task here: the model is summarising your own material rather than recalling facts. Larger models produce better prose but need more memory.

Retrieval quality does not depend on the LLM at all. Finding the right source is done by the embedding model and the keyword index, both local and both fixed. The LLM only phrases the answer.

7. Retrieval

Library first. Knowledge base second. Model last.

How does retrieval actually work?

Three things happen in order, each only if the policy for the engagement permits it.

  1. Your approved answer library is checked first. If a question closely matches an answer your team has already signed off, that answer is returned verbatim, with no model call at all. This is the fastest and most defensible path, and it is why the library gets more valuable with every questionnaire.
  2. Otherwise the knowledge base is searched, semantically via vectors with a fallback to keyword search. Results are filtered by relevance, so a question your material does not cover returns nothing rather than the closest available paragraph.
  3. Only then is the model asked to draft an answer from those sources, with instructions to say so when the sources are insufficient rather than fill the gap.

Every answer shows its confidence and the sources behind it. Confidence is computed from how well the retrieved material actually matched, not from the model's own opinion of its answer, which is not evidence of anything.

8. Security

Credentials and network exposure.

How are my provider credentials stored?

API keys are encrypted with AES-GCM before being written to SQLite, using a key you supply as REPLISEC_ENCRYPTION_KEY. That key is never persisted; it lives only in the container's environment.

If you rotate or lose it, RepliSec does not fail to start. It detects that the stored credentials can no longer be decrypted, treats them as absent, and asks you to re-enter them in Settings.

What is exposed on the network?

Only the UI on port 3000. The FastAPI backend is bound to loopback inside the container and reached through the UI's /api/* proxy. The container runs as a non-root user.

9. Current limitations

What RepliSec does not do yet.

What are the current limitations?

  • Single user. This release is designed for one practitioner: no accounts, no login, no roles. Anyone who can reach port 3000 can use it, so run it on a machine or network you control.
  • Self-hosted only. There is no managed or hosted version.
  • No API or MCP server. RepliSec is used through its own web interface.
  • No per-answer AI-use record. The answer policy is set per engagement, and Disclosure mode adds a disclosure report to exports, but RepliSec does not yet record how AI was used for each individual answer.
  • The embedding model is not in the image. Semantic modes download it on first use, so air-gapped semantic deployments need that first run done before isolation.
  • Lexical matching finds words, not meaning. Under the no-AI policy, a question phrased very differently from your approved answer may not find it.