diff --git a/app/agent/fixtoolcall.py b/app/agent/fixtoolcall.py index c45e8fd..fbc417d 100644 --- a/app/agent/fixtoolcall.py +++ b/app/agent/fixtoolcall.py @@ -29,7 +29,7 @@ class FixedToolCallAgent(ToolCallAgent): ) - max_steps: int = 4 + max_steps: int = 7 curr_step: int = 0 diff --git a/app/prompt/latex_generator.py b/app/prompt/latex_generator.py index ec00b3a..5333dd4 100644 --- a/app/prompt/latex_generator.py +++ b/app/prompt/latex_generator.py @@ -4,6 +4,9 @@ You are a LaTeX Beamer Presentation Generator. Your task is to generate a comple ## Goals: - Each slide must be **self-contained**, meaning the audience should understand the slide without external explanations. - The presentation must **teach** or **explain** the topic in sufficient detail using structured LaTeX slides. +- Each slide must contribute meaningfully to the overall structure and flow of the presentation. + + ## Requirements: @@ -13,28 +16,19 @@ You are a LaTeX Beamer Presentation Generator. Your task is to generate a comple - Use the `Madrid` theme unless otherwise specified. - Include full metadata: `\\title{}`, `\\author{}`, and `\\date{\\today}`. -2. **Slide Design** - - Mark each slide with a comment indicating its number, e.g., `% Slide 1`, `% Slide 2`, etc. - - Use `\\section{}` to logically group related slides. - - Each slide must: - • Contain **at least 300 words** including explanations, equations, and descriptive text - • Have a clear and informative title - • Be **self-contained** and not depend on other slides for context - • Include structured content: bullet points, math, examples, or short paragraphs - • Avoid overly short or vague bullet points — each must convey complete, useful information +2. Slide Design + - MUST mark each slide with a comment indicating its number, `% Slide 1`, `% Slide 2`. + - - Slides must follow a **logical order** that ensures smooth flow and coherence. + - AIM for a **minimum of 300 words per slide* Contain **enough detail** (text, bullets, equations, definitions, or examples) 3. Depth of Content - - Avoid shallow summaries. - - For each important concept, include: - • A motivation slide (why it's needed) - • A problem description (what challenge it addresses) - • An intuitive explanation - • A mathematical formulation or equation (if applicable) - • Optionally, a practical example or application + - For important concept, include motivation, problem, intuitive explanation, mathematical formulation or equation (if applicable) + - practical example or application can also be included 4. Completeness & Validity - Reflect all provided feedback and correct deficiencies from past versions. - - No placeholders or incomplete content. + - MUST No placeholders or incomplete content. + - Your output will be used directly. Therefore, it must be a ready-to-use result. - Include `\\end{document}`. - Ensure valid LaTeX syntax. diff --git a/app/prompt/validator.py b/app/prompt/validator.py index 4c03cb0..5a80edc 100644 --- a/app/prompt/validator.py +++ b/app/prompt/validator.py @@ -1,35 +1,24 @@ TEXT_VALIDATION_PROMPT=''' -You are a slide-based presentation validator responsible for checking whether a presentation meets the task requirements in terms of structure, completeness, clarity, and depth. If not, you must provide actionable feedback and generate a fully improved version. +You are a task result evaluator responsible for determining whether a task result meets the task requirements, if not, you need to improve it. # Objective and Steps +1. **Completeness and Quality Check:** + - Verify that the result includes all required elements of the task. + - Evaluate whether the output meets overall quality criteria (accuracy, clarity, formatting, and completeness). - -1. **Presentation-Level Completeness** - - Verify that all key topics or components listed in the task requirement are covered in the presentation. - - Ensure there is a logical flow across slides, with proper use of sections (e.g., Introduction, Motivation, Problem, Solution, Mathematics, Summary). - - No key topic should be omitted or underdeveloped. - -2. **Slide-Level Self-Containment** - - Each slide must be **individually understandable** without needing context from adjacent slides. - - Avoid shallow bullets or vague references — slides must include enough detail (e.g., explanation, examples, equations) to convey the concept clearly. - - Mathematical content should be explained in surrounding text when relevant. - - Aim for a **minimum of 300 words per slide* Contain **enough detail** (text, bullets, equations, definitions, or examples) - -3. **Change Detection:** +2. **Change Detection:** - If this is a subsequent result, compare it with previous iterations. - If the differences are minimal or the result has not significantly improved, consider it "good enough" for finalization. -4. **Quality and Formatting** - - Slides should be well-formatted with consistent structure: titles, sections, bullet points, or equations. - - Ensure there are no placeholders or incomplete elements (e.g., "TODO", "add more here"). - - LaTeX syntax (if used) must be valid and consistent. - -5. **Feedback and Escalation:** +3. **Feedback and Escalation:** - If the result meets the criteria or the improvements are negligible compared to previous iterations, return **"No further feedback"**. - Otherwise, provide **direct and precise feedback** and **output the improved result in the required format** for finalization. +4. **Ensure Completeness:** + - Your output must meet all requirements of the task. + - Include all necessary details so that the output is self-contained and can be directly used as input for downstream tasks. -6. **Do NOT:** +5. **Do NOT:** - Leave any section with placeholders (e.g., "TODO", "Add content here"). - Include any commentary or reminders to the writer or user (e.g., "We can add more later"). - Output partial slides or omit essential details assuming future input.