Back to Data for the Common Good
GSoC 2026

Enhancing a Chatbot for Generating GraphQL and Custom Queries for Cohort Descriptions

This project enhances an existing LLM-powered chatbot for cohort discovery in the PCDC platform, enabling users to describe patient cohorts in natural language and automatically generate accurate GraphQL or custom queries. Building on last year’s system, the project focuses on improving both usability and reliability for complex query construction. The proposed approach introduces a structured and modular architecture to improve query generation quality and system extensibility. It includes a context-aware preprocessing layer, schema-aware candidate retrieval, and a validated structured output pipeline to ensure correctness of generated queries. In addition, the chatbot will be extended into a multi-tool agent capable of handling different user intents, including general inquiry, documentation browsing, GraphQL generation and modification, and cohort-level summary and comparison. Key deliverables include: (1) an improved NL-to-GraphQL generation pipeline aligned with the PCDC data model; (2) a multi-tool interactive chatbot supporting intent routing and multi-turn interactions; (3) an evaluation framework for benchmarking query accuracy and performance; and (4) enhanced domain-aware term normalization. This project aims to provide a more robust and user-friendly interface for clinical researchers to explore cohort data efficiently.

Project details

Contributor

YujingDong

Mentors

Not available

Technologies

Not listed in the archive