can you improve this 
from agents.base_agent import BaseAgent

class QTDPerformanceAgent(BaseAgent):
    prompt_sys = "Quarter-to-date performance analyst for Macy's, focused on summarizing commentary about QTD or May or June performance across sales, comps, and earnings."

    # Reuse the exact formatting enforcement instructions from ConsumerHealthAgent (adapt or extend if needed)
    formatting_directive = """Please strictly follow these formatting guidelines for all numerical mentions and sentence structures:
1. **No Combined Elements**: Always space-separate numbers, words, and units (e.g., "3.3 billion" not "3.3billion").
2. **Time Formatting**: Use formats like "Q2 2024" or specific months like "May" or "June" (never "Q22024" or "2nd quarter").
3. **Number Rules**:  
   - 3.3B → 3.3 billion  
   - 150.2M → 150.2 million  
   - 0.33 → keep exact decimal  
4. **Text Integrity**:  
   - "net income" never "netincome"  
   - "year-over-year" never "YOY" or "yearoveryear"  
   - "YOY" never "year-over-year" or "yearoveryear"  
   - "vs." never "versus" or "vs"  
   - "$XB" never "$X billion"  
   - "$XM" never "$X million"  
5. **Style Prohibition**: Do not italicize or alter text formatting; maintain a single plain format throughout.
6. **Bad Example**: `3.3billioninMay,withsalesup4percent` → REJECTED
7. **ALWAYS Required Format**: `3.3 billion in May, with sales up 4 percent` → ACCEPTED

APPLY THESE RULES TO ALL NUMERICAL MENTIONS AND SENTENCE STRUCTURES."""

    prompt_analyze = (
        "You are a senior business analyst working directly for Macy's CEO. Summarize all commentary related to quarter-to-date performance or specific performance in May or June.\n\n"
        "Be explicit about the type of performance mentioned: sales, comparable sales (comps), or earnings.\n\n"
        "For each relevant mention:\n"
        "- Provide a clear, concise 100-word summary detailing the type of performance and key numerical metrics.\n"
        "- STRICTLY preserve original numerical and textual formatting: maintain exact decimals, spacing, and verbatim terminology without concatenation or rephrasing.\n"
        "- ALWAYS provide exact excerpts of the source text under the heading \"Ground Truth\" as follows:\n"
        "      - Extract unmodified sentences or paragraphs exactly as they appear in the document.\n"
        "      - Format each excerpt as: **Ground Truth:** \"Exact text from the document...\" (Document Name)\n"
        "      - If multiple documents mention the topic, include separate excerpts for each.\n"
        "      - Do NOT paraphrase, summarize, or alter the excerpts in any way; preserve all punctuation and formatting.\n"
        "      - If no mention is found, respond with “N/A”.\n\n"
        "Format each topic as:\n"
        "- Topic Name (e.g., \"QTD Sales Performance\", \"May Earnings Summary\"): Summary [Relevance Score]\n\n"
        "Document Text: " + formatting_directive
    )

    prompt_summary = (
        "You are a senior analyst preparing a summary of all quarter-to-date and monthly (May, June) performance commentary from provided documents.\n\n"
        "1. Aggregate mentions and describe the QTD or monthly sales, comps, and earnings performance.\n\n"
        "2. For each identified performance topic:\n"
        "   * Provide a concise combined summary from all relevant documents.\n"
        "   * Include key numerical data and time references.\n"
        "   * Provide exact source excerpts under the heading \"Ground Truth\" for each document, honoring all original formatting and punctuation.\n"
        "   * If no information is available for a topic, state “N/A.”\n\n"
        "3. Format results with clear headings and maintain strict plain text formatting.\n\n"
        "Documents Analysis Data:\n"
        "{topics_block}\n\n"
        "SUMMARY:\n"
        + formatting_directive
    )

    prompt_detail = (
        "You are preparing a detailed briefing for Macy's CEO on the quarter-to-date or monthly performance topic '{topic}', based on the external documents.\n\n"
        "Provide:\n"
        "1. An overview of the QTD or monthly performance.\n"
        "2. Key quantitative insights and timelines associated with sales, comps, or earnings.\n"
        "3. Detailed analysis of implications for Macy's operations and financial outlook.\n"
        "4. ALWAYS include exact source excerpts under the heading \"Ground Truth\" as follows:\n"
        "      - Exact, unmodified text from each relevant document.\n"
        "      - Format each excerpt as: **Ground Truth:** \"Exact text from the document...\" (Document Name)\n"
        "      - Include separate excerpts for multiple documents.\n"
        "      - Do NOT paraphrase or edit any excerpts; maintain full fidelity.\n"
        "      - If no content exists, state “N/A”.\n\n"
        "Document:\n"
        "{text}\n\n"
        "Topic: {topic}\n\n"
        "Provide a structured briefing with bolded section headings.\n"
        + formatting_directive
    )

    def analyze_document(self, text, custom_prompt=None):
        prompt = custom_prompt if custom_prompt else self.prompt_analyze
        return super().analyze_document(self.prompt_sys, prompt, text)

    def generate_consolidated_summary_from_topics(self, processed_files, custom_prompt=None):
        prompt = custom_prompt if custom_prompt else self.prompt_summary
        return super().generate_consolidated_summary_from_topics(self.prompt_sys, prompt, processed_files)

    def generate_topic_detail(self, text, topic, custom_prompt=None):
        prompt = custom_prompt if custom_prompt else self.prompt_detail
        return super().generate_topic_detail(self.prompt_sys, prompt, text, topic)

the upper was not getting any topic in prompt analyze 

make it like according to below

from agents.base_agent import BaseAgent

class ConsumerHealthAgent(BaseAgent):
    prompt_sys = "Consumer health and macroeconomic analyst for Macy's, tasked with analyzing provided documents regarding consumer financial health and macro environment."

    # Universal formatting enforcement line (adapted and extended where necessary)
    formatting_directive = """Please strictly follow these formatting guidelines for all numerical mentions and sentence structures:
1. **No Combined Elements**: Always space-separate numbers, words, and units (e.g., "3.3 billion" not "3.3billion").
2. **Time Formatting**: Use formats like "Q4 2024" (never "Q42024" or "4th quarter").
3. **Number Rules**:  
   - 3.3B → 3.3 billion  
   - 150.2M → 150.2 million  
   - 0.33 → keep exact decimal  
4. **Text Integrity**:  
   - "net income" never "netincome"  
   - "year-over-year" never "YOY" or "yearoveryear"  
   - "YOY " never "year-over-year" or "yearoveryear"  
   - "vs." never "versus" or "vs"  
   - "$XB" never "$X billion"  
   - "$XM" never "$X million"  
5. **Style Prohibition**: Do not italicize or alter text formatting; maintain a single plain format throughout.
6. **Bad Example**: `3.3billioninQ42024,withanadjustednetincomeof,106million,withadjustedearningsperdilutedshareat0.95` → REJECTED
7. **ALWAYS Required Format**: `3.3 billion in Q4 2024, with an adjusted net income of` → ACCEPTED

APPLY THESE RULES TO ALL NUMERICAL MENTIONS AND SENTENCE STRUCTURES."""
    
    prompt_analyze = (
        "You are a senior business analyst working directly for Macy's CEO. Analyze the provided earnings call transcript and summarize mentions "
        "of consumer financial health and the macroeconomic environment.\n\n"
        "Identify key topics including but not limited to:\n"
        "- US consumer\n"
        "- The company’s customer\n"
        "- Change in demand\n"
        "- Change in spend\n\n"
        "For each topic, provide:\n"
        "- A clear topic name (e.g., \"E-commerce Growth\", \"Supply Chain Digitization\")\n"
        "- Concise 100-word summary providing key numbers and operational impacts\n"
        "- Strictly preserve original numerical and textual formatting: maintain exact decimals (0.33), required spacing (0.11 → '0.11'), and verbatim terminology without concatenation or rephrasing.\n"
        "- For every topic, ALWAYS provide excerpts mentioned under the heading \"Ground Truth\" as follows:\n"
        "      - For each document where the topic appears, extract the exact, unmodified sentence(s) or paragraph(s) from the original document.\n"
        "      - Format each excerpt as: **Ground Truth:** \"Exact text from the document...\" (Document Name)\n"
        "      - If a topic is present in multiple documents, include a separate \"Ground Truth\" excerpt for each document.\n"
        "      - Do NOT paraphrase, summarize, or alter the original text in any way. The excerpt must match the document data exactly, including all formatting, punctuation, and special characters.\n"
        "      - If the LLM cannot find an exact match in the document, do NOT fabricate or modify the excerpt—only include what is present in the documents.\n\n"
        "Format each topic as:\n"
        "- Topic Name: Summary [Relevance Score]\n\n"
        "Example:\n"
        "- Holiday Sales Performance: Q4 comparable sales up 4.2% driven by 18% digital growth [8]\n"
        "- Inventory Optimization: Implementing AI demand forecasting to reduce carrying costs by $150M [7]\n\n"
        "Document Text: " + formatting_directive
    )
    
    prompt_summary = (
        "You are a senior analyst preparing a summary of transcript commentary from all documents provided.\n"
        "Identify and describe all mentions of consumer financial health and the macroeconomic environment in the provided documents, "
        "focusing on what the company says about the US consumer, their customer, a change in demand, or a change in spend. Combine and synthesize topics that appear in multiple documents.\n\n"
        "1. **Overview**: Identify and describe all mentions of consumer financial health and the macroeconomic environment in the provided documents.\n\n"
        "2. For each topic:\n"
        "    * Provide a concise summary by combining information from all relevant documents.\n"
        "    * Include relevant examples, numerical data, or timelines from the documents.\n"
        "    * For every topic, ALWAYS provide each excerpt mentioned under the heading \"Ground Truth\" as follows:\n"
        "        - For each document where the topic appears, extract the exact, unmodified sentence(s) or paragraph(s) from the original document.\n"
        "        - Format each excerpt as: **Ground Truth:** \"Exact text from the document...\" (Document Name)\n"
        "        - If the same topic is present in multiple documents, always include a separate \"Ground Truth\" excerpt for each document with proper line breaks.\n"
        "        - Do NOT paraphrase, summarize, or alter the original text in any way. The excerpt must match the documents data exactly, including all formatting, punctuation, and special characters.\n"
        "        - If the LLM cannot find an exact match in the document, do NOT fabricate or modify the excerpt—only include what is present in the document.\n\n"
        "3. Format with clear sections in plain black text with proper headings:\n"
        "    * Consumer Health Summary\n\n"
        "Use the following Documents Analysis Data to combine similar topics from different documents and provide a comprehensive summary:\n"
        "{topics_block}\n\n"
        "Provide a comprehensive yet concise summary. STRICTLY ENFORCE PLAIN TEXT FORMATTING:\n"
        + formatting_directive
    )
    
    prompt_detail = (
        "You are preparing a detailed briefing for Macy's CEO on the consumer health topic '{topic}', based on the external company document.\n\n"
        "Provide:\n"
        "1. Overview of the topic.\n"
        "2. Key insights and relevant excerpts.\n"
        "3. Important figures, timelines, or operational metrics.\n"
        "4. Detailed analysis of the impact on Macy's consumer health outlook and macroeconomic environment.\n"
        "5. For every topic, ALWAYS provide verbatim source excerpts under the heading \"Ground Truth\" as follows:\n"
        "      - For each document where the topic appears, extract the exact, unmodified sentence(s) or paragraph(s) from the original document.\n"
        "      - Format each excerpt as: **Ground Truth:** \"Exact text from the document...\" (Document Name)\n"
        "      - If a topic is present in multiple documents, include a separate \"Ground Truth\" excerpt for each document.\n"
        "      - Do NOT paraphrase, summarize, or alter the original text in any way. The excerpt must match the source exactly, including all formatting, punctuation, and special characters.\n"
        "      - If the LLM cannot find an exact match in the document, do NOT fabricate or modify the excerpt—only include what is present in the source.\n\n"
        "Document:\n"
        "{text}\n\n"
        "Topic: {topic}\n\n"
        "Please provide a structured briefing with proper paragraphs and bold topics.\n"
        + formatting_directive
    )
    
    def analyze_document(self, text, custom_prompt=None):
        prompt_analyze = custom_prompt if custom_prompt else self.prompt_analyze
        return super().analyze_document(self.prompt_sys, prompt_analyze, text)

    def generate_consolidated_summary_from_topics(self, processed_files, custom_prompt=None):
        prompt_summary = custom_prompt if custom_prompt else self.prompt_summary
        return super().generate_consolidated_summary_from_topics(self.prompt_sys, prompt_summary, processed_files)

    def generate_topic_detail(self, text, topic, custom_prompt=None):
        prompt_detail = custom_prompt if custom_prompt else self.prompt_detail
        return super().generate_topic_detail(self.prompt_sys, prompt_detail, text, topic)