I am ready to run a local LLM for this task, but can someone with more LLM experience than me (I have none) describe a good process to do so? And which LLM might be suited?
Thanks!
1–5 of 5 posts
I am ready to run a local LLM for this task, but can someone with more LLM experience than me (I have none) describe a good process to do so? And which LLM might be suited?
Thanks!
LLMs are good at the gist of accuracy, not actual accuracy. They could create new XML files that follow a schema, sure. But they won't even do that correctly 100% of the time, and definitely are not awesome at going the other direction. So just write a parser. It will be no more work, and more correct.
Having used the results so far to annotate the original elements and attributes with their types, you could then pass a generated, simplified XML document into the LLM. So where the original document has real data, you can start replacing it with simple data that conforms to the same structure and data type. If the LLM is still confused, try giving it just the structure which you've identified with no actual data within the elements and attributes, only type annotations.
TL;DR: a depth-first approach and then building up from there will work better than giving everything to an LLM all at once. They are only clever thematic Markov chains after all.