Initial Interactions and Issue Identification with LLM Connection

This section explores the initial stages of interaction between a user and the chatbot, focusing on the seamless integration with a Language Learning Model (LLM) to enhance user experience. We will dissect the steps from the moment a user initiates contact, through issue re-characterization and identification, up to the point where geographical information is requested.


Initiating User Engagement

The process kicks off when a tenant responds to an initial query regarding their housing situation, with their response stored in a variable termed welcome . This marks the beginning of the engagement, setting the stage for subsequent actions.

Google Sheets Integration

Subsequently, an entry is created in a Google Sheet, documenting various pieces of information such as chat ID, the current date, and the chat's URL. This step is critical for tracking the conversation's source and progress, whether it stems from specific websites or channels, and includes key details like the conversation's status.

Legal Advice Disclaimer and OpenAI Webhook

Early in the conversation, users are presented with a disclaimer clarifying the nature of the advice provided — highlighting that the interaction is with a bot, not a human lawyer. This transparency is crucial for setting expectations. The process continues with a webhook to OpenAI, passing through authorization to access the GPT-4 model, aiming to rephrase the user's inquiry into a more generalized context related to landlord-tenant issues.

Inquiry Refinement and Issue Identification

With the inquiry rephrased, the chatbot initiates another interaction with OpenAI to quantify the potential legal issues identified within the user's input, aiming to output an integer reflecting the number of issues recognized. This approach refines the user's issue into a variable called refined issue , laying the groundwork for deeper analysis.

Filtering and Issue Categorization

Upon identifying at least one legal issue, an additional row is inserted into a Google Sheet dedicated to tracking such issues, aiding in content optimization. Conversely, if no legal issue is identified, the user is prompted for more information or directed towards further help. Another API call to OpenAI is made to categorize the identified issue strictly, relying on the refined issue for accuracy.

Updating Chat Records and Further Actions

The chat record is updated in Google Sheets with the categorized matter type. Based on this categorization, the process either proceeds with additional API calls for deeper engagement or directs the user towards the help desk for more personalized assistance. This differentiation ensures that users facing unique legal challenges receive the most appropriate form of help.

Empathic Response and Educational Engagement

The chatbot employs GPT-3.5 Turbo for generating responses that are not only empathetic but also educational, aiming to rephrase inquiries at a seventh-grade reading level. This step emphasizes empathy and education, ensuring the chatbot's interactions are informative and supportive. The goal is to make the chatbot interaction feel more conversational and less transactional, gradually building on the user's concerns to foster a deeper understanding of their legal issue.

Conclusion and Request for Geographical Information

The culmination of this initial interaction phase is marked by the chatbot's empathetic response, setting the stage for the next step: requesting the user's zip code. This transition signifies the chatbot's readiness to delve into more specific assistance based on geographical relevancy, underscoring the system's nuanced approach to user engagement and support.

This detailed walkthrough outlines the critical steps in the initial interaction between the user and the chatbot, showcasing the integration of advanced technologies to streamline the user experience while providing targeted legal assistance.

Did this answer your question? Thanks for the feedback There was a problem submitting your feedback. Please try again later.