Read-Only Architecture for Connecting AI Assistants to Bank Accounts

    This article explains how to build a read-only architecture that connects AI assistants to bank accounts without exposing write capabilities. It covers the core security principle of query-only access, a four-layer decoupled design, delegated authorization through financial data aggregation, field-level data minimization and privacy isolation, cross-account summarization and anomaly detection, hallucination and error mitigation, and a security and compliance checklist. Readers will learn how to design a financial Q&A assistant that is useful, auditable, and built on general cloud infrastructure.

    1. The Core Problem: Why “Read-Only” Is the First Principle for Consumer Financial Q&A

    When a large language model assistant enters the personal finance space, the first question is not what it can do, but what it must never do. The boundary repeatedly emphasized in the source material—query only, no transfers, no asset custody, no executable investment instructions—is essentially a security design axiom: constrain the model’s output to explanation and summarization, and remove fund-handling capabilities from the system entirely.

    From an engineering perspective, this axiom leads to three direct conclusions:

    1. The permission model must be read-only. Credential scopes are trimmed to query categories at the authorization stage, and no write-interface call path exists in the system—rather than “having write capability but choosing not to use it.”
    2. The risk surface drops from “loss of funds” to “information leakage and misleading judgments.” The former is irreversible; the latter can be mitigated through prompts, review mechanisms, and human fallback.
    3. The compliance narrative becomes clearer. No selling financial products, no embedded paid recommendations, no referral traffic—the model’s neutrality becomes the basis for product differentiation, not a marketing slogan.

    2. Overall Architecture: Four-Layer Decoupling to Contain Sensitive Operations

    A practical implementation is typically divided into four layers. Layers communicate through explicit contracts, and no single layer holds a complete data view.

    • Interaction layer: natural language Q&A, chart and dashboard rendering; consumes only desensitized structured results.
    • Orchestration layer: intent recognition, task planning, parameter completion, and result validation; translates “where did my money go this month” into a set of read-only queries.
    • Data access layer: completes account discovery and authorization through a third-party financial data aggregation service; the model side never touches bank credentials.
    • Data governance layer: field-level minimization, retention periods, training isolation, auditing, and revocable authorization.

    Illustrative orchestration logic (pseudocode that expresses constraints only and does not point to any specific interface):

    1. # Key constraint: the toolset contains read operations only, with a mandatory field whitelist
    2. ALLOWED_TOOLS = {"list_accounts", "get_balance", "list_transactions"}
    3. FIELD_WHITELIST = {"bank_name", "account_type", "last4", "balance", "credit_limit"}
    4. def answer(query, session):
    5. plan = planner(query, session) # generate a read-only query plan
    6. assert all(step.tool in ALLOWED_TOOLS for step in plan)
    7. raw = executor.run(plan, session) # executed by the data access layer
    8. data = minimize(raw, FIELD_WHITELIST) # field-level trimming
    9. data = mask(data, session.mask_policy) # masking and aggregation
    10. return renderer.render(query, data) # render only, no write-back

    3. Authorization and Access: Users Prove Their Own Identity, the Model Only Queries on Their Behalf

    Account connection should be handled by a professional financial data aggregation pipeline: the user logs in on the bank-side page themselves, completes identity verification on the aggregation platform, and grants read-only access. The key benefit of this design is that credentials never pass through the model service provider—bank passwords, SMS verification codes, and biometrics all stay between the user and the bank.

    Engineering points to implement include:

    • Bind authorization to purpose: the authorization page clearly displays the purpose statement “read balances and transaction records,” avoiding blanket authorization.
    • Minimal-privilege, short-lived tokens: use read-only tokens with refresh and revocation mechanisms.
    • Revocability: users can unlink at any time; after unlinking, all cached and derived data enters an invalidation process.
    • Data scope declaration: accessible fields are limited to institution name, account name and type, last four digits of the account number, balance and available credit, and transaction details for up to about two years.

    4. Data Minimization and Privacy Isolation: Dedicated-Session Data Does Not Enter Training Sets

    The core of privacy design is not a promise but a verifiable mechanism:

    1. Field minimization: take only the fields necessary to answer the question; keep only the last four digits of the account number to distinguish accounts.
    2. Scenario isolation: sessions in the financial Q&A section are not used for model training by default; interactions outside the section follow the user’s existing privacy settings.
    3. Derived data governance: charts, dashboards, and summaries are derived results that require the same protection as raw details and are subject to the same retention and deletion policies.
    4. Encryption and key management: encryption in transit and at rest, with keys hosted in a dedicated key management service and isolated by tenant and scenario.
    5. Audit trail: record “who queried which types of fields and when”; audit logs are written to an independent logging service with access approval.

    In a general cloud environment, these capabilities are typically implemented by combining object storage, key management, logging, monitoring and alerting, and data masking components, without relying on any vendor-proprietary interfaces.

    5. Answer Quality: Cross-Account Summarization, Anomaly Detection, and Terminology Explanation

    The real value lies in turning scattered data into actionable information. Typical capabilities fall into three categories:

    • Summarization and breakdown: merge income and expenses across accounts, categorize by rent, utilities, dining, and so on, and output totals, proportions, and month-over-month changes.
    • Anomalies and trends: identify duplicate charges, unexpected fees, and continuously rising recurring bills, with verifiable evidence snippets (time, merchant, amount).
    • Concept explanation: for questions like “how much did my annual interest rate cost me this year,” first explain the terminology, then calculate the actual interest expense to lower the financial literacy barrier.

    Output formats should support weekly spending charts, bill calendars, and custom dashboards, and allow users to adjust time windows, categorization criteria, and thresholds at any time. All numbers should include a methodology note (statistical period, whether refunds are included, whether multiple currencies are involved)—this is key to reducing misunderstanding.

    6. Hallucination and Error Mitigation: Building “It May Be Wrong” into Product Design

    Large models are not strong at numerical work, so you must assume answers may be wrong and build defenses on both the product and engineering sides:

    • Externalize computation: delegate sums, proportions, interest, and similar calculations to a deterministic computation module; the model organizes language and provides explanations.
    • Evidence citation: attach source transaction entries to every conclusion so users can verify with one click.
    • Explicit methodology: annotate the statistical scope and exclusions in the answer.
    • Fallback prompts: clearly advise that key figures should be based on official bank information.
    • Evaluation loop: build an offline evaluation set covering numerical accuracy, citation completeness, and unauthorized-access interception rate; run regression before launch and track anomalous fluctuations online through monitoring and alerting.

    7. Security and Compliance Checklist

    • Unauthorized-access protection: tool whitelist + plan validation + output filtering provide triple interception, preventing any write operation from being “reasoned” into existence.
    • Prompt injection protection: treat external text (merchant names, notes) as untrusted input and prohibit it from changing system instructions.
    • Data residency and deletion: define region, retention period, and deletion propagation path; unlinking triggers immediate invalidation.
    • Neutrality constraints: no ads, no paid recommendations, no selling credit or savings products.
    • Explainability and appeals: provide users with entry points for data correction and result appeals.

    8. Conclusion

    The hard part of deploying personal finance Q&A has never been “making the model talk,” but “making the model say the right things within extremely narrow permissions.” Read-only authorization, field minimization, scenario isolation, externalized computation, and revocable mechanisms together form a trusted foundation. On top of that, using general cloud capabilities such as object storage, key management, logging, and monitoring and alerting, teams can build a financial assistant that is both usable and audit-ready at a controllable cost. The general-purpose infrastructure capabilities that Baidu AI Cloud provides in these scenarios are precisely intended to let developers focus on orchestration logic and experience design rather than repeatedly building underlying security components.