Teaching ZIM to AI

A few times students try writing ZIM with AI, it gives very very old ZIM like version ONE and sometimes mixes CreateJS with it... I think it would be good to teach AI how to use ZIM. @ajerni or others... shall we do this?

image

image

3 Likes

I think that would be great! I gave it a shot here: GitHub - ajerni/langchain-zim-generator. The live version at https://zim-generator-dev.streamlit.app/ works only with OpenAI keys from paid accounts though. I just fed it with the text version of the ZIM docs. The steps are easy: provide docs, split them into chuncks (embeddings) to store them in a vector store and then do some "clever" prompting (I have used LangChain). The reason why it often gives "old" code is simply because that is what is provided in the docs. To improve this we could try to feed it with the actual/real code of the latest version. However I think that the AI alway provides best results when it is given good examples. So the best thing to bring this a huge step forward might be to have a separate documentation (in text form) that mostly contains examples written in the latest version of ZIM.

2 Likes

I will ask friends about that

Very cool, Andi - yes... I remember playing with that a bit.

The docs are the latest version of code and have been all along. There is a text version here ZIM Docs - Text Version - is that what you used? A search for "new createjs" shows just 6 entries relating to zimify and a few other comparison examples. The rest is a thousand examples all in the latest ZIM... ES6.

If you feed your GitHub version the docs... does that then go to the general openAI learning pool? Is there a way to feed that one?

yes, that is the verison of the documentation I have used and no, that is only a local application of ChatGPT, not feeding anything official.

I found shecodes.ai and claude.ai to generate ZIM code!

How useful this will be!

1 Like