neurobagel / query-tool-ai

MIT License
2 stars 0 forks source link

Parsing user prompt #5

Closed rmanaem closed 3 months ago

rmanaem commented 5 months ago

Outcome

The model should be able to take a natural language prompt from user and parse that into a dictionary where keys map to Neurobagel query model fields

Examples

prompt: How many female subjects older than 50 with a Parkinson’s diagnosis?

{sex: female, min_age: 50, diagnosis: Parkinsons}

prompt: How many male healthy control subjects?

{sex: male, healthy_control: True}

prompt: How many subjects between 20 and 80 yrs old who have at least 3 phenotypic sessions and 2 imaging sessions?

{min_age: 20, max_age: 80, num_matching_phenotypic_sessions: 3, num_matching_imaging_sessions: 2}

What should happen if a prompt includes fields we don’t support (yet) like race and socio-economic status? Perhaps an informative message saying “Neurobagel currently doesn’t support the search for race and socioeconomic status” e.g.,

User: How many subjects of x race between the ages of 20 and 50 Model: Unfortunately, Neurobagel currently doesn’t support a search for race, would you like me to search for subjects between the ages of 20 and 50 instead?

Resources

Neurobagel query model fields

Tasks

rmanaem commented 3 months ago

@Raya679 Feel free to close this milestone since it has been addressed 🎉