How causalinferencelab/lang2sql works
Project type and purpose
• Lang2SQL is an open-source, full-stack Python tool that converts natural-language queries into optimized SQL, leverages DataHub metadata, vector search (FAISS/pgvector), and presents results via a Streamlit web UI (plus CLI).
File structure
• Top-level “cli” and “interface” directories (presentation layer)
• “engine” and “llm_utils” directories (core business logic / LLM orchestration)
• “data_utils” (DataHub API clients) and “db_utils” (DB connectors) (integration/adapters)
• “viz” (visualization components)
• “infra” (deployment scripts, monitoring, observability)
• Docker files and GitHub Actions workflows for containerization and CI/CD
README insights
• Four logical stages: NLP → table search (vector DB) → SQL generation → visualization
• Tech stack: LangGraph for LLM workflows, DataHub for metadata, Streamlit for UI
• CLI commands and environment config