You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+37-41Lines changed: 37 additions & 41 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,29 +1,28 @@
1
+
---
2
+
icon: hand-wave
3
+
---
4
+
1
5
# ChatWithSQL
2
6
3
7
**ChatWithSQL** is a Python library that bridges the gap between natural language queries and SQL databases. Designed for reliability, security, and performance, ChatWithSQL allows developers to leverage advanced Language Learning Models (LLMs) like OpenAI, Gemini, and more to retrieve database data using simple, intuitive natural language prompts.
4
8
5
-
6
9
## 🎯 Why ChatWithSQL?
7
10
8
11
A major risk of Text-to-SQL systems is the potential execution of arbitrary SQL queries, which can result in **unauthorized data access, security vulnerabilities, inefficient query performance, or incorrect query results**. Common mitigations include using restricted roles, read-only databases, and sandboxed environments. However, ChatWithSQL takes this one step further.
9
12
10
-
11
13
ChatWithSQL has implemented a **schema-based validation approach** to ensure that only SQL queries adhering to a predefined schema are generated and executed. This mechanism restricts the scope of data retrieval strictly within the defined parameters, effectively mitigating the risks of arbitrary or malicious queries. Each query is validated against the schema before execution, **guaranteeing compliance and eliminating unauthorized access**.
12
14
13
-
14
15
This unique approach positions ChatWithSQL as a leader in secure and reliable, natural language-driven SQL data retrieval.
15
16
16
-
17
17
## 🚀 Key Features
18
18
19
-
-**Natural Language to SQL**: Translate human-readable prompts into actionable SQL queries.
20
-
-**Schema-Validated Queries**: Ensures only schema-defined queries are executed, mitigating arbitrary query risks.
ChatWithSQL mitigates one of the largest risks of Text-to-SQL systems: **arbitrary query execution**. It employs schema-based validation to restrict query generation within pre-defined parameters. SQL queries are dynamically constructed and validated, ensuring:
@@ -84,20 +81,19 @@ ChatWithSQL mitigates one of the largest risks of Text-to-SQL systems: **arbitra
84
81
2. Parameters are sanitized and validated against expected types.
85
82
3. Arbitrary query execution by LLMs is entirely eliminated.
0 commit comments