<?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[Nesterlabs - Medium]]></title>
        <description><![CDATA[Nesterlabs publication - Medium]]></description>
        <link>https://medium.com/nesterlabs?source=rss----bcf8316e193b---4</link>
        <image>
            <url>https://cdn-images-1.medium.com/proxy/1*TGH72Nnw24QL3iV9IOm4VA.png</url>
            <title>Nesterlabs - Medium</title>
            <link>https://medium.com/nesterlabs?source=rss----bcf8316e193b---4</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 05 Dec 2026 19:10:35 GMT</lastBuildDate>
        <atom:link href="https://medium.com/feed/nesterlabs" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <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----bcf8316e193b---4</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>Fri, 01 May 2026 16:29:40 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>
        <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----bcf8316e193b---4</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>Fri, 01 May 2026 16:29:29 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[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----bcf8316e193b---4</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>Fri, 01 May 2026 16:29:16 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[nCompose: Compressing the Figma-to-Code Round-Trip]]></title>
            <link>https://medium.com/nesterlabs/ncompose-compressing-the-figma-to-code-round-trip-e9709466d200?source=rss----bcf8316e193b---4</link>
            <guid isPermaLink="false">https://medium.com/p/e9709466d200</guid>
            <category><![CDATA[figma]]></category>
            <category><![CDATA[design-to-code]]></category>
            <category><![CDATA[generative-ui]]></category>
            <category><![CDATA[figma-to-code]]></category>
            <category><![CDATA[ai]]></category>
            <dc:creator><![CDATA[Kunal Shrivastava]]></dc:creator>
            <pubDate>Fri, 01 May 2026 16:22:55 GMT</pubDate>
            <atom:updated>2026-05-01T16:22:56.894Z</atom:updated>
            <content:encoded><![CDATA[<p><em>By </em><a href="https://www.linkedin.com/in/ayush-raj-295099261/"><em>Ayush</em></a><em>, </em><a href="https://www.linkedin.com/in/pooja-rani-15871b3b5/"><em>Pooja</em></a><em>, </em><a href="https://www.linkedin.com/in/johnhoro/"><em>John</em></a><em>, </em><a href="https://www.linkedin.com/in/abishekuxd/"><em>Abishek</em></a><em> — </em><a href="https://nesterlabs.com/"><em>Nester Labs</em></a></p><p>Here’s a job most frontend teams have done at least once. A designer hands you a Figma file with a full design system inside (buttons, inputs, cards, modals, navigation, charts, the lot) and it has to ship into a React web app, a Vue marketing site, and a Svelte dashboard. None of it is hard. All of it is slow. You spend a week pulling values out of the inspector, naming modifier classes, exporting icons, fixing the same bug in three frameworks. By Friday you’re not even mad, just bored.</p><p>The “just point Claude Code or Codex at it” route looks like the obvious shortcut. Sometimes it is. But if you’ve actually tried it on real components, you know how it goes. The model invents class names that don’t match your tokens, drifts on text, picks the wrong element, forgets a hover state, makes up a padding value that looks plausible and isn’t in the source. The output is close enough to feel useful and different enough that you read every line. The review pass eats whatever the generation saved.</p><p>We learned this the hard way. The first version of nCompose was basically “send the Figma JSON to a model and hope.” It demoed great. It shipped nothing. Every component still needed a human to fix it, and we were tired of being that human.</p><p>So we rebuilt it around a different idea: stop asking the LLM to do work the LLM is bad at. Anything that can be computed from the Figma data, like variant CSS, BEM class names, icon dedup, and chart structure, gets computed. The LLM only handles the parts that actually need interpretation: which element is semantically a button, how props map to modifiers, where text belongs. And whatever still slips through gets caught by a validator loop that feeds the errors back until the output passes. Three layers, each doing the part it’s actually good at.</p><p>The result is a pipeline that takes a Figma URL and gives you working components for React, Vue, Svelte, Angular, and Solid in a single pass. The rest of this article is how it’s built. The repo is <a href="https://github.com/nesterlabs-ai/nCompose/">nesterlabs-ai/nCompose</a>, MIT-licensed.</p><h3>Where the time really goes</h3><p>If you’ve hand-converted a Figma component before, you already know the time sinks:</p><ul><li>Reading colors, paddings, radii, and shadows out of the inspector and typing them into CSS.</li><li>Naming the variant axes and writing the conditional class logic.</li><li>Exporting icons one variant at a time, then noticing three of them are the same file.</li><li>Re-checking text and structure against the design after the LLM (or you) drifted from the source.</li><li>Doing it all again for Vue because the backend team picked Nuxt.</li></ul><p>nCompose chips at every one of these. CSS comes from Figma data, not from a model. Variants are parsed structurally. Icons are exported across all variants and deduped by shape and position. Text content is validated against the source. The multi-framework output is essentially free, because the pipeline emits one intermediate representation that compiles to all five targets.</p><p>None of this is magic. The savings are just what happens when you move work out of the LLM and into deterministic code. Fewer retries, fewer hand-fixes, no more “why did it rename my class.”</p><h3>How the routing works</h3><p>Every input gets sent down one of four branches, depending on what the URL actually points to:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/831/1*M1iKI6r_yFQe5eQZbvD2mg.png" /></figure><p>All four eventually produce either a Mitosis .lite.tsx source (which compiles to the five frameworks), or, for charts, a React component generated directly. The branches differ in how they parse the Figma data and what they hand the LLM.</p><p>The reason for splitting them up is that each problem has different determinism guarantees. A variant set is a tractable diff. An arbitrary card is not. A chart from data points is fully programmatic. Treating them as one problem is what makes naive Figma-to-code tools brittle, so we don’t.</p><h3>PATH A: Component sets</h3><p>This is the path that saves the most time, because variant sets are where the manual tax is highest. A component set is one component with multiple variants organized along axes. A button with Style × Size × State and reasonable values gets you 40+ variants, easy. By hand, that&#39;s &quot;write the base, add every modifier, test every combination.&quot; It&#39;s the most boring kind of work in frontend.</p><p>The parser in src/figma/component-set-parser.ts automates it in five steps:</p><ol><li><strong>Identify axes.</strong> It looks for an axis literally named State, or detects a state axis when two or more values match known state keywords (hover, focus, disabled, checked, etc.). Compound names like &quot;Error-Hover&quot; or &quot;Filled in - Active&quot; get split correctly. There are 30+ patterns it understands, mostly because real designers name things in 30+ ways.</li><li><strong>Classify states.</strong> Each variant value gets mapped to a CSS selector or data attribute. Hover becomes :hover:not([disabled]), Disabled becomes [disabled], Checked becomes [data-checked]. Compound states split into a boolean condition plus a pseudo-class.</li><li><strong>Compute the variant spec.</strong> The system walks all the variants property by property. Anything identical across every variant becomes the base. Anything that changes goes into a per-axis diff. No manual schema. A button’s shared border-radius lives in base; its background color (which differs between Primary and Secondary) lives in the Style axis.</li><li><strong>Build BEM CSS.</strong> The output is strict BEM:<br>Some small but useful behaviours get layered on automatically. :hover and :active get a :not([disabled]) guard, spinner children get an auto-generated @keyframes spin, and behavioral CSS like cursor: pointer and transition shows up based on the detected category. None of this is interesting to write by hand and all of it gets forgotten exactly when you need it.</li><li><strong>Collect assets across variants.</strong> Icons are exported from every variant, not just the default, then deduped by position + SVG path content + color. The most common color gets the clean filename. A 40-variant button that visually contains four unique icons exports four files, not 160.</li></ol><p>The LLM’s job in PATH A is small: take the pre-generated class names, the default variant YAML, and a list of which icons appear in which variants, and produce a Mitosis component that wires props and states to the right BEM modifiers. <strong>It doesn’t write CSS, and it doesn’t invent class names.</strong> That single boundary is most of the reason PATH A behaves predictably.</p><h3>PATH B: Single nodes</h3><p>Cards, modals, navbars, individual icons, anything that isn’t a variant set or a page, all go through a simpler serializer in src/convert.ts. The serializer turns the raw Figma node into CSS-ready YAML covering auto-layout, sizing modes, fills, strokes, effects, text, and absolute positioning.</p><p>A few non-obvious decisions are baked in, all of them earned the hard way:</p><ul><li><strong>Suppress fixed pixel dimensions when a sizing mode is set.</strong> If an element is set to fill the container, emitting width: 1440px would tempt the LLM into rigid fixed-width CSS that breaks the moment the viewport changes.</li><li><strong>Suppress height on auto-layout containers with children.</strong> Their height comes from content + padding + gap, not a number.</li><li><strong>Detect input-like frames</strong> by checking horizontal layout, visible strokes, sensible aspect ratio, and TEXT children. When detected, the serializer emits a wrapper-plus-&lt;input&gt; structure. Figma frames that look like inputs have to compile to actual &lt;input&gt; elements, not styled divs that someone has to fix later.</li><li><strong>Convert exported SVG assets into compact </strong>ICON<strong> markers</strong> instead of serializing whole subtrees. The LLM sees &lt;Icon src=&quot;./assets/x.svg&quot;&gt; and emits the right &lt;img&gt; tag.</li></ul><p>There’s also a fast path. With template mode on, PATH B first scans for known shadcn/ui primitives (checkbox, radio, button, input, dropdown, toggle) and structural components (sidebar, table). When it finds one, it generates React + Tailwind directly from a shadcn template. No Mitosis intermediate, no LLM-authored markup. If nothing matches, it falls back to the standard pipeline. For primitives whose structure is already known, a deterministic generator beats any model.</p><h3>PATH C: Multi-section pages</h3><p>Full pages get split before they get generated. Detection uses six complementary signals: name heuristics on the root frame, vertical auto-layout with fill-width children, size-based thresholds, three-or-more wide children, chart-cluster detection, and the nested card pattern that shows up in basically every dashboard design.</p><p>Once a page is detected, sections get processed in parallel. A Component Set section runs PATH A. A chart section runs the Recharts codegen. Compound sections with multiple child frames get specialized handling. Everything else runs a PATH B prompt with extra context about its neighbors (previous and next section names, page width, gap, padding) so the sections actually line up visually instead of looking like five strangers in a Zoom call.</p><p>The stitcher in src/compile/stitch.ts then merges JSX and CSS, hoists nested Component Set references into imports, inlines chart components, and sorts out naming collisions. If the stitched result fails to parse through Mitosis, the pipeline falls back to monolithic LLM generation as a safety net.</p><p>The reason for splitting first is straightforward. A 12-section landing page won’t fit cleanly into one prompt, and even if it did, one bad section would tank the whole output. Doing the sections in isolation means a broken hero doesn’t take down the footer.</p><h3>Charts</h3><p>Charts are the cleanest “the LLM should not be writing this” case in the codebase, so they get their own bypass.</p><p>Detection in src/figma/chart-detection.ts looks for arc segments (pie/donut), grid lines plus axis labels (bar/line/area), connected paths with data point markers, and chart-like names. When something is recognized as a chart, the LLM is used only to extract metadata (chart type, data points, labels, colors, dimensions) and the actual component is assembled programmatically from a config map:</p><pre>pie/donut → PieChart   + Pie  + Cell + Tooltip + Legend<br>bar       → BarChart   + Bar  + XAxis + YAxis + CartesianGrid + Tooltip<br>line      → LineChart  + Line + XAxis + YAxis + CartesianGrid + Tooltip<br>area      → AreaChart  + Area + XAxis + YAxis + CartesianGrid + Tooltip</pre><p>The output is a working Recharts component. The LLM never touches the JSX. For charts component(multiple chart variants), each variant produces its own chart function and a wrapper renders all of them in a grid. Charts found inside a PATH C page get stitched into the final page output alongside the rest.</p><h3>Mitosis as the intermediate representation</h3><p>If you want to target React, Vue, Svelte, Angular, and Solid from one source, you either write five generators or you find one. nCompose uses <a href="https://github.com/BuilderIO/mitosis">Mitosis</a>: a .lite.tsx file gets parsed into an IR and emitted as framework-specific code.</p><p>The catch is that Mitosis enforces a restricted JSX dialect, and if you violate it, parsing fails. The project’s CLAUDE.md lists the rules:</p><ul><li>class, not className</li><li>No .map() in JSX. Use &lt;For each={...}&gt;</li><li>No ternary expressions returning JSX. Use &lt;Show when={...}&gt;</li><li>css={{}} values must be plain string literals (no expressions, no template literals)</li><li>All numeric CSS values need units</li><li>The store variable must be named state and come from useStore()</li><li>Event handler parameters must be named event</li></ul><p>These rules are unusual enough that they live in the system prompt and get re-checked on every retry. They also explain a specific architectural choice: PATH A uses class={state.classes} with a useStore getter rather than css={{}}, because the latter can&#39;t hold a conditional expression and we needed conditionals for variant logic.</p><p>After parsing, Mitosis runs with explicit per-framework configs:</p><p>The deterministic CSS gets injected into each output: a &lt;style&gt; block for React/Solid, &lt;style scoped&gt; for Vue, a &lt;style&gt; block appended for Svelte, styles: [...] in the Angular @Component decorator. Google Fonts referenced in the CSS get an @import prepended automatically.</p><p>The payoff is what you’d hope: one generation pass, five framework-native files. The React app, the Vue admin panel, and the Svelte marketing site all get the same component without three runs of the same pipeline.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*7t1I7i5Sawa6OGpcv9CUCw.png" /></figure><h3>The retry loop</h3><p>The LLM call sits inside a retry loop with up to three attempts plus a fallback:</p><ol><li>Send system + user prompt.</li><li>Strip markdown fences, fix missing Mitosis imports.</li><li>Run parseJsx(). If it fails, feed the parse error back as the next user message.</li><li>If it parses, run validators.</li></ol><p>The validators in src/compile/ are where &quot;did it actually match the design&quot; gets answered:</p><ul><li>a11y-validate renders the JSX in jsdom and runs axe-core. Only serious/critical WCAG violations trigger a retry. The minor stuff isn&#39;t worth the round-trip.</li><li>bem-validate checks that every static class name in the JSX exists in the stylesheet, and vice versa. This is the one that catches the LLM inventing class names that the deterministic CSS pass didn&#39;t emit.</li><li>semantic-validate checks that the chosen HTML element matches the detected component category. A button frame should compile to &lt;button type=&quot;button&quot;&gt;, not &lt;div&gt;.</li><li>css-fidelity-validate checks CSS property coverage against the Figma node&#39;s actual values.</li><li>text-fidelity-validate checks that text content from the Figma source actually shows up in the output.</li><li>layout-fidelity-validate checks CSS class coverage for child elements.</li></ul><p>When a validator fails, the error gets formatted as feedback and sent as the next turn. On the final attempt, the result is returned even if validators are still complaining. A hard failure is worse than an imperfect render with a fidelity report attached, and we’d rather you have something to look at than nothing.</p><p>The fidelity report is written next to the output as ComponentName.fidelity.json. If BEM, text, and semantics all pass, you can skim instead of read line by line.</p><h3>The web UI</h3><p>Beyond the CLI, there’s a browser-based environment that turns the conversion into something you can actually iterate in:</p><ul><li><strong>Live preview via WebContainer.</strong> Boots a Vite dev server in the browser with hot module replacement. Edits in the Monaco editor sync to the preview live. If the in-memory session expires (1-hour TTL), the server falls back to reading from output/ on disk and rehydrates.</li><li><strong>Server-side static preview</strong> as a second tier. A standalone HTML page using React CDN + Babel for in-browser JSX transpilation, including a variant grid for Component Set results (cartesian product of prop axes × state entries, each labeled).</li><li><strong>Inline offline preview</strong> as a third tier. When the server session is gone entirely, the client reconstructs the preview from localStorage with assets converted to data URIs.</li><li><strong>Visual edit mode.</strong> Click any element in the preview and the iframe sends its tag, computed styles, bounding rect, and a data-ve-id to the parent over postMessage. From there you can either describe a change in natural language (which gets enriched with the element metadata before hitting the LLM) or edit CSS properties directly. Direct property edits patch the CSS by selector match without going through the LLM at all.</li><li><strong>Chat-based refinement.</strong> Iterate on the code by chatting. An intent classifier (classifyMessageIntent()) runs first; conversational messages like &quot;thanks&quot; or &quot;what does this do&quot; return a chat reply without invoking the Mitosis pipeline. A quick &quot;make the button bigger&quot; doesn&#39;t pay the same round-trip cost as a structural change.</li><li><strong>Project persistence.</strong> All project state (code, assets, chat history, UI state) saved to localStorage with quota protection that progressively strips assets and the oldest projects when storage runs out.</li><li><strong>Template wiring.</strong> Wire the generated component into a starter app with Tailwind, a cn() utility, and CSS variables. Download as a zip, or push to GitHub via OAuth.</li></ul><h3>What we ended up believing</h3><p>After living in this code for a while, four convictions stand out:</p><ul><li><strong>Determinism first, LLM second.</strong> Anywhere a value can be computed from Figma data (variant CSS, icon dedup, page layout flex properties, charts), it should be. The LLM is reserved for the part that genuinely needs interpretation: choosing semantic HTML, mapping props to modifiers, deciding what’s a button vs a div. That single rule produced more than half the quality wins.</li><li><strong>An IR a model can actually produce.</strong> Mitosis’s restricted dialect is annoying for humans, but it’s a much smaller, more constrained target than “valid React + valid Vue + valid Svelte.” One generator producing one dialect is more reliable than five generators producing five.</li><li><strong>Validators as a feedback channel, not a gate.</strong> Failing validators feed errors back to the LLM as the next turn instead of blocking output. The fidelity report is the audit trail; you decide how strict you want to be.</li><li><strong>Progressive degradation everywhere.</strong> WebContainer → server preview → inline preview. In-memory session → disk fallback. Stitched page → monolithic page. Mitosis → React-direct (shadcn). Each layer has a working fallback below it, so partial failure produces a usable result instead of nothing.</li></ul><p>These are the choices that shape what working with the tool actually feels like. Less time copying values out of the inspector. Less time hand-writing variant CSS. Less time exporting icons one by one. Less time porting the same component to a second framework. The LLM is a swappable component; the routing, the deterministic CSS generation, the validator loop, and the fallback chains are the part doing the work.</p><h3>Trying it</h3><p>The project lives at <a href="https://github.com/nesterlabs-ai/nCompose">github.com/nesterlabs-ai/nCompose</a>. It needs Node 22+ and at least one LLM API key. DeepSeek recommended, with Anthropic and OpenAI also wired in.</p><pre>git clone https://github.com/nesterlabs-ai/nCompose.git<br>cd nCompose<br>npm install<br>npm run dev -- serve</pre><p>Or use the CLI directly:</p><pre>npm run dev -- convert &quot;https://www.figma.com/design/XXXX/...?node-id=123-456&quot; \<br>-f react,vue,svelte \<br>--llm deepseek \<br>-o ./output</pre><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 to help the frontend and design-tooling community build better Figma-to-code pipelines, and to share what we’ve learned about pairing deterministic codegen with LLMs in production.</p><ul><li><a href="https://github.com/nesterlabs-ai/nCompose"><strong>GitHub</strong></a><strong> | </strong><a href="https://github.com/nesterlabs-ai/nCompose/blob/main/README.md"><strong>Docs</strong></a><strong> | </strong><a href="https://drive.google.com/file/d/1c9SmTr1rlxcKBB9T1rBP1hMrCPuYz1C0/view?usp=sharing"><strong>Demo</strong></a></li><li><strong>Issues and contributions:</strong> open an issue if something breaks or a Figma file produces strange output. PRs welcome, especially for new framework targets, additional shadcn primitives, or chart types we haven’t covered yet.</li><li><strong>Enterprise support and custom builds:</strong> if your team needs private deployment, a custom design-system integration, or help wiring nCompose into an existing toolchain, reach out to the Nester Labs(<a href="/service/mailto:contact@nesterlabs.com">contact@nesterlabs.com</a>) team.</li></ul><p>If you ship something interesting on top of it, we’d genuinely like to hear about it. The most useful feedback so far has come from people running the pipeline on real production design systems and telling us where it broke.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e9709466d200" width="1" height="1" alt=""><hr><p><a href="https://medium.com/nesterlabs/ncompose-compressing-the-figma-to-code-round-trip-e9709466d200">nCompose: Compressing the Figma-to-Code Round-Trip</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>