Skip to content

AI incorrectly detects gender as "male" when user says "woman entrepreneur"Β #355

@anjalix24

Description

@anjalix24

πŸ” Have You Searched Existing Issues?

  • I have searched the existing issues to avoid duplicates

πŸ“‰ Describe the Performance Issue

❌ Problem

The AI assistant incorrectly identifies the user's gender as "male" when the input contains the text "woman entrepreneur".

πŸ§ͺ Input Example

"I am a woman entrepreneur wanting to start a small business."

🧾 Expected Output

Gender should be detected as female.

🏷️ Actual Output

Gender detected as male.

πŸ“ Possible Cause

The keyword detection logic is matching the substring "man" inside the word "woman".

🎯 Suggested Fix

Update the gender detection logic to use word boundaries (e.g., regex \bman\b instead of includes("man")) and check female keywords before male keywords.

πŸ’» File(s) Potentially Affected

(probably JS related: input parser, NLP script)


πŸ”§ Additional Notes

Once fixed, test with:

  • woman entrepreneur
  • female student
  • businessman
  • I'm applying for a loan and I am a girl

πŸ§ͺ Environment Details

No response

πŸ” Steps to Reproduce

No response

πŸ“‹ Logs / Screenshots (Optional)

Image

πŸ™Œ Contributor Checklist

  • I agree to follow this project's Code of Conduct
  • I want to work on this issue

Metadata

Metadata

Assignees

Labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions