File size: 10,359 Bytes
63bcd5a 0a1905d 63bcd5a 8081e10 0c69841 8081e10 0c69841 63bcd5a 809b701 63bcd5a 809b701 63bcd5a 809b701 63bcd5a 809b701 046dbd4 63bcd5a 809b701 046dbd4 809b701 63bcd5a 809b701 63bcd5a 046dbd4 63bcd5a c2a8167 63bcd5a 8463318 63bcd5a b09149c 63bcd5a c2a8167 63bcd5a b09149c 63bcd5a b09149c 63bcd5a 4552666 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 | from typing import Dict, Any, List
def list_to_text(items: List[str], max_items: int = 10) -> str:
if not items:
return "None"
seen = set()
cleaned = []
for item in items[:max_items]:
val = str(item).strip()
if not val:
continue
key = val.lower()
if key not in seen:
seen.add(key)
cleaned.append(val)
return ", ".join(cleaned)
def build_feature_prompt(
context: Dict[str, Any],
count: int = 10,
previous_features: List[str] = None
) -> str:
previous_features = previous_features or []
return f"""
You are a senior software architect and AI systems designer.
TASK:
Generate {count} intelligent and realistic system features
for the following graduation project.
PROJECT TITLE:
{context.get("project_title")}
CURRENT FEATURES:
{list_to_text(context.get("features", []), 15)}
COMMON OVERUSED FEATURES TO AVOID:
{list_to_text(context.get("common_features", []), 15)}
PREVIOUSLY GENERATED FEATURES:
{list_to_text(previous_features, 20)}
PROJECT CONTEXT:
- Originality Score: {context.get("originality_score", 1.0)}
- Context Strength: {context.get("context_strength", 0.0)}
IMPORTANT REQUIREMENTS:
- Generate ONLY additional features.
- Do NOT rewrite or rephrase existing features.
- Do NOT generate semantic variations.
- Each new feature must introduce a new capability.
- Focus on originality expansion.
- Features must belong to ONE coherent system
- Features must solve REAL problems
- Prefer intelligent automation and AI logic
- Focus on implementable engineering features
- Avoid vague or generic functionality
- Avoid simple CRUD/dashboard/login features
- Generate diverse feature types
FEATURE TYPES TO MIX:
- Core system features
- AI/smart features
- Automation features
- Analytics/monitoring features
- Reliability/safety features
- User experience improvements
STRICT RULES:
- One feature per line
- No numbering
- No explanations
- No repeated concepts
- Each feature should be concise
- Each feature should sound like a real product capability
- Prefer 3–10 words per feature
GOOD FEATURE EXAMPLES:
- Real-time gesture recognition
- Predictive patient risk analysis
- AI-assisted diagnosis support
- Emergency response prioritization
- Adaptive learning recommendation engine
BAD FEATURE EXAMPLES:
- Smart dashboard
- AI module
- Login system
- Reports page
- User management
OUTPUT:
""".strip()
def build_niche_domains_prompt(previous_domains: List[str] = None) -> str:
previous_domains = previous_domains or []
prev_text = list_to_text(previous_domains, 20)
return f"""
You are an AI innovation consultant.
Generate 5 highly niche, unusual, and cutting-edge domains for graduation projects.
Avoid standard domains like: AI, Machine Learning, Healthcare, Finance, Education, CyberSecurity, Cloud, E-Commerce, IoT.
PREVIOUSLY SUGGESTED (DO NOT REPEAT THESE):
{prev_text}
Give me just the names of the domains, one per line.
Keep them concise (2-4 words).
Example:
- Quantum Cryptography
- Deep Sea Robotics
- Cognitive Brain-Computer Interfaces
""".strip()
def build_idea_prompt(
context: Dict[str, Any],
count: int = 10,
previous_ideas: List[str] = None
) -> str:
previous_ideas = previous_ideas or []
domain = context.get("domain", "general")
existing_titles = context.get("existing_titles", [])
return f"""
You are a senior AI innovation consultant.
TASK:
Generate {count} HIGHLY ORIGINAL (85% to 99% Originality) and unique graduation project ideas.
The ideas MUST NOT duplicate or be variants of existing database projects or typical student projects.
DOMAIN:
{domain}
EXISTING PROJECTS IN THE DATABASE (DO NOT REPEAT OR DUPLICATE THESE):
{list_to_text(existing_titles, 15)}
PREVIOUS IDEAS SUGGESTED IN THIS SESSION (DO NOT REPEAT THESE):
{list_to_text(previous_ideas, 20)}
IMPORTANT REQUIREMENTS:
- Originality & Feasibility Balance: Ideas must possess HIGH ORIGINALITY, but must be highly feasible and implementable. They should be realistic software or software-hardware projects that undergraduate students can build within 6–9 months.
- Avoid PhD-level, highly theoretical, or "impossible" sci-fi research topics (e.g. do NOT require quantum computing, non-existent sensors, or highly experimental brain-computer interfaces).
- Ideas must solve REAL problems using cutting-edge, yet practical and available technologies (such as standard web/mobile frameworks, existing ML models, APIs, and affordable IoT hardware).
- Avoid generic software projects or standard web/mobile applications that lack intelligence.
- Prefer smart AI integrations (LLMs, Computer Vision, specialized ML models), advanced automation, or intelligent systems.
- Each idea must represent a COMPLETELY DIFFERENT concept.
STRICT RULES:
- No repeated concepts or slight rewording of existing projects.
- Avoid overused ideas like: standard prediction models, generic recommendation engines, basic management dashboards, IoT plant watering, face recognition attendance, or smart traffic lights.
- Push the boundaries of the selected domain to ensure maximum uniqueness without losing feasibility.
FORMAT RULES:
- One idea per line
- No numbering
- No explanations
- Keep each idea concise
- Prefer 4–12 words
GOOD IDEA EXAMPLES:
- AI-powered agricultural crop disease detection via mobile app and offline edge-inference
- Blockchain-secured digital academic certificate issuance and verification portal
- AR-based indoor navigation assistant for visually impaired university students
- Smart waste sorting bin using computer vision and mechanical sorting
- Decentralized federated learning for collaborative medical image classification
BAD IDEA EXAMPLES:
- AI management system
- Smart dashboard platform
- Disease prediction using machine learning
- Recommendation application
OUTPUT:
""".strip()
def build_description_prompt(context: Dict[str, Any]) -> str:
return f"""
You are a senior technical writer and software architect.
TASK:
Write a professional graduation project description.
PROJECT TITLE:
{context.get("project_title")}
FEATURES:
{list_to_text(context.get("features", []), 20)}
REQUIREMENTS:
- Explain the real-world problem
- Explain the proposed solution
- Connect all features logically
- Explain system intelligence and AI usage
- Keep the description realistic and implementable
- Write clearly and professionally
- Avoid unnecessary marketing language
- The description MUST be highly detailed and contain a minimum of 160 words.
STRUCTURE:
1. Problem
2. Solution
3. System capabilities
4. Expected impact
OUTPUT:
Professional structured paragraph
""".strip()
def build_chat_prompt(context: Dict[str, Any]) -> str:
return f"""
You are a senior software architect and graduation project consultant.
PROJECT TITLE:
{context.get("project_title", "None")}
PROJECT DESCRIPTION:
{context.get("description", "None")}
PROJECT FEATURES:
{list_to_text(context.get("features", []), 20)}
TECHNOLOGIES:
{list_to_text(context.get("technologies", []), 20)}
YOUR ROLE:
- Help improve the graduation project
- Suggest technical improvements
- Answer project-related questions
- Keep responses professional and practical
- Focus on software engineering and AI systems
- Avoid unrelated discussions
RULES:
- Be concise
- Be realistic
- Be technically accurate
- Keep all answers related to the current project
- STRICTLY REFUSE to discuss any illegal, inappropriate, explicit (e.g., sexual content), or unethical topics. If the user mentions such topics, reply immediately with a professional warning that you can only discuss academic graduation projects.
""".strip()
def build_full_project_prompt(context):
title = context.get("project_title", "")
features = context.get("features", [])
description = context.get("description", "")
abstract = context.get("abstract", "")
features_text = "\n".join(
f"- {f}"
for f in features
)
return f"""
You are a senior software architect and academic researcher.
Generate a COMPLETE graduation project specification.
====================================================
PROJECT TITLE:
{title}
CURRENT ABSTRACT:
{abstract}
CURRENT DESCRIPTION:
{description}
FEATURES:
{features_text}
====================================================
STRICT RULES:
1. Return ALL sections
2. NEVER skip any section
3. NEVER leave any field empty
4. If information is missing, intelligently generate it
5. Use professional academic style
6. IF CURRENT ABSTRACT or CURRENT DESCRIPTION is provided, you MUST use their core concepts but seamlessly REWRITE and EXPAND them to explicitly include all the new FEATURES. DO NOT just copy them, and DO NOT ignore them. They represent the user's custom baseline intent.
6. Technologies and lists MUST use bullet points
7. Use EXACT section names
8. No explanations outside sections
9. Every section must contain meaningful content
10. OBJECTIVES must contain at least 5 objectives
11. FUTURE_WORK must contain at least 4 items
12. KEYWORDS must contain at least 5 keywords
13. TECHNOLOGIES must contain at least 5 technologies
14. METHODOLOGY must be detailed and multi-step
15. AI_SUMMARY must never be empty
16. The ABSTRACT section MUST be highly detailed and contain a minimum of 130 words.
17. The DESCRIPTION section MUST be highly detailed and contain a minimum of 160 words.
====================================================
CATEGORY:
(short category)
ABSTRACT:
(full academic abstract. CRITICAL RULE: If a CURRENT ABSTRACT was provided above, you MUST base this entirely around that custom text and seamlessly integrate the FEATURES into it. Do not ignore the custom text!)
DESCRIPTION:
(full detailed description. CRITICAL RULE: If a CURRENT DESCRIPTION was provided above, you MUST base this entirely around that custom text and seamlessly integrate the FEATURES into it. Do not ignore the custom text!)
TECHNOLOGIES:
- item
- item
- item
KEYWORDS:
- keyword
- keyword
- keyword
PROBLEM_STATEMENT:
(real-world problem explanation)
PROPOSED_SOLUTION:
(system solution explanation)
OBJECTIVES:
- objective
- objective
- objective
AI_SUMMARY:
(short AI-generated summary)
FUTURE_WORK:
- future enhancement
- future enhancement
METHODOLOGY:
(step-by-step implementation process)
""".strip()
|