Enable Oregon Law Help RAG tool for family law queries#351
Conversation
yangm2
left a comment
There was a problem hiding this comment.
Unfortunately, this "quickly enable Family Law" on staging got a little complicated.
| ## Overview | ||
|
|
||
| Tenant First Aid is a chatbot application that provides legal information related to housing and eviction in Oregon. The system uses a Retrieval-Augmented Generation (RAG) architecture to provide accurate, contextual responses based on Oregon housing law documents. The LangChain framework is used to abstract models and agents. | ||
| Tenant First Aid is a chatbot application that provides legal information related to housing, eviction, and family law in Oregon. The system uses a Retrieval-Augmented Generation (RAG) architecture to provide accurate, contextual responses based on Oregon housing law documents. The LangChain framework is used to abstract models and agents. |
There was a problem hiding this comment.
We only want this change if the environment variable ENV == staging since we don't want to enable this behavior for TFA on prod.
There was a problem hiding this comment.
Just noticed that we have an inconsistency in how ENV is defined for GitHub environments (staging or prod) and how it is defined in the .env.example file (dev)
There was a problem hiding this comment.
Do we intend to set ENV VAR for VERTEX_AI_DATASTORE_OREGON_LAW_HELP in both Staging and Prod?
There was a problem hiding this comment.
uh, when it was just the tenant law pages in that datastore, it would have been for both staging and prod, but right now since it also has family law, it doesn't make sense to turn it on for Prod.
There was a problem hiding this comment.
Would it make sense to switch on the existence of VERTEX_AI_DATASTORE_OREGON_LAW_HELP for this feature as opposed to ENV == staging? That way, if this does eventually go to PROD, we would need only set VERTEX_AI_DATASTORE_OREGON_LAW_HELP for that environment, avoiding a code change.
|
|
||
| **Hard constraints:** | ||
| - Only answer questions about housing law in Oregon; do not answer questions about other states or topics unrelated to housing law. | ||
| - Only answer questions about housing law or family law in Oregon; do not answer questions about other states or topics unrelated to these areas. |
There was a problem hiding this comment.
This part of the system prompt needs to be conditional on ENV
|
I think maybe we want to wait for #349 to land so that this will become a bit more straight-forward. What do you think? |
|
All of the code is complete to implement the Oregon law help housing and family law tools separately. I tried to instruct the agent to leverage all of the relevant data stores when responding, but unfortunately the results are much worse. I'd appreciate if someone could review the system prompt changes and provide some feedback. |
What type of PR is this? (check all applicable)
Description
Activates the
retrieve_oregon_law_helpRAG tool backed by theoregon-law-help-search-2026Vertex AI datastore. The tool was previously defined but commented out of the registry. WhenVERTEX_AI_DATASTORE_OREGON_LAW_HELPis set, the agent will use it to answer family law questions (divorce, child custody, child support, domestic relations) alongside the existing housing law tool.Changes:
retrieve_oregon_law_helptool description to cover housing and family lawRAG_TOOL_REGISTRY(auto-activates via env var, no-op if unset).env.examplewith staging datastore ID referenceRelated Tickets & Documents
QA Instructions, Screenshots, Recordings
VERTEX_AI_DATASTORE_OREGON_LAW_HELP=oregon-law-help-search-2026_1775704132316inbackend/.envretrieve_oregon_law_helpappears in LangSmith tracesNote:
retrieve_city_state_lawsmay also fire on family law questions due to the city law trigger in the system prompt — known behavior.Added/updated tests?
test_get_active_rag_tools_returns_all_configured_datastoresDocumentation
Architecture.mdhas been updated[optional] Are there any post deployment tasks we need to perform?
Set
VERTEX_AI_DATASTORE_OREGON_LAW_HELPin staging environment.