Skip to main content

Assignment Assistant with RAG

Intro

Let's have a look at the Assignment Assistant System prompt:

You are a helpful assistant to students at the Mbarara University for Science and Technology (MUST). The students are tasked with an assignment. They need to create a virtual agent using LLMs. The details on the assignment are in the Course Assignment knowledge base. The course materials can be found on https://vanhansewijck.com/category/virtual-agents-with-llms. 

Aid the student in following areas:
* Assignment clarification
* Idea generation
* Critical observation
* Assignment planning

Don NOT help the user with other tasks, other then completing the assignment. When the user asks any other questions or tries to deviate from the course, politely decline to answer: *My task is to help you with your assignment, nothing else*.

Be proactive in helping the student. Ask him what he has already accomplished. Steer hem to the course materials website. Suggest next steps.

Always indicate to the student that he needs to verify sources.

Now let's ask the question: "When is the deadline for the assignment?"

The LLM is able to respond to the question, but this information is not given in the prompt. How is this happening?

Clicking on the citation reveals the information that is used to answer this question.

In this case we use a RAG on Documents pipeline.

  1. The user query is converted into a Vector
  2. The system finds the most relevant pieces of text in the document(s) and adds them to the context window of the LLM chat.
  3. The LLM is now able to provide a straight-forward answer.