PulseRAG: Grounding LLMs
in Live Enterprise Data
Enterprise teams routinely ask questions whose answers are distributed across multiple systems of record — CRM pipelines, ERP fulfilment data, IT ticketing queues — with no single system capable of answering them. Traditional RAG addresses document retrieval; it does not address cross-system synthesis.
PulseRAG closes that gap with a natural-language query layer that classifies intent, decomposes a query into parallel sub-queries per system, federates across heterogeneous enterprise connectors, and renders the response in the format the answer demands — table, chart, card, or prose. The system runs on Google's own model family — Gemini 3.1 Flash-Lite for cheap, high-volume intent classification and Gemini 3 Flash for cross-system synthesis — with seeded mock connectors for demonstration and every architectural tradeoff documented as a formal ADR.
§1 Problem Statement
Between 2022 and 2025, enterprise teams broadly adopted RAG to reduce LLM hallucination. The pattern is largely uniform: documents are chunked, embedded, and retrieved by similarity against an embedded query. This handles document-level knowledge well.
It does not handle operational questions. A Sales Director asking "which at-risk deals have fulfilment issues that could affect close?" needs an answer that lives in three systems simultaneously — CRM deal stage, ERP fulfilment status, and the ticketing queue for account friction. No vector store contains that join, and no single system of record can answer it alone.
| Query type | Example | Document RAG | PulseRAG |
|---|---|---|---|
| Cross-system synthesis | "At-risk deals with fulfilment issues this quarter?" | Fails — no join | Core use case |
| Live operational status | "Open P1 tickets right now?" | Stale answer | Live connector |
| Inventory & fulfilment | "SKUs below reorder threshold today?" | No document exists | ERP connector |
| Pipeline health summary | "How is Q2 tracking against target by stage?" | Stale if indexed | CRM connector |
| Document lookup | "What is our refund policy?" | Handles correctly | Out of scope |
A document RAG system has no document that answers "which at-risk deals have fulfilment issues that could affect close?" The nearest indexed content might be a sales playbook — returned with high cosine similarity, factually correct, and completely wrong for the question. The generation layer produces a fluent, confident, and useless answer.
PulseRAG routes the same query to three connectors simultaneously — CRM for deal stage and risk flags, ERP for fulfilment status, Ticketing for open account friction — then joins the results and renders a ranked deal table, the format the answer actually demands.
§2 Pipeline Overview
A query passes through five layers between input and rendered answer. Query Intelligence determines which connectors are needed; Connector Federation queries them in parallel; the Freshness & Cache layer decides live-vs-cached per query type; Synthesis & Render merges results into the format the answer demands.
§3 Pipeline Components
Every incoming query passes through a structured Gemini 3.1 Flash-Lite prompt that returns which connectors are required, what output format the answer demands, and how sensitive the data is. No labelled training set is needed — classification is driven entirely by prompt structure, which keeps iteration fast during the design phase and keeps per-query cost near-zero.
CRM, ERP, and Ticketing connectors implement a standard interface — a query-in, JSON-out contract with a fixed schema shape modelled on Salesforce, SAP, and Jira respectively. Sub-queries fan out in parallel via Promise.all(); the connector interface is designed to be real-API-swappable without touching the intelligence or synthesis layers.
In production, that swap point is Apigee as the API gateway in front of each system of record, with Application Integration handling the connection and transformation logic per system — Google's own answer to exactly the "systems that were never designed to talk to each other" problem this project is built around.
Not every query needs a live fetch. High-sensitivity queries — deal risk, ticket SLA breach, inventory thresholds — bypass cache entirely. Lower-sensitivity aggregate queries, like pipeline health by stage, are served from a 5-minute TTL cache to reduce redundant connector load.
| Query type | Sensitivity | Policy |
|---|---|---|
| At-risk deals · fulfilment risk | High | Bypass cache — always live |
| Inventory reorder threshold | High | Bypass cache — always live |
| Open P1 tickets · SLA risk | High | Bypass cache — always live |
| Pipeline health by stage | Medium | 5-minute TTL |
The synthesis prompt returns a format signal alongside the answer content — table, chart, cards, or prose — which drives the render layer directly. This separates content generation from presentation: the LLM decides what shape the answer needs; the renderer just executes it.
Every component choice below is a deliberate, documented tradeoff for a zero-infrastructure portfolio build — see §6 for the full ADR set.
§4 Pipeline Simulator
Run the pipeline across four enterprise query scenarios end-to-end. Each run shows intent classification, connector activation, freshness routing, synthesis, and adaptive output rendering with realistic timing. This simulator uses pre-scripted scenario responses and seeded JSON connector data — no external API calls are made.
// select a scenario and run simulation
§5 Tech Stack
§6 Architecture Decision Records
Every significant architectural choice is formally documented following TOGAF principles — design precedes build, decisions are traceable.
gemini-3.1-flash-lite and synthesis to gemini-3-flash, both via the Gemini API. Note: Google's API terms require EEA/Switzerland/UK developers to use the paid tier rather than the free AI Studio tier available elsewhere — this build runs on paid, pay-as-you-go Gemini at demo-scale cost (well under $1 for the full simulator's worth of calls).§7 MVP Scope & Production Path
This is a portfolio-grade MVP. The gap to production is well-defined and documented openly — a deliberate engineering decision, not a limitation to hide.
| MVP | Production |
|---|---|
| Gemini API · direct, paid tier | Vertex AI Gemini with SLA, quota management, VPC-SC |
| Mock JSON connectors | Live Salesforce, SAP, Jira via Apigee + Application Integration |
| Browser-side API calls | Cloud Run backend proxy |
| In-memory TTL cache | Memorystore with distributed invalidation |
| Static HTML | Angular application with component separation, deployed on Firebase Hosting |
| Single-user demo | Multi-tenant with Identity Platform auth, Cloud Audit Logs, IAM access control |
§8 Documented Tradeoffs
Every limitation below is surfaced deliberately, with a clear statement of what production would require.