Spaces:
Sleeping
Sleeping
File size: 26,934 Bytes
7cb4836 | 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 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 | """
Project content for the Dify AI Learning Platform
Real-world projects based on official Dify use cases and documentation
"""
def get_all_projects():
"""Return all available hands-on projects"""
return [
{
'id': 1,
'title': 'AI Customer Service Bot',
'slug': 'ai-customer-service-bot',
'category': 'Customer Support',
'difficulty': 'beginner',
'difficulty_color': 'success',
'estimated_time': 45,
'description': 'Build an intelligent customer service bot that can answer questions from your product documentation and handle common support queries.',
'icon': 'headphones',
'outcomes': [
'A fully functional customer service chatbot',
'Knowledge base integration for product documentation',
'Automated response system for common queries',
'Escalation handling for complex issues'
],
'prerequisites': [
'Completed "Building Your First Chatbot" tutorial',
'Completed "Creating Knowledge Bases with RAG" tutorial',
'Basic understanding of customer service workflows'
]
},
{
'id': 2,
'title': 'AI Travel Consultant',
'slug': 'ai-travel-consultant',
'category': 'Travel & Tourism',
'difficulty': 'intermediate',
'difficulty_color': 'warning',
'estimated_time': 60,
'description': 'Create an AI agent that can plan travel itineraries, suggest accommodations, and find restaurants using external tools and APIs.',
'icon': 'map-pin',
'outcomes': [
'Intelligent travel planning agent',
'Integration with Wikipedia and Google Search',
'Dynamic itinerary generation',
'Hotel and restaurant recommendations with ratings'
],
'prerequisites': [
'Completed "Building AI Agents" tutorial',
'Completed "Tool Integration and APIs" tutorial',
'Understanding of AI agent workflows'
]
},
{
'id': 3,
'title': 'Document Analysis Assistant',
'slug': 'document-analysis-assistant',
'category': 'Document Processing',
'difficulty': 'intermediate',
'difficulty_color': 'warning',
'estimated_time': 55,
'description': 'Build an AI agent that can analyze documents, extract key information, and answer questions about document content.',
'icon': 'file-text',
'outcomes': [
'Document upload and processing system',
'AI-powered content analysis',
'Information extraction capabilities',
'Document Q&A functionality'
],
'prerequisites': [
'Completed "Creating Knowledge Bases with RAG" tutorial',
'Completed "Working with Files and Documents" tutorial',
'Understanding of document processing workflows'
]
},
{
'id': 4,
'title': 'Smart Recipe Generator',
'slug': 'smart-recipe-generator',
'category': 'Food & Lifestyle',
'difficulty': 'beginner',
'difficulty_color': 'success',
'estimated_time': 35,
'description': 'Create an AI agent that generates personalized recipes based on ingredients, dietary preferences, and cooking skills.',
'icon': 'chef-hat',
'outcomes': [
'Personalized recipe generation',
'Ingredient-based recipe suggestions',
'Dietary restriction handling',
'Cooking instruction optimization'
],
'prerequisites': [
'Completed "Building Your First Chatbot" tutorial',
'Basic understanding of conversational AI'
]
},
{
'id': 5,
'title': 'Investment Analysis Copilot',
'slug': 'investment-analysis-copilot',
'category': 'Finance',
'difficulty': 'advanced',
'difficulty_color': 'danger',
'estimated_time': 75,
'description': 'Build a sophisticated AI agent that analyzes stocks, provides market insights, and generates investment recommendations using financial APIs.',
'icon': 'trending-up',
'outcomes': [
'Real-time stock analysis system',
'Market trend analysis and insights',
'Investment recommendation engine',
'Risk assessment and portfolio suggestions'
],
'prerequisites': [
'Completed "Building AI Agents" tutorial',
'Completed "Tool Integration and APIs" tutorial',
'Understanding of financial markets and analysis'
]
},
{
'id': 6,
'title': 'Educational Quiz Bot',
'slug': 'educational-quiz-bot',
'category': 'Education',
'difficulty': 'intermediate',
'difficulty_color': 'warning',
'estimated_time': 40,
'description': 'Develop an interactive AI tutor that creates quizzes, provides explanations, and adapts to student learning patterns.',
'icon': 'graduation-cap',
'outcomes': [
'Adaptive quiz generation system',
'Personalized learning paths',
'Progress tracking and analytics',
'Interactive educational content'
],
'prerequisites': [
'Completed "Building Your First Chatbot" tutorial',
'Completed "Creating Knowledge Bases with RAG" tutorial',
'Understanding of educational workflows'
]
}
]
def get_project_content(slug):
"""Return detailed content for a specific project"""
projects = {
'ai-customer-service-bot': {
'id': 1,
'title': 'AI Customer Service Bot',
'category': 'Customer Support',
'difficulty': 'beginner',
'difficulty_color': 'success',
'estimated_time': 45,
'description': 'Build an intelligent customer service bot that can answer questions from your product documentation and handle common support queries.',
'icon': 'headphones',
'outcomes': [
'A fully functional customer service chatbot',
'Knowledge base integration for product documentation',
'Automated response system for common queries',
'Escalation handling for complex issues'
],
'prerequisites': [
'Completed "Building Your First Chatbot" tutorial',
'Completed "Creating Knowledge Bases with RAG" tutorial',
'Basic understanding of customer service workflows'
],
'overview': '''
<p>Customer service is evolving with AI-powered solutions that can handle routine inquiries 24/7. In this project, you'll build a comprehensive customer service bot that can:</p>
<ul>
<li>Answer questions from your product documentation using RAG</li>
<li>Handle common support queries with pre-trained responses</li>
<li>Escalate complex issues to human agents when needed</li>
<li>Track customer satisfaction and conversation quality</li>
</ul>
<p>This project demonstrates real-world application of AI in customer support, combining knowledge retrieval with intelligent conversation management.</p>
''',
'sections': [
{
'title': 'Setting Up Your Knowledge Base',
'content': '''
<p>Create a comprehensive knowledge base from your product documentation that will power your customer service bot's responses.</p>
''',
'steps': [
{
'title': 'Upload Product Documentation',
'content': '''
Upload your existing product documentation, FAQs, and support materials to Dify. The system will automatically process and chunk this content for optimal retrieval.
**What to Upload:**
- Product manuals and guides
- Frequently asked questions (FAQs)
- Troubleshooting documentation
- Policy documents (returns, warranties, etc.)
- Contact information and escalation procedures
**Best Practices:**
- Use clear, consistent formatting
- Include specific examples and scenarios
- Keep information current and accurate
- Organize content by topic or product line
''',
'tips': [
'Upload documents in PDF, TXT, or DOCX format for best results',
'Break large documents into smaller, focused sections',
'Include keywords customers commonly use'
]
}
]
}
]
},
'ai-travel-consultant': {
'id': 2,
'title': 'AI Travel Consultant',
'category': 'Travel & Tourism',
'difficulty': 'intermediate',
'difficulty_color': 'warning',
'estimated_time': 60,
'description': 'Create an AI agent that can plan travel itineraries, suggest accommodations, and find restaurants using external tools and APIs.',
'icon': 'map-pin',
'outcomes': [
'Intelligent travel planning agent',
'Integration with Wikipedia and Google Search',
'Dynamic itinerary generation',
'Hotel and restaurant recommendations with ratings'
],
'prerequisites': [
'Completed "Building AI Agents" tutorial',
'Completed "Tool Integration and APIs" tutorial',
'Understanding of AI agent workflows'
],
'overview': '''
<p>Travel planning involves researching destinations, finding accommodations, and creating itineraries. In this project, you'll build an AI travel consultant that can:</p>
<ul>
<li>Research destinations and provide detailed information</li>
<li>Plan day-by-day itineraries based on preferences</li>
<li>Find and recommend hotels with ratings and reviews</li>
<li>Suggest restaurants and local attractions</li>
</ul>
<p>This project showcases advanced AI agent capabilities with external tool integration and complex workflow orchestration.</p>
''',
'sections': [
{
'title': 'Configuring External Tools',
'content': '''
<p>Set up Wikipedia and Google Search integrations to provide your travel agent with access to real-time information about destinations, attractions, and travel recommendations.</p>
''',
'steps': [
{
'title': 'Configure Wikipedia Integration',
'content': '''
Add Wikipedia as a tool to your Dify agent to provide detailed information about destinations, landmarks, and cultural sites.
**Configuration Steps:**
1. Go to Tools section in your Dify workspace
2. Add "Wikipedia" from the available tools
3. Configure search parameters for travel-related queries
4. Test with sample destination searches
**Search Optimization:**
- Use specific place names and landmarks
- Include cultural and historical context
- Focus on tourist-relevant information
- Verify information accuracy and recency
''',
'tips': [
'Test Wikipedia searches with various destination formats',
'Combine multiple search terms for comprehensive results',
'Verify information from multiple sources when possible'
]
}
]
}
]
},
'document-analysis-assistant': {
'id': 3,
'title': 'Document Analysis Assistant',
'category': 'Document Processing',
'difficulty': 'intermediate',
'difficulty_color': 'warning',
'estimated_time': 55,
'description': 'Build an AI agent that can analyze documents, extract key information, and answer questions about document content.',
'icon': 'file-text',
'outcomes': [
'Document upload and processing system',
'AI-powered content analysis',
'Information extraction capabilities',
'Document Q&A functionality'
],
'prerequisites': [
'Completed "Creating Knowledge Bases with RAG" tutorial',
'Completed "Working with Files and Documents" tutorial',
'Understanding of document processing workflows'
],
'overview': '''
<p>Document analysis is crucial for businesses dealing with large volumes of text documents. In this project, you'll build an AI assistant that can:</p>
<ul>
<li>Process and analyze various document types</li>
<li>Extract key information and summarize content</li>
<li>Answer specific questions about document content</li>
<li>Identify patterns and insights across multiple documents</li>
</ul>
<p>This project demonstrates advanced document processing capabilities using AI, essential for legal, financial, and research applications.</p>
''',
'sections': [
{
'title': 'Document Processing Setup',
'content': '''
<p>Configure your document processing pipeline to handle various file formats and extract meaningful information from uploaded documents.</p>
''',
'steps': [
{
'title': 'Configure Document Upload',
'content': '''
Set up document upload capabilities in your Dify application to accept and process various file formats including PDFs, Word documents, and text files.
**Supported Formats:**
- PDF documents (.pdf)
- Microsoft Word documents (.docx, .doc)
- Plain text files (.txt)
- Rich text format (.rtf)
- Markdown files (.md)
**Processing Configuration:**
1. Enable file upload in your application settings
2. Set maximum file size limits (recommended: 10MB per file)
3. Configure document chunking for optimal processing
4. Enable OCR for scanned documents if needed
**Quality Optimization:**
- Ensure documents are well-formatted and readable
- Test with sample documents of each supported type
- Monitor processing time and adjust chunk sizes accordingly
''',
'tips': [
'Start with smaller documents to test processing capabilities',
'Use clear, well-structured documents for best results',
'Consider document security and privacy requirements'
]
}
]
}
]
},
'smart-recipe-generator': {
'id': 4,
'title': 'Smart Recipe Generator',
'category': 'Food & Lifestyle',
'difficulty': 'beginner',
'difficulty_color': 'success',
'estimated_time': 35,
'description': 'Create an AI agent that generates personalized recipes based on ingredients, dietary preferences, and cooking skills.',
'icon': 'chef-hat',
'outcomes': [
'Personalized recipe generation',
'Ingredient-based recipe suggestions',
'Dietary restriction handling',
'Cooking instruction optimization'
],
'prerequisites': [
'Completed "Building Your First Chatbot" tutorial',
'Basic understanding of conversational AI'
],
'overview': '''
<p>Cooking inspiration and meal planning can be enhanced with AI assistance. In this project, you'll build a smart recipe generator that can:</p>
<ul>
<li>Generate recipes based on available ingredients</li>
<li>Accommodate dietary restrictions and preferences</li>
<li>Adjust recipes based on cooking skill level</li>
<li>Provide step-by-step cooking instructions</li>
</ul>
<p>This project showcases creative AI applications in daily life, demonstrating how AI can assist with personal tasks and lifestyle decisions.</p>
''',
'sections': [
{
'title': 'Recipe Generation Logic',
'content': '''
<p>Design the core logic for generating personalized recipes based on user preferences, available ingredients, and dietary constraints.</p>
''',
'steps': [
{
'title': 'Create Recipe Prompt Template',
'content': '''
Design a comprehensive prompt template that will guide the AI in generating recipes that meet specific user requirements and preferences.
**Prompt Structure:**
```
You are a professional chef and recipe creator. Generate a recipe based on these requirements:
Ingredients Available: {ingredients}
Dietary Restrictions: {dietary_restrictions}
Cooking Skill Level: {skill_level}
Cuisine Preference: {cuisine_type}
Cooking Time Available: {time_limit}
Please provide:
1. Recipe name and brief description
2. Complete ingredient list with quantities
3. Step-by-step cooking instructions
4. Cooking tips and variations
5. Nutritional highlights
```
**Customization Variables:**
- Available ingredients (user input)
- Dietary restrictions (vegetarian, vegan, gluten-free, etc.)
- Skill level (beginner, intermediate, advanced)
- Cuisine preferences (Italian, Asian, Mexican, etc.)
- Time constraints (15 min, 30 min, 1 hour+)
''',
'tips': [
'Include specific quantity measurements in recipes',
'Provide alternative ingredients for flexibility',
'Add cooking tips for better results'
]
}
]
}
]
},
'investment-analysis-copilot': {
'id': 5,
'title': 'Investment Analysis Copilot',
'category': 'Finance',
'difficulty': 'advanced',
'difficulty_color': 'danger',
'estimated_time': 75,
'description': 'Build a sophisticated AI agent that analyzes stocks, provides market insights, and generates investment recommendations using financial APIs.',
'icon': 'trending-up',
'outcomes': [
'Real-time stock analysis system',
'Market trend analysis and insights',
'Investment recommendation engine',
'Risk assessment and portfolio suggestions'
],
'prerequisites': [
'Completed "Building AI Agents" tutorial',
'Completed "Tool Integration and APIs" tutorial',
'Understanding of financial markets and analysis'
],
'overview': '''
<p>Financial analysis requires processing vast amounts of data and making informed decisions. In this project, you'll build an AI investment copilot that can:</p>
<ul>
<li>Analyze individual stocks with real-time data</li>
<li>Provide comprehensive market trend analysis</li>
<li>Generate investment recommendations based on risk tolerance</li>
<li>Create portfolio suggestions and diversification advice</li>
</ul>
<p>This advanced project demonstrates professional-grade AI applications in finance, including API integration, data analysis, and risk assessment.</p>
''',
'sections': [
{
'title': 'Setting Up Financial Data Integration',
'content': '''
<p>Build connections to financial data sources and configure real-time market analysis capabilities.</p>
''',
'steps': [
{
'title': 'Configure Financial Data APIs',
'content': '''
Set up integration with financial data providers to access real-time stock prices, market data, and financial metrics for comprehensive analysis.
**Recommended Data Sources:**
- Alpha Vantage (free tier available)
- Yahoo Finance API
- Financial Modeling Prep
- IEX Cloud
**Key Data Points to Collect:**
- Current stock price and daily change
- Historical price data (1 year, 5 years)
- Financial ratios (P/E, P/B, ROE, etc.)
- Volume and market capitalization
- Dividend information and yield
- Analyst ratings and price targets
**API Configuration Steps:**
1. Choose your preferred financial data provider
2. Register for API access and obtain API keys
3. Configure API endpoints in Dify tools
4. Test data retrieval with sample stock symbols
5. Set up error handling for API rate limits
**Data Processing Tips:**
- Cache frequently requested data to reduce API calls
- Implement data validation and error handling
- Format financial data for clear presentation
- Consider real-time vs. delayed data requirements
''',
'tips': [
'Start with free API tiers to test functionality',
'Monitor API usage to avoid rate limits',
'Validate all financial data before analysis'
]
}
]
}
]
},
'educational-quiz-bot': {
'id': 6,
'title': 'Educational Quiz Bot',
'slug': 'educational-quiz-bot',
'category': 'Education',
'difficulty': 'intermediate',
'difficulty_color': 'warning',
'estimated_time': 40,
'description': 'Develop an interactive AI tutor that creates quizzes, provides explanations, and adapts to student learning patterns.',
'icon': 'graduation-cap',
'outcomes': [
'Adaptive quiz generation system',
'Personalized learning paths',
'Progress tracking and analytics',
'Interactive educational content'
],
'prerequisites': [
'Completed "Building Your First Chatbot" tutorial',
'Completed "Creating Knowledge Bases with RAG" tutorial',
'Understanding of educational workflows'
],
'overview': '''
<p>Educational technology benefits greatly from AI-powered personalization. In this project, you'll build an educational quiz bot that can:</p>
<ul>
<li>Generate quizzes on various topics and difficulty levels</li>
<li>Provide detailed explanations for answers</li>
<li>Adapt question difficulty based on student performance</li>
<li>Track learning progress and identify knowledge gaps</li>
</ul>
<p>This project demonstrates AI applications in education, showcasing adaptive learning and personalized instruction capabilities.</p>
''',
'sections': [
{
'title': 'Quiz Generation System',
'content': '''
<p>Design an intelligent quiz generation system that creates questions tailored to student learning objectives and performance levels.</p>
''',
'steps': [
{
'title': 'Create Dynamic Quiz Templates',
'content': '''
Develop flexible quiz templates that can generate questions across different subjects, difficulty levels, and question types.
**Question Types to Support:**
- Multiple choice questions
- True/False questions
- Fill-in-the-blank questions
- Short answer questions
- Essay questions (for advanced topics)
**Template Structure:**
```
Generate a {difficulty_level} {question_type} question about {topic}.
Requirements:
- Question should test {learning_objective}
- Include {num_options} answer choices (for multiple choice)
- Provide detailed explanation for correct answer
- Suggest common misconceptions to address
Format:
Question: [Your question here]
A) [Option 1]
B) [Option 2]
C) [Option 3]
D) [Option 4]
Correct Answer: [Letter and explanation]
Common Mistakes: [Address typical errors]
```
**Difficulty Adaptation:**
- Beginner: Basic recall and understanding
- Intermediate: Application and analysis
- Advanced: Synthesis and evaluation
**Learning Objectives:**
- Knowledge retention
- Concept application
- Problem-solving skills
- Critical thinking development
''',
'tips': [
'Include distractors that address common misconceptions',
'Provide detailed explanations for all answer choices',
'Vary question formats to maintain engagement'
]
}
]
}
]
}
}
return projects.get(slug) |