Equations whose left side is longer than a token or two come back with everything after = missing.
input
output
x squared plus y squared equals r squared
x^2 + y^2
x squared plus y squared equals z
x^2 + y^2
alpha squared plus beta squared equals gamma squared
alpha^2 + beta^2
sine squared of x plus cosine squared of x equals 1
sin(x)^2 + cos(x)^2
All phrasings ("equals", "is equal to", "=") fail the same way. a squared plus b squared equals c squared happens to work.
Cause:TreeGen.tree() in src/isotope_typst/generate.py only builds Eq with a left side of y, f, x or expr(depth 0 or 1). Add(Pow, Pow) is depth 2, so it never shows up as a left side. There are zero training rows starting with x^2 + y^2.
Fix:
Let the left side be deeper (e.g. depth 0–3), keeping the overall length limit.
Add the four sentences above to eval/hand_test.jsonl (two of them are already there and failing).
Equations whose left side is longer than a token or two come back with everything after `=` missing.
| input | output |
|---|---|
| x squared plus y squared equals r squared | `x^2 + y^2` |
| x squared plus y squared equals z | `x^2 + y^2` |
| alpha squared plus beta squared equals gamma squared | `alpha^2 + beta^2` |
| sine squared of x plus cosine squared of x equals 1 | `sin(x)^2 + cos(x)^2` |
All phrasings ("equals", "is equal to", "=") fail the same way. `a squared plus b squared equals c squared` happens to work.
**Cause:** `TreeGen.tree()` in `src/isotope_typst/generate.py` only builds `Eq` with a left side of `y`, `f`, `x` or `expr(depth 0 or 1)`. `Add(Pow, Pow)` is depth 2, so it never shows up as a left side. There are zero training rows starting with `x^2 + y^2`.
**Fix:**
- Let the left side be deeper (e.g. depth 0–3), keeping the overall length limit.
- Add the four sentences above to `eval/hand_test.jsonl` (two of them are already there and failing).
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Equations whose left side is longer than a token or two come back with everything after
=missing.x^2 + y^2x^2 + y^2alpha^2 + beta^2sin(x)^2 + cos(x)^2All phrasings ("equals", "is equal to", "=") fail the same way.
a squared plus b squared equals c squaredhappens to work.Cause:
TreeGen.tree()insrc/isotope_typst/generate.pyonly buildsEqwith a left side ofy,f,xorexpr(depth 0 or 1).Add(Pow, Pow)is depth 2, so it never shows up as a left side. There are zero training rows starting withx^2 + y^2.Fix:
eval/hand_test.jsonl(two of them are already there and failing).