logoalt Hacker News

hathymyesterday at 10:04 PM1 replyview on HN

I tested with

  import needle

  @needle.tool
  def add(a: int, b: int):
      "Add two numbers."
      return a + b

  agent = needle.Needle(tools=[add])
  print(agent.run("calculate 1 + 1?")["reasoning"])

python main.py No calculator or math tool available.

conclusion: completly useless


Replies

HenryNdubuakuyesterday at 10:14 PM

Try the following tool description: "Calculate the sum of two numbers. Use for any arithmetic or math question." instead of "Add two numbers." Let me know how it goes, thanks!

show 2 replies