Open markovial opened 1 year ago
Totally doable. I've used both in prior projects, and imo KaTeX is a lot better than MathJax (better defaults, faster engine, better output when they do differ, etc).
The main point of consideration here that any rendering engine will be a pretty massive bundle, and will balloon our load times. It would only make sense if we don't load it initially, then lazily load it at some point based on page content. Not a major hurtle, but it's not completely trivial either.
One thing that might be useful: do you have a prompt which currently cases the system to output equations as part of an answer?
Originally I saw equations as part of these prompts -
It is not 100% guaranteed that equations show up though. You could just explicitly ask for equations to test, e.g. by using:
What is the equation for KL-divergence?
In theory the system is 100% deterministic, with the only variance we haven't quite nailed down yet coming from slightly non-deterministic order of citations (though they almost always are deterministic, it's weird). Testing it out, I see the aforementioned equations in the first question, though weirdly not in the second. Thanks for the prompts!!
Some answers generate equations to explain things. The equations look like LaTeX code. Can we render equations using mathjax or something, so that the reader doesnt have to imagine what the equation is actually trying to say?