|
| 1 | +# Chat Interface |
| 2 | + |
| 3 | +We've developed an AI-powered chat interface that allows users to ask questions about cBioPortal data in plain English. Please reach out if you'd like to test it on [email protected]. |
| 4 | + |
| 5 | +> **Note:** This is a prototype and work in progress. Features and functionality are actively being developed and improved. |
| 6 | +
|
| 7 | +## What is the Chat Interface? |
| 8 | + |
| 9 | +The cBioPortal chat interface uses Claude, an LLM developed by Anthropic, to help you explore cancer genomics data through conversational queries. The system translates natural language questions into database queries that are executed directly against cBioPortal's ClickHouse database. Instead of navigating through multiple pages or writing complex queries, you can simply ask questions about studies, patients, samples, and treatments in natural language. |
| 10 | + |
| 11 | +## Key Features |
| 12 | + |
| 13 | +- **Natural Language Queries**: Ask questions in plain English without needing to know the technical details of the database structure |
| 14 | +- **Study Information**: Get quick answers about the number of studies, patients, and samples in cBioPortal |
| 15 | +- **Sample Analysis**: Query specific details about samples, including sample types and patient demographics |
| 16 | +- **Treatment Data**: Explore treatment information across different studies |
| 17 | +- **Data Exploration**: Discover insights from the extensive cancer genomics datasets available in cBioPortal |
| 18 | + |
| 19 | +## Example Queries |
| 20 | + |
| 21 | +Here are some example questions you can ask the chat interface: |
| 22 | + |
| 23 | +### General Portal Information |
| 24 | +- "How many studies are in cBioPortal?" |
| 25 | + |
| 26 | +### Study-Specific Queries |
| 27 | +- "How many patients and samples are in the MSK-CHORD Study?" |
| 28 | +- "How many primary samples are in the MSK-CHORD Study?" |
| 29 | +- "What treatment did most patients receive in the MSK-CHORD Study?" |
| 30 | + |
| 31 | +## Tips for Using the Chat Interface |
| 32 | + |
| 33 | +- **Be specific**: Include study names or specific data types when possible |
| 34 | +- **Ask follow-up questions**: The chat interface maintains context, so you can ask related questions in sequence |
| 35 | +- **Explore different angles**: Try rephrasing questions or asking for different perspectives on the data |
| 36 | +- **Learn about the database structure**: You can ask the LLM to explain the database schema and available fields - this can help you formulate more effective questions |
| 37 | + |
| 38 | +## Getting Started |
| 39 | + |
| 40 | +1. Visit [chat.cbioportal.org](https://chat.cbioportal.org/) |
| 41 | +2. Type your question in the chat input |
| 42 | +3. Review the AI-generated response |
| 43 | +4. Ask follow-up questions to dive deeper into the data |
| 44 | + |
| 45 | +## Feedback and Support |
| 46 | + |
| 47 | +The AI chat interface is actively being developed and improved. Your feedback helps us make it better: |
| 48 | + |
| 49 | +- **Use the thumbs up/down buttons**: Each chat response has thumbs up and thumbs down buttons. Please use them to rate the quality and accuracy of the responses - this feedback directly helps us improve the AI's answers. |
| 50 | +- **Report issues or suggestions**: If you encounter any issues or have suggestions for improvement, please reach out through the [cBioPortal Google Group](https://groups.google.com/g/cbioportal). |
| 51 | + |
| 52 | +## Technical Details |
| 53 | + |
| 54 | +### Architecture |
| 55 | + |
| 56 | +The cBioPortal chat interface is built on the following technical stack: |
| 57 | + |
| 58 | +- **User Interface**: Built with [LibreChat](https://github.com/danny-avila/LibreChat), an open-source chat interface |
| 59 | +- **AI Model**: Uses [Claude](https://www.anthropic.com/claude), Anthropic's large language model |
| 60 | +- **MCP Layer**: Model Context Protocol (MCP) servers provide the connection between Claude and cBioPortal data |
| 61 | +- **Database**: Queries are executed against cBioPortal's [ClickHouse](https://clickhouse.com/) database |
| 62 | + |
| 63 | +### How It Works |
| 64 | + |
| 65 | +When you ask a question in the chat interface: |
| 66 | + |
| 67 | +1. Your natural language question is sent to Claude |
| 68 | +2. Claude uses MCP servers to understand the database schema and formulate appropriate queries |
| 69 | +3. The MCP server translates Claude's intent into ClickHouse SQL queries |
| 70 | +4. Query results are returned to Claude, which formats them into a natural language response |
| 71 | +5. You receive the answer along with relevant data |
| 72 | + |
| 73 | +For more information about the MCP servers and how to build your own integrations, see the [Model Context Protocol documentation](mcp.md). |
0 commit comments