<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Kunal Shrivastava on Medium]]></title>
        <description><![CDATA[Stories by Kunal Shrivastava on Medium]]></description>
        <link>https://medium.com/@kunal_nester?source=rss-24b366bfea93------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*efjPDGMgvetFww8A_sF8Lw.jpeg</url>
            <title>Stories by Kunal Shrivastava on Medium</title>
            <link>https://medium.com/@kunal_nester?source=rss-24b366bfea93------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 05 Dec 2026 18:54:20 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@kunal_nester/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Open-Sourcing ConversationalBot: A Low-Latency Voice Assistant for AI Conversations]]></title>
            <link>https://medium.com/nesterlabs/open-sourcing-conversationalbot-a-low-latency-voice-assistant-for-ai-conversations-49c7d45253a7?source=rss-24b366bfea93------2</link>
            <guid isPermaLink="false">https://medium.com/p/49c7d45253a7</guid>
            <category><![CDATA[speech-recognition]]></category>
            <category><![CDATA[llms-utilization]]></category>
            <category><![CDATA[conversational-ai]]></category>
            <category><![CDATA[voice-assistant]]></category>
            <dc:creator><![CDATA[Kunal Shrivastava]]></dc:creator>
            <pubDate>Sat, 26 Jul 2025 14:36:09 GMT</pubDate>
            <atom:updated>2026-05-01T16:29:17.873Z</atom:updated>
            <content:encoded><![CDATA[<p>In a world where speech interfaces are becoming as common as swipes and taps, building <strong>real-time voice assistants</strong> isn’t just a nice-to-have — it’s foundational. At <strong>NesterLabs</strong>, we set out to develop a system that’s not just intelligent, but <strong>responsive</strong>, <strong>multilingual</strong>, and <strong>human-aware</strong>.</p><p>Meet <a href="https://github.com/nesterlabs-ai/NesterConversationalBot"><strong>NesterConversationalBot</strong></a> — our open-source framework for building voice-first applications powered by Speech-to-Text (STT), Text-to-Speech (TTS), RAG (Retrieval-Augmented Generation), and LLMs — all orchestrated with <strong>~1–1.5 second response times</strong> and support for Hinglish.</p><h3>What Is NesterConversationalBot?</h3><p>NesterConversationalBot is a modular voice assistant engine built using <a href="https://github.com/pipecat-ai/pipecat">pipecat</a> for <strong>real-time, low-latency conversations</strong>, with a plug-and-play architecture for production applications.</p><p>It supports:</p><ul><li>Real-time voice streaming</li><li>Modular LLM function execution</li><li>Dynamic tool use (via RAG)</li><li>Multilingual input (including Hinglish)</li><li>High-performance monitoring</li></ul><h3>Deep Dive into Key Components</h3><p>Here’s an in-depth look at the foundational technologies behind NesterConversationalBot.</p><h3>Speech-to-Text (STT) — Real-Time, Streaming Transcription</h3><p><strong>Purpose</strong>: Capture and transcribe user speech with low latency and high accuracy.</p><p>Provider Used in This Project:</p><ul><li><strong>Deepgram</strong>: A streaming STT API that returns partial and final results as the audio flows in. Great for latency-sensitive apps.</li><li><strong>OpenAI Whisper</strong>: Open-source model with multilingual capabilities. Runs locally or on a server and offers fine control over noise handling and punctuation.</li></ul><p>Other supported Providers(via pipecat)</p><ul><li>AWS, Azure, Gladia, Google, Groq, OpenAI, SambaNova, Speechmatics etc.</li></ul><p>To use a provider other than Deepgram or OpenAI Whisper, update the SpeechToTextService accordingly.</p><h4>Pipeline Behavior:</h4><ul><li>Incoming audio is chunked and streamed to the STT engine.</li><li>STT outputs <strong>partial results</strong> (useful for pre-emptive LLM calls) and <strong>final results</strong>.</li><li>Transcriptions are normalised (e.g., lowercase, punctuation handling).</li><li>Transcripts are pushed into the LLM orchestrator immediately — we don’t wait for full utterance end.</li></ul><h4>Hinglish Adaptation:</h4><ul><li>Hinglish works well with Deepgram due to its hybrid phonetic modeling.</li><li>Whisper’s multilingual model also supports code-mixed sentences, especially with small tuning.</li></ul><blockquote><em>Example: “aaj ka mausam kaisa hai” → “what’s today’s weather like?”</em></blockquote><h3>LLM Integration — Conversation Flow and Reasoning</h3><p><strong>Purpose</strong>: Drive intelligent responses, manage context, and trigger tools dynamically.</p><h4>Architecture:</h4><ul><li>The core ConversationManager class handles LLM session state, function registration, and tool invocation.</li><li>Each incoming transcript is treated as an input to the LLM (Google or OpenAI).</li><li>LLM responses can be pure text or <strong>function calls</strong> (e.g., &quot;name&quot;: &quot;get_weather&quot;).</li></ul><h4>Google Gemini Integration:</h4><ul><li>Uses Google’s Gemini Pro API via a structured JSON tool-calling interface.</li><li>You define tool schemas with FunctionSchema and register Python callbacks.</li><li>Gemini intelligently decides when to invoke a tool and passes arguments accordingly.</li></ul><h4>Example Function Call:</h4><pre>{<br>  &quot;name&quot;: &quot;fetch_company_facts&quot;,<br>  &quot;arguments&quot;: {<br>    &quot;company_name&quot;: &quot;NesterLabs&quot;<br>  }<br>}</pre><p>Python-side:</p><pre>async def _handle_company_facts(self, params: FunctionCallParams):<br>    company = params.arguments.get(&quot;company_name&quot;)<br>    facts = await fetch_facts_from_vector_db(company)<br>    await params.result_callback(facts)</pre><h4>Context Management:</h4><ul><li>Uses conversation memory (optional) to maintain user intent over turns.</li><li>Can integrate with RAG for domain-specific grounding before response generation.</li></ul><blockquote><em>This architecture enables your bot to “reason and act,” not just “respond.”</em></blockquote><h3>Function Calling — RAG, Tools, APIs</h3><p><strong>Function Calling</strong> is the core mechanism that lets your assistant <em>do things</em> instead of just talking.</p><h4>Key Features:</h4><ul><li>Define tool schemas (name, description, arguments) via JSON</li><li>Register Python callbacks to handle each function</li><li>Trigger tools like RAG search, database fetch, API query, etc.</li><li>LLM decides when to invoke tools vs. respond directly</li></ul><h4>Example:</h4><p>If the user says <em>“Tell me the current stock price of Apple”</em>, the LLM might:</p><ul><li>Parse intent</li><li>Call get_stock_price with {&quot;symbol&quot;: &quot;AAPL&quot;}</li><li>Receive the response</li><li>Wrap it in a natural sentence: <em>“Apple’s current stock price is $193.47.”</em></li></ul><h4>RAG Integration in This Project</h4><p>If the user asks:</p><blockquote>“Who is the president of US?”</blockquote><p>The flow looks like this:</p><ol><li>LLM recognizes it’s a knowledge-based question</li><li>Calls RAGService.get_response(query=&quot;who is the president of US&quot;)</li><li>The RAG pipeline fetches relevant context</li><li>LLM incorporates the retrieved information into a response:</li></ol><ul><li><em>“The assistant uses a real-time streaming architecture with STT, RAG, and LLM for dynamic query handling.</em></li></ul><p>This approach allows the assistant to provide <strong>factually grounded, contextual answers</strong> on demand.</p><p>This design enables:</p><ul><li>Extendability (plug in any tool)</li><li>Traceability (know what the model called and why)</li><li>Control (fallbacks, logging, monitoring)</li></ul><h4>Caveat: Tool Integration and Latency</h4><p>While function calling greatly enhances the assistant’s capabilities, each additional tool introduces potential latency — from the time it takes for the LLM to choose relevant tools, to the overhead of invoking them and waiting for API responses. For real-time systems, it’s crucial to:</p><ul><li>Design tool selection logic intelligently</li><li>Avoid unnecessary or redundant function calls</li><li>Monitor and profile tool latency regularly</li></ul><p>Use tools <strong>selectively and strategically</strong> to balance intelligence with responsiveness, especially when targeting sub-1.5 second latency.</p><h3>Text-to-Speech (TTS) — Emotional, Natural Responses</h3><p><strong>Purpose</strong>: Deliver responses back to the user in a natural-sounding voice with emotional tone.</p><h4>Engine: ElevenLabs</h4><p>We chose ElevenLabs because of:</p><ul><li><strong>Indian voice support</strong> (important for Hinglish users)</li><li><strong>Emotion &amp; prosody modeling</strong>: Add expressiveness to responses</li><li><strong>Streaming</strong>: Fast audio generation with minimal lag</li></ul><h4>Workflow:</h4><ol><li>Text response from LLM</li><li>Pass to TTS client with voice_id, emotion config (future support)</li><li>Stream audio back to the user in real-time chunks</li></ol><h4>Configurable Parameters:</h4><pre>tts:<br>  provider: &quot;elevenlabs&quot;<br>  config:<br>    api_key: &quot;${ELEVENLABS_API_KEY}&quot;<br>    voice_id: &quot;${ELEVENLABS_VOICE_ID}&quot;</pre><p>You can also:</p><ul><li>Clone your own voice</li><li>Fine-tune pronunciation</li><li>Add pauses, emphasis, or pitch adjustments</li></ul><blockquote><em>Voice is not just an output — it’s how trust and emotion are built. ElevenLabs gives us that expressive control.</em></blockquote><h3>End-to-End Orchestration</h3><p>At the center is our <strong>Voice Assistant Orchestrator</strong> — an async controller that:</p><ul><li>Streams audio from WebSocket clients</li><li>Transcribes input via STT</li><li>Triggers LLM inference</li><li>Invokes tools if needed (e.g., RAG)</li><li>Sends TTS output back to the client</li></ul><p>Each service runs independently but communicates through fast, async queues. Latency is measured at each hop and visualised for optimisation.</p><h3>Architecture Diagram</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*kuCoWQEOiydnUnUWDgRMig.png" /></figure><h3>Getting Started with the Code</h3><pre>git clone https://github.com/nesterlabs-ai/NesterConversationalBot.git<br>or <br>git clone git@github.com:nesterlabs-ai/NesterConversationalBot.git<br>cd NesterConversationalBot<br><br>## To Start Server ##<br>pip install -r requirements.txt<br>cp env.example .env  # Add API keys<br>python websocket_server.py<br><br>## To Start Client ##<br>cd client<br>npm install<br>npm run dev</pre><h3>Customize It for Your Use Case</h3><p>You can:</p><ul><li>Add new tools for your LLM to call</li><li>Swap in your own RAG engine or reach out to us for assistance with the RAG code</li><li>Replace TTS or STT providers</li><li>Add UI on web/mobile</li></ul><p>Our architecture is made to grow with your product.</p><h3>About NesterLabs</h3><p>We are a deep-tech technology company with AI Nest, specializing in AI-powered systems and conversational intelligence. At NesterLabs, we combine cutting-edge AI with our proprietary PGI (Perceptual, Goal-driven, Interactive) UX Nest to craft user experiences that are not only intelligent and responsive but also deeply engaging and human-centric.</p><p><a href="/service/mailto:contact@nesterlabs.com">contact@nesterlabs.com</a><strong>| </strong><a href="https://nesterlabs.com/">nesterlabs.com</a> | <a href="https://www.linkedin.com/company/nester-labs">LinkedIn</a></p><h3>Get Involved</h3><p>We’ve open-sourced NesterConversationalBot to help the developer and research community build better voice-first AI.</p><ul><li><a href="https://github.com/nesterlabs-ai/NesterConversationalBot#">GitHub</a></li><li><a href="https://github.com/nesterlabs-ai/NesterConversationalBot/blob/main/README.md">Doc</a></li><li><a href="https://www.loom.com/share/a7caaffbc3234acfb93a7e0093ff579b">Demo video</a></li><li><a href="https://github.com/nesterlabs-ai/NesterConversationalBot/issues">Create issues, contribute features</a></li><li><a href="/service/mailto:contact@nesterlabs.com">Ask us for enterprise support or custom builds</a></li></ul><blockquote><em>Real-time conversational AI has moved from concept to reality — and we’re here to support you in bringing it to life</em></blockquote><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=49c7d45253a7" width="1" height="1" alt=""><hr><p><a href="https://medium.com/nesterlabs/open-sourcing-conversationalbot-a-low-latency-voice-assistant-for-ai-conversations-49c7d45253a7">Open-Sourcing ConversationalBot: A Low-Latency Voice Assistant for AI Conversations</a> was originally published in <a href="https://medium.com/nesterlabs">Nesterlabs</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Building a High-Accuracy RAG Assistant for Connector Documentation: A Step-by-Step Implementation…]]></title>
            <link>https://medium.com/nesterlabs/building-a-high-accuracy-rag-assistant-for-connector-documentation-a-step-by-step-implementation-c6d3478bc4f9?source=rss-24b366bfea93------2</link>
            <guid isPermaLink="false">https://medium.com/p/c6d3478bc4f9</guid>
            <category><![CDATA[ai]]></category>
            <category><![CDATA[ai-chat-agent]]></category>
            <category><![CDATA[llm]]></category>
            <category><![CDATA[gen-ai-tools]]></category>
            <category><![CDATA[rags]]></category>
            <dc:creator><![CDATA[Kunal Shrivastava]]></dc:creator>
            <pubDate>Mon, 23 Jun 2025 18:54:37 GMT</pubDate>
            <atom:updated>2026-05-01T16:29:31.116Z</atom:updated>
            <content:encoded><![CDATA[<h3>Building a High-Accuracy RAG Assistant for Connector Documentation: A Step-by-Step Implementation Guide</h3><h3>Overview</h3><p>For companies building and maintaining large catalogs of software connectors — JDBC, SaaS APIs, CRMs, ERPs — technical documentation is essential. But static documentation, however well written, fails when users want fast, contextual answers.</p><p>We built a <strong>Retrieval-Augmented Generation (RAG)</strong> system to solve this. In this post, we’ll walk through the exact design, the challenges we faced, and the strategies we used to scale an assistant that works across 100+ connectors.</p><h3>Step 1: Foundational RAG System — Chunk, Embed, Retrieve</h3><p>We began with a baseline architecture:</p><h4>What We Built:</h4><p>1. Semantic Chunking:</p><ul><li>Parsed HTML documentation into semantically meaningful units (method-level, endpoint-level, parameter blocks, examples).</li><li>Avoided fixed-size chunking as it broke structure and context.</li><li>Each chunk included metadata: connectorName, docSection, filePath.</li></ul><p>2. Embedding</p><ul><li>Used transformer-based models (OpenAI, Cohere, etc.) to generate vector embeddings.</li><li>Focused on models that preserved code and instruction format sensitivity.</li></ul><p>3. Vector Store:</p><ul><li>Stored embeddings in a scalable store that allowed filtering by connector or section.</li><li>Used hybrid search (vector + keyword filters) to improve retrieval precision.</li></ul><p>4. Query + Retrieval + Prompt + LLM Response:</p><ul><li>For every question, we retrieved the top-k semantically similar chunks.</li><li>Prompted an LLM with those chunks + the question.</li></ul><h4>The Challenge:</h4><ul><li>Failed on multi-turn conversations.</li><li>Couldn’t disambiguate connectors when the user used aliases or abbreviations.</li><li>Didn’t include related context if it was in adjacent chunks.</li></ul><p>So we moved from “just retrieval” to “structured understanding.”</p><h3>Step 2: Add Session Context Awareness</h3><p>Users often ask follow-up questions without repeating the connector or topic:</p><blockquote>“What does the batchSize parameter do?”<br> “How do I authenticate?”<br>“What authentication methods are supported?”</blockquote><p>These are meaningless without understanding <em>which</em> connector or <em>which</em> method the user is referring to.</p><h4>What We Built:</h4><ol><li>A SessionContext Engine:</li></ol><ul><li>Tracked the last discussed connector, topic, and user intent.</li><li>Every question was classified as: NEW_TOPIC, FOLLOW_UP, CLARIFICATION</li></ul><p>2. Each session stored metadata like:</p><pre>{<br>    &quot;id&quot;: &quot;033198ae-23fd-43dc-8abe-8ed1e0343149&quot;,<br>    &quot;connector_type&quot;: &quot;Quickbooks&quot;,<br>    &quot;last_topic&quot;: &quot;Authentication&quot;<br>}</pre><p>3. Each incoming query was routed through a classifier (using both rules and an LLM call) to determine if it needed to reuse previous context.</p><h4>Result:</h4><ul><li>Enabled multi-turn understanding.</li><li>Removed the burden from users to restate their query every time.</li><li>Allowed our RAG system to evolve into a true conversational interface.</li></ul><h3>Step 3: Include Neighbouring Chunks for Structural Context</h3><p>Docs are not flat. Often, the relevant answer spans multiple sections:</p><ul><li>Chunk A: Function Signature</li><li>Chunk B: Parameters</li><li>Chunk C: Notes or Warnings</li><li>Chunk D: Example Usage</li></ul><p>The Problem: RAG systems usually fetch a single best-matching chunk. That’s brittle.</p><h4>What We Built:</h4><ul><li>Linked Chunk Metadata:<br>- Each chunk stored its previousChunkId and nextChunkId.</li><li>Intelligent Neighbour Retrieval:<br>- During retrieval, we not only fetched top-k chunks but also their immediate neighbours.<br>- Added logic to avoid duplicate or structurally irrelevant neighbors.<br>- Neighbors were weighted slightly less than the primary match.</li><li>Chunk Types:<br>- Introduced types like EXAMPLE, ERROR, REFERENCE, PARAMS, etc., to include only relevant neighbours.</li></ul><h4>Result:</h4><ul><li>Created a richer context window for the LLM.</li><li>Helped answer questions like:</li></ul><blockquote>“What are required fields for this endpoint?” even if they spanned multiple sections.</blockquote><h3>Step 4: Resolve Connector Aliases and Abbreviations</h3><p>Users don’t type full names. They say:</p><blockquote>“QB account pull?” → “QuickBooks”<br> “Sf refresh?” → “Salesforce”</blockquote><p>This caused false negatives in both retrieval and context tracking.</p><h4>What We Built:</h4><p>A two-layer identification mechanism:</p><p>1. Deterministic Matching:</p><ul><li>Built a list of common aliases (QB → QuickBooks).</li><li>Used:<br>- Lowercased string matching<br>- Fuzzy ratios<br>- Anagram token logic</li></ul><p>2. LLM Fallback Resolution:</p><ul><li>If the first layer failed, we asked the LLM.<br>“Which known connector is the user referring to in this query?</li><li>Revalidated against our connector list to avoid hallucinations.</li></ul><h4>Result:</h4><ul><li>Resolved 99% of ambiguous connector names.</li><li>Greatly improved first-hit answer accuracy.</li></ul><h3>Step 5: Query Expansion to Improve Recall</h3><p>Users often phrase questions differently than how documentation is written:</p><blockquote>“How do I list all errors?”<br> vs.<br> “Supported error codes” (from the docs)</blockquote><h4>What We Built:</h4><ul><li>For every query, we generated 5–7 semantic variants:</li><li>Used LLM to generate paraphrases, synonyms, and intent restatements.</li><li>Examples:</li></ul><pre>Original: &quot;How to list supported errors?&quot;<br>Expanded:<br>  - &quot;Error codes returned by the connector&quot;<br>  - &quot;What are the possible failure codes?&quot;<br>  - &quot;List of exceptions and meanings&quot;</pre><ul><li>Performed vector retrieval for each variant.</li><li>Merged and deduplicated results.</li><li>Reranked by semantic similarity and documentation coverage.</li></ul><h4>Result:</h4><ul><li>Massive improvement in retrieval coverage.</li><li>Enabled answers for flexible, user-style language without needing users to adapt to documentation terms.</li></ul><h3>High Level Diagram</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*VX_mLGPpM04jT458L2n77A.png" /></figure><h3>Outcomes</h3><p>After implementing this layered design, here’s what we achieved:</p><ul><li>Answer accuracy improved from ~45% to over 90%</li><li>Connector name resolution accuracy hit 99%</li><li>Smooth multi-turn conversations with no connector repetition required</li><li>Designed for easy onboarding of new connectors</li><li>Scaled across 100+ connectors, each with thousands of documentation lines</li></ul><h3>Lessons for Connector Companies</h3><p>If your company maintains multiple technical connectors, here’s what we learned:</p><ul><li><strong>Start with retrieval — but design for memory.</strong> Multi-turn context is non-negotiable.</li><li><strong>Don’t trust user input at face value.</strong> Resolve connector names, typos, and abbreviations.</li><li><strong>Docs are structured — respect that.</strong> Neighbour chunks matter more than you think.</li><li><strong>Language is flexible. Your system should be too.</strong> Synonym and paraphrase handling is critical for open-ended queries.</li></ul><h3>Final Thoughts</h3><p>Static documentation is necessary, but not sufficient. A RAG system built with structure, memory, and intelligence can bridge the gap between product complexity and user simplicity.</p><p>If you’re building for connector ecosystems — where each product has its own nuances — this layered approach works. And it scales.</p><p>If you’re looking to build a similar RAG assistant for your product or connectors, feel free to reach out to us at <a href="https://www.nesterlabs.com/"><strong>NesterLabs</strong></a> or connect with me on <a href="https://www.linkedin.com/in/kunalshrivastava89/">LinkedIn</a>. We’d love to help.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c6d3478bc4f9" width="1" height="1" alt=""><hr><p><a href="https://medium.com/nesterlabs/building-a-high-accuracy-rag-assistant-for-connector-documentation-a-step-by-step-implementation-c6d3478bc4f9">Building a High-Accuracy RAG Assistant for Connector Documentation: A Step-by-Step Implementation…</a> was originally published in <a href="https://medium.com/nesterlabs">Nesterlabs</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Agentic System for Conversational Data Querying and Visualisation]]></title>
            <link>https://medium.com/nesterlabs/agentic-system-for-conversational-data-querying-and-visualisation-fd0dff3bce34?source=rss-24b366bfea93------2</link>
            <guid isPermaLink="false">https://medium.com/p/fd0dff3bce34</guid>
            <category><![CDATA[conversational-ai]]></category>
            <category><![CDATA[query-agents]]></category>
            <category><![CDATA[agentic-ai]]></category>
            <category><![CDATA[nesterlabs]]></category>
            <category><![CDATA[multi-agent-systems]]></category>
            <dc:creator><![CDATA[Kunal Shrivastava]]></dc:creator>
            <pubDate>Mon, 16 Jun 2025 07:33:58 GMT</pubDate>
            <atom:updated>2026-05-01T16:29:41.431Z</atom:updated>
            <content:encoded><![CDATA[<h3>Introduction</h3><p>Imagine asking a complex business question like, “What was our monthly revenue trend over the past year for high-value customers?” — and getting an insightful graph in response, all through a simple conversation.</p><p>Welcome to the world of <strong>Agentic Query &amp; Visualisation Systems</strong> — AI-powered assistants that enable seamless, natural language interaction with data systems. These systems are transforming how users access, explore, and visualise data by combining intent recognition, task-specific agents, and real-time analytics into one cohesive experience.</p><p>This article outlines a modular architecture for designing such a system, focusing on conversational interfaces that support multi-intent queries, dynamic agent orchestration, and secure, real-time data interaction.</p><h3>System Overview</h3><p>At its core, the Agentic Query &amp; Visualisation System acts as an intelligent assistant that understands user queries, identifies the intent behind them, and orchestrates various specialised agents to complete the tasks. Whether the user wants a data report, troubleshooting support, or just general interaction, the system responds with the right tools, insights, or visuals.</p><p>The system is designed for:</p><ul><li><strong>Multi-intent recognition</strong></li><li><strong>Natural language understanding</strong></li><li><strong>Secure database interaction</strong></li><li><strong>Real-time response generation</strong></li><li><strong>Visual output rendering</strong></li></ul><h3>Key Architectural Components</h3><h3>1. Entry Points</h3><p>The system supports multiple user interaction modes:</p><ul><li>A <strong>web interface</strong> that offers a modern chat-like experience with visual output.</li><li>A <strong>CLI interface</strong> for quick tests, scripting, or developer-focused automation.</li></ul><h3>2. Processing Pipeline</h3><p>The system follows a structured flow:</p><ol><li>A user sends a message (text-based query).</li><li>The system analyses the message to determine intent.</li><li>Based on the detected intent, it routes the task to the appropriate specialised agent.</li><li>The selected agent processes the query and prepares a result (e.g., data visualisation, natural language answer).</li><li>The response is formatted and presented back to the user.</li></ol><h3>3. Agents: Task-Specific Intelligence Units</h3><p>Agents are the brainpower behind the scenes. Each agent is purpose-built, has its own capabilities, and is responsible for executing a specific type of task. These agents are modular and can be plugged in or extended easily.</p><p>Here are some of the primary agents in the system:</p><p><strong>Query Agent</strong><br>This is the most advanced agent in the system, tasked with translating natural language questions into executable database queries. It leverages a schema-aware toolset to ensure accuracy and relevance.<br>Key responsibilities include:</p><ul><li>Parsing complex, multi-intent, or nested queries from user input</li><li>Understanding temporal expressions and aggregate concepts like “last quarter” or “average revenue”</li><li>Generating structured queries aligned with the current database schema</li><li>Validating queries for completeness, correctness, and safety</li><li>Executing the queries and retrieving the corresponding data results</li></ul><p><strong>Visualisation Agent</strong>:<br>Once a data query is executed and results are retrieved, the Visualisation Agent steps in to transform those results into meaningful visual outputs. It selects the most appropriate chart or graph type (e.g., bar chart, line graph, pie chart) based on the data’s structure and semantics.<br>Capabilities include:</p><ul><li>Automatically determining the optimal visualisation format based on the query’s aggregation or comparison needs.</li><li>Supporting multiple chart types such as time-series trends, category breakdowns, and comparison plots.</li><li>Generating plots using libraries like Plotly for seamless integration into the UI.</li><li>Enhancing user experience by summarising visuals in plain language.</li></ul><p>For example, if a user asks, “<em>Compare monthly revenue by product category for the last 6 months,</em>” the Visualisation Agent will generate a grouped bar chart showing revenue trends for each category across the requested timeframe, along with a summary insight.</p><p><strong>Conversation Agent</strong><br>A general-purpose dialogue agent that manages casual or off-topic conversation. It enhances user engagement and keeps the interaction smooth between tasks.</p><p><strong>Help Agent</strong><br>Designed to guide users in using the system effectively. It provides onboarding, feature walkthroughs, and answers to “How do I…” style questions.</p><p><strong>Tech Support Agent</strong><br>Handles troubleshooting for system issues, helping users resolve errors, co raise support ticket in the case a query is not answered.</p><p>Each agent operates under a clear <strong>persona</strong>, has defined <strong>skills</strong>, and is capable of reasoning within its scope. The orchestrator ensures the right agent is called at the right time.</p><h3>4. Query Toolchain: The Execution Backbone</h3><p>The system includes a powerful suite of tools that augment the capabilities of agents, particularly the Query Agent. These tools handle parsing, validation, optimisation, and execution of queries, ensuring they are accurate, safe, and efficient.</p><p>Here’s a breakdown of the key tools:</p><ul><li><strong>Multi-Query Parser Tool</strong><br>Deconstructs compound or multi-intent queries into smaller, manageable units. For example, “Show me sales in Q1 and list top-performing regions” gets split into two parallel queries.</li><li><strong>Query Validator Tool</strong><br>Ensures that user queries contain enough concrete details — like dates, timeframes, codes, statuses, or quantities — to be translated into valid and precise database queries. It uses the schema and contextual time awareness to validate the user’s intent and, if necessary, reword ambiguous queries or stop incomplete ones from proceeding.<br>For example:<br>- A vague query like <em>“Show me sales for last month”</em> will be transformed into <em>“Show me sales for the period 01-May-2025 to 31-May-2025.”<br>- </em>An incomplete query like <em>“Get report for region”</em> will be flagged for missing details and the system will prompt the user to specify which region and what type of report is needed.</li><li><strong>Query Generator Tool</strong><br>Translates natural language into query language syntax (e.g., SQL or MongoDB queries etc). It uses both templates and LLM-assisted techniques to ensure accuracy and flexibility.</li><li><strong>Query Analyser Tool</strong><br>Acts as a security and compliance layer. It checks for:<br>- Schema consistency<br>- Access(Read/Write/Delete) violations<br>- Query injection patterns<br>- Query complexity limits</li><li><strong>Query Executor Tool</strong><br> Connects securely to the database, runs the validated query, and fetches results in real-time. It also supports pagination, limits, and result formatting.</li></ul><p>These tools work together to allow natural language interfaces to run powerful, production-grade data queries with speed and confidence.</p><h3>5. Schema Awareness</h3><p>A dynamic <strong>Schema Manager</strong> continuously parses the connected database schema to understand:</p><ul><li>Collections or tables</li><li>Field types and relationships</li><li>Existing indexes</li></ul><p>This allows the system to:</p><ul><li>Provide context-aware query generation</li><li>Offer intelligent auto-complete</li><li>Prevent malformed or unsupported queries</li></ul><h3>Data Flow in Action</h3><p>A typical interaction might look like this:</p><ol><li>The user types: <em>“Compare total sales across all product categories for the past 6 months.”</em></li><li>The system classifies the message as a <strong>DATABASE_QUERY</strong> intent.</li><li>The <strong>Master Orchestrator</strong> invokes the <strong>Query Agent</strong>.</li><li>The agent uses the <strong>Parser</strong>, <strong>Analyser, Validator</strong>, and <strong>Generator</strong> tools to prepare the query.</li><li>The <strong>Executor</strong> runs it and returns results.</li><li>Visualisation agent analyses the result and generates a suitable <strong>visualisation</strong> (e.g., grouped bar chart).</li><li>The <strong>Response</strong> is sent back to the UI in natural language + chart form.</li></ol><h3>Security &amp; Reliability</h3><p>To ensure trust and reliability, the system includes:</p><ul><li><strong>Validation layers</strong> for every query to prevent data leakage or attacks</li><li><strong>Intent fallback mechanisms</strong> to avoid breaking the conversation</li><li><strong>Role-based access controls</strong> to govern what each user can see or do</li><li><strong>Structured logging and alerts</strong> for monitoring and debugging</li></ul><h3>Final Thoughts</h3><p>Agentic Query &amp; Visualisation Systems represent a shift from static dashboards to dynamic, human-centric data interaction. By combining modular agents, intelligent tooling, and natural conversation, these systems empower non-technical users to explore and understand complex data with ease.</p><p>As enterprises continue to move toward data democratisation, the need for such AI-powered systems will only grow. They are not just a technical enhancement — they are a productivity revolution.</p><p><em>Curious how you can build one for your team or platform? Let’s </em><a href="https://www.nesterlabs.com/contact"><strong><em>connect</em></strong></a><em> and explore possibilities.</em></p><p>Say hello @ <a href="https://www.linkedin.com/in/kunalshrivastava89/"><strong>LinkedIn</strong></a> <a href="https://www.linkedin.com/company/nester-labs/"><strong>NesterLabs</strong></a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=fd0dff3bce34" width="1" height="1" alt=""><hr><p><a href="https://medium.com/nesterlabs/agentic-system-for-conversational-data-querying-and-visualisation-fd0dff3bce34">Agentic System for Conversational Data Querying and Visualisation</a> was originally published in <a href="https://medium.com/nesterlabs">Nesterlabs</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>