Chapter 9: Exercises
Below are five exercises designed to teach you to engage hands-on with the principles introduced in Chapter 9 by using a no-code AI platform to create a knowledge assistant to provide legal information about housing issues using public information.
How to Use These Exercises
Get Started:
Create a free LawDroid Builder. (Visit https://lawdroid.com/subscriptions/lawdroid-open-access/ and create account). Make sure to use your suffolk.edu email address.
Await manual approval of your account. I will approve your account within 24 hours.
Approval of your account. Once you receive an email notifying you that your account is approved, you can log in here: https://lawdroid.com/.
Launch LawDroid Builder. Visit your my account page (https://lawdroid.com/account/) and use the "Launch" button to launch LawDroid Builder. It will take you to https://bot.lawdroid.com/bots.
Watch this Loom. Follow instructions in my Loom video to complete set up. For step-by-step instructions, see Further Instructions below (found after exercises).
Source Document: Use this URL (https://www.mass.gov/info-details/tenants-guide-to-eviction) as your source document per the instructions in the Loom video.
OpenAI API Key: You will need an OpenAI API key to integrate GPT-4o per the instructions in the Loom video. I will provide you with this key by way of a Class Announcement. Please do not share this key with anyone.
Exercises:
Below are five hands-on exercises designed to help you build and test a Retrieval-Augmented Generation (RAG) chatbot using the housing legal information provided.
- Copy/Paste each prompt into your chatbot’s interface, one exercise at a time.
- Read the chatbot’s response carefully:
Is it factually accurate based on the provided housing legal information? Is it formatted in a clear, helpful way for a tenant or layperson? Does it align with the Chapter 9 theme of improving access to justice through AI? - Reflect on your results: Note any inaccuracies or missing details. Consider whether the chatbot’s answer is user-friendly and ethically sound.
Exercise 1: Receiving a 14-Day Notice to Quit
Prompt:
I just got a 14-day notice to quit because I'm behind on my rent. Do I have to move out immediately?
Reflection: Note your reflections as per instructions 2-3 above.
Exercise 2: Facing Lockout Threats
Prompt:
My landlord said if I don’t pay the rent by Friday, I’m getting locked out on Saturday. Is that legal? Can my landlord change the locks to force me out?
Reflection: Note your reflections as per instructions 2-3 above.
Exercise 3: Summons and Complaint Response
Prompt:
I got a Summons and Complaint for eviction. What are my next steps, and do I need to file anything with the court?
Reflection: Note your reflections as per instructions 2-3 above.
Exercise 4: Post-Eviction Trial Options
Prompt:
The judge decided I have to leave my apartment. Can I appeal? How do I ask for extra time to move out if I have a disability?
Reflection: Note your reflections as per instructions 2-3 above.
Exercise 5: RAG Chatbot Creation Feedback
Reflection: What did you think about setting up the knowledge assistant? Was it difficult? Easy? What were your initial expectations? What would you like it to do differently? Any other thoughts you'd like to share?
Further Instructions for Creating Knowledge Assistant
1. Log into LawDroid Builder
- Start by logging into the LawDroid Builder platform.
- You will be directed to the main screen that displays 'Bots'.
2. Set Up OpenAI Integration
- Navigate to the integrations page (snowflake icon).
- Click on OpenAI, then select the OpenAI icon.
- Copy the provided API key from the announcement and paste it into the designated field.
- Click 'Save' to store the API key.
3. Create a Knowledge Assistant Template
- Go to the 'Templates' section.
- Select the 'Knowledge Assistant' template by clicking 'Use Template'.
- This will auto-generate a basic knowledge assistant.
4. Configure the Knowledge Assistant
- Click on 'Q and A' within the assistant.
- Set the question prompt to 'Ask me a question about housing'.
- Ensure the AI focuses solely on the provided source document by keeping the prompt as is.
- Select model version GPT-4o for the AI.
- Set the temperature to 0 for accurate legal responses.
- Add an 'Exit' button for users to stop asking questions.
5. Save Your Work
- Click 'Save' to ensure all changes are recorded.
6. Create a Knowledge Base
- Return to the integrations icon (snowflake).
- Click on the knowledge management button (brain icon).
- Select 'Knowledge Bases' and click the '+' sign to create a new base.
- Name the knowledge base (e.g., 'Housing KB').
7. Scrape Relevant Information
- Choose to create the knowledge base by scraping a webpage.
- Enter the URL for the Massachusetts state tenants guide on eviction.
- Confirm that the content is public and can be used freely.
- Click 'Save' to embed the information into the vector database.
8. Link Knowledge Base to the Assistant
- Return to the bot screen and select the knowledge assistant.
- Go back to 'Q&A' and choose 'Housing KB' from the dropdown menu.
- Click 'Save' to finalize the connection.
9. Test the Chatbot
- Click on the bot icon in the lower right corner to initiate testing.
- Enter a sample question (e.g., about a 14-day notice to quit).
- Review the AI's response for accuracy and helpfulness.
10. Document Your Reflections
- As you test the bot, take notes on the responses.
- Assess if the answers are helpful, accurate, and well-formatted.
- Submit your reflections for review.
Link to Loom