Session 4: Function Calling
AIRAGCoT

Session 4: Function Calling

Presenters

Masih MoloodianYasin FakharMohammad Amin Dadgar

Function Calling

The discussion began by introducing Chain of Thought (CoT) reasoning as a fundamental concept in LLM interactions. CoT enables language models to break down complex queries into logical steps, significantly improving their problem-solving capabilities across various domains like mathematics and multi-step queries. This was demonstrated through practical examples, including a comparison between standard prompting and CoT prompting, as well as a practical exercise involving apple counting that highlighted the difference between direct answers and step-by-step reasoning.

The core focus then shifted to function calling, which was presented as a bridge between LLM decision-making capabilities and actual execution of actions. The presentation emphasized that while LLMs excel at making decisions, they require function calling mechanisms to interact with external systems like APIs and databases. This was illustrated through practical examples, including a weather query for Paris and a delivery date retrieval system, demonstrating how LLMs can be integrated with external tools through structured JSON workflows.

The meeting concluded with a detailed exploration of four distinct function calling types (Single, Sequential, Parallel, and Multi-Step Iterations) and their associated challenges. Key considerations discussed included latency issues with sequential calls, error handling in parallel executions, resource management concerns, the importance of well-defined schemas, and security considerations when dealing with sensitive data and API interactions. This theoretical framework was then reinforced through practical code demonstrations in Google Colab, providing attendees with hands-on experience in implementing different function calling patterns.

Slide link: https://www.canva.com/design/DAGXRdD4K-c/vUz0jae_bULC4Ljw02LzvQ/view?utm_content=DAGXRdD4K-c&utm_campaign=designshare&utm_medium=link2&utm_source=uniquelinks&utlId=h2b0737eefa