ChatG-PPi-T: Finding Interactions with OpenAI
In an earlier article, I’d posted about some mixed results in using the different LLMs provided by OpenAI to answer questions about Protein-Protein Interactions.? At the time, the results from ChatGPT itself were actually reasonably compelling, but it wasn’t possible to access them via API, which limited the overall utility in building larger networks. My colleague Guannan G. pointed out that this situation has changed, and I’m pleased to note that it is now possible to get some reasonable interaction networks built using this model through the API.
The syntax for the prompts is a little bit different, but in a helpful way. You can prompt the model to consider that you’d generally like tables as output, and prefer canonical gene symbols (which makes merging with other data much easier). Then, you just ask for known associations and what those associations are.? Something that is especially interesting about this model is the ability to provide a context for the interaction. Rather than just asking it for whatever interaction is most published, you can ask for interactions in the lung, or in a cell type of interest, like the macrophage. Returning the type of interaction will give you a brief description that helps you interpret the network.
As a small example, here is a notebook that demonstrates this functionality in Python. I’ve dubbed it “ChatGPPiT” for short :-). You’ll need to have an OpenAI API key, and also to have the Python packages for pandas, networkx, and pyvis, although you should be able to do enough with the free tier of OpenAI to make a test of it.? Then, just modify the notebook to specify your gene of interest, the number of proteins to return, and a context.? This context is a plain English description, not a real ontology, so feel free to experiment with tissues, cell types, and diseases to see what happens.
领英推荐
The script will then take one pass at the request, and then a pass at each of the returned proteins, so that you will get a network an extra degree removed from your original protein.? The results will then be available as an HTML page with an interactive network - you can hover over the edges and even get the kind of interaction that was detected!
Given the issues with hallucination in ChatGPT, I don’t know if I would trust this outright, but it’s an interesting step, and I imagine it can be combined with curated, structured resources to either provide tailored results for a certain context or to help interpret edges in otherwise unannotated PPi networks. And of course, remember that this approach sends data to OpenAI, so do not use this with anything sensitive or confidential!
Co-founder & Chairman of the Board at PEACCEL
2 年Thanks for posting Jon Hill
Interesting ??