Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
|
@@ -329,38 +329,32 @@ if research_button and topic:
|
|
| 329 |
])
|
| 330 |
|
| 331 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 332 |
prompt = f"""
|
| 333 |
You are an expert research assistant.
|
| 334 |
|
| 335 |
-
Your
|
| 336 |
-
|
| 337 |
-
1. **Chronological Mapping**:
|
| 338 |
-
- Begin by outlining the timeline of major ideas, technologies, or findings based on the sources provided.
|
| 339 |
-
- Highlight what research or approaches have come **before** in the field.
|
| 340 |
-
- This will serve as the foundational timeline to understand the evolution of work in this domain.
|
| 341 |
-
|
| 342 |
-
2. **Gap Identification**:
|
| 343 |
-
- Based on the timeline above, identify gaps or underexplored areas in current research.
|
| 344 |
-
- Gaps may be due to limited datasets, outdated methods, lack of real-world validation, missing cross-disciplinary approaches, etc.
|
| 345 |
|
| 346 |
-
|
| 347 |
-
|
| 348 |
-
|
|
|
|
|
|
|
| 349 |
|
| 350 |
-
|
| 351 |
-
|
| 352 |
-
- It should summarize the current state of research (based on sources), highlight the research gap, and introduce your proposed research direction.
|
| 353 |
|
| 354 |
-
|
| 355 |
-
|
| 356 |
-
---
|
| 357 |
-
|
| 358 |
-
π **Sources to Analyze**:
|
| 359 |
{combined_text}
|
| 360 |
|
| 361 |
-
π
|
| 362 |
-
{chr(10).join(citations)}
|
| 363 |
-
|
| 364 |
|
| 365 |
st.subheader(f"π {report_type} on '{topic}'")
|
| 366 |
output_placeholder = st.empty()
|
|
|
|
| 329 |
])
|
| 330 |
|
| 331 |
|
| 332 |
+
length_instruction = {
|
| 333 |
+
"Summary": "Keep it short and focused, ideally under 300 words. Use bullet points or clear paragraph breaks to emphasize key points.",
|
| 334 |
+
"Detailed Report": "Provide a well-rounded analysis of the topic in about 500β700 words. Include the research history, identified gaps, and a proposed idea.",
|
| 335 |
+
"Thorough Academic Research": "Write a comprehensive academic-style report. It should include background, detailed timeline, analysis, research gaps, proposed solution, and potential methodologies. Use a formal tone and aim for 1000+ words if needed."
|
| 336 |
+
}[report_type]
|
| 337 |
+
|
| 338 |
prompt = f"""
|
| 339 |
You are an expert research assistant.
|
| 340 |
|
| 341 |
+
Your task is to write a {report_type.lower()} in a {tone.lower()} tone.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 342 |
|
| 343 |
+
π Use the following structure:
|
| 344 |
+
1. **Chronological Mapping**: Start by outlining the research progress over time using the provided sources.
|
| 345 |
+
2. **Gap Identification**: Highlight what hasn't been explored or optimized.
|
| 346 |
+
3. **Novel Contribution**: Propose a new direction or idea that builds on the gaps.
|
| 347 |
+
4. **Formatted Report**: Structure the response cleanly with subheadings.
|
| 348 |
|
| 349 |
+
βοΈ Writing Instruction:
|
| 350 |
+
{length_instruction}
|
|
|
|
| 351 |
|
| 352 |
+
π Sources:
|
|
|
|
|
|
|
|
|
|
|
|
|
| 353 |
{combined_text}
|
| 354 |
|
| 355 |
+
π APA Citations:
|
| 356 |
+
{chr(10).join(citations)}"""
|
| 357 |
+
|
| 358 |
|
| 359 |
st.subheader(f"π {report_type} on '{topic}'")
|
| 360 |
output_placeholder = st.empty()
|