# Data Augmentation using LLMs

**URL:** </static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fdata-augmentation-using-llms%2F168346%3E%5C
**Category:** Research\
**Created:** [September 12, 2025, 9:49pm UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fdata-augmentation-using-llms%2F168346 "2025-09-12T21:49:05Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![AylinNaebzadeh](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/aylinnaebzadeh/32/52343_2.png) [@AylinNaebzadeh](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2FAylinNaebzadeh)%5C
**Post date:** [September 12, 2025, 9:49pm UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fdata-augmentation-using-llms%2F168346%2F1 "2025-09-12T21:49:05Z")

</div>

Dear HuggingFace Community,

I am interested in exploring how large language models (LLMs) handle **session-based and sequential data understanding** in the context of SQL queries. Most existing datasets only provide a single query paired with its label, but I would like to investigate whether we can **augment public datasets** to better capture sequential interactions.

For example, consider the [SQLShield dataset](https://huggingface.co/datasets/salmane11/SQLShield), which follows the structure below:

| question | query | context | malicious |
| --- | --- | --- | --- |
| What is the description of the claim status “Open”? | SELECT claim\_status\_description FROM claims\_processing\_stages WHERE claim\_status\_name = ‘Open’; | CREATE TABLE claims\_processing\_stages ( claim\_status\_description VARCHAR, claim\_status\_name VARCHAR ); | 0 |
| SELECT AVG(Snatch) FROM body\_builder | SELECT AVG(Snatch) FROM body\_builder; | CREATE TABLE body\_builder ( Snatch INTEGER ); | 0 |

My idea is to provide an LLM with some of these records at random and, through carefully designed prompts, ask it to **generate a sequence of related queries** that can represent a session. But, I could not find a similar research, blog post, etc. I will be grateful if you had seen one and share it with me.

I’d love to hear your thoughts:

- Do you see this as a valuable contribution?
- Do you have other suggestions or approaches for enriching datasets in this way?

---

<div class="post-metadata">

**Author:** ![John6666](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/john6666/32/27664_2.png) [@John6666](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2FJohn6666)%5C
**Post date:** [September 13, 2025, 2:52am UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fdata-augmentation-using-llms%2F168346%2F2 "2025-09-13T02:52:16Z")

</div>

> Do you see this as a valuable contribution?

Yeah. [Seems promising](https://huggingface.co/datasets/John6666/forum1/blob/main/llms_session_data.md).

---

<div class="post-metadata">

**Author:** ![juhoinkinen](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/juhoinkinen/32/32436_2.png) [@juhoinkinen](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2Fjuhoinkinen)%5C
**Post date:** [September 18, 2025, 8:40am UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fdata-augmentation-using-llms%2F168346%2F3 "2025-09-18T08:40:17Z")

</div>

We used a similar approach in a different topic area ([LLMs4Subjects competition](https://sites.google.com/view/llms4subjects/)):

> **3.2 Synthetic training data**
> 
> We found that the number of training records provided was quite small compared to the size of the subject vocabulary, so we used the Llama-3.1-8B-Instruct LLM to generate additional synthetic training records. We presented the LLM with each of the existing train records (its title and abstract) at a time along with its manually assigned subject labels (GND preferred terms in either German or English, matching the language of the document). We then asked the LLM to generate a similar record with the same set of subjects plus one additional, randomly chosen preferred term from the GND (step 2 in Figure [1](https://arxiv.org/html/2504.19675v2#S3.F1); see also example in Figure [4](https://arxiv.org/html/2504.19675v2#A4.F4) in Appendix [D](https://arxiv.org/html/2504.19675v2#A4)). This additional subject caused the LLM to generate a novel record, not just to rephrase the given example, and also helped to expand the subject coverage of the training data set to new GND subjects.

See the report at [Annif at SemEval-2025 Task 5: Traditional XMTC augmented by LLMs](https://arxiv.org/html/2504.19675v2)

---

<div class="post-metadata">

**Author:** ![AylinNaebzadeh](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/aylinnaebzadeh/32/52343_2.png) [@AylinNaebzadeh](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2FAylinNaebzadeh)%5C
**Post date:** [October 8, 2025, 11:36pm UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fdata-augmentation-using-llms%2F168346%2F4 "2025-10-08T23:36:27Z")

</div>

Thank you for your answer and time!

---

<div class="post-metadata">

**Author:** ![AylinNaebzadeh](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/aylinnaebzadeh/32/52343_2.png) [@AylinNaebzadeh](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2FAylinNaebzadeh)%5C
**Post date:** [October 8, 2025, 11:38pm UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fdata-augmentation-using-llms%2F168346%2F5 "2025-10-08T23:38:40Z")

</div>

Great! Some other friends told me to also look in similar research topic but other domains!  
Recently I found a public session based query dataset and thinking about just adding some malicious queries in sessions… Hope it can be done!
