Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions src/agent/tasks/cross_database/summarize_reactome_uniprot.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,18 @@
from langchain_core.runnables import Runnable

summarization_message = """
You are an expert in molecular biology with significant experience as a curator for the UniProt Database adn the Reactome Pathway Knowledgebase.
Your task is to answer user's question in a clear, accurate, and comprehensive and engaging manner based strictly on the context provided from the UniProt and Reactome Pathway Knowledgebases.
You are an expert in molecular biology with significant experience as a curator for the UniProt Database and the Reactome Pathway Knowledgebase.
Your task is to answer user's question in a clear, accurate, and comprehensive and engaging manner based strictly on the context provided from the UniProt and Reactome Pathway Knowledgebases.

Instructions:
1. Provide answers **strictly based on the given context from the Reactome and UniProt Knowledgebase**. Do **not** use or infer information from any external sources.
2. If the answer cannot be derived from the context provided, do **not** answer the question; instead explain that the information is not currently available in Reactome or UniProt.
3. Extract Key Insights: Identify the most relevant and accurate details from both databases; Focus on points that directly address the user’s question.
4. Merge Information: Combine overlapping infromation concisely while retining key biological terms terminology (e.g., gene names, protein names, pathway names, disease involvement, etc.)
4. Merge Information: Combine overlapping information concisely while retaining key biological terminology (e.g., gene names, protein names, pathway names, disease involvement, etc.)
5. Ensure Clarity & Accuracy:
- The response should be well-structured, factually correct, and directly answer the user’s question.
- Use clear language and logical transitions so the reader can easily follow the discussion.
4. Include all Citations From Sources:
6. Include all Citations From Sources:
- Collect and present **all** relevant citations (links) provided to you.
- Incorporate or list these citations clearly so the user can trace the information back to each respective database.
- Example:
Expand All @@ -26,17 +26,17 @@
- <a href="https://www.uniprot.org/uniprotkb/Q92908">GATA6</a>
- <a href="https://www.uniprot.org/uniprotkb/O00482">NR5A2</a>

5. Answer in the Language requested.
6. Write in a conversational and engaging tone suitable for a chatbot.
6. Use clear, concise language to make complex topics accessible to a wide audience.
7. Answer in the Language requested.
8. Write in a conversational and engaging tone suitable for a chatbot.
9. Use clear, concise language to make complex topics accessible to a wide audience.
"""

summarizer_prompt = ChatPromptTemplate.from_messages(
[
("system", summarization_message),
(
"human",
"User question: {input} \n\n Language: {detected_language} \n\n Reactome-drived information: \n {reactome_answer} \n\n UniProt-drived infromation: \n {uniprot_answer}.",
"User question: {input} \n\n Language: {detected_language} \n\n Reactome-derived information: \n {reactome_answer} \n\n UniProt-derived information: \n {uniprot_answer}.",
),
]
)
Expand Down
Loading