GSoC icon indicating copy to clipboard operation
GSoC copied to clipboard

LLM Copilot for cBioPortal

Open jjgao opened this issue 1 year ago • 10 comments

Background

cBioPortal is a powerful platform for exploring cancer genomics data, but its rich interface can be challenging for new users to navigate and interpret. An integrated Copilot (AI assistant powered by LLMs) could guide users through key pages of cBioPortal, answering questions and providing contextual help in real-time. This Copilot concept can be applied to multiple parts of the portal, including:

  • Query Page: Assists users in selecting relevant studies and genomic profiles for their analysis through natural language suggestions or explanations of available options.
  • Study View Page: Helps users navigate study-level data (genomic alterations, clinical summaries, etc.), highlighting important findings and answering questions about the cohort’s genomic and clinical landscape.
  • Results Page: Guides users through complex visualizations (Oncoprint, Plots, Mutations, Mutual Exclusivity, etc.), explaining charts and results, and helping interpret findings (e.g. what a mutual exclusivity plot means or how to download data).
  • Comparison Page: Assists in comparing patient groups (e.g. mutated vs. wild-type cases) by explaining differences in genomic or clinical characteristics and helping users set up or interpret group comparisons.
  • Patient View Page: Helps users understand a single patient’s data by summarizing the patient’s “journey” (diagnosis, treatments, outcomes) and explaining specific mutations or treatment history in context.

While the Copilot could eventually span all five pages above, the primary goal for GSoC 2025 is to achieve deep integration on at least one page rather than superficial support across all pages. We would recommend that the proposed project focus on one page. By narrowing the scope to one page, we aim to deliver a fully functional and insightful assistant experience that can later be extended to other parts of cBioPortal. The goal is to fully understand the technical feasibility and showcases the Copilot’s capabilities.

Benefits to the Community

  • Improved User Experience: This project will make cBioPortal more intuitive and user-friendly, especially for novices. An AI Copilot can lower the learning curve by providing on-demand explanations and guidance, allowing researchers and clinicians to focus on insights rather than figuring out the tool.
  • Innovation in Bioinformatics Tools: Implementing an LLM-driven assistant in cBioPortal will be a novel proof-of-concept for how AI can enhance bioinformatics software. It could inspire similar features in other scientific platforms and spark further development of intelligent user assistance in open-source tools.
  • Efficiency in Data Analysis: Researchers and clinicians will be able to navigate large genomic datasets more efficiently with the Copilot’s help. For example, instead of manually searching documentation, a user could ask the Copilot questions like “How many patients have this alteration?” or “What does this clinical term mean?” and get quick answers. This accelerates data interpretation and could lead to faster hypotheses generation or insights.
  • Community and Educational Value: A well-documented Copilot feature can also serve as an educational resource. New contributors can learn from the implementation about integrating AI into web applications. Users of cBioPortal will indirectly learn more about genomics as the Copilot explains concepts to them. Plus, the feature shows the community that cBioPortal is staying at the forefront by adopting modern AI assistance capabilities.

Overall, the Copilot integration aims to enhance cBioPortal’s functionality and accessibility, ensuring that the research community can leverage the portal’s full potential with greater ease and understanding. The project’s outcome will not only benefit current users but also lay the groundwork for future expansions of AI-driven assistance across the platform.

Approach

We will develop an interactive Copilot panel or chatbot UI within the chosen cBioPortal page. The Copilot will leverage a Large Language Model (LLM) to understand user questions or actions and provide helpful, context-specific responses. Key steps include:

  • Backend Integration (Java): Extend cBioPortal’s Java backend if necessary to gather the relevant context from the portal (such as current study details, selected patient data, or query parameters) and make it available to the Copilot. This may involve utilizing data fetched by the current page, creating new API endpoints or services to retrieve metadata (e.g. study descriptions, gene annotations, patient clinical data) on the fly.
  • API Development: Ensure that all information the Copilot needs (e.g. definitions of genomic terms, interpretation of plots, data summaries) is either already fetched by the page, or can be retrieved through cBioPortal’s APIs. We might enhance existing APIs or add new ones to provide richer context. This will enable the LLM to ground its answers in real cBioPortal data.
  • LLM Integration: Use an LLM to power the Copilot’s natural language understanding and generation. The Copilot will be prompted with the context from the current page and the user’s query. We will likely use a hosted LLM service or an open-source model, depending on what’s feasible within the project (ensuring compliance with any data privacy or hosting constraints).
  • Prompt Engineering: Craft effective prompts and conversation flows so that the LLM provides accurate and relevant assistance. This involves instructing the LLM on cBioPortal-specific roles (e.g. “You are an expert assistant for a cancer genomics portal…”) and feeding it context like “the user is looking at Oncoprint for Study X” or “the user selected patient Y with these mutations”. Iterative refinement of prompts will be done to handle different user questions (from basic “what is shown in this plot?” to complex “how do I find patients with KRAS mutations and treated with sotorasib?”) and to ensure the responses are correct, concise, and helpful.
  • UI/UX Integration: Design a user-friendly interface element on the page (such as a chat window or help sidebar) where users can interact with the Copilot. The UI will display the Copilot’s guidance and allow the user to ask follow-up questions. It should feel like a seamless part of cBioPortal, with context-aware behavior (for example, suggesting what to do next or providing explanations without the user always needing to ask).

Throughout development, we will test the Copilot’s responses for accuracy and helpfulness. We will also document how the context is gathered and used, to make it easier to expand the Copilot to the other pages in the future. If time permits after achieving a solid integration on the primary page, we can create a minimal prototype on one of the other pages to demonstrate scalability.

Technologies

  • Java: Used for back-end development in cBioPortal. We will use Java to integrate the Copilot with server-side logic, ensuring the LLM has access to necessary data through cBioPortal’s backend.
  • REST APIs: Developing and extending APIs will be crucial for retrieving page-specific metadata and context. This project will likely involve creating new API calls or augmenting existing ones.
  • LLM (Large Language Model): The core of the Copilot’s intelligence. We will utilize an LLM (such as GPT-based models or similar) to interpret user queries and generate helpful responses. The model could be accessed via an API (e.g. OpenAI, Anthropic, or a local model) depending on feasibility and permissions.
  • Prompt Engineering: Techniques for constructing effective prompts and handling the conversation with the LLM. This includes providing context, controlling the tone and detail of responses, and guiding the model to stay on topic (for instance, focusing on genomic data interpretation rather than general knowledge).

Expected Outcome

By the end of the project we expect to deliver:

  • Copilot on One Key Page: A fully functional, context-aware Copilot integrated into one of the major cBioPortal pages (as identified in the scope). Users should be able to interact with it to get assistance specific to that page (e.g. asking “What does this chart mean?” on the Results page and receiving a useful explanation).
  • Enhanced Metadata Access: Any necessary enhancements to cBioPortal’s data retrieval (such as new API endpoints or backend methods) to support the Copilot’s functionality will be implemented. This ensures the Copilot has the data it needs.
  • Documentation and Guides: Clear documentation of the Copilot’s implementation and usage. This will include how to configure or extend it to other pages, instructions for developers to maintain or improve it, and maybe a short user guide section on how to use the Copilot feature.
  • Proof-of-Concept for Expansion: Although we focus on one page, the project will serve as a template for future Copilot integrations in cBioPortal. The outcome will include insights or even a demo on how the Copilot could be rolled out to the other pages (for instance, noting what additional data would be needed for those pages), providing a foundation for continued development after GSoC.

Difficulty

Difficulty Level: Advanced – This project is challenging because it involves cutting-edge integration of AI (LLMs) with a complex bioinformatics platform. The student will need to be comfortable working across the full stack (front-end UI, back-end Java, and external AI services) and handling the uncertainties of LLM interactions. Experience with both software engineering and some understanding of the biological context will be helpful to navigate this project’s complexity.

Skills Required

  • LLM Integration: Experience or willingness to learn how to integrate large language model APIs or libraries. This includes handling API calls, parsing model responses, and possibly fine-tuning prompts or using libraries for better context management.
  • Prompt Engineering: Skill in crafting and refining prompts to get useful outputs from the LLM. The student should be prepared to experiment with prompt phrasing and conversation structure to improve the Copilot’s accuracy and usefulness.
  • Java Development: Strong skills in Java for modifying cBioPortal’s backend, adding new endpoints, and ensuring the application remains robust and efficient with the new features.
  • API Design & Development: Ability to design clear and efficient APIs. The student should be able to extend cBioPortal’s REST API or backend services to provide the data the Copilot needs.
  • Web Integration (Frontend): Familiarity with web development (JavaScript/React) to embed the Copilot interface seamlessly into the cBioPortal UI. While the project description emphasizes backend and LLM, some frontend work will be needed for the user interface.
  • Bioinformatics Domain Knowledge (Preferred): While not strictly required, familiarity with cancer genomics concepts and portals like cBioPortal will be very beneficial. Understanding terms like “oncoprint”, “mutation frequency”, or clinical data will help in guiding the LLM and interpreting what users might ask.

Potential Mentors

  • @pieterlukasse, @forus, @jjgao, Michele Water, Mitchell Parker

jjgao avatar Mar 06 '25 22:03 jjgao

I'm really interested in working on this project — it sounds super exciting! I recently built a chatbot using an LLM that fetched real-time data, so I’m quite confident I can handle the technical aspects of this. I'd love to get started by exploring cBioPortal’s API structure or anything else you suggest — let me know how I should proceed or if there's any initial task I can take up.

Also if i can start drafting a proposal for the same !!

harshagr70 avatar Mar 09 '25 17:03 harshagr70

I came across the copilot project and it seemed fantastic and align perfectly with my experience in RAG techniques, LLM finetuning, Advanced Prompting and system Integration. Having worked recently on similar architectures, I'm confident in my ability to contribute to the technical aspects effectively.

I have visited cBioPortal to better understand the the problem statement. Just wondering that do copilot needs to extract real time data from the page dynamically or would it be suffice to train it on the available data beforehand? This likely depends on the frequency with which the information gets updated on the platform as both real time retrieval(excessive API calls and latency issues) and Pre training on available data(not up to date with recent information) has their own pros and cons.

Would love to hear your suggestions and thoughts on this! Also, is there any specific area where brainstorming and contribution is more impactful at this stage ?

Looking forward to your response!

Regards, Ayush Shaurya Jha

JhaAyush01 avatar Mar 10 '25 18:03 JhaAyush01

Just wondering that do copilot needs to extract real time data from the page dynamically or would it be suffice to train it on the available data beforehand?

@jhaayush2004 Hi Ayush! It should extract real time data from the page dynamically.

forus avatar Mar 17 '25 13:03 forus

Greetings @forus @jjgao @pieterlukasse, I am Siddharth Rajput, a B.Tech (CSE) student at IIIT Delhi, interested in contributing to the "AI Copilot for cBioPortal" project for GSoC 2025.

With my experience in developing an AI-powered Co-pilot for Azure Landing Zones at Microsoft using OpenAI Assistants and Semantic Kernel, along with my focus on NLP and data analysis, I believe I can effectively contribute to this project.

I’m enthusiastic about enhancing cBioPortal’s usability and would appreciate guidance on the project’s roadmap, technical requirements, or resources to prepare effectively.

Looking forward to your response.

https://drive.google.com/file/d/1qwi1dfzeBnOQK69VxYTLcxDh4Auh502n/view?usp=sharing

Best regards, Siddharth Rajput

Rajputsiddharth avatar Mar 17 '25 14:03 Rajputsiddharth

It's useful to know that there is already a Proof of Concept (POC) that navigates cBioPortal using hyperlinks.

🔹 Demo: You can see it in action here: LinkedIn Demo

Key Insight: URL-Based Navigation A useful property of cBioPortal is that much (though not all) of its state can be represented via URLs with structured HTTP parameters.

Example: This OncoPrint visualization for the MSK-CHORD (MSK, Nature 2024) study with TP53 and TRAF3IP2 genes selected: OncoPrint Example

Challenges & Areas for Improvement

1️⃣ Limited UI Coverage with URLs

Not all UI states can be represented through URLs. A potential improvement: Modify the frontend to better expose states via URL parameters. 2️⃣ Lack of URL Discoverability

URLs must be explicitly documented for the LLM to use them. How can we make the copilot autonomously discover new UI functionality when cBioPortal updates? 3️⃣ POC can't read the screen —It Can Navigate but Not Read

The copilot can take users to pages but cannot interpret content once there. How can we enable the copilot to "see" and extract relevant information from the UI dynamically? 4️⃣ LLM Response Quality & Evaluation

The POC's responses are not always optimal. A key part of your project will be to develop an LLM Evaluation Framework (e.g., LangSmith). This should compare copilot responses against a curated golden dataset, track performance on new prompts, and implement automated + human feedback loops for continuous improvement.

What to Brainstorm?

🔹 How can we systematically evaluate and improve the copilot’s accuracy and usefulness? 🔹 How can we make the copilot perceive the UI state the way a human would? 🔹 Can we enable the copilot to map and adapt to new UI elements dynamically—like a robotic vacuum learning a new room? 🔹 Would improving semantic tagging in cBioPortal (e.g., better accessibility for screen readers) also help the copilot extract information more effectively?

Looking forward to your ideas!

forus avatar Mar 17 '25 14:03 forus

Hello @forus, @jjgao, @pieterlukasse

I am Vaishvi Khandelwal, an IT sophomore at VJTI Mumbai, with a passion for AI/ML, web development, and retrieval-augmented generation (RAG). I've previously built a multimodal RAG system and developed a RAG-based chatbot for documentation, giving me hands-on experience in optimizing retrieval pipelines for technical content.

I am enthusiastic for cBioPortal Copilot project. After reviewing the current sources shared, I wanted to ask, have we considered implementing a hybrid approach where the Copilot could leverage both URL parameters and a knowledge graph of the interface to understand context? This might help address the "reading" limitation in the current POC.

Additionally, could you point me to specific resources, tasks, or areas in the codebase that would help me align my contributions effectively? I look forward to discussing ideas and your thoughts.

Thanks & Regards, Vaishvi Khandelwal Email: [email protected]

vaishvi2811 avatar Mar 18 '25 19:03 vaishvi2811

Hi @pieterlukasse, @forus, @jjgao

I am Markéta, a Software Engineering student at Masaryk University, and I am very interested in contributing to cBioPortal. I have a strong passion for AI-driven solutions in precision medicine, and coming from a family with a medical background, I am particularly motivated to develop open-source AI tools that enhance clinical decision-making for medical professionals.

With experience in Gen AI, LLMs, and prompt engineering, I have the following suggestions for the current challenges:

  1. Limited UI Coverage with URLs – develop new API endpoints to expose UI metadata
  2. Lack of URL Discoverability – implement automated URL indexing to dynamically detect new UI elements
  3. POC Can’t Read the Screen – use Playwright to extract and interpret real-time information from the cBioPortal UI
  4. LLM Response Quality & Evaluation – design an LLM evaluation framework to assess response accuracy

I look forward to submitting my final proposal and hopefully working with you.

Best regards, Markéta Schlemmerová Email: [email protected]

belatrix0 avatar Mar 24 '25 01:03 belatrix0

Hello @pieterlukasse @forus @jjgao , My name is Aakash Mallik and I am a Final year undergraduate at the National Institute of Technology Karnataka, Surathkal. am currently majoring in Electrical and Electronics Engineering, and hold a minor specialization in Computer Science Engineering.

I have previously worked as a research intern at premier institutes like IISc and IIT Delhi. At IIT Delhi my work involved working on medical data to create an initial protoype model for the prediction of progressionof Non-Alcoholic Fatty Liver Disease(NAFLD), under Dr. Tapan K Gandhi.

Apart from this I have worked at 4x startups. My recent work includes being an AI researcher and developer at an AI wearable startup, Neosapien (link: https://neosapien.xyz/) . Over here we build smart pendants that serve as an assistant and extension to your memory. Here I worked i the AI team to develope novel strategies to transcribe and transliterate data, chunk and store them and retrieve them. As one of the early engineerd I was tasked with creatig the RAG based retrieval pipeline. I worked extensively on promptig strategies that would serve the best to the user. As the USP of this product is to be a "Second Brain" to the user, the accuracy and recall of the product had to be high. My majority work was to get this pipeline in place along with building API endpoints for these services.

I have also worked at OnTheRecord Technologies, California as a remote engineer wherein I finetuned a Speec-To-Text Models for their Legal Proceedings Transcription software.

I have also freelanced as a web-developer working with React and NextJs.

Thank you for your time.

Cheers, Aakash Mallik email: [email protected]

mallikaakash avatar Mar 24 '25 09:03 mallikaakash

Hello @pieterlukasse @forus @jjgao I am Jie Chen, a Software Engineering student at Nanjing University(Top5 University in China).I am writing to express my strong interest in contributing to the AI Copilot for cBioPortal project as part of Google Summer of Code 2025. As a passionate software developer with a deep appreciation for the intersection of AI and bioinformatics, I see this project as an opportunity to make a meaningful impact—helping researchers and clinicians navigate complex genomic data with greater ease and efficiency.

Why This Project Matters to Me Cancer research is not just about data—it’s about lives. Every genomic dataset analyzed, every mutation discovered, and every insight gained brings us closer to understanding and combating this disease. However, powerful tools like cBioPortal often come with a steep learning curve, limiting accessibility for those without deep technical expertise. By integrating an LLM-powered AI Copilot, we can break down barriers and ensure that valuable insights are just a question away—whether it's a researcher seeking mutation frequency data or a clinician trying to understand a specific genomic alteration.

I strongly believe that AI should augment human expertise, not replace it. This project embodies that philosophy: enabling experts to focus on discovery while the Copilot handles navigation, interpretation, and context retrieval. The potential to empower the research community and accelerate discoveries makes this challenge deeply meaningful to me.

My Relevant Skills & Experience I bring a unique blend of expertise that aligns perfectly with this project’s requirements:

LLM Integration & Prompt Engineering: I have hands-on experience working with large language models, designing effective prompts to extract relevant and precise responses, and integrating AI services into real-world applications.

Java Backend Development: I am proficient in Java and have worked on REST API design and backend enhancements, ensuring scalable and efficient data retrieval.

Web Development (React/JavaScript): I have experience in building intuitive UI components that seamlessly integrate AI-powered features, ensuring a smooth user experience.

Bioinformatics & Data Science (Preferred Domain Knowledge): I have worked with genomic datasets and understand key concepts such as mutational analysis, clinical cohort comparisons, and Oncoprint visualizations. This allows me to craft meaningful Copilot interactions that align with real-world research needs.

My Vision for This Project Rather than just embedding a chatbot, I envision a deeply integrated, context-aware Copilot that feels like a true research assistant. A system that understands the user’s intent, dynamically retrieves relevant information, and provides actionable insights—not just generic AI responses. Through a combination of intelligent API design, backend enhancements, and UI optimization, I want to ensure that this Copilot transforms the way researchers interact with cBioPortal.

Why I Am the Right Candidate Beyond technical expertise, I bring commitment, curiosity, and a relentless drive to solve meaningful problems. I thrive in complex, interdisciplinary projects, and I am eager to contribute not just as a developer, but as someone who understands the profound human impact behind this work.

I would be honored to collaborate with the cBioPortal community to build something that can truly make a difference. Thank you for your time and consideration—I look forward to the opportunity to contribute.

Best regards, Jie Chen, email: [email protected]

JaneChennn avatar Apr 01 '25 07:04 JaneChennn

Proposed Solutions for Copilot Issues

This is my proposed set of solutions addressing the challenges mentioned in the post. I hope they will be helpful.

1️⃣ Evaluating & Improving Copilot’s Accuracy

Solution: Build an LLM Evaluation Framework

  • Golden Dataset: Collect expert Q&A pairs, covering edge cases.
  • Automated Scoring: Use BLEU, ROUGE, BERTScore for response evaluation.
  • User Feedback Loop: Implement like/dislike feedback + RLHF fine-tuning.
  • Prompt Optimization: Use LangSmith for failure tracking & A/B testing.
  • Dashboard: Monitor accuracy, response time, and user satisfaction.

2️⃣ Making Copilot Understand UI Like a Human

Solution: Semantic UI Parsing

  • Enhance UI Tagging: Add data-* attributes for better recognition.
  • Enable DOM Parsing: Use Puppeteer/Playwright to extract content.
  • Track UI States: Store filters, clicked buttons, etc., using localStorage.
  • Use Vision-Language Models (VLMs): GPT-4V for screenshot analysis.

3️⃣ Adapting to UI Changes Dynamically

Solution: Automated UI Mapping

  • UI Change Detection: Use MutationObservers to detect real-time modifications.
  • Automate Navigation Mapping: Crawl all UI elements & functionalities.
  • NLP-Based UI Clustering: Recognize renamed/moved UI components.
  • Few-Shot Learning: Train Copilot to match new elements to past interactions.

4️⃣ Improving Data Extraction with Better UI Metadata

Solution: Optimize Accessibility & API Structure

  • Use ARIA Tags: Improve accessibility for better LLM comprehension.
  • Expose API Endpoints: Provide structured data instead of HTML scraping.
  • Add JSON-LD Markup: Use schema.org metadata for structured extraction.
  • Auto-Generate UI Descriptions: Train Copilot using automated page descriptions.

JaneChennn avatar Apr 01 '25 08:04 JaneChennn