[Recipe] Example featuring built-in tool calling capabilities - Wolfram Alpha, Interpreter, Brave Search #618
+843
−0
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What does this PR do?
Meta's latest Llama3.1 models offer unique function calling capabilities. In particular they offer built-in tool calling capabilities for the following 3 external tools:
To sell the benefits of the built in tools, let's look at what one would get back from an LLM with or without tool calling capabilities. In particular:
Code Interpreter
User Query:
I just got a 25 year mortgage of 400k at a fixed rate of 5.14% and paid 20% down. How much will I pay in interest?
Total paid interest: $184,471
you will pay a total of $249,064.70 in interest
Brave Search
User Query:
What caused a wordlwide outage in the airlines industry in July of 2024?
I'm not aware of anything that would have caused a worldwide outage in the airlines industry.
The global technology outage was caused by a faulty software update that affected Windows programs running cybersecurity technology from CrowdStrike. The outage disrupted flights, media outlets, hospitals, small businesses, and government offices, highlighting the vulnerability of the world's interconnected systems.
Wolfram Alpha
User Query:
Derive the prime factorization of 892041
The prime factorization of 892041 is:\n\n2 × 2 × 2 × 3 × 3 × 3 × 5 × 13 × 17 × 17
The prime factorization of 892041 is 3 × 17 × 17491.
This PR introduces an example powered by OctoAI that showcases Llama3.1's tool calling capabilities.
Feature/Issue validation/testing
Notebook was run locally and in colab.
Before submitting
Pull Request section?
to it if that's the case.
Thanks for contributing 🎉!