From 7cbd7cdc036c2d777b86db1e54f7588a33bac8e7 Mon Sep 17 00:00:00 2001 From: Adam Wright Date: Fri, 4 Sep 2026 21:44:20 +0000 Subject: [PATCH] Fix typos and the broken numbering in the summarizer prompt Reported by @bhavyakeerthi3 in #157, verified against current main: adn -> and infromation -> information (twice; once in the system prompt, once in the human message template) retining -> retaining drived -> derived (twice, in "Reactome-drived" and "UniProt-drived") Also "key biological terms terminology" -> "key biological terminology", and a doubled space. The instruction list numbered 1,2,3,4,5 then 4 again, then 5,6,6 -- so three of nine items shared a number with an earlier one. Renumbered 1-9. This is prompt text the model reads, and a list that contradicts itself about its own ordering is not a good instruction to follow. Checked the rest of src/ for the same misspellings; there are none. This is the Cross-Database Prototype profile, which config_default.yml does not enable, so no user sees these today. Co-Authored-By: Claude Opus 5 --- .../cross_database/summarize_reactome_uniprot.py | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/agent/tasks/cross_database/summarize_reactome_uniprot.py b/src/agent/tasks/cross_database/summarize_reactome_uniprot.py index 8ea1746..9ceb935 100644 --- a/src/agent/tasks/cross_database/summarize_reactome_uniprot.py +++ b/src/agent/tasks/cross_database/summarize_reactome_uniprot.py @@ -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: @@ -26,9 +26,9 @@ - GATA6 - NR5A2 - 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( @@ -36,7 +36,7 @@ ("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}.", ), ] )