Last year, I built a demo (
https://www.raymondcamden.com/2024/07/10/creating-a-generic-generative-template-language-in-google-gemini) where I asked Gemini to take a string, look for tokens {{ foo }}, and replace the value with a random instance of the token. So {{ noun }} would pick a noun, {{ color }} a color, and so forth. I even got it so it could reuse values: {{ name | yourname }} would pick a random name, and {{ yourname }} later in the string would re-use it.
I thought I'd take a stab at doing it on device, and honestly, it worked great!
I built this yesterday morning. Yesterday afternoon I was about to start a blog post on it, but when I ran it again, it completely, mostly, failed. Given the sample input, it would change {{name:myname}} to {{myname}}, and the other tokens wouldn't get replaced... about 90% of the time. Every now and then one gets replaced.
Is there anything in particular that would have caused this to be near perfect and then near 100% failure? (I've restarted Chrome of course, a few times.)