Page 1 of 2
what espressif is hidding, or what AI knows and i dont
Posted: Sun May 18, 2025 7:47 pm
by chegewara
Dont get it seriously, please. I am playing with AI and this is what one LLM "told me"
So to "clarify", we should have by now
- esp32-H3 with WIFI 7 support, when we can see some samples?
- esp32-s4 - let say it is P4, so this one can be "not so hidden"

- Screenshot from 2025-05-18 21-42-08.png (127.83 KiB) Viewed 925 times
Re: what espressif is hidding
Posted: Sun May 25, 2025 7:29 pm
by chegewara
I am wondering, is there any chance that espressif team could train AI LLM model specifically with esp-idf and maybe arduino-esp32 API?
Or maybe some skilled esp32 passionate is working on something like that?
Thanks
Re: what espressif is hidding
Posted: Mon May 26, 2025 7:01 am
by Sprite
The AI actually should be trained on most of the public documentation.
Re: what espressif is hidding, or what AI knows and i dont
Posted: Tue May 27, 2025 3:38 am
by chegewara
Yeah, but i thought about something more "specialized" with espressif API and examples. Maybe smaller LLM etc
Here is simple example code mostly generated by chatGPT. I wanted to test AI and esp32-p4 with 3D animation
https://github.com/chegewara/esp32-p4-3d-rendering
https://www.youtube.com/watch?v=jaJaxh8C8lA
PS even if its easy to write hardware agnostic code, with esp-idf API there is problem; AI is hallucinating too much, even if chatgpt has access to most recent API and examples on github AI cant write USB host code
Re: what espressif is hidding, or what AI knows and i dont
Posted: Tue May 27, 2025 12:18 pm
by MicroController
AI is hallucinating too much, even if chatgpt has access to most recent API and examples on github AI cant write USB host code
Current AIs don't 'understand' API documentation or the like; they need to be trained via a myriad of examples. And that's the problem: If the AI had access to 1000 different example programs for ESP-IDF USB host in its training set, it could potentially generate useful code for this use case. The lack of a sufficiently large, specialized set of training data may be the major road block here.
Re: what espressif is hidding, or what AI knows and i dont
Posted: Wed May 28, 2025 1:06 am
by mikemoy
even if chatgpt has access to most recent API and examples on github AI cant write USB host code
Maybe it's the AI model your using can't.
I've asked it
can you give me an example of a ESP32-S3 in IDF to act as a host
AN it spit out the code, and I copied and pasted it and worked just fine.
Re: what espressif is hidding, or what AI knows and i dont
Posted: Wed May 28, 2025 1:59 am
by chegewara
Sure, some code chatGPT gave me was fine, some was just, let say, imagination how API should looks like.
Of course i asked another LLM to fix the code and this time LLM found which API is not espressif, but still the code didnt build even with just usb host init part.
I've asked it
can you give me an example of a ESP32-S3 in IDF to act as a host
AN it spit out the code, and I copied and pasted it and worked just fine.
May i ask which AI/LLM you are using
Re: what espressif is hidding, or what AI knows and i dont
Posted: Wed May 28, 2025 3:33 am
by mikemoy
I was using GPT-4.1
I do find it a bit crazy when your working on some code and you ask one LLM to do bla.bla.bla... and it gives you the code. Then you turn around and ask another LLM to look at that code and look for issues, and it shows some, and then even a third and you get something else. My biggest issue is when they start hallucinating.
Re: what espressif is hidding
Posted: Thu May 29, 2025 2:47 am
by vvb333007
The AI actually should be trained on most of the public documentation.
Currently it is hallucinating:
My question to ChatGPT-4.1o:
Hello! I am using ESP32 to make an IoT project. Can you please give me an example, in C, which shows how to register & use a custom "panic" handler?
The reply:
Code: Select all
Key Points:
esp_set_panic_handler() registers a custom panic handler.
...
...
void app_main(void) {
ESP_LOGI(TAG, "Registering custom panic handler...");
// Register the custom handler
esp_set_panic_handler(my_custom_panic_handler);
// Simulate a crash for demonstration
ESP_LOGI(TAG, "Triggering a crash...");
*((int *)0) = 42; // Intentional null pointer dereference
}
Looking good.
The only problem is that ESP-IDF does not provide functions mentioned.
In other hand it is sometimes useful: When I was asking ChaytGPT to translate a documentation from Russian to English, ChatGPT has generated examples and sample CLI dialogues which was not in the source

Re: what espressif is hidding, or what AI knows and i dont
Posted: Sat May 31, 2025 2:06 pm
by chegewara
Its is pretty much hallucinating, but for this kind of questions i am suggesting to use bot which you can find even on this forum.
This bot is very good for simple questions related to API and examples.
To fix, at least partially, hallucinating with LLM is good to "feed" it first with some examples, maybe headers from esp-idf or just try to avoid specific API code questions and use it for general code creating.
Either way in my case i can find AI very helpful. I can be much more productive, even if it takes some time to fix hallucinating and search for some specific API usage. Making simple components in like 2-3 days is more than i could expect. This week HID parser for all who is looking for one and the one in esp-idf feels like not enough (ive seen some questions about it).
https://components.espressif.com/compon ... ions/0.1.0