DigitalOcean GenAI Platform lets you build GPU-powered AI agents with fully-managed deployment. Agents can use pre-built or custom foundation models, incorporate function and agent routes, and implement RAG pipelines with knowledge bases.
Effective prompts guide your agent to accurate, relevant responses by ensuring specificity, context, and intent, similar to asking well-structured questions to a support team.
When testing your agent, well-designed prompts identify training gaps, refine responses, and improve accuracy and consistency, enhancing the user experience.
When writing prompts for your agent, maintain a neutral tone and avoid sarcasm or figurative language. Sarcasm or figurative language may confuse the agent, leading to literal but unhelpful responses. A neutral tone ensures concise, balanced, and unbiased answers.
Maintain neutrality by:
Prefer | Avoid |
---|---|
Summarize the key points of the generative AI article accurately. |
Can you summarize the main points of this article about generative AI? |
When asking your agent questions, make them explicit, concise, and tailored to your needs. Avoid vague or broad phrasing to ensure accurate and actionable responses.
Ask intentional questions by:
Prefer | Avoid |
---|---|
Explain how I can improve the accuracy of my model, specifically through hyperparameter tuning? |
Can you explain how I can improve the accuracy of my model? |
When writing prompts, ask one question at a time and avoid combining multiple questions in a single prompt.
Compound questions can confuse the agent, leading to incomplete or skipped answers. Simple, focused prompts ensure direct and relevant responses.
Prefer | Avoid |
---|---|
What is RAG?" After receiving the answer, follow up with, “How is RAG useful? |
Can you explain what RAG is, and also tell me how it is useful? |
If your prompt is complex, divide it into smaller questions to guide your agent effectively toward the desired answer.
Separating complex prompts ensures specific, accurate, and complete responses while avoiding vague or partial answers. It also helps address each part of your query systematically.
Separate complex prompts by:
Prefer | Avoid |
---|---|
|
How do I create, train, and evaluate a model for text generation? |
When writing prompts, add examples or screenshots if the question alone might confuse the agent.
Examples or screenshots provide context, clarify your query, and help the agent understand the situation or desired outcome.
Use examples or screenshots to improve prompts by:
Prefer | Avoid |
---|---|
I tried running a Python script (see the attached screenshot), but I keep getting a ‘TypeError: unsupported operand type(s)’. Could you help identify the cause of this error? |
I tried running a Python script, but I keep getting a type error. |