Debugging
Introduction
This document provides a structured approach for diagnosing and resolving issues in your GLChat application. It covers two primary types of problems: critical errors that cause the application to fail and accuracy issues that lead to suboptimal responses. Following this guide will help you efficiently troubleshoot and improve your chatbot's performance.
Core Concepts: The State and the Pipeline
GLChat operates on a pipeline architecture. Every incoming request is encapsulated into a single Python dictionary known as the state. This state object contains all relevant information, such as the user's query, model, and configuration parameters.
The state is then passed sequentially through a series of processing steps. Each step can read data from, and write data to, the state. A deep understanding of this state-passing mechanism is fundamental to effective debugging, as most issues can be traced back to an incorrect or unexpected value within the state at a specific point in the pipeline.
Common Debugging Scenarios
Most issues you'll face fall into two categories:
Functional Errors: Critical issues that stop the pipeline from completing, often resulting in a crash and a Python traceback in the logs.
Accuracy Issues: More subtle problems where the application runs without error but the chatbot's responses are incorrect, irrelevant, or low-quality.
This guide is structured to address both scenarios in detail.
Last updated