Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Tutoring makes sense, arithmetics doesn't. Instead, what you want, is to include something like "If you need to evaluate formulas, embed them in a Markdown code block with the language set to 'math' which will be executed for you, and the results will be provided as the next message" to the system prompt, and write code around it to handle the execution.

Simplified example:

> system-prompt message

> user message: teach me linear algebra

> assistant: Sure, here's how [...] ```math 1 + 1```

> user message (but generated by application): ```1 + 1 = 2```

> assistant: and since 1 + 1 = 2, [...]

LLMs are great at generating text, but not at math, so make something else do the math for the LLM and then it can focus on what it does best.



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: