Performance Comparisons of Private AI Chatbot and Public AI Chatbot
摘要
In this paper, we develop an AI chatbot portal using Python Flask server. LangChain was used for setting up the backend process. For phase one, we load and process our PDF documents and use LangChain’s text splitter, RecursiveCharacterTextSplitter, to break up these documents into smaller chunks. HuggingFaceEmbeddings is then used to create embeddings for each chunk and we use Facebook AI Similarity Search (FAISS) to index the embeddings. For phase two, the Question and Answer, FAISS is used to retrieve relevant chunks. CTransformers is used for language model interactions and uses these chunks to generate the answer. The answer is then displayed on the browser screen. For comparison purposes, we develop three versions of this system. The first version utilizes data and knowledge from a pdf on the local store. The second version uses Google search engine AI APIs to send the query and receive the query result. The third one is a hybrid form which uses the local bot to handle the query. If it is unable to do so, it will then fall back to use the search engine AI bot. This paper will only examine and compare the results of version 1 and version 2. We will also briefly discuss the advantages and disadvantages of public and private AI bots, as well security concerns. According to our experimental results, the search engine AI outperforms the private local AI bots.