function NLQScreen() { const [query, setQuery] = useState("Show revenue by state for the last quarter"); const [ran, setRan] = useState(true); const [thinking, setThinking] = useState(false); const run = () => { setThinking(true); setRan(false); setTimeout(() => { setThinking(false); setRan(true); }, 700); }; const stateVals = Object.fromEntries(STATES.slice(0, 10).map(s => [s.code, s.value])); return (
Natural Language Query · Powered by vyapar-agent-v3

Ask your data anything.

Type a question in plain English or हिन्दी. VyaparBI generates the query, runs it across your data sources, and returns a dashboard with citations.

{/* Big search */}
{ setQuery(e.target.value); setRan(false); }} onKeyDown={e => e.key === 'Enter' && run()} placeholder="Show revenue by state for the last quarter" style={{ flex: 1, border: 'none', outline: 'none', background: 'transparent', fontSize: 17, color: 'var(--ink)', fontFamily: 'inherit', padding: '0 4px' }} />
{NLQ_EXAMPLES.map((ex, i) => ( ))}
{thinking && (
Understanding your question…
→ Detected intent: aggregate · dimension: state · metric: revenue
→ Time filter: last quarter (Q2 FY26)
→ Selecting semantic layer: Finance.RevenueDaily
→ Executing query on ClickHouse…
)} {ran && !thinking && (
{/* Interpretation */}
I understood this as:
Sum of revenue collection grouped by state, filtered to Q2 FY 2025–26
state_revenue_daily 218ms · 12,442 rows scanned
{/* Generated dashboard */}
Auto-generated dashboard Generated in 1.2s
Total Revenue — Q2
₹2,568Cr
+9.4% vs Q1
Top state — Maharashtra
₹342Cr
+14.2% · 13.3% of total
Fastest growth — Delhi NCR
+22.1%
vs Q1 FY26

Revenue by State — Q2 FY26

s.value)} labels={STATES.slice(0, 10).map(s => s.code)} h={280} format={v => `₹${v}`} showValue color="var(--primary)"/>

Geographic View

Detailed breakdown

{STATES.slice(0, 8).map((s, i) => ( ))}
Rank State Revenue (Cr) Active Tenders YoY Change Trend
{i + 1} {s.name} · {s.code} {s.value.toFixed(1)} {s.tenders} = 0 ? 'var(--ok)' : 'var(--danger)', fontWeight: 600 }}>{fmtPct(s.delta)} v + i * 2)} w={80} h={22} stroke={s.delta >= 0 ? 'var(--ok)' : 'var(--danger)'}/>
{/* Ask follow-up */}
Follow up: {["Show me quarter-over-quarter", "Filter to only IT category", "Compare vs last year", "Which vendors drove this?"].map((f, i) => ( ))}
)}
); } window.NLQScreen = NLQScreen;