# Natural language to mongodb query with T5

**URL:** </static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fnatural-language-to-mongodb-query-with-t5%2F34232%3E%5C
**Category:** Models\
**Created:** [March 20, 2023, 3:17pm UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fnatural-language-to-mongodb-query-with-t5%2F34232 "2023-03-20T15:17:47Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![MihoZaki](https://avatars.discourse-cdn.com/v4/letter/m/da6949/32.png) [@MihoZaki](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2FMihoZaki)%5C
**Post date:** [March 20, 2023, 3:17pm UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fnatural-language-to-mongodb-query-with-t5%2F34232%2F1 "2023-03-20T15:17:47Z")

</div>

First of all i have to clarify that I’m pretty new to transformer models, and hugging face, so while I did my best to learn about it I still consider myself a beginner. Anyway, back to the main topic of my question, I wanted to fine tune a model for the task of going from natural language to mongodb ( a similar task is usually done with SQL), transformer pretrained models are usually used for such tasks so I wanna use T5. I’ve already made a dataset for what I wanna implement but since I’m new to all of this, there are a few doubts I hope you can clear, I’m still learning so my bad if I mix stuff (and thanks in advance):

- is this considered a fine tuning or transfer Learning? (I still can’t tell when to use each one)
- In a way this task is basically a machine translation one, so I’d like to think fine tuning would be the way to go.
- for the sql version of this task, models are usually pretrained on wide range of datasets of which is wikisql, but in my case I don’t think they were pretrained with anything mongodb related and I was wondering if that would affect my models accuracy? If yes would that mean I’ll have to retrain the model then fine tune it?
- I’d love if you could provide me with good resources I can use.  
Note: I’ve already started fine tuning T5 on this task so the answers will be reassuring.  
Have a nice day.

---

<div class="post-metadata">

**Author:** ![Cybic](https://avatars.discourse-cdn.com/v4/letter/c/b77776/32.png) [@Cybic](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2FCybic)%5C
**Post date:** [June 20, 2024, 6:31am UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fnatural-language-to-mongodb-query-with-t5%2F34232%2F2 "2024-06-20T06:31:47Z")

</div>

Hey MihoZaki, I’m working on the same problem statement. How much progress have you made till now on this?

---

<div class="post-metadata">

**Author:** ![abboudtest](https://avatars.discourse-cdn.com/v4/letter/a/2acd7d/32.png) [@abboudtest](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2Fabboudtest)%5C
**Post date:** [July 25, 2024, 9:29am UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fnatural-language-to-mongodb-query-with-t5%2F34232%2F3 "2024-07-25T09:29:28Z")

</div>

I am working on the same task on microsoft/phi-2, I wonder if you can share with me your dataset because I have synthetic small one (~30 question).

I will share the code with you soon.
