Location>code7788 >text

Intelligent Car Butler: A Case of Workflow Optimization Implementation

Popularity:846 ℃/2024-09-19 11:17:26

Hello everyone ah, Xiaoyu today to experience Baidu Qianfan AppBuilder, which is a smart body platform. As someone who likes to play with workflows, our theme today is still how to fulfill all needs through workflows. So, let me introduce today's assistant - Car Butler.

car butler

Effective demonstration

Online experience address:/qianfandev/matchs

How to find the assistant: Thousand Sails Cup Entries ->Regular Competition ->Workflow Component Regular Competition (Next Issue) ->Car Butler ->Kick it!

image

Capabilities at a glance

The main goal of CarGuard is to help users save time by eliminating the need to spend a lot of time searching for relevant reviews, car configurations, highlights, and featured information, and instead presenting this content directly to the user, allowing them to access more information in less time.

Therefore, our assistant is equipped with a series of process-oriented capabilities, such as: browsing car pictures, checking the car's highlight features and fuel consumption information in detail, if the user prefers other models, the assistant can intelligently compare and analyze them, and according to the user's budget and preferences, the assistant can also recommend some suitable car choices for the user through web search.

Next I'm going to start breaking down the assistants I've built in more detail, and hopefully this will inspire and inform you as well.

persona

Here are the latest characterizations so far, which I hope will give you ideas to refer to and learn from.

# Characterization
As a car concierge, you like to use various emojis to express your thoughts to increase affinity, and you are tasked with introducing users to their favorite models and helping them purchase the car lineup that best suits their situation. You have excellent communication skills and product knowledge and are able to clearly demonstrate the selling points of a vehicle to a customer.

# Component competencies
## Model Pictures
Prerequisite: When the user does not specify which vehicle, further confirmation must be made with the user here first.
Background: After learning about a certain car model, the user wants to see pictures of that model for further confirmation.
Goal: Only show the relevant pictures to the user

## Model introduction
Prerequisites: When the user does not specify which car it is, further confirmation must be made with the user.
Background: The user needs to understand the advantages of the vehicle in terms of price, performance, safety, comfort, technology and fuel consumption in order to make a purchase decision.
Objective: To provide users with detailed information about the vehicle's price, performance, safety, comfort, technology and fuel consumption as well as the vehicles for sale to help them make an informed purchase choice.
Output Format: Key content should be bolded to highlight key points

## Recommended Vehicles
Background: Users want to buy a car and need a professional sales consultant to provide personalized recommendations and reasons for purchase based on users' specific needs, budget and preferences.
Objective: Based on the user's budget, preferences and needs, recommend only a few suitable models, and provide a brief reason for the recommendation can be.

## Model Comparison
Background: The user needs to compare two different car models in order to make a purchase decision. The user expects to quickly understand the differences between the two car models in terms of performance, safety, comfort, technological features and fuel consumption through an intuitive table.
Objective: To provide a clear comparison table showing the differences in performance, safety, comfort, technology features and fuel consumption between the two Link trim levels, and to provide a paragraph of decision-making advice at the end.


# Requirements and Limitations
- The output content language must use emoticons such as 😝, πŸš—, πŸš€, 😁, 🫑, ❀️, πŸ”₯, etc. to increase the fun of chatting, and be able to choose the right emoticon in context.
- The format of the output result must be in markdown format
- Only talk about content related to automobile brands, products and services, prohibit topics related to national policies and violating laws.
- Prohibit verbal attacks on users and always maintain a warm and professional service attitude.
- The output must be organized according to the given format and cannot deviate from the framework requirements.

The fact that we don't need to specifically specify the component to be called in a specific capability is a unique advantage in Chifan AppBuilder. This means that it has a clearly visible thought process, as demonstrated by:

image

In this case, what we need to do is to provide a detailed and precise description, because with a clear description, large models can be fully understood and invoked.

Vehicle Introduction

So, let's take a look at the response so far, and overall it has largely met my needs.
image

Here I have performed the encapsulation of the component call so that you can understand its internal structure in more detail.

image

This paragraph looks simple, and it is. I purposely wrote a simplified version to minimize user waiting time. Currently the workflow of Chifan AppBuilder does not support parallel processing, so a complete query of a car lineup may take more than 2 minutes, which is obviously unacceptable for users. Therefore, I developed this simplified version.

The code node itself is very simple, mainly splicing the car line information I need to query into a string for the subsequent two component nodes. The details are shown below:

def main(params):
    car = params['car']
    # Create a dictionary as an output variable
    output_object = {
        "desc": f'{car}'s performance and power, including how well it accelerates, handles, and has engine efficiency, {car}'s technology and features, including how well it has infotainment systems, driver assistance systems, etc., {car}'s gas mileage, how well it compares to the same class of vehicles, {car}'s safety features, including how well it has active and passive safety systems, {car}'s interior space and comfort, including how well it has how well the seats, storage space and noise control'.
        "sales": f'Vehicles for sale in {car}',
    }

    # Return the output dictionary type variable output_object, containing the output data required by the code node
    return output_object

Such processing returns information directly after the query, allowing the outer model to make the parameters available to the user for viewing. It can be seen that while the above approach is not very exhaustive. A complex workflow would be able to provide more comprehensive information, but this approach would significantly increase the time cost.

So I decided to give up on this complicated approach because some information is better than no information at all.

Vehicle Pictures

The solution to this problem is simple, as it is possible to directly utilize off-the-shelf components, such as Bing Image Search.

I chose to mount it in directly instead of encapsulating it into a workflow. This is because it doesn't involve content processing and doesn't create additional textual distractions when the larger model answers my questions.

image

Recommended Vehicles

The car line recommendation process starts with a pre-search for available recommended car lines. Next, a large model is used to extract this trim level information and perform code analysis to obtain the name of the first recommended trim level and search for related images for external display. Since batch processing is not supported here, only one image can be processed.

Too much processing may lead to the problem of too many result elements crossing the boundaries, which in turn may raise an exception. Therefore, only the image of the first car line is extracted for display.

image

The big model here is used for the process of extracting car line recommendation information with the following cue words:

Summarize the names of car models from the following text, each model name should be no more than 7 words if possible, the model name needs to appear in full in the whole text, you can't generate the name of a model that you haven't seen before, output 1 result, use comma to separate in the middle:

Text: {{query}}

Subject Tags:
Car line name 1,Car line name 2,Car line name 3

In fact, I would very much like to be able to better realize my needs, but current constraints don't allow it. I hope that Chifan AppBuilder can speed up the iteration so that we can achieve optimization and improvement faster.

Vehicle Comparison

The optimization process for the car line comparison was originally planned to be done by nesting two car line queries and outputting the results through the large model node. However, I had to give up this program because the nodes could not be executed in parallel. In the end, we decided to use the Baidu Cars node to realize this function, which is demonstrated below:
image

The big model reference words here are as follows:

- Role: Automotive Performance Analyst and Sales Consultant
- Background: A user needs to compare two different car models in order to make a purchase decision. The user expects to quickly understand the differences in performance, safety, comfort, technology features, and gas mileage between the two vehicle lines in an intuitive tabular format.
- Profile: You are a professional automotive performance analyst and sales consultant with in-depth knowledge and research of each vehicle line, able to provide detailed data and professional analysis.
- Skills: You have the ability to analyze data, conduct market research, and communicate with customers, and are able to clearly present vehicle performance comparisons to customers and provide professional buying advice.
- Goals: Provide users with a clear comparison table showing the differences in performance, safety, comfort, technology features, and gas mileage between two vehicle lines, and provide a paragraph of decision-making advice at the end.
- Constrains: Only objective data and facts are presented in the table, without subjective evaluations or personal emotional overtones. Provides customers with a reference rather than a direct purchase recommendation.
- OutputFormat: Presentation of comparative data in a Markdown table, with no <br> characters allowed in the table. And provide a paragraph of decision-making reference at the end of the text, the reference must use emoticons such as: 😝, πŸš—, πŸš€, 😁, 🫑, ❀️, πŸ”₯, etc., in order to increase the interest of chatting, and to be able to choose the right emoticon with the context.
- Workflow.
  1. collect data on two car lines in terms of performance and power, safety features, interior space and comfort, technology and features, and fuel consumption.
  2. Organize the collected data into a table format to ensure that the information is accurate.
  3. Write a paragraph of decision-making reference below the table to provide reference to the customer, the reference must use emoticons such as 😝, πŸš—, πŸš€, 😁, 🫑, ❀️, πŸ”₯, etc., in order to increase the fun of chatting, and to be able to choose the correct emoticon in context.
The data is provided as follows: {{car_1}}

So far, our car butler has basically done the job. I hope this provides some lessons and references for you.

fixed output

In order to optimize the output results and reduce the encapsulation of the outer large model, the output of the car line comparison is directly turned on here, and it is sufficient to output it as-is, as the inner large model has already dealt with the problem.

image

summarize

In this paper, we delve into how to utilize the intelligent body platform of Baidu Chifan AppBuilder to build a powerful car management assistant. Through workflow design and optimization, we successfully implemented several core functions, including model introduction, recommendation, picture display and comparison analysis. These functions not only save users' time, but also enhance their experience, enabling them to quickly and accurately obtain the information they need and make rational car-buying decisions.

Car Butler, as an intelligent assistant, not only simply displays car information, but also helps users find the most suitable car for their needs and budget through process-oriented capabilities and an intelligent recommendation system. We have fully considered users' needs and usage scenarios in our design to ensure that every functional node serves users in the most efficient way.

For the technical implementation, we used Markdown format and emoticons to increase the fun and approachability of the output content, while maintaining professionalism and accuracy. By continuously optimizing the workflow process, we not only improved the functional integrity of the product, but also optimized the user experience to make it easy and enjoyable to use.

Finally, thank you for your interest and reading. If you have any suggestions or comments about my car butler, please feel free to contact me.


I'm Rain, a Java server-side coder, studying the mysteries of AI technology. I love technical communication and sharing, and I am passionate about open source community. I am also a Tencent Cloud Creative Star, Ali Cloud Expert Blogger, Huawei Cloud Enjoyment Expert, and Nuggets Excellent Author.

πŸ’‘ I won't be shy about sharing my personal explorations and experiences on the path of technology, in the hope that I can bring some inspiration and help to your learning and growth.

🌟 Welcome to the effortless drizzle! 🌟