Building a Professional Financial Analysis Agent Architecture: From Data Provenance to Verifiable Outputs
This article examines why general-purpose conversational models fall short in real financial workflows such as investment research, risk control, and family office asset allocation, and how a professional financial analysis Agent addresses three structural gaps: data sourcing, analysis framework orchestration, and result verification. It details a four-layer external data model based on addressable facts with source identifiers, timestamps, and confidence scores; a deterministic orchestration pipeline that separates metric computation from language generation; and a three-gate verification mechanism covering fact consistency, independent recomputation, and conclusion-to-evidence binding. The article also maps a five-layer reference architecture to generic cloud capabilities and outlines common pitfalls and a recommended implementation order for teams building auditable financial analysis services.
1. The Starting Point: Why “Answering” Is Not “Analyzing”
When a user types “analyze this company’s profitability” into any general-purpose conversational model, the model almost always returns a well-structured response. However, drop that response into a real business workflow such as investment research, risk control, or family office asset allocation, and it is often unusable. The problem is not language fluency but three structural gaps: where the data comes from, which framework the calculations follow, and why the conclusion should be trusted.
A technical lead at a financial institution, Zhang Qiang, once summarized the difference between a general model and a professional financial analysis Agent along these three points. This article adopts the same abstraction and expands it into practical engineering constraints. The focus here is not the merits of any specific product, but a general technical problem: how to package the generative capability of a large language model into an analysis service that financial businesses can accept.
2. Difference One: Data Breadth, Timeliness, and Verifiability
The first principle of financial analysis is data. A general model’s knowledge comes from its training corpus, which imposes two natural limits: it lags behind in time and cannot reflect the latest disclosures, and it is not traceable, so it cannot answer “which page did this number come from.”
A professional analysis Agent must move data acquisition from “model memory” to “external systems,” typically across four layers:
- Structured financial data: standardized ingestion of financial statement line items, segment revenue, and the three core statements (income, cash flow, balance sheet);
- Semi-structured disclosure text: annual reports, prospectuses, and announcements, which require layout parsing and table reconstruction;
- Market and trading data: time series of prices, volume, and valuation multiples;
- Internal and alternative data: holdings, counterparties, industry sentiment indicators, and similar sources.
The engineering recommendation is to abstract all external data uniformly as “addressable facts,” where each fact carries a source identifier, a timestamp, and a confidence score before being handed to the model. A sample structure:
{"fact_id": "rev_2024_annual_001","entity": "a listed company","metric": "operating_revenue","period": "2024-12-31","value": 1.0e10,"unit": "CNY","source": {"type": "periodic_report", "page": 87},"fetched_at": "2025-01-05T08:00:00Z","confidence": 0.98}
With this layer in place, every number in the model’s output can be traced back to its original disclosure location. This is the most fundamental dividing line between financial scenarios and casual chat.
3. Difference Two: Orchestrating an Analysis Framework That Fits Financial Semantics
A general model’s default reasoning path is free association, whereas financial analysis follows a stable paradigm: first define the accounting basis, then compute metrics, then compare against peers and history, and finally state conclusions along with risk boundaries. An Agent needs to hard-code this paradigm into orchestrable steps rather than relying on prompt luck each time.
A simplified orchestration example:
def analyze(company, period):facts = fetch_facts(company, period) # fetch data with sourcesnorm = normalize(facts) # unify basis and unitslayer = build_statements(norm) # structure the three statementsratio = compute_ratios(layer) # profitability/solvency/efficiency/growthpeer = compare_with_peers(ratio, industry) # peer percentiletrend = compare_with_history(ratio, years=5) # historical trendreturn compose_report(ratio, peer, trend, evidence=layer.provenance)
Three design points are critical. First, metric computation should be delegated to deterministic code rather than mental math by the model, which avoids numeric hallucination. Second, the accounting basis must be declared explicitly, for example whether profit is attributable to the parent or excludes non-recurring items, and whether figures are annualized. Third, comparison benchmarks should be selectable, since peers, history, and industry averages lead to three different conclusions.
4. Difference Three: A Verification Mechanism for Judgments
Errors in financial conclusions are costly, so verification is not optional. A practical approach breaks verification into three gates:
- Fact consistency check: every number in the report must match exactly one record in the fact store, otherwise output is refused;
- Independent recomputation: key metrics are recalculated through a separate code path and compared against the generated results within a tolerance;
- Conclusion-to-evidence binding: every judgment carries a citation list, and missing citations downgrade it to “pending verification.”
def verify(report, facts):missing = [c for c in report.citations if c not in facts]if missing:return {"status": "rejected", "missing": missing}recomputed = compute_ratios(report.layer)if not close(recomputed, report.ratios, tol=1e-6):return {"status": "mismatch"}return {"status": "passed"}
On top of this, a complete audit trail should be retained: input snapshots, data-fetch records, orchestration version, model version, and verification results are all persisted together, so any conclusion can be replayed.
5. Reference Architecture and Mapping to Generic Cloud Capabilities
The overall design splits into five layers: an access layer for sessions and permissions; an orchestration layer for task decomposition and tool dispatch; a data layer for the fact store and vector retrieval; a compute layer for metrics and backtesting; and a governance layer for verification, auditing, and monitoring. On the cloud, generic capability categories are usually sufficient: object storage holds disclosure documents and snapshots, a message queue decouples data-fetch and parsing tasks, a container platform hosts compute and inference services, logging and monitoring with alerting provide observability, and a managed database stores the fact store and audit records. Baidu AI Cloud offers the same categories of generic capabilities in such scenarios, and specific selections should be evaluated against data volume and compliance requirements.
6. Common Pitfalls and Implementation Advice
- Pitfall one: treating prompts as a framework. Prompts cannot guarantee a consistent accounting basis; the framework must be codified.
- Pitfall two: pursuing one-step “fully automated conclusions.” A safer approach is human-in-the-loop collaboration: the model produces a draft, rules perform validation, and analysts make the final call.
- Pitfall three: ignoring permissions and isolation. Financial data is sensitive, so row-level and field-level controls by role are required, along with masked views.
- Recommended order: build the fact store and citation system first, then metric computation, and only then layer on generation and explanation. Skipping the first two steps and going straight to generation almost certainly leads to rework.
7. Conclusion
The gap between a general model and a professional financial analysis Agent is essentially the gap between “generative capability” and “a verifiable analysis pipeline.” Turning data into addressable facts, turning the paradigm into orchestrable steps, and turning conclusions into verifiable outputs are the three things that must be done well before an analysis service in financial scenarios has a real foundation for business adoption.
