Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion app/tests/integration/suitability_prompts.json
Original file line number Diff line number Diff line change
Expand Up @@ -276,7 +276,7 @@
"\\bchiropract(?:ic|or)\\b"
],
"required_fact_patterns": [
"(?:\\bchiropract(?:ic|or)s?\\b(?:(?!(?:\\b(?:acupunctur|massage|naturopath|physiotherap|physical\\s+therap|podiatr|orthotic|counselling)\\w*\\b|\\$\\d|\\b(?:not\\s+(?:covered|reimbursed|eligible)|no\\s+(?:coverage|benefit|reimbursement|chiropractic))\\b|[.!?;]))[\\s\\S]){0,160}(?:(?<!\\bnot\\s)(?<!\\bno\\s)\\$500(?:\\.00)?(?!\\d)(?:(?!(?:\\b(?:acupunctur|massage|naturopath|physiotherap|physical\\s+therap|podiatr|orthotic|counselling)\\w*\\b|\\$2,?000|[.!?;\\n])).){0,40}(?:/\\s*(?:calendar\\s+)?year|\\b(?:a|per)\\s+(?:calendar\\s+)?year\\b|\\bannual(?:ly)?\\b)|(?:/\\s*(?:calendar\\s+)?year|\\b(?:a|per)\\s+(?:calendar\\s+)?year\\b|\\bannual(?:ly)?\\b)(?:(?!(?:\\b(?:acupunctur|massage|naturopath|physiotherap|physical\\s+therap|podiatr|orthotic|counselling)\\w*\\b|\\$2,?000|[.!?;\\n])).){0,40}(?<!\\bnot\\s)(?<!\\bno\\s)\\$500(?:\\.00)?(?!\\d))|(?:(?<!\\bnot\\s)(?<!\\bno\\s)\\$500(?:\\.00)?(?!\\d)(?:(?!(?:\\b(?:acupunctur|massage|naturopath|physiotherap|physical\\s+therap|podiatr|orthotic|counselling)\\w*\\b|\\$2,?000|[.!?;\\n])).){0,40}(?:/\\s*(?:calendar\\s+)?year|\\b(?:a|per)\\s+(?:calendar\\s+)?year\\b|\\bannual(?:ly)?\\b)|(?:/\\s*(?:calendar\\s+)?year|\\b(?:a|per)\\s+(?:calendar\\s+)?year\\b|\\bannual(?:ly)?\\b)(?:(?!(?:\\b(?:acupunctur|massage|naturopath|physiotherap|physical\\s+therap|podiatr|orthotic|counselling)\\w*\\b|\\$2,?000|[.!?;\\n])).){0,40}(?<!\\bnot\\s)(?<!\\bno\\s)\\$500(?:\\.00)?(?!\\d))(?:(?!(?:\\b(?:acupunctur|massage|naturopath|physiotherap|physical\\s+therap|podiatr|orthotic|counselling)\\w*\\b|\\$\\d|\\b(?:not\\s+(?:covered|reimbursed|eligible)|no\\s+(?:coverage|benefit|reimbursement|chiropractic))\\b|[.!?;\\n])).){0,100}\\bchiropract(?:ic|or)s?\\b)"
"(?:\\bchiropract(?:ic|or)s?\\b(?:(?!(?:\\b(?:acupunctur|massage|naturopath|physiotherap|physical\\s+therap|podiatr|orthotic|counselling)\\w*\\b|\\$\\d|\\b(?:not\\s+(?:covered|reimbursed|eligible|actually|really|for)|no\\s+(?:coverage|benefit|reimbursement|chiropractic|for)|never\\s+for|(?:is|are)\\s+(?:not|never|no\\s+longer)|isn't|aren't)\\b|\\b(?:not|no|never)\\b(?=\\s+(?:for\\s+|per[-\\s]+|each\\s+|/\\s*person\\b))|[.!?;]))[\\s\\S]){0,160}(?:(?<!\\bnot\\s)(?<!\\bno\\s)(?<!\\bnever\\s)\\$500(?:\\.00)?(?!\\d)(?=(?:(?!(?:\\b(?:acupunctur|massage|naturopath|physiotherap|physical\\s+therap|podiatr|orthotic|counselling)\\w*\\b|\\$\\d|[.!?;\\n])).){0,40}(?:/\\s*(?:calendar\\s+)?year|\\b(?:a|per)\\s+(?:calendar\\s+)?year\\b|\\bannual(?:ly)?\\b))(?=(?:(?!(?:\\b(?:acupunctur|massage|naturopath|physiotherap|physical\\s+therap|podiatr|orthotic|counselling)\\w*\\b|\\b(?:not|no|never|isn't|aren't)\\b|\\$\\d|[.!?;\\n])).){0,40}(?:/\\s*person\\b|\\b(?:per[-\\s]+|for\\s+each\\s+|each\\s+)(?:covered\\s+)?(?:person|individual|family\\s+member|member|employee)\\b))|(?:/\\s*(?:calendar\\s+)?year|\\b(?:a|per)\\s+(?:calendar\\s+)?year\\b|\\bannual(?:ly)?\\b)(?:(?!(?:\\b(?:acupunctur|massage|naturopath|physiotherap|physical\\s+therap|podiatr|orthotic|counselling)\\w*\\b|\\$\\d|[.!?;\\n])).){0,40}(?<!\\bnot\\s)(?<!\\bno\\s)(?<!\\bnever\\s)\\$500(?:\\.00)?(?!\\d)(?=(?:(?!(?:\\b(?:acupunctur|massage|naturopath|physiotherap|physical\\s+therap|podiatr|orthotic|counselling)\\w*\\b|\\b(?:not|no|never|isn't|aren't)\\b|\\$\\d|[.!?;\\n])).){0,40}(?:/\\s*person\\b|\\b(?:per[-\\s]+|for\\s+each\\s+|each\\s+)(?:covered\\s+)?(?:person|individual|family\\s+member|member|employee)\\b))|(?<!\\bnot\\s)(?<!\\bno\\s)(?<!\\bnever\\s)(?<!\\bnot\\sfor\\s)(?<!\\bno\\sfor\\s)(?<!\\bnever\\sfor\\s)(?:/\\s*person\\b|\\b(?:per[-\\s]+|for\\s+each\\s+|each\\s+)(?:covered\\s+)?(?:person|individual|family\\s+member|member|employee)\\b)(?:(?!(?:\\b(?:acupunctur|massage|naturopath|physiotherap|physical\\s+therap|podiatr|orthotic|counselling)\\w*\\b|\\b(?:not|no|never|isn't|aren't)\\b|\\$\\d|[.!?;\\n])).){0,40}(?:/\\s*(?:calendar\\s+)?year|\\b(?:a|per)\\s+(?:calendar\\s+)?year\\b|\\bannual(?:ly)?\\b)(?:(?!(?:\\b(?:acupunctur|massage|naturopath|physiotherap|physical\\s+therap|podiatr|orthotic|counselling)\\w*\\b|\\b(?:not|no|never|isn't|aren't)\\b|\\$\\d|[.!?;\\n])).){0,40}(?<!\\bnot\\s)(?<!\\bno\\s)(?<!\\bnever\\s)\\$500(?:\\.00)?(?!\\d)|(?<!\\bnot\\s)(?<!\\bno\\s)(?<!\\bnever\\s)(?<!\\bnot\\sfor\\s)(?<!\\bno\\sfor\\s)(?<!\\bnever\\sfor\\s)(?:/\\s*person\\b|\\b(?:per[-\\s]+|for\\s+each\\s+|each\\s+)(?:covered\\s+)?(?:person|individual|family\\s+member|member|employee)\\b)(?:(?!(?:\\b(?:acupunctur|massage|naturopath|physiotherap|physical\\s+therap|podiatr|orthotic|counselling)\\w*\\b|\\b(?:not|no|never|isn't|aren't)\\b|\\$\\d|[.!?;\\n])).){0,40}(?<!\\bnot\\s)(?<!\\bno\\s)(?<!\\bnever\\s)\\$500(?:\\.00)?(?!\\d)(?=(?:(?!(?:\\b(?:acupunctur|massage|naturopath|physiotherap|physical\\s+therap|podiatr|orthotic|counselling)\\w*\\b|\\$\\d|[.!?;\\n])).){0,40}(?:/\\s*(?:calendar\\s+)?year|\\b(?:a|per)\\s+(?:calendar\\s+)?year\\b|\\bannual(?:ly)?\\b)))|(?:(?<!\\bnot\\s)(?<!\\bno\\s)(?<!\\bnever\\s)\\$500(?:\\.00)?(?!\\d)(?=(?:(?!(?:\\b(?:acupunctur|massage|naturopath|physiotherap|physical\\s+therap|podiatr|orthotic|counselling)\\w*\\b|\\$\\d|[.!?;\\n])).){0,40}(?:/\\s*(?:calendar\\s+)?year|\\b(?:a|per)\\s+(?:calendar\\s+)?year\\b|\\bannual(?:ly)?\\b))(?=(?:(?!(?:\\b(?:acupunctur|massage|naturopath|physiotherap|physical\\s+therap|podiatr|orthotic|counselling)\\w*\\b|\\b(?:not|no|never|isn't|aren't)\\b|\\$\\d|[.!?;\\n])).){0,40}(?:/\\s*person\\b|\\b(?:per[-\\s]+|for\\s+each\\s+|each\\s+)(?:covered\\s+)?(?:person|individual|family\\s+member|member|employee)\\b))|(?:/\\s*(?:calendar\\s+)?year|\\b(?:a|per)\\s+(?:calendar\\s+)?year\\b|\\bannual(?:ly)?\\b)(?:(?!(?:\\b(?:acupunctur|massage|naturopath|physiotherap|physical\\s+therap|podiatr|orthotic|counselling)\\w*\\b|\\$\\d|[.!?;\\n])).){0,40}(?<!\\bnot\\s)(?<!\\bno\\s)(?<!\\bnever\\s)\\$500(?:\\.00)?(?!\\d)(?=(?:(?!(?:\\b(?:acupunctur|massage|naturopath|physiotherap|physical\\s+therap|podiatr|orthotic|counselling)\\w*\\b|\\b(?:not|no|never|isn't|aren't)\\b|\\$\\d|[.!?;\\n])).){0,40}(?:/\\s*person\\b|\\b(?:per[-\\s]+|for\\s+each\\s+|each\\s+)(?:covered\\s+)?(?:person|individual|family\\s+member|member|employee)\\b))|(?<!\\bnot\\s)(?<!\\bno\\s)(?<!\\bnever\\s)(?<!\\bnot\\sfor\\s)(?<!\\bno\\sfor\\s)(?<!\\bnever\\sfor\\s)(?:/\\s*person\\b|\\b(?:per[-\\s]+|for\\s+each\\s+|each\\s+)(?:covered\\s+)?(?:person|individual|family\\s+member|member|employee)\\b)(?:(?!(?:\\b(?:acupunctur|massage|naturopath|physiotherap|physical\\s+therap|podiatr|orthotic|counselling)\\w*\\b|\\b(?:not|no|never|isn't|aren't)\\b|\\$\\d|[.!?;\\n])).){0,40}(?:/\\s*(?:calendar\\s+)?year|\\b(?:a|per)\\s+(?:calendar\\s+)?year\\b|\\bannual(?:ly)?\\b)(?:(?!(?:\\b(?:acupunctur|massage|naturopath|physiotherap|physical\\s+therap|podiatr|orthotic|counselling)\\w*\\b|\\b(?:not|no|never|isn't|aren't)\\b|\\$\\d|[.!?;\\n])).){0,40}(?<!\\bnot\\s)(?<!\\bno\\s)(?<!\\bnever\\s)\\$500(?:\\.00)?(?!\\d)|(?<!\\bnot\\s)(?<!\\bno\\s)(?<!\\bnever\\s)(?<!\\bnot\\sfor\\s)(?<!\\bno\\sfor\\s)(?<!\\bnever\\sfor\\s)(?:/\\s*person\\b|\\b(?:per[-\\s]+|for\\s+each\\s+|each\\s+)(?:covered\\s+)?(?:person|individual|family\\s+member|member|employee)\\b)(?:(?!(?:\\b(?:acupunctur|massage|naturopath|physiotherap|physical\\s+therap|podiatr|orthotic|counselling)\\w*\\b|\\b(?:not|no|never|isn't|aren't)\\b|\\$\\d|[.!?;\\n])).){0,40}(?<!\\bnot\\s)(?<!\\bno\\s)(?<!\\bnever\\s)\\$500(?:\\.00)?(?!\\d)(?=(?:(?!(?:\\b(?:acupunctur|massage|naturopath|physiotherap|physical\\s+therap|podiatr|orthotic|counselling)\\w*\\b|\\$\\d|[.!?;\\n])).){0,40}(?:/\\s*(?:calendar\\s+)?year|\\b(?:a|per)\\s+(?:calendar\\s+)?year\\b|\\bannual(?:ly)?\\b)))(?:(?!(?:\\b(?:acupunctur|massage|naturopath|physiotherap|physical\\s+therap|podiatr|orthotic|counselling)\\w*\\b|\\$\\d|\\b(?:not\\s+(?:covered|reimbursed|eligible|actually|really|for)|no\\s+(?:coverage|benefit|reimbursement|chiropractic|for)|never\\s+for|(?:is|are)\\s+(?:not|never|no\\s+longer)|isn't|aren't)\\b|\\b(?:not|no|never)\\b(?=\\s+(?:for\\s+|per[-\\s]+|each\\s+|/\\s*person\\b))|[.!?;\\n])).){0,100}\\bchiropract(?:ic|or)s?\\b)"
],
"forbidden_patterns": [
"/public/docs/forms/Grievance_-_",
Expand Down
74 changes: 73 additions & 1 deletion tests/deploy_integrity/test_suitability_gate.py
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,15 @@ def test_s09_chiropractic_benefits_response_variants():
"[BC Bargaining Unit Health and Dental Benefits]."
),
(
"An annual limit of $500 applies to chiropractic services "
"An annual limit of $500 per person applies to chiropractic services "
"[BC Bargaining Unit Health and Dental Benefits]."
),
(
"Chiropractic treatments have a $500 per person per year limit "
"[BC Bargaining Unit Health and Dental Benefits]."
),
(
"Chiropractic services have a per-person annual limit of $500 "
"[BC Bargaining Unit Health and Dental Benefits]."
),
(
Expand Down Expand Up @@ -579,6 +587,70 @@ def test_failure_diagnostics_include_citations_excerpt_and_raw_response():
),
"forbidden_fact_present",
),
(
"s09_chiropractic_benefits_limit",
(
"Chiropractic coverage is $500/year for the entire family "
"[BC Bargaining Unit Health and Dental Benefits]."
),
"missing_factual_anchor",
),
(
"s09_chiropractic_benefits_limit",
(
"An annual limit of $500 applies to chiropractic services "
"[BC Bargaining Unit Health and Dental Benefits]."
),
"missing_factual_anchor",
),
(
"s09_chiropractic_benefits_limit",
(
"Chiropractic coverage is $500/year, not per person "
"[BC Bargaining Unit Health and Dental Benefits]."
),
"missing_factual_anchor",
),
(
"s09_chiropractic_benefits_limit",
(
"Chiropractic coverage is $500/year, but this isn't per person "
"[BC Bargaining Unit Health and Dental Benefits]."
),
"missing_factual_anchor",
),
(
"s09_chiropractic_benefits_limit",
(
"Chiropractic coverage is $500/year with a $50 deductible per person "
"[BC Bargaining Unit Health and Dental Benefits]."
),
"missing_factual_anchor",
),
(
"s09_chiropractic_benefits_limit",
(
"Chiropractic coverage is not actually $500/year/person; it is $300/year/person "
"[BC Bargaining Unit Health and Dental Benefits]."
),
"missing_factual_anchor",
),
(
"s09_chiropractic_benefits_limit",
(
"Chiropractic coverage: not for each person, but an annual limit of $500 for the household "
"[BC Bargaining Unit Health and Dental Benefits]."
),
"missing_factual_anchor",
),
(
"s09_chiropractic_benefits_limit",
(
"Chiropractic coverage: not per person, but an annual limit of $500 for the household "
"[BC Bargaining Unit Health and Dental Benefits]."
),
"missing_factual_anchor",
),
(
"s09_chiropractic_benefits_limit",
(
Expand Down
Loading