# LLM prompts for various text generation tasks.

[prompts]
file_summary = """
TASK:
Analyze the provided code repository based on the available source code and README description. Your task is to summarize the following:
Purpose: The overall goal and intended function of the codebase as reflected in both the code and README.
Architecture: The structure of the codebase and its key components.
Functionality: What the code achieves and the main algorithms, techniques, or approaches it implements.
Connection to the context: How the repository reflects, supports, or implements the methodology, key ideas, or results described in the accompanying article, inferred from both the code and README.

Ensure your summary is clear, concise, and omits technical implementation details. Focus on high-level insights that help understand the codebase and its role within the broader context.

Generate a JSON response following this exact structure:

{{
    "file_summary": "text"
}}

RULES:

- Avoid phrases like "This file", "The file", or "This code".
- Begin with a verb or noun.
- Do not include quotes, code snippets, bullets, or lists.
- Limit the response to 200-250 words.

INPUT DATA:

1. FILES CONTENT:

{files_content}

2. README CONTENT:

{readme_content}
"""

pdf_summary = """
TASK:
Analyze the given text, which may be a technical report or article. Your task is to extract the following, basing your response solely on the context provided:

Main topic: Identify the central subject of the document.
Key ideas: Highlight the primary concepts or arguments presented.
Methodology: Describe the methods or approaches used.
Working steps: Outline the significant actions or processes involved.
Results: Summarize the outcomes or findings.
Ensure your response is precise, uses concise language, and avoids any additional information not present in the text.

Generate a JSON response following this exact structure:

{{
    "pdf_summary": "text"
}}

RULES:

- Start with a strong, attention-grabbing statement.
- Avoid phrases like "This PDF" or "The document".
- Exclude quotes, code snippets, bullets, or lists.
- Limit the response to 200-250 words.

INPUT DATA:

1. PDF CONTENT: {pdf_content}
"""

overview = """
TASK:
Write a high-level overview capturing the essence, purpose, and objectives of the project. The repository is developed as part of, or in support of, an academic article or research work. Use the provided file summaries, PDF summaries, and README content to identify the project's central idea, its primary goals, and the key problems it addresses.

The overview should:
- Clearly state the project's main purpose and its relevance within the research or application domain.
- Highlight the essential functionalities, workflows, or methodologies implemented in the repository without going into technical implementation details.
- Emphasize how the project contributes to the ideas, findings, or methodology described in the associated article or study.
- Maintain an accessible, non-technical tone suitable for a broad academic or research-oriented audience.

Generate a JSON response following this exact structure:

{{
    "overview": "text"
}}

RULES:

- Begin with a clear, impactful statement capturing the project's essence.
- Avoid phrases like "This project" or "The repository".
- Do not include code snippets, bullet points, or explicit file references.
- Limit the response to 90-140 words.

INPUT DATA:

1. PROJECT NAME: {project_name}

2. FILE SUMMARIES: {files_summary}

3. PDF SUMMARIES: {pdf_summary}

4. README CONTENT:

{readme_content}
"""

content = """
TASK:
Summarize the key components of the project—including datasets, models, utilities, and supporting modules—and explain how they collectively contribute to the overall functionality and objectives.
Use the provided file summaries, PDF summaries, and README content to identify the main parts and their conceptual relationships.

The description should provide readers with a clear, high-level understanding of how the repository is structured and how its parts work together to achieve the project’s purpose.

Generate a JSON response following this exact structure:

{{
    "content": "text"
}}

RULES:

- Focus on each component's role within the overall project.
- Avoid technical implementation details, code references, or file names.
- Use clear, accessible, academic-style language.
- Limit the description to 100-130 words.

INPUT DATA:

1. PROJECT NAME: {project_name}

2. FILE SUMMARIES: {files_summary}

3. PDF SUMMARIES: {pdf_summary}

4. README CONTENT:

{readme_content}
"""

algorithms = """
TASK:
Summarize the main algorithms, computational methods, or analytical techniques implemented in the project.
For each, explain its conceptual role and how it contributes to achieving the project’s objectives.
Use the provided code content, PDF summaries, and README content to identify the core algorithms and describe them in clear, high-level terms.

The description should help readers quickly understand what computational strategies are applied and why they are important within the context of the project or research.

Generate a JSON response following this exact structure:

{{
    "algorithms": "text"
}}

RULES:

- Focus on each algorithm’s conceptual purpose and role within the workflow.
- Avoid technical implementation details, code references, and file names.
- Use clear, academic-oriented, accessible language.
- Limit the description to 100-130 words.

INPUT DATA:

1. PROJECT NAME: {project_name}

2. FILES CONTENT:

{files_content}

3. PDF SUMMARIES: {pdf_summary}

4. README CONTENT:

{readme_content}
"""

article_name_extraction = """
TASK:
From the provided text, extract the most accurate and concise title of the article. Focus on the linguistic and structural cues within the text. The title should capture the essence of the work and be formatted as a single clear phrase.

RULES:

- Rely strictly on the given text.
- Prefer the text’s first strong heading or the phrase that best encapsulates the article’s subject.
- If multiple candidates appear, select the one most formal and general in scope.
- Avoid using section headers like "Introduction", "Abstract", or "Conclusion".
- Do not invent or rephrase — use the exact wording from the text.
- Output must be short and precise, no more than 20 words.
- Do not add explanations or commentary.

Generate a JSON response following this exact structure:

{{
    "article_name": "text"
}}

INPUT DATA:

1. ARTICLE TEXT: {pdf_content}
"""
