krajnish95 commited on
Commit
875ad9f
·
verified ·
1 Parent(s): 0fc52e5

Upload folder using huggingface_hub

Browse files
soql_dataset.json ADDED
The diff for this file is too large to render. See raw diff
 
soql_dataset_README.md ADDED
@@ -0,0 +1,229 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+
2
+ # SOQL Mega Dataset Documentation
3
+
4
+ This document explains the contents of the **15,000‑record SOQL training dataset**.
5
+ It summarizes **what type of SOQL queries**, **which Salesforce objects**, and **which SOQL features** are included.
6
+
7
+ ---
8
+
9
+ ## 📁 1. Dataset Overview
10
+
11
+ - **File Name:** `soql_dataset_full_15000.json`
12
+ - **Total Records:** 15,000
13
+ - **Format for each entry:**
14
+ ```json
15
+ {
16
+ "instruction": "<plain English instruction>",
17
+ "input": "",
18
+ "output": "<SOQL query>"
19
+ }
20
+ ```
21
+ - Designed specifically for **LLM training** to convert natural language → SOQL.
22
+
23
+ ---
24
+
25
+ ## 📌 2. Salesforce Clouds Covered
26
+
27
+ The dataset includes SOQL examples from **all major Salesforce clouds**:
28
+
29
+ ### ✔ Sales Cloud
30
+ Account, Contact, Lead, Opportunity, OpportunityLineItem
31
+ Product2, Pricebook2, PricebookEntry
32
+ Campaign, CampaignMember, Quote, QuoteLineItem
33
+ Order, OrderItem, Contract, Asset, User
34
+
35
+ ### ✔ Service Cloud
36
+ Case, CaseComment, Solution
37
+ EmailMessage, LiveChatTranscript, LiveChatVisitor
38
+ Entitlement, EntitlementProcess
39
+
40
+ ### ✔ Field Service
41
+ WorkOrder, WorkOrderLineItem
42
+ ServiceAppointment, ServiceResource
43
+ ServiceTerritory, ServiceTerritoryMember
44
+ WorkType, RoutingRule
45
+
46
+ ### ✔ CPQ
47
+ SBQQ__Quote__c, SBQQ__QuoteLine__c
48
+ ContractedPrice, Subscription
49
+
50
+ ### ✔ Marketing / Pardot
51
+ ListEmail
52
+ EmailTemplate
53
+ Pardot_Prospect__c
54
+ MarketingForm__c
55
+
56
+ ### ✔ Commerce Cloud
57
+ Cart__c, CartItem__c
58
+ InventoryItem__c
59
+ ProductCategory__c
60
+
61
+ ### ✔ Experience Cloud
62
+ Network, NetworkMember
63
+ Site, AuthSession
64
+ UserPreference
65
+
66
+ ### ✔ Einstein / AI / Analytics
67
+ PredictionResult__c
68
+ MlRecommendation__c
69
+ EinsteinActivity__c
70
+ Dataset__x
71
+
72
+ ### ✔ Content / Knowledge
73
+ KnowledgeArticleVersion
74
+ Knowledge__kav
75
+ ContentVersion, ContentDocument
76
+
77
+ ### ✔ Security & Metadata
78
+ PermissionSet, PermissionSetAssignment
79
+ AccountShare, ContactShare, OpportunityShare
80
+ CustomMetadata__mdt, CustomPermission__c
81
+ ApexClass, ApexTrigger, Layout
82
+
83
+ ### ✔ Big Objects
84
+ EventArchive__b
85
+ CustomerActivity__b
86
+ LoginHistoryArchive__b
87
+ CaseHistoryArchive__b
88
+
89
+ ### ✔ Custom Objects (examples)
90
+ Invoice__c
91
+ InvoiceLine__c
92
+ CreditMemoLine__c
93
+ ConsumptionRate__c
94
+ Document__c
95
+ ApptBundleAggrDurDnscale__c
96
+
97
+ ### ✔ 200+ Synthetic Platform Objects
98
+ To generalize LLM behavior:
99
+ - SalesObject1 … SalesObject20
100
+ - ServiceObject1 … ServiceObject20
101
+ - CPQObject1 … CPQObject20
102
+ - etc.
103
+
104
+ ---
105
+
106
+ ## 📌 3. SOQL Query Types Covered
107
+
108
+ ### ✔ Basic SELECT Queries
109
+ - Simple equality
110
+ - Numeric comparisons
111
+ - String filters
112
+ - Email filters
113
+ - Null checks (`= NULL`, `!= NULL`)
114
+
115
+ ### ✔ WHERE Clause Variants
116
+ - `LIKE '%keyword%'`
117
+ - `IN (1,2,3)`
118
+ - `INCLUDES ('Value')` (multi-select picklists)
119
+ - Date filters
120
+ - Date literals: `LAST_N_DAYS:30`, `YESTERDAY`, `THIS_YEAR`
121
+
122
+ ---
123
+
124
+ ## 📌 4. Aggregates Included
125
+
126
+ ### ✔ Aggregate Functions
127
+ - `COUNT()`
128
+ - `COUNT_DISTINCT()`
129
+ - `SUM()`
130
+ - `AVG()`
131
+ - `MAX()`
132
+ - `MIN()`
133
+
134
+ ### ✔ GROUP BY / HAVING
135
+ Examples include:
136
+ ```sql
137
+ SELECT StageName, COUNT(Id) FROM Opportunity GROUP BY StageName
138
+ SELECT Industry, SUM(AnnualRevenue) FROM Account GROUP BY Industry HAVING SUM(AnnualRevenue) > 1000000
139
+ ```
140
+
141
+ ### ✔ ROLLUP & GROUPING
142
+ Examples:
143
+ ```sql
144
+ SELECT Industry, Type, SUM(AnnualRevenue) FROM Account GROUP BY ROLLUP(Industry, Type)
145
+ SELECT Industry, GROUPING(Industry) grp FROM Account GROUP BY ROLLUP(Industry)
146
+ ```
147
+
148
+ ---
149
+
150
+ ## 📌 5. Advanced SOQL Features
151
+
152
+ ### ✔ TYPEOF
153
+ Polymorphic queries for WhoId / WhatId:
154
+ ```sql
155
+ TYPEOF Who WHEN Contact THEN LastName, Email WHEN Lead THEN Company END
156
+ ```
157
+
158
+ ### ✔ USING SCOPE ALL ROWS
159
+ Soft-deleted record access.
160
+
161
+ ### ✔ FOR VIEW / FOR REFERENCE / FOR UPDATE
162
+ - `FOR VIEW` (view stats)
163
+ - `FOR REFERENCE` (read-only snapshot)
164
+ - `FOR UPDATE` (record locking)
165
+
166
+ ---
167
+
168
+ ## 📌 6. Relationship Queries
169
+
170
+ ### ✔ Parent → Child Subqueries
171
+ ```sql
172
+ SELECT Name, (SELECT Subject FROM Case WHERE Status = 'New') FROM Account
173
+ ```
174
+
175
+ ### ✔ Semi-Join / Anti-Join
176
+ ```sql
177
+ SELECT Id FROM Account WHERE Id IN (SELECT AccountId FROM Contact)
178
+ SELECT Id FROM Account WHERE Id NOT IN (SELECT AccountId FROM Opportunity)
179
+ ```
180
+
181
+ ### ✔ Deep Multi-Level Chains (3–5 levels)
182
+ Examples include:
183
+ - Account → Contact → Case → CaseComment
184
+ - Account → Contact → Case → FeedItem → FeedComment
185
+ - Account → Opportunity → OpportunityLineItem → Product2
186
+
187
+ ---
188
+
189
+ ## 📌 7. Big Object Queries
190
+
191
+ ```sql
192
+ SELECT Id, EventDate__c FROM EventArchive__b WHERE EventDate__c > 2021-01-01T00:00:00Z
193
+ ```
194
+
195
+ Big objects use **restricted SOQL**, which is represented in the dataset.
196
+
197
+ ---
198
+
199
+ ## 📌 8. Query Variations Included
200
+
201
+ - `ORDER BY`
202
+ - `LIMIT`
203
+ - `OFFSET`
204
+ - `FIELDS(ALL)`
205
+ - Currency conversion: `convertCurrency()`
206
+ - Timezone conversion: `convertTimezone()`
207
+
208
+ ---
209
+
210
+ ## 📌 9. Dataset Goals
211
+
212
+ This dataset was intentionally built to help LLMs learn:
213
+
214
+ 1. Convert plain English instructions → valid SOQL.
215
+ 2. Understand objects, fields, and query patterns.
216
+ 3. Handle complex SOQL operations & multi-object reasoning.
217
+ 4. Work with both standard & custom object patterns.
218
+ 5. Generalize to unseen objects using synthetic ones.
219
+
220
+ ---
221
+
222
+ ## ✔ Final Notes
223
+
224
+ - The dataset intentionally mixes real + synthetic objects to maximize generalization.
225
+ - All SOQL examples are syntactically plausible and demonstrate Salesforce querying concepts.
226
+ - You can safely fine‑tune any LLM or RAG system using this dataset.
227
+
228
+ ---
229
+
soql_dataset_enriched.json ADDED
The diff for this file is too large to render. See raw diff
 
soql_dataset_full_15000.json ADDED
The diff for this file is too large to render. See raw diff