krishanusinha20 commited on
Commit
9a50bd7
·
verified ·
1 Parent(s): c30a282

Create README.md

Browse files
Files changed (1) hide show
  1. README.md +35 -13
README.md CHANGED
@@ -1,13 +1,35 @@
1
- ---
2
- title: Multi Agent SQL Executer
3
- emoji: 💻
4
- colorFrom: green
5
- colorTo: blue
6
- sdk: gradio
7
- sdk_version: 5.19.0
8
- app_file: app.py
9
- pinned: false
10
- short_description: The Multi-Agent SQL Generator is an AI-powered system design
11
- ---
12
-
13
- Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Multi-Agentic SQL Generator
2
+
3
+ The Multi-Agentic SQL Generator is a modular, multi-step system that translates natural language queries into SQL queries, validates and optimizes them, and then executes them against a SQLite database. The system leverages OpenAI's language models (via a LangGraph workflow) for query understanding, validation, and optimization. It also provides evaluation capabilities using RAGAS metrics (such as context precision and context recall) to assess performance and quality.
4
+
5
+ ## Capabilities
6
+
7
+ - **Natural Language Query Understanding:**
8
+ Converts natural language queries into structured SQL metadata according to a predefined database schema.
9
+
10
+ - **Query Validation:**
11
+ Checks the generated SQL for syntax errors and security risks (e.g., harmful operations like `DROP`, `DELETE`).
12
+
13
+ - **Query Optimization:**
14
+ Optimizes SQL queries for performance, ensuring only the necessary columns, joins, and filtering conditions are included.
15
+
16
+ - **SQL Execution:**
17
+ Executes the optimized SQL query against a SQLite database and returns the results.
18
+
19
+ - **Evaluation with RAGAS Metrics:**
20
+ Evaluates the generated output using metrics like:
21
+ - **Faithfulness:** How closely the output matches the expected result.
22
+ - **Answer Relevancy:** How well the result addresses the user query.
23
+ - **Context Precision:** Whether the query returns only the necessary data.
24
+ - **Context Recall:** Whether the query returns all required data.
25
+
26
+ - **Extensibility and Deployment:**
27
+ Easily integrable with front-end frameworks (e.g., Chainlit) and deployable on platforms like Hugging Face Spaces.
28
+
29
+ ## Installation
30
+
31
+ 1. **Clone the Repository:**
32
+
33
+ ```bash
34
+ git clone https://github.com/yourusername/multi-agent-sql-generator.git
35
+ cd multi-agent-sql-generator