Function Composition
Learn about function composition and how it works to create seamless, multi-step commerce interactions.
Function composition is the process of combining multiple functions to create a new, cohesive workflow. This involves defining the inputs and outputs of each function and how they interact with each other. The design of these functions is crucial for both the user experience and the model’s ability to generate the correct output.
Finding the Perfect Car
Using Drivly’s Concierge API, let’s walk through a complex car-buying scenario where various functions work together to meet specific customer needs, and incorporating additional service workflows.
In this guide, we’ll follow an example customer request:
I need a new big car. Requirements are:
- Drive cross-country, quickly and reliably, twice a year.
- Seat 6+ people fairly often.
- REAL off-road capability.
- Excellent driver assist/“self driving” technology.
Key Functions
Function | Description |
---|---|
searchListings | Searches for available cars based on user preferences. |
lookupVehicleDetails | Retrieves detailed information about a specific car. |
scheduleTestDrive | Schedules a test drive for the selected car. |
buyVehicle | Finalizes the purchase of the car. |
submitCreditApplication | Submits a credit application for financing. |
addVscProduct | Adds a Vehicle Service Contract (VSC) from Drivly F&I products. |
arrangeTransport | Arranges transport and delivery for the vehicle. |
Interactions
By leveraging Drivly’s AI functions you can provide a powerful experience with dynamic intent handling, and key service integrations. Ultimately providing a complete customer journey – from finding the perfect car, to driveway delivery.