MRKL's arithmetic expert exists because language models are unreliable at exact arithmetic. Sending a simple expression to a deterministic module gives an exact answer the language model can then report.
Implement arithmetic_expert(expr), evaluating a simple binary expression with +, - or *.
Match the expression with a regular expression that captures two numbers and an operator, then compute the result.
No results yet
Run your code to check it against the examples, or submit to run every test.