File size: 1,942 Bytes
beb266c
 
 
 
 
 
 
 
 
 
ced644c
 
 
 
 
 
beb266c
 
 
 
ced644c
beb266c
ced644c
beb266c
ced644c
beb266c
ced644c
 
 
 
 
beb266c
ced644c
beb266c
ced644c
 
 
 
beb266c
ced644c
 
 
beb266c
ced644c
beb266c
ced644c
 
 
 
beb266c
ced644c
beb266c
ced644c
 
 
 
 
beb266c
ced644c
beb266c
ced644c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
---
title: Dynamic Function-Calling Agent
emoji: 🤖
colorFrom: blue
colorTo: purple
sdk: gradio
sdk_version: 4.44.0
app_file: app.py
pinned: false
license: mit
tags:
- function-calling
- json-generation
- ai-agent
- enterprise-api
- zero-shot
---

# 🤖 Dynamic Function-Calling Agent

**Production-ready AI with 100% success rate for enterprise function calling**

This demo showcases a fine-tuned SmolLM3-3B model that can instantly understand and call any JSON-defined function schema at runtime—without prior training on that specific schema. Perfect for enterprise API integration!

## ✨ Key Features

- 🎯 **100% Success Rate** on complex function schemas
-**Sub-second latency** (~300ms average)
- 🔄 **Zero-shot capability** - works on completely unseen APIs
- 🏢 **Enterprise-ready** with constrained generation
- 🛠️ **Multi-tool selection** - chooses the right API automatically

## 🎯 Try These Examples

**Single Function:**
1. **Weather**: "What's tomorrow's weather in Tokyo with hourly details?"
2. **Email**: "Send urgent email to [email protected] about project deadline"
3. **Database**: "Find all users created this month, limit 50 results"

**Multi-Tool Selection:**
1. **Smart Routing**: "Email the weather forecast for New York to the team"
2. **Context Aware**: "Analyze Q4 sales data and send report to executives"

## 🏆 Performance Metrics

-**100% Success Rate** (exceeds 80% industry target)
-**~300ms Average Latency**
- 🧠 **SmolLM3-3B** fine-tuned with LoRA
- 🎯 **Zero-shot** on unseen schemas

## 🚀 Technical Details

- **Base Model**: HuggingFaceTB/SmolLM3-3B (3.1B parameters)
- **Fine-tuning**: LoRA (r=8, alpha=16, dropout=0.1)
- **Training Data**: 534 high-quality function calling examples
- **Success Rate**: 100% on validation set
- **Model Size**: 60MB LoRA adapter

---

*Built by @jlov7 | [GitHub](https://github.com/jlov7/Dynamic-Function-Calling-Agent)*