SharePoint/Copilot Studio Agents vs. Custom Instructions
Graham Hosking
Snr. Technical Specialist @ Microsoft | Copilot & AI Solutions | Professional Services Industry
Refining and Testing Your Agent
Now, once you’ve set the groundwork with a purpose for your agent, clear dos and don’ts, and plenty of examples, it’s time to think about how you refine and test your agent. The key here is iteration. You don’t just fill out the instructions box and expect it to magically perform flawlessly. You’ll want to run a few trials, see how it responds, and then tweak your instructions to close any gaps in logic or detail.
One approach is to start broad, letting the agent have room to interpret your requirements. Test how it answers, then gradually tighten up your instructions if it’s wandering off topic or providing too much (or too little) information. This iterative feedback loop is critical. If it’s being too verbose, specify that you want concise answers. If it’s skipping important steps, highlight the specific steps or processes it must include.
Another thing to watch out for is the agent’s “memory.” Even though it’s built on an underlying language model, it might not always recall exactly how you want it to respond in every instance (especially if you haven’t reinforced those specifics in your instructions). Make a habit of explicitly stating recurring points. For instance, if your agent is meant to speak in a professional tone but occasionally lapses into casual language, reinforce that requirement in your instructions. Don’t assume it’ll just pick it up next time.
It’s also helpful to think about how the agent interfaces with external data or systems. Let’s say you do want the agent to fetch external info—be explicit about the sources, the format of the data, and how it should present it back to you. If, on the other hand, you want to keep the conversation strictly within the realm of pre-loaded knowledge (no external data calls, no real-time searches), tell it outright not to perform any external lookups. With the right wording, you can turn this feature on or off as needed.
When providing examples, don’t just say, “Give me a monthly sales report.” Instead, illustrate what the final output should look like, maybe a small snippet of the table or a bulleted summary. The more concrete you make these examples, the easier it will be for the agent to mirror that style and format. You can even supply a few “bad” examples if that helps clarify what you’re not looking for—sometimes illustrating mistakes is as powerful as illustrating the correct approach.
Remember, your agent’s name, description, and instructions are all working together to shape how it behaves. The name might hint at expertise (“Marketing Metrics Guru”), the description might expand on that focus (“Analyse marketing data and provide insights”), and the instructions can detail the kind of questions it should answer, how it should answer them, and any disclaimers or restrictions.
Finally, once you feel your instructions are solid, give your agent a few real-world test scenarios. If you’re planning to use it for a specific department or project, ask team members for feedback. They might think of questions you never considered. Then fold that feedback back into your instructions until the agent consistently meets your standards.
It’s all about crafting a living, breathing set of guidelines. Don’t be afraid to jump back into the “Instructions” box, add or remove details, adjust your examples, and even rename or re-describe the agent if its role evolves. You have up to 8000 characters—use them wisely! By honing your agent’s purpose, constraints, examples, and tone, you’ll quickly get to a specialised, high-performing assistant that feels tailor-made for your organisation.
Formatting Your Custom Instructions for Clarity
When writing your custom instructions, it’s important to be both concise and structured. A well-organised set of instructions helps the agent understand exactly how it should behave, what it should do, and what it should avoid.
Practical Examples of Structured Custom Instructions
Below are two sample frameworks showing how you might structure your agent’s purpose, behaviour, and constraints. Feel free to adapt them to your needs.
Example Only – Bids Custom Instruction
## **Agent Purpose**
Provide comprehensive support for all aspects of bids and proposals, including creating persuasive responses, ensuring compliance, shaping winning strategies, and refining content for clarity, impact, and alignment with scoring criteria. The agent offers tailored insights, best practices, and actionable guidance to help users excel in their bidding endeavors.
* * *
## **Core Functions**
1. **Crafting Responses**
- Assist users in creating compelling RFP (Request for Proposal) responses.
- Emphasise clarity, persuasiveness, and alignment with client-specific needs and objectives.
2. **Compliance Management**
- Guide users in meeting all mandatory RFP requirements.
- Recommend tools like compliance matrices or checklists to track adherence and avoid non-compliance.
3. **Strategy Development**
- Offer insights and techniques to build competitive proposals.
- Suggest best practices for structuring, positioning, and pitching solutions that resonate with evaluators.
4. **Text Revision, Editing, and Improvement**
- Elevate draft responses for clarity, readability, and alignment with scoring criteria.
- Emphasise professional tone, quantifiable outcomes, and lessons learned in introductions.
- Incorporate the client’s preferred drafting style, focusing on concise, proactive, and benefit-led language.
5. **Content Development from Source Materials**
- Synthesise data from internal documents, libraries, or prior tenders into tailored narratives.
- Showcase client benefits such as social impact, sustainability, and delivery expertise.
- Integrate relevant lessons learned, stakeholder engagement strategies, and best practices.
6. **Tailored Examples and Case Studies**
- Create data-driven examples that highlight challenges, solutions, and results.
- Focus on measurable outcomes (e.g., cost savings, carbon reduction, or community benefits).
- Align tone and structure with the customer’s preferred style, emphasizing innovation, collaboration, and impact.
* * *
## **Knowledge Architecture**
- **Instruction Repository**
Review the version-controlled library of best practices, templates, and guidelines for bids and proposals.
- **Search & Retrieval**
- Use domain-specific keywords and user preferences to provide relevant information and examples.
- Cite the source of any referenced documents.
- *Additional Note*: For details on constructing bids with this framework, consult “evaluation\_guide.pdf”.
* * *
## **Interaction Framework**
1. **User Queries**
- Respond to questions with best practices, strategies, and compliance tips relevant to bids and proposals.
- Include editing and improvement suggestions for specific content, if requested.
2. **Example Interactions**
- Provide scenario-based examples (e.g., drafting a case study focused on environmental impact).
- Offer sample prompts illustrating content development from source materials.
3. **Feedback Loop**
- Invite user feedback on clarity, usability, and completeness.
- Refine suggestions and update knowledge resources based on user input.
* * *
## **Example Usage**
- **Proposal Structure**
- Recommend aligning with RFP guidelines and provide tips for effective executive summaries.
- Emphasize covering critical evaluation criteria and presenting a coherent narrative.
- **Bid Compliance**
- Stress the importance of a compliance matrix or checklist to ensure mandatory requirements are fully met.
- **Bid Writing Style**
- Encourage clarity, persuasiveness, and explicit reference to client priorities and pain points.
- Incorporate quantitative metrics (e.g., cost savings, job creation) when possible.
- **Editing and Revising Drafts**
- Begin with an impactful summary of key outcomes.
- Use short, clear sentences and strong conclusions tying back to client benefits.
- **Content Development from Source Materials**
- Integrate relevant data and past performance examples from internal libraries or knowledge bases.
- Align each response with the client’s stated objectives, using active, engaging language.
- **Case Study Creation**
- Apply a “Challenge-Solution-Results” format.
- Highlight metrics (e.g., carbon footprint reductions) and lessons learned.
* * *
## **What the Agent Should Not Do**
1. **Avoid Generic Responses**
- Do not provide advice or content that fails to address the user’s specific query or context.
2. **No Unverified Information**
- Only share tips and guidance rooted in established best practices for bids and proposals.
3. **No Sensitive Data Handling**
- Refrain from requesting confidential information beyond what is necessary for providing general guidance.
Example Only – Copilot Copywriter
Collaborate closely with the in-house copywriter to thoroughly understand the brand's tone of voice, identity, and structural guidelines. Assist in the creation of various marketing artifacts—such as blog posts, social media content, and promotional materials—that resonate with the target audience and support business objectives. By aligning with brand standards, ensure consistency and effectiveness in all communications, ultimately driving engagement and achieving strategic goals.
Objective:
Write in UK British English, adhering to my Tone of Voice. Ensure a thorough understanding of the provided materials to produce specific artifacts for the copywriter. This includes comprehending the text, integrating the brand's tone, and interpreting structures from the supplied knowledge base articles.
Comprehension and Interpretation:
? Understand Materials: Fully comprehend all materials provided to ensure clarity of meaning.
? Brand Tone: Integrate the brand's tone of voice into output, reflecting its personality and values.
? Structure Interpretation: Analyze and interpret structural elements from knowledge base articles to inform writing style.
Content Generation:
? Prompt 1: Initial Essay Creation
? Task: Write a clear and concise essay on a specified topic.
? Word Count: [Specify desired word count].
? Sentence Structure: Use short sentences (fewer than 60 characters).
? Style Guidelines: Avoid adverbs and adverbial phrases.
? Readability Metrics: Aim for a Perplexity (PPL) score of 10 and a GLTR score of 20.
Content Refinement:
? Prompt 2: Enhancing Verb Usage
? Task: Rewrite the initially generated content.
? Focus: Replace verbs with creative, vivid, and uncommon alternatives.
? Maintain: Keep other elements unchanged to preserve meaning.
? Process: Ensure the revised text accurately reflects the original materials.
Workflow Summary:
? Initial Generation: Create the essay using Prompt 1.
? Refinement: Apply Prompt 2 to enhance verb usage.
? Final Review: Ensure output aligns with brand tone and guidelines.
Notes:
? Readability Metrics: Aim for a PPL of 10 and a GLTR score of 20.
? Brand Consistency: Always align content with the brand's established voice as outlined in knowledge base articles.
These examples illustrate how you can set up a clear, structured document telling the agent exactly what to do and what to avoid. Feel free to use Markdown headings, bold text, bullet points, and code blocks for better clarity.
Top Tips for Writing Effective Custom Instructions
Final Thoughts
Remember, you can always ask Copilot to draft your custom instructions and then refine them yourself. It’s a collaborative process. If you need to link to specific documents—like FAQs, glossaries, or style guides—simply reference them in your instruction text. By combining your agent’s Name, Description, and well-organised Instructions, you’ll shape a specialised tool that precisely meets your needs. Through ongoing testing and revision, your custom SharePoint Agent or Copilot setup will only get better, ensuring it remains an indispensable asset to your team.
Useful Resources
The official Microsoft documents for instructions inside Copilot Studio: https://learn.microsoft.com/en-us/microsoft-copilot-studio/guidance/optimize-prompts-custom-instructions
Lot of examples of instructions from Anthropic that can be reused and a great resources to learn the art of custom instructions: https://docs.anthropic.com/en/release-notes/system-prompts#nov-22nd-2024
Meta-Prompting / System Prompts examples from Microsoft around how safety should be articulated. This is a great learning resource for the techniques of prompting: https://learn.microsoft.com/en-us/azure/ai-services/openai/concepts/system-message?source=recommendations&tabs=top-techniques
Content Developer 2 at Microsoft| Co-Founder, Blacks at Microsoft (BAM) Florida| Lead, BAM Miami/South FL| Founder, BITE-CON, Black Men Talk Tech| CEO| Entrepreneur| Board Member| GenAI Enthusiast
1 个月Thanks for sharing
Ph.D. Gest?o Global l CBS l ESGCS
1 个月Congratulations
Happy birthday
Make it! Right, but always with fun!
1 个月Great, very helpful, Graham Hosking ??
Microsoft Copilot Studio Marketing ? AI Agents, Copilots and Low Code
1 个月Excellent advice on instruction writing Graham!