web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Copilot Studio / Prevent AI Code Tutor ...
Copilot Studio
Suggested Answer

Prevent AI Code Tutor Bot from Generating Code

(3) ShareShare
ReportReport
Posted on by
I am a teacher at a community college. I want to design a chat bot that serve as a AI Code Tutor for my students. However, I want to prevent its ability to generate programming solution to homework assignment. 
 
Here're the instruction I gave to the chatbot. But the agent seems to ignore the part about do not generate code. Any idea how to fix this? Thanks!
 
- Provide tips and tricks for completing programming assignments and homework.
- Look over the student's code and identify errors.
- Give feedback on programming style and suggest where to comment the code.
- Point out logical mistakes in the code.
- Provide directions and examples on functions that might be needed for assignments.
- Encourage students to conduct research online.
- Do not generate complete programming answers for students.
- Focus on introductory C programming.
- Do not generate code for the student.
Categories:
I have the same question (0)
  • Suggested answer
    Romain The Low-Code Bearded Bear Profile Picture
    2,447 Super User 2026 Season 1 on at
    hello, i really love what you try to do with copilot studio, 
     
    the ability to generate code came from the "general knowledge" : i suggest you to try to remove it :
     
    Screenshot of the Allow the AI to use its own general knowledge setting.
     
     
    And then go to the "knowledge source" of the agent and target explicitly the website with information OR give directly document you have with your learning lesson.
     
    This way the bot will only know what you tell him :) I think will know how to do a hello world, but for more complexe notion, it will probably have some problem.
     

    Let's us know if it help, it s a very interesting use case :) if it help don't forget to click on "this is the answer" :)
     
  • SG-04021642-0 Profile Picture
    2 on at
     
    Hi, Romain. I have a question related to this. I don't mean to hijack this thread, but I didn't see a way to directly message you :). 
     
    I'm also creating a "tutor agent". It's job is to be a helpful guide to students rather than an answer giver. The knowledge source for the agent is a digital social studies textbook which it accesses directly (meaning I uploaded the file instead of using Sharepoint). 
     
    Here is my issue. I want the Agent to only use the content of the social studies textbook, so I turned off "use general knowledge." When doing that, the agent claims “no information was found that could help answer this” even when that information is present in the textbook.
     
    The Power Platform Community suggested I try a smaller sized file for the Agent's knowledge source since the textbook was 1000 pages. So, I exported a 25 page section of the textbook (specifically about the American Civil War), and asked a question related to that content. The agent again replied, "no information was found that could help answer this," even though that information did exist. 
     
    If I turn on "use general knowledge" the agent is able to respond as expected.
     
    I wondered if perhaps the agent was not accessing the knowledge source and relying on general knowledge, but in both circumstances (when general knowledge is "off" or "on") the agent does access the file.
     
    One other curious thing to note: The agent is designed to ask the student questions about their assignment, and to find out what the student already knows about the topic by asking questions. When "use general knowledge" is on, the agent performs those tasks. When "use general knowledge" is off, the agent does not do those tasks. 
     
    Thanks for any insight you may have!

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Leaderboard > Copilot Studio

#1
Valantis Profile Picture

Valantis 161

#2
Romain The Low-Code Bearded Bear Profile Picture

Romain The Low-Code... 130 Super User 2026 Season 1

#3
Arild Aarnes Profile Picture

Arild Aarnes 61 Super User 2026 Season 1

Last 30 days Overall leaderboard