Project Purpose

ChatUI is an open-source user interface developed by Hugging Face, designed for interacting with open-source large language models. It serves as the foundation for HuggingChat, a completely open-source platform similar to ChatGPT, emphasizing transparency and accessibility in AI interactions.

Architecture

Overall System Architecture

Here is the system architecture overview:

Untitled

The Chat-UI is built using a client-server architecture. The client side of the application is responsible for handling the user interface and sending and receiving messages from the server. The server side of the application is responsible for handling the routing of messages to the LLM.

Untitled

The LLM is a cloud-based service that provides natural language processing capabilities, running in HuggingFace. The LLM can be used to generate text, translate languages, and answer questions, like GPT.

The database uses a database called MongoDB to store chat histories from the client side, which allows users to review what they say easily.

Detailed Model Architecture

For model parts, here is the architecture overview:

Untitled

The Chat-UI boasts a robust Web Search capability that streamlines information retrieval. The process follows these steps:

  1. Formulating an appropriate search query based on the user's input.
  2. Conducting web searches and extracting relevant content from various web pages.
  3. Creating embeddings, which are numerical representations, from the extracted texts using a text embedding model.