TABLY: an AI spreadsheet

What did I actually build

A spreadsheet application that democratizes data science through natural language aims to bridges the gap between traditional spreadsheets and enterprise BI tools by combining deterministic calculation engines with probabilistic Large Language Models (LLMs).

Tech Stack

GolangNext.jsTypeScriptMongoDBChart.jsTailwind CSS

Core Innovation: The Neuro-Symbolic Architecture

The system uses LLMs not to guess answers, but to orchestrate rigorous, deterministic tools. This hybrid approach ensures that while the interface is natural language (probabilistic), the execution is mathematical (deterministic), solving the AI hallucination problem.

Key Technical Achievements

1. Custom Formula Compiler & Parser

Built a production-grade formula compilation pipeline from scratch, capable of parsing and executing 200+ Excel-compatible functions.

  • Recursive Descent Parser: Tokenizes formulas into Abstract Syntax Trees (AST)
  • Type-Safe Evaluator: Executes AST nodes with type checking and error handling
  • Circular Reference Detection: Stack-based algorithm prevents infinite loops

2. Multi-Step Query Engine

A revolutionary Chain-of-Thought reasoning system that breaks complex business questions into sequential, deterministic steps.

Multi-Step Query Engine Flow: User query is decomposed by LLM into sequential steps - Calculate Q3 Total, Calculate Q4 Total, Calculate Growth, Sort by Performance

3. Dependency Graph Engine

An advanced topological sorting system that tracks formula dependencies and optimizes recalculation.

Dataset SizeWithout DAGWith DAGImprovement
100 cells12ms3ms4x faster
1,000 cells450ms45ms10x faster
10,000 cells18s420ms43x faster

4. Pivot Table Engine

A complete OLAP (Online Analytical Processing) implementation for multi-dimensional data analysis. Supports grouping, aggregations, filtering, and nested grouping.

Technical Deep Dive: Formula Parser

The parser uses a Recursive Descent approach with operator precedence climbing.

Why this approach? O(n) time complexity, single pass, easy to add new operators, and mirrors mathematical grammar.