Role-Based Conversational BI: Turning Natural Language into Insights

Overview

Business data lives across dashboards, spreadsheets, reports, and data warehouses, yet answering a simple question such as “Who are our top customers?” or “How did sales trend last year?” can still require technical tools, complex filters, and access permissions.

Rysun developed a Role-Based Conversational BI Application that enables users to ask questions in natural language and receive AI-generated insights, interactive visualizations, and detailed data tables. Role-based access control (RBAC) is embedded throughout the experience, ensuring users only access information they are authorized to see.

Business Objective

The goal was to make business intelligence work like a conversation without compromising data security. The solution had to:

  • Let non-technical users get answers from enterprise data in natural language.
  • Serve different business roles from a single dataset while enforcing strict access boundaries.
  • Support follow-up questions, comparisons, and drill-downs that static dashboards handle poorly.
  • Keep authorization deterministic and auditable, regardless of how a question is phrased.
Industry​

Industry​

Retail

Challenge

One dataset for many roles, rigid dashboards, low adoption by non-technical users, query-level data security

Solution

Solution

Conversational BI, Natural language to SQL, Role-based views, Interactive visualization, Few-shot learning

Challenge

Several foundational challenges shaped the solution:

  • One Dataset, Many Perspectives: The same data had to serve different business viewpoints without exposing everything to everyone.
  • Rigid Analytical Workflows: Business questions evolve through follow-ups and comparisons that static dashboards cannot easily support.
  • Adoption by Non-Technical Users: When analytics feels complex, users disengage and decision-making slows down.
  • Security Beyond the Interface: Access had to be controlled before queries run, not just hidden after results appear.

Rysun’s Solution

Rysun built a conversational analytics experience around a simple principle: people already know how to ask questions.

Users can ask questions in natural language and receive an AI-generated insight, an appropriate visualization, and a structured table of the underlying data.

Interactive Analysis: The system automatically selects visualizations based on the question and data, with interactive charts and maps enabling users to identify trends, comparisons, and outliers.

Deeper Exploration: Users can drill down into chart elements, ask contextual follow-up questions, sort and inspect results, and export data to CSV or Excel—all within the same workflow.

Governance Built In: RBAC ensures users only access authorized data. Requests involving restricted information are blocked before execution, providing a clear unauthorized-access response. The same question can therefore produce different results based on the user’s role or be blocked entirely when access is not permitted.

Rysun’s Approach

The project followed a behavior-first, insight-driven approach, focused on how users naturally explore data: starting broad, drilling down, comparing segments, and asking follow-up. AI handles interpretation and presentation, but not authorization. Governance is enforced at the database level through role-specific views, so restricted information is never queried.

Technology and Architecture

The AI-powered editorial platform delivered a more connected, efficient, and context-aware experience across the content lifecycle.

  • User Interaction Layer: A chat interface built with HTML, CSS, and JavaScript, backed by a FastAPI (Python) service that manages authentication, sessions, and conversation history.
  • Intelligence Layer: An LLM interprets questions and generates SQL using LangChain, with the Qwen 2.5-Coder model (served via Hugging Face TGI) driving reasoning and query generation.
  • Few-Shot Learning & Context: Semantic embeddings stored in Chroma / FAISS vector stores help the system handle business-specific language and answer reliably.
  • Governed Query Execution: Queries run only on role-specific PostgreSQL views and pass through guardrails. If restricted columns are detected, execution stops and the user gets an unauthorized access message.
  • Visualization & Tables: Approved results are rendered with Plotly as interactive charts and maps, alongside sortable, exportable tables.

Business Impact

  • Improved Accessibility: Non-technical users can get answers without knowing where data lives or how it is structured.
  • Richer Visual Understanding: Interactive charts and maps make trends, outliers, and comparisons easier to see.
  • Stronger Data Governance: Database-level, role-specific views ensure restricted data is never queried, however a question is worded.
  • Faster Decision-Making: Follow-ups and drill-downs happen in the same conversation, without rebuilding reports or adjusting filters.
  • Consistency Across Roles: Every role uses the same interface, and each gets answers within its own authorized view.

Conclusion

By shifting BI from dashboards to dialogue, and from static visuals to interactive exploration, Rysun delivered an analytics experience that is intuitive, trustworthy, and aligned with how people actually make decisions. Natural language lowers the barrier to insight, and governance at the data layer keeps every answer secure.