kumar6591 commited on
Commit
ee95e34
Β·
1 Parent(s): 9ae739c

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +100 -0
README.md CHANGED
@@ -16,6 +16,106 @@ openenv validate
16
  ## Description
17
  DataQualityEnv v2 is a budget-constrained, confidence-scored OpenEnv environment where an AI agent performs multi-step SQL auditing and optional fix verification.
18
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
19
  Core loop:
20
  - `reset` β†’ environment generates seeded dirty datasets.
21
  - `query` β†’ agent investigates across one or more tables.
 
16
  ## Description
17
  DataQualityEnv v2 is a budget-constrained, confidence-scored OpenEnv environment where an AI agent performs multi-step SQL auditing and optional fix verification.
18
 
19
+ ## πŸš€ How to Use
20
+
21
+ ### Step 1: Reset the Environment
22
+ Click **"Reset episode"** to start a new task.
23
+
24
+ You will see:
25
+ - task description
26
+ - table schema
27
+ - step budget and query credits
28
+
29
+ ---
30
+
31
+ ### Step 2: Investigate with SQL Queries
32
+
33
+ Run SQL queries to explore the data and identify issues.
34
+
35
+ Examples:
36
+
37
+ ```sql
38
+ SELECT COUNT(*) FROM customers;
39
+
40
+ SELECT SUM(CASE WHEN email IS NULL THEN 1 ELSE 0 END) FROM customers;
41
+
42
+ SELECT customer_id, email, COUNT(*)
43
+ FROM customers
44
+ GROUP BY 1,2
45
+ HAVING COUNT(*) > 1;
46
+ πŸ’‘ Note:
47
+
48
+ Queries help you gather evidence
49
+ They may return small rewards or penalties
50
+ Final scoring does NOT happen here
51
+ Step 3: Submit Audit Report (IMPORTANT)
52
+
53
+ After analysis, submit your findings using:
54
+ Observation json: {
55
+ "null_issues": {
56
+ "email": 12,
57
+ "customer_id": 0
58
+ },
59
+ "duplicate_row_count": 15,
60
+ "near_duplicate_count": 9,
61
+ "confidence": 0.9
62
+ }
63
+ submit: {
64
+ "null_issues": {
65
+ "email": 12,
66
+ "customer_id": 0
67
+ },
68
+ "duplicate_row_count": 15,
69
+ "near_duplicate_count": 9,
70
+ "confidence": 0.9
71
+ }
72
+ πŸ“Œ This step triggers:
73
+
74
+ deterministic grading
75
+ final score calculation (0.0 – 1.0)
76
+
77
+ ⚠️ Important:
78
+
79
+ Running queries alone will NOT produce a final score.
80
+ You must submit a report.
81
+
82
+ Step 4: Fix Phase (Optional)
83
+
84
+ After submitting the report, the environment enters fix phase.
85
+
86
+ You can propose fixes using SQL:
87
+ UPDATE customers SET email = NULL WHERE email = 'UNKNOWN';
88
+ This may improve your score.
89
+
90
+ Step 5: Final Result
91
+
92
+ You will receive:
93
+
94
+ {
95
+ "value": 0.85,
96
+ "done": true
97
+ }
98
+ value β†’ final score
99
+ done β†’ task completed
100
+ πŸ€– Auto Audit Mode
101
+
102
+ You can also click "Auto audit", which:
103
+
104
+ runs multiple diagnostic SQL queries
105
+ generates a report automatically
106
+ submits it before step limit
107
+
108
+ This is the fastest way to test the system.
109
+
110
+ 🧠 Reward System
111
+ Queries may return small penalties (e.g., -0.1) for redundant or low-value actions
112
+ This encourages efficient exploration
113
+ Final score depends ONLY on the submitted report
114
+ ⚠️ Important Notes
115
+ Always submit a report before step limit
116
+ If you don't, the system may auto-submit a fallback report
117
+ Efficient querying leads to better performance
118
+
119
  Core loop:
120
  - `reset` β†’ environment generates seeded dirty datasets.
121
  - `query` β†’ agent investigates across one or more tables.