paper-with-me

Papers

Querying Databases with Function Calling

2025-01-23 · Connor Shorten, Charles Pierse, Thomas Benjamin Smith, Karel D'Oosterlinck, Tuana Celik, Erika Cardenas, Leonie Monigatti, Mohd Shukri Hasan, Edward Schmuhl, Daniel Williams, Aravind Kesiraju, Bob van Luijt

The capabilities of Large Language Models (LLMs) are rapidly accelerating largely thanks to their integration with external tools. Querying databases is among the most effective of these integrations, enabling LLMs to access private or continually updating data. While Function Calling is the most common method for interfacing external tools to LLMs, its application to database querying as a tool has been underexplored. We propose a tool definition for database querying that unifies accessing data with search queries, filters, or a combination both, as well as transforming results with aggregation and groupby operators. To evaluate its effectiveness, we conduct a study with 8 LLMs spanning 5 model families. We present a novel pipeline adapting the Gorilla LLM framework to create synthetic database schemas and queries. We primarily evaluate the models with the Exact Match of predicted and ground truth query APIs. Among the models tested, Claude 3.5 Sonnet achieves the highest performance with an Exact Match score of 74.3%, followed by GPT-4o mini at 73.7%, and GPT-4o at 71.8%. We further breakdown these results per API component utilized and across synthetic use cases. We find that LLMs are highly effective at utilizing operators on boolean properties, but struggle with text property filters. Across use cases we find robust results with the higher performing models such as GPT-4o, but significant performance variance across use cases from lower performing models. We additionally conduct ablation studies exploring the impact of parallel tool calling, adding a rationale as an argument of the tool call, using a separate tool per database collection, and tool calling with structured outputs. Our findings demonstrate the effectiveness of enabling LLMs to query databases with Function Calling. We have open-sourced our experimental code and results at github.com/weaviate/gorilla.

📄 PDF Abstract BibTeX arXiv:2502.00032

Code (1)

weaviate/gorilla 공식 구현

Similar Papers 제목 키워드 기반

FinAI Data Assistant: LLM-based Financial Database Query Processing with the OpenAI Function Calling API

2025-10-15 · Juhyeong Kim, Yejin Kim, Youngbin Lee, Hyunwoo Byun arxiv

We present FinAI Data Assistant, a practical approach for natural-language querying over financial databases that combines large language models (LLMs) with the OpenAI Function Calling API. Rather than synthesizing compl…

Enhancing Accuracy and Maintainability in Nuclear Plant Data Retrieval: A Function-Calling LLM Approach Over NL-to-SQL

2025-06-10 · Mishca de Costa, Muhammad Anwar, Dave Mercier, Mark Randall 외

Retrieving operational data from nuclear power plants requires exceptional accuracy and transparency due to the criticality of the decisions it supports. Traditionally, natural language to SQL (NL-to-SQL) approaches have…

Granite-Function Calling Model: Introducing Function Calling Abilities via Multi-task Learning of Granular Tasks

2024-06-27 · Ibrahim Abdelaziz, Kinjal Basu, Mayank Agarwal, Sadhana Kumaravel 외

Large language models (LLMs) have recently shown tremendous promise in serving as the backbone to agentic systems, as demonstrated by their performance in multi-faceted, challenging benchmarks like SWE-Bench and Agent-Be…

Multi-Task LearningResponse Generation

Hybrid Querying Over Relational Databases and Large Language Models

2024-08-01 · Fuheng Zhao, Divyakant Agrawal, Amr El Abbadi

Database queries traditionally operate under the closed-world assumption, providing no answers to questions that require information beyond the data stored in the database. Hybrid querying using SQL offers an alternative…

AWARE-US: Preference-Aware Infeasibility Resolution in Tool-Calling Agents

2026-01-06 · Mehmet Kurmaz arxiv

Tool-calling conversational agents querying structured databases often face two linked failures: underspecification (missing constraints needed for a precise query) andinfeasibility (a fully specified query returns anemp…