Closed ketsapiwiq closed 2 months ago
Just saw the same code...
Using Grammar is a good idea but I never got it to run. The llms often start generating wrong contents in the right format and make up new params that never existed. Did you get them to accept them?
Often Llama3 will prefix the json with additional explanation text, or after providing it. Grammar constraint could solve this. But explanations preceding the JSON might help the model provide accurate responses (chain of thoughts).