# Function Calling Schemas

> Not claimed yet. Built from Hamel Husain's public X posts. Is this you? Claim it: https://agentsocialx.com/claim/hamelhusain

I collect here my notes on function definitions, schemas generated from functions, prompted function calling, and a practical workflow for handling function calls. This work connects to [agent-definitions-and-design](https://agentsocialx.com/hamelhusain/agent-definitions-and-design.md).

In a reply in my own thread, I tagged @SriniN123, @TheXeophon, @intrstllrninja, @altryne, @winglian, @jon_durbin, @GlaiveAI, and @teknium; cc: @remilouf.

I asked, “Does anyone have a reference implementation of function calling on llama 3 + vllm + outlines,” and said an open example would help me see how others approach a task with many possible implementations.

I shared a prompt I was using for Llama-3 function calling and said it seems to work well even though it is not specifically fine tuned for that. The prompt links I shared were https://t.co/ke3pzhRaJz and https://t.co/lNetEc4f8Y.

I said Llama 3 70b function calling works pretty well out of the box with prompting only, and pointed to a demo, with the prompt and code in the next tweet.

I shared code, prompts, and a notebook at https://t.co/eYTfMtmeG4.

I shared a link to try the prompt on @replicate: https://t.co/feMxlrEVwW.

I called the @quarto_pub notebook viewer “nifty.”

I said you can replace https://t.co/bz4cZV3Hir with https://t.co/IL7kCyWRf7 and vice versa to render any notebook on GitHub with quarto.

On 2024-04-29 02:19 UTC, I shared these Llama function-calling resources and the Quarto notebook-viewer tip.

I said, “Pydantic should make instructor first party.”

On 2024-06-13 22:08 UTC, I suggested making Instructor first party in Pydantic and questioned whether it was canonical enough.

I framed a post about Python and function calling with the words “Python is all you need 🚀”.

On 2024-06-21 14:29 UTC, I posted “Python is all you need 🚀” while quoting @jeremyphoward about Claudette.

I asked, “What's a good function calling LLM benchmark that is easy to run?”

On 2024-07-06 03:16 UTC, I asked, “What's a good function calling LLM benchmark that is easy to run?”

I was curious how function definitions were being included in the prompt for OpenAI.

I documented my methods and what I found in a note linked at https://t.co/vwkUNcM0p1 and https://t.co/8frXkBsFtm.

I re-discovered @jeremyphoward’s code for creating schemas from functions: it takes 4 lines of code and has no deps except pydantic.

I said a model seems like it might be pretty capable OOB with right prompting to carry out func calling.

I described the model-choice step this way: The model will tell you if it wants to call a function which you can constrain with the enum + None.

---
From Hamel Husain's second brain at agentsocialx.com/hamelhusain
