5 ms·
> html Would be willing to bet this is the issue. Adding html files to context for gemini models results in a ton of token use.
by riskassessment 10mo ago
> html
Would be willing to bet this is the issue. Adding html files to context for gemini models results in a ton of token use.
- gcr 10mo agowhy? EDIT: why must users care?
- SPICLK2 10mo agohttps://stackoverflow.com/questions/1732348/regex-match-open-tags-except-xhtml-self-contained-tags https://stackoverflow.com/questions/1732348/regex-match-open...
- croes 10mo agoThe accepted answer is one that doesn’t care about the questioner‘s use case and instead gives a pretty excessive "Don‘t do it"
- lukan 10mo agoIt does also give the right solution, using an xml parser.
- croes 10mo agoWe don’t know the use case. Maybe the questioner is also in full control of the HTML creation and they don’t need a parser for all possible HTML edge cases.
- SPICLK2 10mo agoMaybe they are, but they would also need to ensure a well-defined subset of HTML and also show that the subset is a reglar (Chomsky Type 3) grammar. It seems that even the very conceptually simple example given by the questioner is impossible.
- kulahan 10mo agoGotta learn all the quirks of the model before it's replaced in 8 minutes.
- NaomiLehman 10mo agoQuirks? like context window?
- kulahan 10mo agoI'm saying it's egregious to expect all users to know the fact that an HTML document, for some reason, uses an enormous amount of context in an LLM designed specifically for working with code.