Practical Guide to Combining LLMs with Intelligent BI

    This article explains why the same large language model produces very different output quality in business analysis, and how to combine LLMs with intelligent BI and metric platforms through example-driven standards and metric semantic constraints. It covers a two-stage workflow that first summarizes writing and analysis specifications from approved samples and then generates reports against those specifications, the metadata needed to make metric definitions machine-readable, a layered engineering architecture with validation, quality assurance practices, and common pitfalls to avoid.

    1. The Problem: Same Model, Very Different Output Quality

    A common pattern in real deployments is that two teams using the same LLM capability get very different results. One gets generic copy and tables; the other reliably produces complete, well-structured business analysis reports. The root cause is usually not “a nicer prompt.” It is whether the model was given enough work experience: prior high-quality deliverables, metric definitions, statistical conventions, chart layout conventions, and the way conclusions are expressed.

    A zero-context instruction (for example, “create a monthly business analysis report for me”) is unreliable because it omits three kinds of critical context:

    • Structural context: how many sections the report has and what question each section answers;
    • Semantic context: how metrics such as revenue, profit, and expense are defined, and along which time and entity dimensions they are aggregated;
    • Presentation context: chart type selection, layout order, conclusion sentence patterns, and wording conventions.

    The technical topic of this article can therefore be stated as: how to combine an LLM with an intelligent BI or metric platform, using an “example-driven plus metric-semantic-constraint” approach, to build a reusable analysis automation pipeline.

    2. The Overall Approach: From “Giving Instructions” to “Providing the Reference Answer”

    The recommended approach splits the task into two stages, so the model does not produce output that “looks complete but needs major rework” when information is insufficient.

    Stage 1: Derive the standard (let the model learn the method first)
    Provide several approved high-quality deliverables (reports, dashboard notes, metric dictionaries) and ask the model to produce a “writing and analysis specification” covering section structure, the analysis goal of each section, the required metric list, definition notes, chart selection rules, and conclusion templates.

    Stage 2: Produce against the standard (let the model do the work)
    For a new task, feed in the current period’s data summary or metric results, and require the model to reference the specification generated in Stage 1 before producing content section by section. Missing data must be explicitly marked and must not be invented.

    Illustrative prompt structure (pseudocode):

    1. [Role] You are a business analyst assistant.
    2. [Spec] Follow the section structure / metric definitions / chart rules in <spec document ID>.
    3. [Input] Current period metric results (JSON / table summary).
    4. [Constraints] Stop and ask when definitions conflict; mark missing data as pending.
    5. [Output] Section by section: conclusion first + data evidence + variance breakdown + recommended actions.

    3. The Key to Integrating with Intelligent BI: Make Metric Semantics Machine-Readable

    LLMs are good at expression and summarization, but bad at “guessing definitions.” Metric definitions, dimension hierarchies, time conventions, and filter conditions from the intelligent BI layer should therefore be supplied as constraint inputs. In engineering terms, a three-part bundle works well: metric list + field descriptions + query result summary.

    • Metric list: name, business definition, calculation formula, unit, and whether higher or lower is better;
    • Dimension descriptions: hierarchy relationships for organization, region, channel, product category, and so on;
    • Result summary: current period value, year-over-year and period-over-period change, target value, and variance contribution.

    When definitions conflict, the pipeline should “intercept first, generate later” rather than letting the model compromise on its own. A rules engine or validation script can complete the consistency check before the prompt is built.

    4. A Practical Engineering Architecture (Vendor-Neutral)

    A robust combination typically uses a layered design that avoids exposing the model directly to raw data:

    1. Data and semantic layer: the metric platform or a lightweight data service provides metric definitions and aggregated results;
    2. Orchestration layer: a task orchestration and workflow engine handles the two-stage flow, retries, and timeouts;
    3. Model layer: the LLM derives the specification, generates section text, and produces explanatory summaries;
    4. Validation layer: rule validation (definitions, units, time range) plus statistical validation (totals match the sum of components);
    5. Delivery layer: export to documents or tables, retaining “data source and definition version” for auditing.

    Illustrative pipeline pseudocode:

    1. spec = llm.summarize_spec(excellent_samples) # Stage 1
    2. data = metric_service.fetch(period, dims) # Fetch aggregated results
    3. validate(data, spec) # Definition / unit / time checks
    4. report = llm.generate(data, spec) # Stage 2
    5. assert_consistency(report, data) # Numerical consistency check

    5. Quality Assurance: Turning “Editable” into “Rarely Edited”

    • Version metric definitions: any change to a metric definition requires a version number, and the report states which version it used;
    • Traceable conclusions: each conclusion is followed by the metric name and period, making review easy;
    • Templated variance breakdown: sort by dimension contribution and fix a three-level breakdown of total, structure, and individual;
    • Counter-example constraints: explicitly forbid inferring data that was not provided and forbid splicing across different definitions;
    • Manual spot checks: set thresholds for abnormal fluctuations that trigger human review.

    6. Common Pitfalls

    • Giving the task but no examples: the model can only imitate a “generic report” and struggles to match company standards;
    • Letting the model align definitions on its own: this easily creates invisible data bias;
    • One long prompt at once: information overload causes omissions, so layered input and segmented generation are recommended;
    • No validation loop: generation is fast but rework is heavy, so overall efficiency actually drops.

    7. Conclusion

    The core of combining an LLM with intelligent BI is not chasing fancier prompts. It is turning “high-quality deliverables” into machine-executable specifications and turning “metric definitions” into verifiable constraints. Only when the two-stage workflow, semantic constraints, and a validation loop work together can business analysis and everyday office automation move from “able to generate” to “ready to deliver.”