Skip to content

Commit

Permalink
docs: add another query to calculator example, set library descriptio…
Browse files Browse the repository at this point in the history
…n, set similarity cutoff to 2
  • Loading branch information
felixocker committed Aug 5, 2024
1 parent 3a07dee commit 232cde4
Showing 1 changed file with 15 additions and 9 deletions.
24 changes: 15 additions & 9 deletions examples/calculator_example.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@
MinimalTulipAgent,
NaiveToolAgent,
NaiveTulipAgent,
OneShotCotTulipAgent,
PrimedCotTulipAgent,
ToolLibrary,
)
Expand Down Expand Up @@ -78,7 +79,8 @@ def print_seperator(name: str) -> None:


def run_comparison():
query = "What is 45342 * 23487 + ((32478 - 2) * (-1) + 2)?" # 1064915080
# query = "What is 45342 * 23487 + ((32478 - 2) * (-1) + 2)?" # 1064915080
query = "Find the value of $x$ such that $\sqrt{x - 2} = 8$."
print(query)

print_seperator(name=BaseAgent.__name__)
Expand All @@ -92,16 +94,20 @@ def run_comparison():
res = agent.query(query)
print(f"{res=}")

tulip = ToolLibrary(chroma_sub_dir="example/", file_imports=[("calculator", [])])
tulip = ToolLibrary(
chroma_sub_dir="example/",
file_imports=[("calculator", [])],
description="A tool library containing math tools.",
)

type_k_combinations = (
(MinimalTulipAgent, 5, 1),
(NaiveTulipAgent, 5, 1),
(CotTulipAgent, 5, 1),
(InformedCotTulipAgent, 5, 1),
(PrimedCotTulipAgent, 5, 1),
(CotTulipAgent, 5, 1),
(AutoTulipAgent, 5, 1),
(MinimalTulipAgent, 5, 2),
(NaiveTulipAgent, 5, 2),
(CotTulipAgent, 5, 2),
(InformedCotTulipAgent, 5, 2),
(PrimedCotTulipAgent, 5, 2),
(OneShotCotTulipAgent, 5, 2),
(AutoTulipAgent, 5, 2),
)
for agent_type, top_k, sim_threshold in type_k_combinations:
print_seperator(name=agent_type.__name__)
Expand Down

0 comments on commit 232cde4

Please sign in to comment.