|
| 1 | +import { Navbar } from "@/components/layout/navbar" |
| 2 | +import { Card, CardHeader, CardTitle, CardDescription, CardContent } from "@/components/ui/card" |
| 3 | + |
| 4 | +export default function BestPracticesPage() { |
| 5 | + const practices = [ |
| 6 | + { |
| 7 | + title: "Be Specific with Context", |
| 8 | + description: "Provide clear, relevant information", |
| 9 | + content: "Always include only the most relevant context for each interaction. Avoid dumping entire codebases or documents. Instead, carefully select the specific sections that matter for the task at hand.", |
| 10 | + }, |
| 11 | + { |
| 12 | + title: "Structure Your Prompts", |
| 13 | + description: "Use consistent formatting patterns", |
| 14 | + content: "Organize your prompts with clear sections: role definition, context, task description, output format, and constraints. This helps AI models parse and respond to your requests more effectively.", |
| 15 | + }, |
| 16 | + { |
| 17 | + title: "Iterate and Refine", |
| 18 | + description: "Continuously improve your templates", |
| 19 | + content: "Treat your prompts as living documents. Collect feedback, analyze results, and refine your templates over time. Small adjustments can lead to significant improvements in output quality.", |
| 20 | + }, |
| 21 | + { |
| 22 | + title: "Use Examples Wisely", |
| 23 | + description: "Demonstrate desired outputs", |
| 24 | + content: "Include 2-3 high-quality examples in your prompts to show the AI exactly what you expect. This few-shot approach dramatically improves consistency and accuracy.", |
| 25 | + }, |
| 26 | + { |
| 27 | + title: "Manage Token Budgets", |
| 28 | + description: "Optimize context window usage", |
| 29 | + content: "Be mindful of token limits. Prioritize the most important information, use summarization for lengthy content, and leverage ODIN's chunking features to maximize the value of every token.", |
| 30 | + }, |
| 31 | + { |
| 32 | + title: "Version Your Prompts", |
| 33 | + description: "Track changes over time", |
| 34 | + content: "Use version control for your prompt templates just like code. This allows you to track what works, roll back changes, and collaborate effectively with your team.", |
| 35 | + }, |
| 36 | + { |
| 37 | + title: "Test Across Scenarios", |
| 38 | + description: "Validate with diverse inputs", |
| 39 | + content: "Test your prompts with various edge cases and input types. What works for one scenario may fail for another. Build a test suite for your critical prompts.", |
| 40 | + }, |
| 41 | + { |
| 42 | + title: "Document Your Patterns", |
| 43 | + description: "Share knowledge across your team", |
| 44 | + content: "Create a library of proven prompt patterns and share them with your team. Document what works, what doesn't, and why. This accelerates learning and ensures consistency.", |
| 45 | + }, |
| 46 | + ] |
| 47 | + |
| 48 | + return ( |
| 49 | + <> |
| 50 | + <Navbar /> |
| 51 | + <main className="min-h-screen pt-24 pb-16"> |
| 52 | + <div className="container mx-auto px-4 max-w-4xl"> |
| 53 | + <h1 className="text-4xl font-bold mb-4">Best Practices</h1> |
| 54 | + <p className="text-xl text-muted-foreground mb-12"> |
| 55 | + Proven strategies for effective context engineering and prompt design. |
| 56 | + </p> |
| 57 | + |
| 58 | + <div className="space-y-6"> |
| 59 | + {practices.map((practice, index) => ( |
| 60 | + <Card key={index}> |
| 61 | + <CardHeader> |
| 62 | + <div className="flex items-center gap-3"> |
| 63 | + <span className="flex items-center justify-center w-8 h-8 rounded-full bg-cyan-500/10 text-cyan-400 text-sm font-bold"> |
| 64 | + {index + 1} |
| 65 | + </span> |
| 66 | + <div> |
| 67 | + <CardTitle>{practice.title}</CardTitle> |
| 68 | + <CardDescription>{practice.description}</CardDescription> |
| 69 | + </div> |
| 70 | + </div> |
| 71 | + </CardHeader> |
| 72 | + <CardContent> |
| 73 | + <p className="text-muted-foreground">{practice.content}</p> |
| 74 | + </CardContent> |
| 75 | + </Card> |
| 76 | + ))} |
| 77 | + </div> |
| 78 | + </div> |
| 79 | + </main> |
| 80 | + </> |
| 81 | + ) |
| 82 | +} |
0 commit comments