Bengaluru, India · Global delivery
Back to home
Product — Secure RAG for Regulated Data · Pilot

Banking Document Intelligence

Staff ask plain-language questions about customer documents — with access control enforced before retrieval, so a role can never leak what it was never allowed to see.

PilotAccess before retrievalLangGraphKeycloakOllama
The problem

Typical document AI searches everything first and hides data afterwards, when it is already too late.

What it does

Answers staff questions from bank documents, checking access before any document is searched.

The result

Access before retrieval, data masked by role, a tamper-evident audit trail and local models.

Pilot demo · 1:52

The problem

Bank staff need answers from customer documents — KYC records, account statements, passbooks — without searching through files by hand. Retrieval-augmented generation is the obvious tool, but the common way it is built retrieves broadly first and filters afterwards. By the time anything is redacted, the model has already seen everything: a prompt-injection attempt, or a single bug in the redaction step, can expose data the user was never entitled to.

A quieter problem sits underneath. Teams choose between keyword search and vector embeddings by habit rather than evidence, even though short, field-heavy banking documents — a PAN, an account number — behave very differently under semantic search than natural-language questions do.

Who it is for

  • Banks, NBFCs and fintechs that want natural-language access to customer documents without widening who can see what
  • Compliance and audit teams that need every question — granted or denied — recorded in a form that cannot be quietly edited
  • Engineering teams that need evidence, not habit, when choosing between keyword and vector retrieval

Market context

Large banks are served by established, certified platforms for onboarding, KYC and client lifecycle management — Fenergo, Jumio and Moody's among them — alongside general enterprise search and RAG offerings from the major cloud providers. This pilot does not compete with them on certification or scale. It is a reference architecture for one specific, high-risk pattern: letting staff query sensitive documents with AI.

The gap it closes

The gap is where access control happens. Retrieve-then-filter pipelines depend on every downstream filter being correct, every time. Here, the permission check runs before retrieval, as an explicit node in a LangGraph state graph: a denied request follows a graph edge that never reaches the document store at all. There is nothing to redact, because nothing was retrieved.

How it works

  • A staff member signs in through OIDC and asks a plain-language question about a customer's documents
  • Their role is checked before retrieval — admins see everything unmasked, analysts see public and private documents with PII masked, end users see public documents only; private documents are invisible to them, not redacted
  • The answer is generated from the permitted documents only, and every request — granted or denied — is written to a hash-chained audit log
  • Admins govern uploads through an editable configuration: every document must be marked public or private, and rule changes need a second admin's approval

What makes it different

  • Denial is structural, not a filter — enforced as a graph edge, and verified by a test that replaces the document store with a mock and asserts it is never called on a denied request
  • Tamper-evident by design — every request is encrypted and hash-chained; editing any past record breaks verify_chain(), which identifies exactly which record changed
  • Two retrieval engines, one platform — a keyword-only (BM25) build and a hybrid vector + BM25 build share every other layer; the difference between them is a git diff, so the comparison itself is part of the deliverable
  • Governance that cannot be self-approved — rule changes need a second admin; self-approval is refused server-side with HTTP 409, verified with two real admin accounts

Architecture

System Overview

Staff question │ ▼ ┌──────────────────────────────────┐ │ Sign-in (OIDC, verified on Keycloak) │ └──────────────┬───────────────────┘ ▼ ┌──────────────────────────────────┐ │ Access check: role + visibility │ │ LangGraph node — BEFORE retrieval │ └──────────────┬───────────────────┘ ▼ Permitted? │ │ YES NO │ │ ▼ ▼ Scoped retrieval Graph edge ends here — (permitted docs document store is only) never called │ ▼ Answer + PII masked by role Every request, granted or denied → encrypted, hash-chained audit log

Component Breakdown

Access GateRole and document-visibility check as a LangGraph node, before any retrieval
Retrieval EngineKeyword-only BM25 (one file per customer) or hybrid vector + BM25 on Chroma — swappable behind one interface
Answer LayerGenerates from permitted documents only, with PII masked according to role
Audit LogEncrypted, hash-chained record of every request, granted or denied
Upload GovernanceConfig-driven upload rules, mandatory public/private choice, dual approval for rule changes

Data Flow

  1. The user signs in; identity and role come from OIDC
  2. The access node checks role and document visibility for the requested customer
  3. Denied → the request ends at a graph edge; the document store is never called, and the denial is logged
  4. Permitted → retrieval runs only over documents that role may see — physically separated per customer in the keyword build, a scoped query plus an independent ownership re-check in the vector build
  5. The answer is generated, PII is masked where the role requires it, and the request is written to the audit log

Technology Stack

OrchestrationLangGraph state graphAccess control expressed as graph structure, not scattered conditionals
IdentityOIDC (Keycloak)Standards-based sign-in, verified end to end
RetrievalBM25 · Chroma + nomic-embed-textTwo engines behind one interface, chosen by measured traffic
GenerationLocal LLM (Ollama)Customer documents never leave the environment
PlatformPostgreSQL · DockerVerified as a full live stack, not mocked services

Real Design Trade-off, Documented

Keyword-only retrieval wins on cost, infrastructure and simplicity, and is strongest on exact-field questions such as account numbers. Vector retrieval handles paraphrased, natural-language questions better. Rather than choose by habit, both were built on the same platform — and the recommendation is to start keyword-only, measure the real miss rate, and add vectors only when the misses justify the extra stack.

Performance, Measured Not Estimated

  • Zero mocked security boundaries: access control, audit and dual approval verified against a live Docker stack, a real Keycloak instance, a real Postgres container and real embeddings in a real Chroma collection
  • Self-approval of a governance change refused with HTTP 409, verified with two real admin accounts

What This Pilot Deliberately Does Not Do

  • No SharePoint, OneDrive or FileNet connectors — these need external accounts the pilot does not have
  • Azure Entra ID is not verified as a tenant — OIDC is verified against Keycloak instead
  • No RBI, ISO, SOC 2 or PCI-DSS certification — those are organizational, not code

Request a walkthrough of the pilot →

See Banking Document Intelligence working

A guided walkthrough, one-on-one. We usually reply within one business day.

Request access →
Next step

Stop guessing whether your AI is safe to ship.

Tell us about one AI system. In 30 minutes we will show you where it can fail silently, and what it would take to prove it does not.