codeforpdx / codeforpdx/tenantfirstaid

RAG Approach does not include "definitions" sections of relevant law

Open
#201 4 comments 0 reactions 1 assignee View on GitHub

@apkostka is already working on this.

Since Oct 16, 2025.

backend bug external-RAG help wanted question RFC
Dominant language
Python
Stars
13
Forks
21
Avg merge
6d 7h
Merged PRs (30d)
3

Description

NOTE: this was found on the branch for #192 using Vertex AI Search, not current main.

During a recent conversation, TFA gave me some bad information about delivering "written notice" to a landlord.

**Model**: Excellent. For a two-bedroom apartment in Portland, the required relocation 
assistance payment is **$4,200**. You should now send a written demand to your landlord.
 An email is perfectly acceptable and creates a clear time-stamped record. Below is a
 template you can adapt. Fill in the bracketed information and feel free to add any other
 specific details from your conversations.
...

**User**: They have not actually offered to terminate our lease yet, they just brought up that
 they would be open to it. What should we do in the mean time? Are we able to withhold
 rent if we hand them a letter tomorrow?

**Model**: Thank you for that crucial clarification. This changes the immediate strategy.
 Since the landlord has not made a formal offer, you cannot "accept" it. Instead, you must
 be the one to formally notify them of the situation and your intended actions based on
 your legal rights.
...
Are you ready to send a formal notice that presents these two options to your landlord?

**User**: Yes, I am ready to send a formal notice.

**Model**: Excellent. Taking this step is the correct way to protect your rights and force a
 resolution. Below is a template for the formal notice. You should send this via email to
 create a clear, dated record.
...
Their response will determine your next move. Do you have any questions about this notice
 before you send it?

**User**: Are you sure this can be an email? It seems like the law says it has to be a letter
 hand delivered or sent certified to the landlord

**Model**: >That is an excellent and very important question. You are absolutely right to be
 cautious, and your understanding of the law is correct. For a notice this critical, email alone
 is not sufficient unless you have a specific prior written agreement with your landlord.
 Oregon law is very precise about how legal notices must be delivered to be considered
 valid. The statute that governs this is ORS 90.155. According to this law, sending a notice by
 **email is only valid if** you and your landlord have signed a separate written addendum to
 your lease that explicitly agrees to the use of email for legal notices. This addendum must
 be signed *after* your tenancy began and must contain specific warning language required
 by the statute. If you have not signed such an addendum, an email by itself does not count
 as legal notice. Therefore, you should not rely on email alone. To ensure your notice is
 legally binding, you must use one of the following methods: 

1. **Personal Delivery:** You can hand-deliver the written, signed notice to your landlord or
 their designated property manager. This is the strongest method. When you do this, it is a
 very good idea to bring a second copy and ask them to sign and date it as "Received." This
 gives you instant proof. If they refuse to sign, you can simply make a note for your own
 records of the date, time, and person you delivered it to. 

2. **First-Class Mail:** You can mail the notice via standard first-class mail. The law considers
 the notice served three days after you mail it. For your own protection, it is wise to get a
 Certificate of Mailing from the post office. This is different from Certified Mail; it's a simple
 receipt that proves you mailed a letter to that address on that date. 

### The Best Practice: A "Belt and Suspenders" Approach 
To be as safe as possible, I strongly recommend you do all of the following: 
 - **Hand-deliver the physical letter** and try to get a signed receipt.
 - **Send an identical copy via first-class mail** on the same day. 
 - **Also send the email** as you had planned. 

This way, you have satisfied the strict legal requirement with the physical letter, and you also
 have the timestamped, easy-to-read record of the email. If the landlord were to ever claim
 they didn't receive the notice, you would have multiple forms of proof that you sent it.
 Properly delivering this notice is critical. If it's not done correctly, a landlord could ignore it,
 and if this were to end up in court, a judge could rule that you failed to give proper notice,
 which would weaken your position significantly. 

You are right to have questioned this. Always use physical delivery or mail for official 
notices.

This is because in Oregon law (ORS), like most law, there is a section or sections at the beginning of a chapter that defines what some of the terms in the subsequent laws mean. So in ORS 90.155, it says:

... where this chapter requires written notice, service or delivery of that written notice shall be executed by one or more of
 the following methods:

(a)Personal delivery to the landlord or tenant.

(b)First class mail to the landlord or tenant.

(c)If allowed under a written rental agreement, both first class mail and attachment to a designated location. In order for a
 written rental agreement to provide for mail and attachment service of written notices from the landlord to the tenant, the
 agreement must also provide for such service of written notices from the tenant to the landlord. Mail and attachment
 service of written notices shall be executed as follows:

Then in the section relevant to my question, when it says "written notice", it means what was defined in ORS 90.155. Here's the relevant text of ORS 90.360:

(a)Except as provided in this chapter, if there is a material noncompliance by the landlord with the rental agreement or a
 noncompliance with [ORS 90.320 (Landlord to maintain premises in habitable condition)](https://oregon.public.law/statutes/ors_90.320) or [90.730 (Landlord duty to maintain rented space, vacant spaces and common areas in habitable condition)](https://oregon.public.law/statutes/ors_90.730), 
the tenant may deliver a **written notice** to the landlord specifying the acts and omissions constituting the breach and
 that the rental agreement will terminate upon a date not less than 30 days after delivery of the notice if the breach is not
 remedied in seven days in the case of an essential service or 30 days in all other cases, and the rental agreement shall
 terminate as provided in the notice subject to paragraphs (b) and (c) of this subsection. However, in the case of a 
week-to-week tenancy, the rental agreement will terminate upon a date not less than seven days after delivery of the
 notice if the breach is not remedied.

I believe this is because when our RAG approach retrieves relevant sections of the law, even though the vector DB might contain a semantic link between the two instances of "written notice", because it's not contained within the original question it isn't retrieved with the rest of the results. This is confirmed by looking at the retrieval / grounding chunks from gemini, which do not contain a reference to ORS 90.155.

I have a few potential fixes for this which I'll detail in separate comments.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.