AI Assistant Architecture and Security Boundaries for Personal Finance Queries

    This article explains how to design an AI assistant that answers personal finance questions without managing money. It covers read-only authorization, data minimization, cross-account aggregation, deterministic calculations, model-based explanations, privacy isolation, and governance controls for building a secure and auditable financial information service.

    As generative AI enters consumer financial services, personal finance querying is becoming a common capability. Users can ask about account balances, transaction history, and spending patterns in natural language, while an AI assistant aggregates information across accounts and explains the results. The core capability is not managing money on the user’s behalf, but understanding financial data and answering questions.

    For developers, the real design challenge involves five connected areas: authorization, data, models, presentation, and governance. These areas must be built around a clearly defined security boundary.

    1. Product Scope: Information Retrieval, Not Money Movement

    The product boundary should be explicit from the start: read-only, explainable, and unable to move funds.

    An AI assistant should not initiate transfers, manage assets, or execute investment operations. It should also avoid embedding advertisements, paid recommendations, or financial product sales. Its value lies in reducing the need to switch between multiple applications, consolidating fragmented account information into an understandable spending view, and providing authorized queries, categorization, charts, and terminology explanations.

    This positioning determines the system’s design principles:

    • Minimize permissions.
    • Keep the data scope controllable.
    • Make key figures traceable.
    • Leave final decisions to licensed professionals and regulated financial institutions.

    “Do not operate funds” should be implemented as a hard constraint in the permission model and product workflow, rather than enforced only through prompts.

    2. A General System Architecture: Five Layers

    A practical architecture can be divided into five layers.

    1. Connection and Authorization Layer

    Users should authenticate directly with the institutions that hold their accounts through a financial data aggregation service. They then authorize the AI assistant to access the accounts in read-only mode.

    The assistant should not receive account passwords. It should hold only restricted tokens. Authorization should be scoped to specific accounts and fields, such as account metadata, balances and credit limits, and transaction records. Fields that are not explicitly declared should be denied by default.

    2. Data Aggregation Layer

    Financial institutions often expose data in different formats. This layer standardizes account names, account types, transaction dates, amounts, currencies, and merchant categories.

    It should also handle:

    • Deduplication
    • Category normalization
    • Suspicious or unusual transaction flags
    • Cache expiration controls

    The model should not receive raw, inconsistent data directly. Data should first be cleaned and structured by this layer.

    3. Query and Analysis Layer

    Natural-language questions should first be converted into an intent and a query plan. For example:

    • “What is my spending breakdown this month?”
    • “How much available balance will I have before payday?”
    • “How much interest did I actually pay based on the annual rate?”

    The system can then perform cross-account aggregation, subtract planned expenses, and identify recurring billing cycles before passing the calculated results to the model for language generation.

    Critical calculations should be performed by deterministic code. The model should be responsible for explanation and presentation, not for producing authoritative financial figures.

    4. Interaction and Presentation Layer

    The interface can support weekly spending charts, billing calendars, customizable dashboards, and adjustable parameters.

    For users who are unfamiliar with financial terminology, the assistant should explain a concept before applying it to a calculation. It should also indicate that answers may contain errors and clarify that figures from the relevant financial institution are authoritative.

    5. Security and Governance Layer

    This layer should include:

    • Audit logs
    • Field-level redaction
    • Token lifecycle management
    • Isolation of financial-area conversations from model training
    • Propagation of account unlinking events
    • Observability and alerting

    Governance should remain independent of business logic so that permission changes and account disconnections can take effect quickly.

    3. Implementing Read-Only Authorization and Data Minimization

    Read-only authorization should follow three principles: the user initiates it, the scope is explicit, and it can be revoked at any time.

    The following pseudocode illustrates the control flow only. It does not represent any real API or parameter set:

    1. function connectAccount(user, consent):
    2. assert consent.scope == "read_only"
    3. assert consent.fields is subset_of(ALLOWED_FIELDS)
    4. link = dataAggregator.createReadOnlyLink(user, consent)
    5. store.link(user.id, link.id, expiry=consent.expiry)
    6. audit.log("link_created", user.id, link.id, consent.fields)
    7. return link.status
    8. function answerQuery(user, question):
    9. link = store.getActiveLink(user.id)
    10. if link is null: return "Please authorize a read-only account connection first"
    11. plan = parseIntent(question)
    12. records = fetchAllowedFields(link, plan.fields, maxLookback=24months)
    13. result = deterministicAggregate(records, plan)
    14. return explainWithModel(result, disclaimer=true)
    15. function revoke(user):
    16. store.markRevoked(user.id)
    17. dataAggregator.revokeLink(user.id)
    18. cache.purge(user.id)
    19. audit.log("link_revoked", user.id)

    The data scope should be limited to necessary fields, such as account names and types, the last four digits of account numbers, balances and credit limits, and up to two years of transaction history.

    The last four digits are generally sufficient for account identification. Full account numbers should not be exposed. Transaction descriptions may contain sensitive information and should be redacted or summarized before entering the model context.

    When a user disconnects an account, access should stop immediately and cached data should be removed. Audit logs should retain necessary events without storing complete transaction details.

    4. Natural-Language Analysis and Explainability

    The natural-language query pipeline should include:

    1. Intent recognition
    2. Field filtering
    3. Deterministic calculation
    4. Model-based explanation
    5. Uncertainty notices

    For example, “Where did my money go?” can be mapped to spending aggregation by category. “How much do I have left before payday?” can be mapped to available balance minus planned expenses.

    The calculation layer should return intermediate results and data timestamps so users can verify the answer.

    Anomaly detection can combine rules with statistical methods:

    • Duplicate charges can be identified through repeated transactions from the same merchant for the same amount within a short period.
    • Unexpected fees can be detected through sudden changes in a spending category.
    • Increases in recurring bills can be identified from historical sequences.

    Every anomaly should include the evidence that triggered it. The model should not make unsupported assertions.

    For terminology explanations, the assistant should first explain what an annual interest rate means, then calculate actual interest expenses from authorized transactions while stating the estimation method and scope.

    5. Privacy and Training-Data Isolation

    Privacy governance depends on isolation and user control.

    Conversations in a personal finance area should not be used to train the model. Interactions outside that area can remain subject to the platform’s standard privacy settings.

    The system should also minimize context. Only the aggregated results needed to answer a question should be sent to the model; the full two-year transaction history should not be inserted into a prompt.

    Additional controls should include:

    • Redacting logs
    • Setting short cache expiration periods
    • Propagating unlinking events to the aggregation layer, cache layer, and model context layer
    • Allowing users to review authorization scope
    • Showing the last synchronization time
    • Providing a clear disconnection entry point

    6. Risks and Engineering Best Practices

    The main risks include model hallucinations, prompt injection, permission drift, and dependency risks from third-party services.

    Critical figures must be calculated by deterministic code and displayed with their source and timestamp. Free-text transaction descriptions may contain malicious instructions and should be treated as data, not commands.

    Changes to authorization scope should require renewed confirmation. If the financial data aggregation service becomes unavailable, the system should degrade to a clear “temporarily unavailable” state rather than guessing a balance.

    From an engineering perspective, the service should include auditing, rate limiting, alerting, and rollback mechanisms. Access should be introduced gradually through controlled testing with subscribed users.

    7. Conclusion

    The technical foundation of connecting an AI assistant to personal financial accounts is the conversion of cross-account data into explainable query and analysis capabilities under strict read-only authorization and data-minimization controls.

    Developers should enforce the following system constraints:

    • Do not move funds.
    • Do not sell financial products.
    • Do not use personal finance area data for model training.
    • Allow users to disconnect at any time.

    Deterministic calculations provide trustworthy numbers, while the model improves explanation and interaction. Only when boundaries are clear and governance is auditable can personal finance querying be deployed reliably in consumer applications.