Lurker News
Long story short: We (Dataherald) just open-sourced our entire codebase, including the core engine, the clients that interact with it and the backend application layer for authentication and RBAC. You can now use the full solution to build text-to-SQL into your product.

The Problem: modern LLMs write syntactically correct SQL, but they struggle with real-world relational data. This is because real world data and schema is messy, natural language can often be ambiguous and LLMs are not trained on your specific dataset.
Solution: The core NL-to-SQL engine in Dataherald is an LLM based agent which uses Chain of Thought (CoT) reasoning and a number of different tools to generate high accuracy SQL from a given user prompt. The engine achieves this by:
- Collecting context at configuration from the database and sources such as data dictionaries and unstructured documents which are stored in a data store or a vector DB and injected if relevant
- Allowing users to upload sample NL <> SQL pairs (golden SQL) which can be used in few shot prompting or to fine-tune an NL-to-SQL LLM for that specific dataset
- Executing the SQL against the DB to get a few sample rows and recover from errors
- Using an evaluator to assign a confidence score to the generated SQL
The repo includes four services https://github.com/Dataherald/dataherald/tree/main/services:
1- Engine: The core service which includes the LLM agent, vector stores and DB connectors.
2- Admin Console: a NextJS front-end for configuring the engine and observability.
3- Enterprise Backend: Wraps the core engine, adding authentication, caching, and APIs for the frontend.
4- Slackbot: Integrate Dataherald directly into your Slack workflow for on-the-fly data exploration.
Would love to hear from the community on building natural language interfaces to relational data. Anyone live in production without a human in the loop? Thoughts on how to improve performance without spending weeks on model training?

Comments (144) 34 threads

Earlier comments
devd00d1 reply#
I struggle to see why chatgpt can't do this already?
badgersnake1 reply#
Then you haven’t used it very much.
saigal1 reply#
Yes totally agree. You can easily sniff out products that are simple wrap of GPT
yard20101 reply#
Wouldn't a full featured OS GUI be a simple wrap of the command line? Would this make it less valuable to have?

Continue this thread — 1 reply

akch2 replies#
Not finding the license anywhere. Which one have you chosen?
aazo111 reply#
Hi -- the license is Apache 2.0
numlocked1 reply#
Is that documented somewhere? The "contributing" link in the readme also 404s. I would definitely need to understand the licensing and how contributing works before I could consider integrating this (and I would definitely consider it!). Cool stuff.
saigal2 replies#
We'll make the licensing more visible. Stay tuned in a few minutes.

Continue this thread — 2 replies

threesevenths1 reply#
Guess it's public domain since there is no license
munk-a1 reply#
Just for future reference - if no license is given it's unlicensed. Licensing defaults closed for extremely good reasons - that's one of the reasons why github had a strong push for users to assign appropriate licensing documents to repositories a while back and declare those licenses in machine readable forms (if applicable).
saigal#
Apache 2.0.
tootie1 reply#
Is the only LLM support OpenAI?
saigal#
"The agent is LLM agnostic and you can use it with OpenAI or self-hosted LLMs."
kwerk2 replies#
Will it work with GraphQL?
aazo11#
Currently does not but looking to add support. Would love to connect and learn more about your use case.
saigal#
No

Load more comments