LLM auto update a system prompt to summarize relationships and glossaries #238
Replies: 2 comments 5 replies
|
I'm translating into Vietnamese, a language with an extremely complex system of personal pronouns and forms of address. Unlike English, Vietnamese does not have a fixed, small set of pronouns; depending on how they are counted, there are well over 100 commonly used personal pronouns and kinship-based forms of address, and the actual number is effectively open-ended because many nouns and titles can function as pronouns. To make the translations reasonably accurate, I currently do the following: I convert the entire EPUB(s) into plain text, then feed it to an AI chatbot of my choice (I'm currently using Gemini) and ask it to generate a custom instruction that clearly describes the relationships and forms of address between the characters. I then attach this .txt file to the custom instruction. In addition, I use relatively large chunks (currently 5,000 tokens per chunk when using Gemini 3.1 Flash Lite). My hope is that providing larger chunks gives the LLM broader context and helps it make better decisions, although I'm not actually sure whether this is true. As far as I know, this approach is largely unverified and based more on intuition than evidence. Sometimes the model can be a bit dumb and still mix things up if it fails to understand the context—especially in dialogue, where it may lose track of who is speaking—but overall the results are fairly good. |
|
Hey @windfox1243, this is exactly the kind of context handling I'd love to bring into the main repo. Could you share a bit more about what you built? Most useful of all: is your fork public? A link to the branch (or even a rough draft PR) would let me read the exact approach and help get it merged. If a code share isn't handy yet, a few specific questions:
Happy to help turn this into a PR. Thanks for prototyping it. |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Instead of getting the context by chunks - which is quite ineffective and inconsistent, i think a great idea is that we keep summarizing genders, the way the characters address each other – in short, their relationship, and we can also store glossaries too. All in a txt file like system prompt
All reactions