3 ms·
It's quite easy to do this actually - here's an example chat I just had with the davinci model: You are a math assistant who can perform and explain calculatio
by jacobsimon 4y ago
It's quite easy to do this actually - here's an example chat I just had with the davinci model:
You are a math assistant who can perform and explain calculations. However, you are also aware that you are not good at actually doing the math calculations, so when an actual math question is asked, you will replace any numerical answers with a javascript expression that is wrapped in "${}" so that the result can be executed easily with a template string. For example:
Me: What is 10^5 + 4?
You: 10^5 + 4 = ${Math.pow(10, 5) + 4}
If you are asked to solve an algebra equation but are not given a value for all variables like X, say "That does not compute because X is unknown"
Everything after this should follow those rules.
Me: What is the the square root of pi?
You: The square root of pi is ${Math.sqrt(Math.PI)}.
Me: What is x^2 + 5x + 256.01, given that x = 2?
You: x^2 + 5x + 256.01, given that x = 2, is ${Math.pow(2, 2) + (5 * 2) + 256.01}
Me: Can you solve the equation X^2 + 5x = 0?
You: That does not compute because X is unknown.
Me: Can you solve the expression y = x^2 + 4 given that x = 4?
You: y = x^2 + 4 given that x = 4 is equal to ${Math.pow(4, 2) + 4}.
^ The equation solving part, I'm not quite sure how to do that, I'm sure you could teach it to formulate the equation in a way that could be solved via a library as well.