Bank Reconciliation with Sinapsis
Explore a complete Sinapsis agent that reconciles bank and ERP entries with deterministic matching and LLM adjudication.
Source: Bank Reconciliation — GitHub
Publication status: This tutorial remains a draft because the bank-reconciliation demo currently resides in a private repository, and its deployment requirements have not been publicly verified. GitHub access is required to view the source. The links below point to
mainuntil a tested release or immutable commit is selected.
This example shows how one declarative Sinapsis Agent combines exact matching, fuzzy matching, amount reconciliation, and an optional LLM adjudication step. It is a proof-of-concept demonstration, not a production banking system.
The application has a Gradio interface. A user uploads bank and ERP files, selects the relevant column names, and runs a single agent whose output is read from a DataContainer.
Agent pipeline
flowchart TD
A[InputTemplate] --> B[BankCSVReader]
B --> C[ERPCSVReader]
C --> D[ExactMatcher]
D --> E[FuzzyMatcher]
E --> F[Reconcile]
F --> G[CaseBuilder]
G --> H[LLaMACPPTextCompletion]
H --> I[Resolver]
I --> J[SummaryTable]
Green-bordered nodes reference Sinapsis templates. Hover or focus them to fetch documentation.
View Mermaid source
flowchart TD
A[InputTemplate] --> B[BankCSVReader]
B --> C[ERPCSVReader]
C --> D[ExactMatcher]
D --> E[FuzzyMatcher]
E --> F[Reconcile]
F --> G[CaseBuilder]
G --> H[LLaMACPPTextCompletion]
H --> I[Resolver]
I --> J[SummaryTable]
The two CSV readers add data-frame packets. Exact matching handles straightforward references; RapidFuzz supplies candidates for unresolved references. The reconciliation stage compares grouped amounts and deterministically classifies clear-cut cases. The LLM receives only ambiguous residual cases to judge reference identity, not to set the financial reconciliation flag. The resolver combines its verdict with deterministically computed amount agreement.
Important safety rule in this example: The LLM does not set reconciled = Y. Only exact reference matches with agreeing amounts can be automatically reconciled; fuzzy matches remain subject to review even when the model suggests they refer to the same document.
Source code and files
The complete executable demo lives in the bank-reconciliation/ directory of Sinapsis-AI/sinapsis-demos. The code, configurations, prompts, fixtures, and Docker assets are maintained there rather than duplicated in the documentation repository.
| File | Role |
|---|---|
README.md | Project setup, behavior, inputs, outputs, and limitations. |
webapp.py | Gradio interface and Agent invocation. |
configs/bank_reconciliation_light.yaml | Agent definition; 3B LLM variant. |
configs/bank_reconciliation_heavy.yaml | Agent definition; 9B LLM variant for larger GPUs. |
artifacts/adjudication_prompt.txt | LLM adjudication prompt. |
artifacts/sample_bank.csv | Bank-side sample input. |
artifacts/sample_erp.csv | ERP-side sample input. |
docker/Dockerfile | Docker image definition. |
docker/compose_test.yaml | Development Compose configuration. |
Accessing the demo
With authorised access to the private repository, obtain the demo from the monorepo:
git clone git@github.com:Sinapsis-AI/sinapsis-demos.gitcd sinapsis-demos/bank-reconciliationThese commands retrieve the source but do not guarantee that the demo runs: review its README, private dependencies, GPU requirements, and Docker configuration first. The documentation currently links to the changing main branch; after a release is tested, replace these URLs with links to the same immutable commit or tag and record the corresponding Sinapsis version.
Prerequisites and reproducibility
The supplied example currently requires Docker and Compose, a CUDA-capable NVIDIA GPU (approximately 4 GB VRAM for the light configuration or at least 10 GB for the heavy configuration), the sinapsis-nvidia:base image, and access to its Sinapsis package dependencies. On first execution the selected GGUF weights may need to be downloaded.
The README refers to SSH access for private repositories, whereas the provided Dockerfile installs packages from https://pypi.sinapsis.tech. Confirm the actual authentication and dependency requirements for the release before describing it as publicly runnable.
Docker context needs correcting
The supplied Compose file declares build.context: ./ from inside docker/, but the Dockerfile attempts COPY ../ /app/. Dockerfile COPY cannot access files outside the build context: with BuildKit, parent-directory traversal is stripped, so it will not copy the intended repository root (legacy builders may reject the path). A conventional fix is to set the build context to the repository root:
# docker/compose_test.yaml (suggested modification)
services:
sinapsis-demo:
build:
context: ..
dockerfile: docker/Dockerfile
and change the Dockerfile copy instruction to:
COPY . /app/
This is a suggested correction, not a tested patch. Before publishing, also review the Compose bind mounts: ~/Downloads and /etc/letsencrypt should not be assumed on readers' computers, and production secrets should never be bundled in tutorials. Pin package/image versions to make the example reproducible.
What the demo illustrates
End-to-end declarative Agent configuration rather than an imperative chain of one-off application calls.
Reusable Template stages sharing a common DataContainer boundary.
Deterministic handling of exact matching, 1-to-many amounts, and easy reference-normalization cases.
Constrained LLM adjudication of genuinely ambiguous candidate references.
Separation between a recommendation about reference identity and a financial reconciliation decision.
Known limitations
The proof of concept selects one best ERP candidate for each bank reference rather than supporting arbitrary many-to-many reference graphs. It reconciles by amount rather than including transaction date in the balancing decision. System-of-record integration and automatic write-back are deferred. All fuzzy matches remain reconciled = N.
For the system design that makes this composition possible, see the Architecture Overview.
Published from Git revision 7b7ba25d627b