Generating world content should be done in chunks #104

Closed
opened 2025-10-26 01:21:25 -04:00 by neph1 · 0 comments
neph1 commented 2025-10-26 01:21:25 -04:00 (Migrated from github.com)

Currently during world generation, items, creatures, etc are generated in one go. This produces a long json that might be difficult for the LLM to close correctly, or it might get cut off due to token limits. This produces an error, and the LLM will have to start over, or eventually fail, if it was the last try.

It would be better to generate one per LLM call, instead. And then manually create the array.

Possibly the list of names of previously generated items should be passed, to avoid repetition and induce some randomness in the prompt.

Relevant starting points are
generate_world_creatures
generate_world_items
in https://github.com/neph1/LlamaTale/blob/master/tale/llm/world_building.py

Make sure relevant tests are updated to reflect this change.

Currently during world generation, items, creatures, etc are generated in one go. This produces a long json that might be difficult for the LLM to close correctly, or it might get cut off due to token limits. This produces an error, and the LLM will have to start over, or eventually fail, if it was the last try. It would be better to generate one per LLM call, instead. And then manually create the array. Possibly the list of names of previously generated items should be passed, to avoid repetition and induce some randomness in the prompt. Relevant starting points are generate_world_creatures generate_world_items in https://github.com/neph1/LlamaTale/blob/master/tale/llm/world_building.py Make sure relevant tests are updated to reflect this change.
Sign in to join this conversation.
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
neph1/LlamaTale#104
No description provided.