Today's sharing is about how to build a private AI at zero costknowledge baseThis solution is particularly suitable for sales personnel who are faced with a large amount of product knowledge that needs to be remembered.
A friend of mine, a middle-aged salesman who switched to a medical device company, recently talked to me about this problem: there are many types of products and complex technical parameters. In order to recommend suitable products to customers, you need to have a deep reserve of product knowledge. This is a challenge for him, because in addition to learning product knowledge, he also has to face pressure from leaders and performance challenges, which makes his work more stressful.
So I gave him a suggestion: provide product descriptions and technical information to AI and let AI learn. In this way, when sales staff encounter problems in promoting products, they can directly consult AI, or let customers ask AI questions themselves to understand which product is suitable for them. Such an intelligent customer service question-and-answer system can greatly reduce the workload of grassroots sales staff.
If you have similar needs, the following solution may be helpful to you. This solution fully utilizes local resources, does not require any fees, and can be easily embedded in third-party platforms, such as your own company's website, WeChat applets, etc.
Let’s first take a look at the effect of this knowledge base. Here is a screenshot of a product description in the knowledge base, which contains the incidence data of the disease population for which the product is applicable.
Now, I will ask the AI a question and see how it responds.
See? Not only did the AI give an answer, it also indicated which knowledge base it learned this information from.
Next, we will show you how to build such a system from scratch.
The framework used this time isMaxKBandOllamaProvide front-end UI and local free large model interface respectively
Install Ollama
Download address: https://ollama.com/download
After downloading, double-click to install.
Then open the CMD window and enter the command:
ollama run llama3
Start automatically downloading llama3 models
Install MaxKB
docker run -d --name=maxkb -p 8080:8080 -v ~/.maxkb:/var/lib/postgresql/data 1panel/maxkb
Enter the above command on the command line to deploy the docker service
After success, access the browser: 127.0.0.1:8000
After entering the login page, enter the default username and password:
# Username: admin # Password: MaxKB@123..
After the first login, you need to change the password and then enter the settings page to configure the large model parameters.
Choose any model name. There is only one default option for model type. For basic model, fill in the name of the model actually downloaded from Ollama. For API domain name, fill in the address of the host where Ollama is installed. For this machine, fill in 127.0.0.1:11434. For API key, fill in anything you want and save it.
After the model is configured, start creating the knowledge base
There are two types of knowledge bases: general ones allow manual entry of information and upload of data documents, and web sites provide a URL and then the system crawls the text information on the web page.
Here we need to upload a document, so choose the general type.
After filling in the basic information, click Upload Document and then import it into the system
After importing, the system will intelligently segment the document content. The speed is very fast, but the accuracy may not be as good as manual segmentation. This depends on your needs. Here is a demonstration of intelligent segmentation.
Click Import in the lower right corner
Now we can create an intelligent assistant based on this knowledge base.
Fill in basic information
Add a knowledge base
Click Create
Enter the settings interface
Enter a debugging settings page
Compare the contents of the original document:
Very good
Next, you can distribute this application to business personnel as a product knowledge assistant, or you can connect this application to the company website or WeChat applet to directly face customers as AI customer service
Now we have an intelligent AI knowledge base that can not only improve work efficiency but also improve customer service quality. I hope this solution can help you!