C hat HF : Collecting Rich Human Feedback from Real-time Conversations (2024)

Abstract: We introduce ChatHF, an interactive annotation framework for chatbot evaluation, which integrates configurable annotation within a chat interface. ChatHF can be flexibly configured to accommodate various chatbot evaluation tasks, for example detecting offensive content, identifying incorrect or misleading information in chatbot responses, and chatbot responses that might compromise privacy. It supports post-editing of chatbot outputs and supports visual inputs, in addition to an optional voice interface. ChatHF is suitable for collection and annotation of NLP datasets, and Human-Computer Interaction studies, as demonstrated in case studies on image geolocation and assisting older adults with daily activities. ChatHF is publicly accessible at https://chat-hf.com.

## introduction advances in large language models and visionlanguage models have led to surprisingly effective chatbots such as gpt-4v, llama-3, gemini, and many more. while these chatbots display interesting and useful emergent capabilities, they can also exhibit some undesirable behaviors. how to evaluate llm-based chatbots remains a challenge. some studies make use of automated gpt-based evaluations @xcite , but human evaluation is still needed to measure the effectiveness of these automatic metrics on new tasks. other recent works, such as chatbot arena @xcite , make use of human evaluators, but present only holistic evaluations of which model produces "better" outputs (i.e., preference). in this paper we present an interactive framework, chathf ( §3), for evaluation and analysis of chatbots that supports fine-grained error detection and collecting human feedback simultaneously ( §5). rather than the common setup where researchers first collect llm-generated responses then evaluate (or annotate) as an afterthought, we this image depicts the ironman world championship, an annual long-distance triathlon race organized by the world triathlon corporation (wtc). this particular event is held in kailua-kona, hawaii. what event is this? where is the finish line of this race located? the finish line of the ironman world championship is traditionally located on aliʻi drive in kailua-kona, hawaii. envision an approach where the human annotators seamlessly interleave annotation with conversation. that is, human evaluators directly chat with llms on specific topics relevant to the phenomenon to be studied (see figure 1 ). this not only saves the annotator's time and energy to accomplish two tasks in a single pass, but also encourages annotators to engage in more interesting and complex conversations -as we show in two case studies: cooking chatbot @xcite and multimodal privacy qa @xcite . chathf is flexible and can be configured for many annotation tasks, such as offensive outputs @xcite , misinformation @xcite , or compromised privacy @xcite , enabling the creation of curated conversational datasets and the study of emergent behaviors in llm-based chatbots. its unique features include flexible configuration, post-editing of chatbot outputs, and multimodal inputs with images and voice interaction (speech-to-text and text-tospeech). chathf supports both standard nlp data collection and annotation, as well as interactive human-computer interaction (hci) studies involving chatbots. in the two case studies ( §6 and §7), we used chathf to ( 1 ) collect a dataset of image geolocation conversations that are labeled with the granularity of location information revealed at each step of the conversation, and (2) as an interface, to support an hci user study on older adults using chatbots to assist with activities of daily living. ## related work the field of text annotation tools has seen iterative advancements in the past decade. this section gives a high-level overview of previous text annotation tools from two perspectives: conversational texts evaluation and human feedback management. chatbot evaluation stav @xcite and brat @xcite are examples of early text annotation tools. brat supports manual curation of the annotation and is optimized for rich structured annotation tasks and annotator productivity. it also provides high-quality annotation visualization. more recent tools like potato @xcite support higher degrees of configuration and customization and provide even better quality control and productivity enhancement. however, most of them are mostly useful for annotation tasks within one sentence or one paragraph rather than multi-turn conversations. within the field of conversational text annotation tools, there has been only a limited amount of available open-source tools. lida @xcite was the first tool designed specifically for annotating multi-turn conversational text data @xcite . its later evolution matilda @xcite improved it by facilitating multilingual and multi-annotator annotations. however, these tools have no web interfaces and require some technical knowledge for model integration and configuration, which inhibits their accessibility. ez-cat @xcite can be used directly on their web application to both configure text labels, on a message or conversation level, and go through the annotation process. however, ezcat does not have the option to collect multiple labels per turn. in this work, we aim to supply this field with a flexible multi-purpose annotation tool with a configurable and easy-to-use interface. human feedback it is increasingly important to audit and evaluate llms and vlms by human, and in turn, learn from rich and diverse human feedback (see the excellent survey by @xcite ) to improve the model's performance. however, in addition to their restricted accessibility, existing annotation tools are also limited to only utilizing human feedback at the end of each conversation as an afterthought @xcite @xcite . for example, inception @xcite and gate @xcite provide large feature sets, but cannot display conversation data as turns @xcite . lida and matilda fully support conversational text annotation tasks such as task-oriented dialogue systems. however, their frameworks can only be used to annotate static recorded dialogues. such an annotation scheme fails to address human feedback during the conversation, which leads to systemic productivity loss. in contrast, we present a customizable annotation tool capable of managing real-time human feedback during conversations. annotators are allowed to edit model-generated utterances and to reverse and modify chat history to reflect their feedback. we track all these edits and reversals, as well as the reasons why these changes are made as free-text and/or multi-choice annotations. ## chatbot infrastructure chathf supports various models and configuration options for easy prompt engineering and experimentation. our public web demo supports testing openai, anthropic, google gemini, and mistral models directly through their respective apis. for security, all configuration settings like api keys are stored client-side, and can be downloaded and loaded as a yaml file for easy sharing. run locally or self-hosted, chathf can be used with ollama foot_0 and huggingface foot_1 models. additionally, api keys can be hidden in an environment file. for more complex generation schemes, sample code is provided to set up a custom arbitrary generate function. chathf also offers several configuration options to experiment with model settings, such as the system prompt, temperature, timeout limit, and conversation history memory length. any changes are automatically reflected in the chat window. at each turn of the conversation, the model is passed the conversation history truncated to the memory length with the system prompt inserted at the start, and the model generates a response with the set temperature, timing out if the processing time exceeds the timeout limit. multimodality to support voice chatbot applications, chathf integrates the option for text-tospeech on model outputs and speech-to-text with microphone input. features such as press-to-talk, continuous listening, and text-to-speech are customizable, allowing chathf to cater to different needs from accessibility to hands-free operations. interfacing with vision-language models are also possible as chathf allows for image input to the chatbox, which are simply saved as base64 images in the chat history to be sent to the model. user interface chathf is built on a flask backend and a react frontend, with a publicly available codebase released under an apache 2.0 license. we include a flask backend written in python to allow for easier integration of custom models or gener-ation schemes into our chatbot interface. text-tospeech and and speech-to-text are implemented via azure ai speech foot_2 , using their proprietary models. chat history all messages in the chat history are saved into a json log file, timestamped with the date and time. user feedback is saved with each message with the user-specified name and value. in the case of a reversal, the old chat history is not overwritten, and instead, an additional chat history created with all messages until the reversal point. chathf supports downloading the log file locally or to a database such as google firebase foot_3 , as well as uploading a log file to view the chat history or edit the evaluation later. the user also has the option to clear the chat history to start a new conversation. ## customizable annotation configuration in addition to the chatbot interface, chathf enables integrated on-the-fly human evaluation of the generated conversation and allows users to customize the annotation formats according to their needs. during a conversation, the user can annotate user messages, the generated model responses, or both. these messages can be annotated in various formats including binary, likert-scale, multiplechoice, multiple-select, and free-text inputs. all annotation types can have a custom question and the option to require the annotator to provide an explanation through an additional textbox. furthermore, the labels for binary, likert-scale, multiplechoice, and multiple-select annotations are all customizable, and annotations can be specific to user messages, model responses, or both. the full control of the annotation format and customizable labels is implemented as an annotator's configuration panel in our tool located in the upper left corner. the panel settings can be saved and uploaded for reuse later. if needed, custom annotations can also be edited and deleted. in the chatbot interface, if the annotation feature is turned on, icons representing each annotation type appear below each user message or model response (see figure 2 ). users can click on an annotation icon to reveal its prompt and input the specified response. this process is quick and responsive to facilitate real-time fine-grained data collection. to demonstrate the efficacy of chathf's customizable evaluation, we describe and release sample configuration files for our two example use cases. ## rich human feedback along with the more traditional formats for human feedback, chathf includes two unique annotation types to collect real-time post-editing and reversal data for richer human feedback. post-editing post-editing can be useful when only a portion of the model response is incorrect and requires changing or deleting, or if the output could be improved with just a minor addition. for instance, hallucinations and toxic language can be edited out and the offending spans can be easily extracted by comparing the post-edited and original text. post-editing is also helpful when the model is partially correct, such as figure 4 , allowing for fine-grained corrections. crucially, post-editing corrects the conversation history, so that errors cannot propagate. this creates a more seamless chat experience and reduces the need to restart or reverse the conversation, which can be especially valuable in time, effort, or resource sensitive situations such as human studies in real world settings. ( §7). with post-editing selected in the configuration, users can directly edit the llm-generated response. similarly to the other annotations, users may be required to provide an explanation for the edit. upon confirming the post-edit, the previous conversation history before the edit is added to the conversation log as a record of an unsuccessful termination. furthermore, each message stores its post-edit, with the most recent edit and original model output saved to the conversation log file to ensure there is a fair evaluation only the most recent bot-message are editable. a list of the edits made will automatically be generated and saved as well. reversal in other cases, the model may have made an error that was not caught earlier in the figure 5 : in this cooking assistance dialogue task, the model gives the incorrect order of steps without the user immediately realizing. the user then reverses to previous turn to try again, with the model giving the correct order of steps the second time. chathf's reversal option allows for this rich feedback, saving both the reversed chat in the json log as well as either an optional annotator-provided reversal explanation or a simple indication of the success of the final dialogue. by default, when saving the conversation log, the current, most recent conversation is considered successful. multi-branch conversation employing the post-editing and reversal features, chathf can be used to explore a branching dialogue with multiple potentially successful continuations or completions. the set of branching conversations created by postediting and reversing can be represented with a tree structure. at the simplest, a single continuous conversation is represented as one node. once a branch is made, the conversation truncated at the branching point is set as the parent node, and the messages after the branching point both in the previous conversation and in the new conversation are each a child node. this tree of interactions over a single overarching conversation topic can be viewed and each node can be selected to jump to a certain conversation. ## conclusion we present chathf, an interactive, customizable, and open-source tool for evaluating llm-based multimodal chatbots with rich human feedback and annotation. it supports real-time conversation and manual annotation (or human evaluation) at the same time. for example, the users may directly revise llm-generated response or request the llm to regenerate another response when they are not satisfied with the llm-generated response, then continue on the conversation, etc.