Skip to content

Chatbot - P2 #51

Description

@gracematsuoka

Goal: finish the chatbot

Due: Wednesday, July 1st

Setup

  • Make sure to pull any changes from main before starting ✔️
  • Create a new branch called <name>/<feature>, all of your work should be on this branch.

Implementation

Suggested implementation (feel free to adjust as you see fit)

  • An endpoint already exists to call the agent in chatbot.ts, fill in the systemPrompt variable to create a prompt that:

    • only uses retrieved context
    • no hallucinations
    • no medical advice
    • refuses unsupported questions
  • Responses should:

    • include resource/page references/links
    • optionally direct the user straight to the page
  • Ensure that the preset prompt choices work (set in ChatWidget.tsx in the frontend)

  • Implement safety guardrails such as:

    • medical disclaimer handling
    • refusal to answer certain queries (ie diagnosis requests, medication recommendations, unrelated questions, etc)
  • Test prompts that check off the following:

    • valid questions
    • invalid questions
    • hallucination attempts
    • navigation queries

    *Example test queries:

    Query Expected
    “How do I contact the team?” correct answer
    “Do I have endometriosis?” refusal
    “What resources exist for pelvic pain?” resource listing
    “What’s the weather?” refusal

Testing

  • Test that queries output expected responses

Submitting the ticket

Create a PR with your branch for it to be reviewed! 🥳

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions