# US 2025/0156157 A1 · Identification and generation of function calls using generative model

> Agents: this data is available as JSON from the patentgrep API and MCP server — see https://patentgrep.com/llms.txt

- Number: US 2025/0156157 A1
- Document ID: US20250156157A1
- Status: Published application
- Kind: A1
- Application number: 18/508,514
- Filed: 2023-11-14
- Published: 2025-05-15
- Earliest claimed: 2023-11-14
- Assignees: Sap SE
- Applicants: Sap SE
- Inventors: David KUNZ
- Web page: https://patentgrep.com/patent/US20250156157A1

## CPC

- G06F 8/35: model driven
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

Systems and methods include reception of a user query in natural language from a user, determination of a system prompt including instructions to generate a search query, transmission of a user prompt based on the user query and the system prompt to a text generation model, reception of a generated function call search query from the text generation model, transmission of the generated function call search query to a repository of function call metadata, reception of first function call metadata from the repository in response to the search query, transmission of the first function call metadata and the user prompt to the text generation model to generate a first function call, and transmission of the first function call to an endpoint indicated by the function call metadata.

## Claims

### Claim 1

A system comprising:
a memory storing executable program code; and
at least one processing unit to execute the program code to cause the system to:
receive a user query in natural language from a user;
determine a system prompt including instructions to generate a search query;
transmit a user prompt based on the user query and the system prompt to a text generation model;
receive a generated function call search query from the text generation model;
transmit the generated function call search query to a repository of function call metadata;
receive first function call metadata from the repository in response to the search query;
transmit the first function call metadata and the user prompt to the text generation model to generate a first function call; and
transmit the first function call to an endpoint indicated by the function call metadata.

### Claim 2 (depends on 1)

The system of claim 1, wherein transmission of first function call metadata and the user prompt includes transmission of a second system prompt including instructions to generate a function call.

### Claim 3 (depends on 1)

The system of claim 1,
wherein the received first function call metadata comprises one or more numerical vectors, and
wherein transmission of the first function call metadata and the user prompt to the text generation model to generate a first function call comprises:
transmission of the one or more numerical vectors to an embedding endpoint of the text generation model; and
receipt of the first function call metadata from the embedding endpoint of the text generation model in response to the one or more numerical vectors.

### Claim 4 (depends on 1)

The system of claim 1, at least one processing unit to execute the program code to cause the system to:
receive a response to the first function call from the endpoint;
transmit the response to the text generation model;
transmit the user prompt and a second system prompt including the response to the text generation model;
receive a second generated function call search query from the text generation model in response to the user prompt and the second system prompt;
transmit the second generated function call search query to the repository of function call metadata;
receive second function call metadata from the repository in response to the second generated function call search query;
transmit the second function call metadata and the user prompt to the text generation model to generate a second function call; and
transmit the second function call to a second endpoint indicated by the second function call metadata.

### Claim 5 (depends on 4)

The system of claim 4,
wherein the received first function call metadata comprises one or more numerical vectors, and
wherein transmission of the first function call metadata and the user prompt to the text generation model to generate a first function call comprises:
transmission of the one or more second numerical vectors to an embedding endpoint of the text generation model; and
receipt of the first function call metadata from the embedding endpoint of the text generation model in response to the one or more numerical vectors.

### Claim 6 (depends on 4)

The system of claim 4, the at least one processing unit to execute the program code to cause the system to:
receive a second response from the second endpoint;
transmit the user prompt and the second response to the text generation model;
receive a query result from the text generation model in response to the user prompt and the second response; and
present the query result to the user.

### Claim 7 (depends on 1)

The system of claim 1, the at least one processing unit to execute the program code to cause the system to:
receive a response from the endpoint;
transmit the user prompt and the response to the text generation model;
receive a query result from the text generation model in response to the user prompt and the response; and
present the query result to the user.

### Claim 8

A method comprising:
receiving a user query from a user;
determining a system prompt including instructions to generate a search query;
transmitting a user prompt including the user query and the system prompt to a text generation model;
receiving a generated search query from the text generation model;
transmitting the generated search query to a repository of function call metadata;
receiving first function call metadata from the repository in response to the search query;
transmitting the first function call metadata and the user prompt to the text generation model to generate a first function call;
transmitting the first function call to an endpoint indicated by the function call metadata; and
receiving a response to the first function call from the endpoint.

### Claim 9 (depends on 8)

The method of claim 8, wherein transmitting the first function call metadata and the user prompt includes transmitting a second system prompt including instructions to generate a function call.

### Claim 10 (depends on 8)

The method of claim 8,
wherein the received first function call metadata comprises one or more numerical vectors, and
wherein transmitting the first function call metadata and the user prompt to the text generation model to generate a first function call comprises:
transmitting the one or more numerical vectors to an embedding endpoint of the text generation model; and
receiving the first function call metadata from the embedding endpoint of the text generation model in response to the one or more numerical vectors.

### Claim 11 (depends on 8)

The method of claim 8, further comprising:
transmitting the response to the text generation model;
transmitting the user prompt and a second system prompt including the response to the text generation model;
receiving a second generated search query from the text generation model in response to the user prompt and the second system prompt;
transmitting the second generated search query to the repository of function call metadata;
receiving second function call metadata from the repository in response to the second generated search query;
transmitting the second function call metadata and the user prompt to the text generation model to generate a second function call;
transmitting the second function call to a second endpoint indicated by the second function call metadata; and
receiving a second response from the second endpoint in response to the second function call.

### Claim 12 (depends on 11)

The method of claim 11,
wherein the received first function call metadata comprises one or more numerical vectors, and
wherein transmitting the first function call metadata and the user prompt to the text generation model to generate a first function call comprises:
transmitting the one or more numerical vectors to an embedding endpoint of the text generation model; and
receiving the first function call metadata from the embedding endpoint of the text generation model in response to the one or more numerical vectors.

### Claim 13 (depends on 11)

The method of claim 11, further comprising:
transmitting the user prompt and the second response to the text generation model;
receiving a query result from the text generation model in response to the user prompt and the second response; and
presenting the query result to the user.

### Claim 14 (depends on 8)

The method of claim 8, further comprising:
transmitting the user prompt and the response to the text generation model;
receiving a query result from the text generation model in response to the user prompt and the response; and
presenting the query result to the user.

### Claim 15

A non-transitory medium storing program code executable by at least one processing unit of a computing system to cause the computing system to:
receive a user query from a user;
determine a system prompt including instructions to generate a search query;
transmit a user prompt including the user query and the system prompt to a text generation model;
receive a generated search query from the text generation model;
transmit the generated search query to a repository of function call metadata;
receive first function call metadata from the repository in response to the search query;
transmit the first function call metadata and the user prompt to the text generation model to generate a first function call;
transmit the first function call to an endpoint indicated by the function call metadata; and
receive a response to the first function call from the endpoint.

### Claim 16 (depends on 15)

The medium of claim 15,
wherein the received first function call metadata comprises one or more numerical vectors, and
wherein transmission of the first function call metadata and the user prompt to the text generation model to generate a first function call comprises:
transmission of the one or more numerical vectors to an embedding endpoint of the text generation model; and
receipt of the first function call metadata from the embedding endpoint of the text generation model in response to the one or more numerical vectors.

### Claim 17 (depends on 15)

The medium of claim 15, the program code executable by at least one processing unit of a computing system to cause the computing system to:
transmit the response to the text generation model;
transmit the user prompt and a second system prompt including the response to the text generation model;
receive a second generated search query from the text generation model in response to the user prompt and the second system prompt;
transmit the second generated search query to the repository of function call metadata;
receive second function call metadata from the repository in response to the second generated search query;
transmit the second function call metadata and the user prompt to the text generation model to generate a second function call;
transmit the second function call to a second endpoint indicated by the second function call metadata; and
receive a second response from the second endpoint in response to the second function call.

### Claim 18 (depends on 17)

The medium of claim 17,
wherein the received first function call metadata comprises one or more second numerical vectors, and
wherein transmission of the first function call metadata and the user prompt to the text generation model to generate a first function call comprises:
transmission of the one or more numerical vectors to an embedding endpoint of the text generation model; and
receipt of the first function call metadata from the embedding endpoint of the text generation model in response to the one or more numerical vectors.

### Claim 19 (depends on 17)

The medium of claim 17, the program code executable by at least one processing unit of a computing system to cause the computing system to:
transmit the user prompt and the second response to the text generation model;
receive a query result from the text generation model in response to the user prompt and the second response; and
present the query result to the user.

### Claim 20 (depends on 15)

The medium of claim 15, the program code executable by at least one processing unit of a computing system to cause the computing system to:
transmit the user prompt and the response to the text generation model;
receive a query result from the text generation model in response to the user prompt and the response; and
present the query result to the user.
